Re: [iPhone] Data protection clarification needed.

2010-08-03 Thread Sandro Noël
Graham thank you ! On 2010-08-03, at 1:46 AM, Graham Lee wrote: > On 2 Aug 2010, at 18:37, Sandro Noël wrote: > >>> I suppose it might depend on what data you're talking about. If it's >>> application configuration data, then it definitely should be backed up via >>> the usual methods. If it

Re: NSPanel, changing the look of the min button

2010-08-03 Thread Uli Kusterer
Am 03.08.2010 um 00:31 schrieb Tony Romano: > Changing the argument to the correct flag gets me the button, however, > setting the style doesn't have any effect. I moved the code to > initWithContentRect: post the call to super, still no change. I introspected > the view with F-Script and it h

Numpad (keypad, numericpad) shortcuts binding to NSMenuItem

2010-08-03 Thread Yuriy Shevyrov
Hi everyone, Does exist any way to bind Numpad keys to menu items separately of main digits? For example that Cmd+1 and Cmd+Numpad_1 would be different commands. The method NSMenuItem setKeyEquivalent allows to specify only usual characters, (possible with Shift). Different methods like set

Re: iOS 4: CGImageCreateWithImageProvider

2010-08-03 Thread Fritz Anderson
On 3 Aug 2010, at 1:54 AM, Gerriet M. Denkmann wrote: > When I run the Apple Sample Code "CurrentAddress" on my iPhone (4.0.1) I > always get: > Tue Aug 3 13:50:52 da CurAddress[679] : > CGImageCreateWithImageProvider: invalid image size: 0 x 0. I hate "me too"s, but I've seen this a lot in my

Re: iOS 4: CGImageCreateWithImageProvider

2010-08-03 Thread David Duncan
On Aug 2, 2010, at 11:54 PM, Gerriet M. Denkmann wrote: > When I run the Apple Sample Code "CurrentAddress" on my iPhone (4.0.1) I > always get: > Tue Aug 3 13:50:52 da CurAddress[679] : > CGImageCreateWithImageProvider: invalid image size: 0 x 0. > > What does this mean? It means exactly wha

[Q] Enter Key & HIG

2010-08-03 Thread Eric Gorr
The HIG states: - Enter Most applications add information to a document as soon as the user enters it. In some cases, however, the application may need to wait until a whole collection of information is available before processing it. The Enter key tells the application that the user has fi

iOS: UITableViewCell an textlabel?

2010-08-03 Thread sebi
Hello, In my project (iPad) I use a UITableViewCell subclass. The problem is, that the built in textLabel doesn't show the text. Here is some test code: -(void)setText:(NSString*)text { CGRect r; r.origin.x = 30; r.origin.y = 5; r.size.width = self.bounds.size.wid

Re: Search Kit memory management

2010-08-03 Thread Michael Tsai
On Aug 1, 2010, at 2:26 PM, Michael Thon wrote: > I decided to spend more time on Search Kit first, to see if I can get it to > do what I want. As far as I know it is the basis of Spotlight, so I didn't > think I would have problem indexing large numbers of files. You'd think so, but I, too,

Re: iOS 4: CGImageCreateWithImageProvider

2010-08-03 Thread Mark Ritchie
On 3/Aug/2010, at 7:36 AM, Fritz Anderson wrote: > I've asked about this many times, and searched Google and the developer fora. > I've combed my code and haven't seen any defects — and as I recall, the log > occurs outside application code, so single-stepping doesn't help Silly question I know

Re: NSURLConnection - data comes in after completion

2010-08-03 Thread Michael Ash
On Mon, Aug 2, 2010 at 1:20 PM, Fritz Anderson wrote: > On 2 Aug 2010, at 11:50 AM, David Duncan wrote: > >> On Aug 2, 2010, at 9:40 AM, Fritz Anderson wrote: >> >>> The didReceiveData: callback asserts that the data accumulator exists. In >>> certain circumstances (it seems to be with four of th

GKPeerPickerController: can't connect from the simulator?

2010-08-03 Thread Laurent Daudelin
I'm experimenting with the GKPeerPickerController and I have the GKTank sample built and running on my iPhone. I'm running the simulator on my MacBook Pro with Bluetooth on. When I show the picker, it just says "Looking for other iPhones or iPod touches…" and never sees my iPhone which also disp

Re: GKPeerPickerController: can't connect from the simulator?

2010-08-03 Thread banane
Right, you can't do that from the simulator, you have to do it from a device. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists

Re: GKPeerPickerController: can't connect from the simulator?

2010-08-03 Thread banane
If you want another sample, we have a working GK simple networking app up- at http://code.google.com/p/ipad-gk-2010-dice/ We also used the tank demo, but simplified it quite a bit. Anna On Tue, Aug 3, 2010 at 12:17 PM, banane wrote: > Right, you can't do that from the simulator, you have to do

Re: GKPeerPickerController: can't connect from the simulator?

2010-08-03 Thread Laurent Daudelin
Thanks, Anna. That's a bummer a bit but I have an iPad and an iPhone so I guess I can manage. That's probably why in my first try, I wanted to reuse the SessionManager from the GKRocket sample and even though I could see other parties, I couldn't connect. I pulled my hair until I gave up and dec

Using NSNotificationCenter passing an object or value?

2010-08-03 Thread Eric E. Dolecki
I am trying to pass along a custom UIButton's tag down to another class I am writing. In my custom view which contains the custom UIButton, I have this code *(A): * -(void) buttonClicked:(id)sender { [[NSNotificationCenter defaultCenter] postNotificationName:@"ButtonClicked" object:sender];

Re: Using NSNotificationCenter passing an object or value?

2010-08-03 Thread Quincey Morris
On Aug 3, 2010, at 12:34, Eric E. Dolecki wrote: > -(void) buttonClicked:(id)sender > { > [[NSNotificationCenter defaultCenter] > postNotificationName:@"ButtonClicked" > object:sender]; > > > In a class which manages these custom views, I have this code *(B):* > > > - (id)initWithFrame:(CG

override hyperlink handler for WebView

2010-08-03 Thread Wayne Shao
Hi, I'd like to present some HTML content in WebView. The HTML content is from a local file, with references to some local images and a few hyperlinks. However, I want to override the click of all hyperlinks in the page so that I open it within my application. When the user clicks on a hyperli

Need help understanding first responder and multiple nibs

2010-08-03 Thread Jason Bruce
Greetings, I've set up a test project in order to understand how first responder works across multiple nibs in a document-based application. In my application, MyDocument has a window with a text field and a single button on it which, when clicked, loads a second nib file which has only a wind

Initialize a GKSession from a view running with presentModalViewController:animated:?

2010-08-03 Thread Laurent Daudelin
Like the title says, are there any limitation to the GKSession operations if the peers discovery part is run from a view which was put with 'presentModalViewController:animated:'? For example, can I create a session with 'initWithSessionID:displayName:sessionMode:' without any problem from a vi

Re: Using NSNotificationCenter passing an object or value?

2010-08-03 Thread Eric E. Dolecki
WHen you say it takes an NSNotification object as a parameter, you mean to say that it's missing, correct? On Tue, Aug 3, 2010 at 3:46 PM, Quincey Morris wrote: > On Aug 3, 2010, at 12:34, Eric E. Dolecki wrote: > > > -(void) buttonClicked:(id)sender > > { > > [[NSNotificationCenter defaultC

Re: GKPeerPickerController: can't connect from the simulator?

2010-08-03 Thread banane
I'll check out SessionManager, thanks! We got this project going at iPadDevCamp. There were about 5 GK teams, and we were all struggling with the callbacks. Now, the documentation seems obvious, but at the time it was frustrating. I also have a blog post about it: http://www.banane.com/2010/04/22/

Re: Using NSNotificationCenter passing an object or value?

2010-08-03 Thread Quincey Morris
On Aug 3, 2010, at 13:00, Eric E. Dolecki wrote: > WHen you say it takes an NSNotification object as a parameter, you mean to > say that it's missing, correct? Yes, as in: - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { mydata = [[NSArray alloc] init];

Re: Need help understanding first responder and multiple nibs

2010-08-03 Thread Quincey Morris
On Aug 3, 2010, at 12:10, Jason Bruce wrote: > I've set up a test project in order to understand how first responder works > across multiple nibs in a document-based application. In my application, > MyDocument has a window with a text field and a single button on it which, > when > clicked,

CoreData warning: File.children -- to-many relationship does not have an inverse:

2010-08-03 Thread Ignacio Enriquez
Hi, I am having some trouble modeling my data. I would like to implement the following: User can create files and folders (they don't have to be real folders/files). Folders can contain files or other folders Files have: title, summary and 8 children Each child also has a title and a summary and c

Threading and Event Queue Question

2010-08-03 Thread Phil Hystad
I am not an experienced programmer in Cocoa -- I have only dabbled. But, I have a question with regard to how event queue (terminology may not be correct) is done differently then a windows platform. As an example, I noticed that each separate Tab of a Chrome browser instance is itself a separ

Re: Using NSNotificationCenter passing an object or value?

2010-08-03 Thread eric dolecki GMail
Many thanks. I didn't know object could be nil yet still pass it along when populated On Aug 3, 2010, at 4:15 PM, Quincey Morris wrote: > On Aug 3, 2010, at 13:00, Eric E. Dolecki wrote: > >> WHen you say it takes an NSNotification object as a parameter, you mean to >> say that it's missing

Re: NSPanel, changing the look of the min button

2010-08-03 Thread Tony Romano
Thanks Uli, couldn't see the forest through the trees! This is how I implemented it and it seems to work quite well. - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCrea

Re: Threading and Event Queue Question

2010-08-03 Thread Kyle Sluder
On Tue, Aug 3, 2010 at 1:40 PM, Phil Hystad wrote: > As an example, I noticed that each separate Tab of a Chrome browser instance > is itself a separate process.  Yet, each separate tab of Safari seems to be > folded into the single Safari process.  I have also noted that tabs in Safari > are t

Re: Threading and Event Queue Question

2010-08-03 Thread Nick Zitzmann
On Aug 3, 2010, at 2:40 PM, Phil Hystad wrote: > I am not an experienced programmer in Cocoa -- I have only dabbled. But, I > have a question with regard to how event queue (terminology may not be > correct) is done differently then a windows platform. I think you meant "run loop" here. > As

Re: CoreData warning: File.children -- to-many relationship does not have an inverse:

2010-08-03 Thread Quincey Morris
On Aug 3, 2010, at 13:37, Ignacio Enriquez wrote: > User can create files and folders (they don't have to be real folders/files). > Folders can contain files or other folders > Files have: > title, > summary and > 8 children > Each child also has a title and a summary and could have 8 children >

Re: override hyperlink handler for WebView

2010-08-03 Thread John Joyce
This is not a Cocoa question. What you are describing is simply a (local) web application. This can all be done via JavaScript, CSS, HTML and something like PHP/Perl/Python/Ruby. On Aug 3, 2010, at 12:17 AM, Wayne Shao wrote: > Hi, > > I'd like to present some HTML content in WebView. > > The

Re: Using NSNotificationCenter passing an object or value?

2010-08-03 Thread Quincey Morris
On Aug 3, 2010, at 13:50, eric dolecki GMail wrote: > Many thanks. I didn't know object could be nil yet still pass it along when > populated I *knew* you were going to say exactly that. :) Specifying nil for the 'object:' parameter just means (and I quote from the NSNotificationCenter referen

Re: Threading and Event Queue Question

2010-08-03 Thread Phil Hystad
You asked "Why does this matter? What are you trying to accomplish?" The matter part is that I am just curious and I am not trying to accomplish or do anything. The question came up when I noticed the different behavior of tabbed windows on browser differences and I asked a question of a guy a

Re: NSOpenSavePanelDelegate mounting all drives of a server

2010-08-03 Thread Lyndsey Ferguson
I've filed bug 8268701 On Mon, Aug 2, 2010 at 1:52 PM, Lyndsey Ferguson wrote: > > Hello Everyone, > > I'm looking into a problem that appears when I use a > NSOpenSavePanelDelegate to filter files from the NSOpenPanel dialog on > Mac OS X 10.6.4. > > The problem is that when the user clicks on o

Re: override hyperlink handler for WebView

2010-08-03 Thread Wayne Shao
No. This is not a web app. My app is a multimedia processong and publishing tool. It is in cocoa. I use web view only for easy rendering of a group of objects in my app. so even though I have a local html file, with links to the image or video objects, I need to open the obj in my own panel for e

Need help understanding first responder and multiple nibs

2010-08-03 Thread Jason Bruce
Thanks Quincey, Passing in a reference to the document did the trick. But I'm still confused as to why the 2d Nib isn't in the responder chain. The docs say that the responder chain would start at the key window; proceed to the main window; and then thru MyDocument, NSApplication, etc. Wou

Re: Need help understanding first responder and multiple nibs

2010-08-03 Thread Quincey Morris
On Aug 3, 2010, at 15:45, Jason Bruce wrote: > Passing in a reference to the document did the trick. But I'm still confused > as > to why the 2d Nib isn't in the responder chain. As I said before, nibs aren't in the responder chain. Anyway, your problem was that the *document* wasn't in the r

Re: Need help understanding first responder and multiple nibs

2010-08-03 Thread Jason Bruce
After thinking about this for awhile, it's all starting to make sense. In order to place associate an nswindowcontroller with a document, you just have to call addwindowController after you create the additional nswindowcontroller. This will place the secondary nib file in the document's resp

Re: Need help understanding first responder and multiple nibs

2010-08-03 Thread Kyle Sluder
On Tue, Aug 3, 2010 at 4:50 PM, Jason Bruce wrote: > After thinking about this for awhile, it's all starting to make sense.  In > order > to place associate an nswindowcontroller with a document, you just have to > call > addwindowController after you create the additional nswindowcontroller.  T

Re: Need help understanding first responder and multiple nibs

2010-08-03 Thread Jason Bruce
Hi Kyle, We are in agreement that the piece I was missing was the call to addWindowController. I was perhaps a bit sloppy when I said that the nib file was in the responder chain versus the nswindowcontroller. But my whole point was to understand how the responder chain works in a document-ba

Re: Need help understanding first responder and multiple nibs

2010-08-03 Thread Kyle Sluder
On Tue, Aug 3, 2010 at 5:25 PM, Jason Bruce wrote: > Hi Kyle, > > We are in agreement that the piece I was missing was the call to > addWindowController.  I was perhaps a bit sloppy when I said that the nib file > was in the responder chain versus the nswindowcontroller.  But my whole point > was

Re: override hyperlink handler for WebView

2010-08-03 Thread Roland King
Have you looked at the WebPolicyDelegate methods? That has one which allows you to decide on policy for a navigation action, like a click. Wayne Shao wrote: No. This is not a web app. My app is a multimedia processong and publishing tool. It is in cocoa. I use web view only for easy rendering o

Need help understanding first responder and multiple nibs

2010-08-03 Thread Jason Bruce
Hi Quincy, I have an IkImageBrowserView bound to an NSArrayController in MyDocument. The IKImageBrowserView displays images and pdf's. In my secondary nib file, I have an NSPredicateEditor which I'd like to use to filter the images and pdfs displayed in my IkImageBrowswerView. I've done it

Re: Need help understanding first responder and multiple nibs

2010-08-03 Thread Quincey Morris
On Aug 3, 2010, at 18:18, Jason Bruce wrote: > I have an IkImageBrowserView bound to an NSArrayController in MyDocument. > The > IKImageBrowserView displays images and pdf's. In my secondary nib file, I > have > an NSPredicateEditor which I'd like to use to filter the images and pdfs > disp

Re: Using NSNotificationCenter passing an object or value?

2010-08-03 Thread Graham Cox
On 04/08/2010, at 5:34 AM, Eric E. Dolecki wrote: > -(void) buttonClicked:(id)sender > { > [[NSNotificationCenter defaultCenter] > postNotificationName:@"ButtonClicked" > object:sender]; > Notwithstanding Quincey's excellent advice, this approach is poor use of MVC. The Button is a view.

How to delete read only files in LaunchAgent folder

2010-08-03 Thread Lance Kwan
Im currently creating a prototype that will delete plist files in LaunchAgent folder. Ive used NSFileManager removeItemAtPath:error: method but unable to delete since i do not have permission. How will i delete the read only file programatically? __

Re: iOS: UITableViewCell an textlabel?

2010-08-03 Thread Bill Garrison
Sebastian, If you doing a UITableViewCell subclass, you'll have issues using the built-in textLabel property if you want it to be positioned somewhere other than the locations provided by the built-in styles. Your best bet is to add your own UILabel to the subclass' contentView. @interface MyT

Re: Using NSNotificationCenter passing an object or value?

2010-08-03 Thread Eric E. Dolecki
You're right... mydata is indeed in a view. I have a subclassed UIView to serve as my "component ui" - and it creates instances of subclassed UIViews (containers) which in turn contain subclassed UIButton items. Since I was being quickly lazy in prototyping, I didn't include a view controller for

Re: How to delete read only files in LaunchAgent folder

2010-08-03 Thread Nick Zitzmann
On Aug 3, 2010, at 7:39 PM, Lance Kwan wrote: > Im currently creating a prototype that will delete plist files in LaunchAgent > folder. > > Ive used NSFileManager removeItemAtPath:error: method but unable to delete > since > i do not have permission. > > How will i delete the read only file

Re: Re: CoreData warning: File.children -- to-many relationship does not have an inverse:

2010-08-03 Thread Ignacio Enriquez
Thanks Quincey for you quick reply! I still have some questions >> User can create files and folders (they don't have to be real folders/files). >> Folders can contain files or other folders >> Files have: >> title, >> summary and >> 8 children >> Each child also has a title and a summary and coul