Re: Strange behivor when our document-based Cocoa application launch on lion

2011-12-11 Thread Dong Feng
I think Qiang's problem has nothing to do with the Lion's new asynchronous opening mechanism. Qiang's problem is about whether or not "openDocumentWithContentsOfURL..." is invoked or not, regardless synch or asynched version. In 10.6, it is not invoked and in Lion it is invoked (and happen to be th

Re: Why does my app suddenly return nil for the version string?

2011-12-11 Thread G S
Turns out there's an Xcode bug behind this. Hard to imagine, I know. We don't use build numbers; just version numbers. I noticed that the target summary's Version field was blank, but the Build field wasn't. Swapping those states led Xcode to inexplicably remove the version from the plist entire

Why does my app suddenly return nil for the version string?

2011-12-11 Thread G S
Hi all. My app just started crashing on launch, and I traced it to this call returning nil: NSString* versionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]; Anyone know why this would suddenly start happening? Looking in the app's plist, there

Re: Image Browser View Delete Item

2011-12-11 Thread koko
ARGGGH …. disregard …. the answer is in the data source protocol … On Dec 11, 2011, at 6:00 PM, koko wrote: > How does one get informed that an item is being deleted in an > IKImageBrowserView? (i.e. item(s) were selected and the delete key was > pressed) > > I see nothing in the delegate prot

Image Browser View Delete Item

2011-12-11 Thread koko
How does one get informed that an item is being deleted in an IKImageBrowserView? (i.e. item(s) were selected and the delete key was pressed) I see nothing in the delegate protocol nor the browser its,m protocol. Am I brain dead? -koko___ Cocoa-dev m

Question regarding Core Data, parent/child contexts, and private/main queues?

2011-12-11 Thread Michael Crawford
I'm using a parent context on a private queue and a child (main) context on the main queue. I do everything in the UI with the child context and save the results as the view disappears. I had a bug where the first time I ran the app, I was able to add objects and save them in the child context

Re: why does this method return an id?

2011-12-11 Thread Fritz Anderson
On 11 Dec 2011, at 1:53 PM, Ken Thomases wrote: >> NSAtrributedString * attrString = [NSAttributedString string]; >> >> is not merely useful, but legal without a downcast. > > And, indeed, you did not make it self-consistent. The above code snippet is > neither useful nor legal. NSAttributed

Re: why does this method return an id?

2011-12-11 Thread Ken Thomases
On Dec 11, 2011, at 12:37 PM, Fritz Anderson wrote: > Stream of consciousness answer; I don't have time to make it self-consistent. > With the return type defined as id, the declaration > > NSAtrributedString * attrString = [NSAttributedString string]; > > is not merely useful, but legal with

Re: NSComboBoxCell pop-up list showing

2011-12-11 Thread Ivan C Myrvold
Thank you for your suggestion, but I'm afraid the delegate methods and the corresponding notifications only applies for NSComboBox, and not NSComboBoxCell. Ivan Den 11. des. 2011 kl. 13:11 skrev Conrad Shultz: > Take a look at the methods declared by the NSComboBoxDelegate protocol. > > (Sent

Re: why does this method return an id?

2011-12-11 Thread Charles Srstka
On Dec 11, 2011, at 12:51 PM, Kyle Sluder wrote: > On Sun, Dec 11, 2011 at 10:41 AM, Ben Kennedy wrote: >> On 11 Dec 2011, at 8:58 am, Matt Neuburg wrote: >> >>> Now, I think I know why [NSString string] is declared as returning an id - >>> it's because it's a class cluster, >> >> Despite this

Re: why does this method return an id?

2011-12-11 Thread Charles Srstka
On Dec 11, 2011, at 12:39 PM, Ben Kennedy wrote: > On 11 Dec 2011, at 10:34 am, Charles Srstka wrote: > >> Most likely it’s to accommodate subclasses. If it weren’t declared to return >> an id, then doing something like this: >> >> MyFancySortDescriptorSubclass *sortDescriptor = >> [MyFancySor

Re: why does this method return an id?

2011-12-11 Thread Kyle Sluder
On Sun, Dec 11, 2011 at 10:41 AM, Ben Kennedy wrote: > On 11 Dec 2011, at 8:58 am, Matt Neuburg wrote: > >> Now, I think I know why [NSString string] is declared as returning an id - >> it's because it's a class cluster, > > Despite this however, why then don't the cluster classes implement a pro

Re: why does this method return an id?

2011-12-11 Thread Ben Kennedy
On 11 Dec 2011, at 8:58 am, Matt Neuburg wrote: > Now, I think I know why [NSString string] is declared as returning an id - > it's because it's a class cluster, Despite this however, why then don't the cluster classes implement a protocol (e.g. one named NSString), and then NSString can return

Re: why does this method return an id?

2011-12-11 Thread Fritz Anderson
Stream of consciousness answer; I don't have time to make it self-consistent. On 11 Dec 2011, at 10:58 AM, Matt Neuburg wrote: > Now, I think I know why [NSString string] is declared as returning an id - > it's because it's a class cluster, right? It occurs to me that if ClassA defines +classAW

Re: why does this method return an id?

2011-12-11 Thread Charles Srstka
On Dec 11, 2011, at 10:58 AM, Matt Neuburg wrote: > There seems to be a small hole in my understanding of Objective-C. I sort of > understand why alloc-init returns an id, but why do so many class method > convenience instantiators also return an id? For example: > > [NSSortDescriptor sortDescr

Re: Best way to manage double-clicked files?

2011-12-11 Thread julius
On 11 Dec 2011, at 00:51, C.W. Betts wrote: >> > I want it so that when I double-click a file in Finder, a window pops up and > lets me select an option, then the window goes away. I'm wondering if > NSDocument is the best way to do this, or if another method would be better > suited. I w

Re: NSComboBoxCell pop-up list showing

2011-12-11 Thread Conrad Shultz
Take a look at the methods declared by the NSComboBoxDelegate protocol. (Sent from my iPad.) -- Conrad Shultz On Dec 11, 2011, at 4:01, Ivan C Myrvold wrote: > I could not find any method for NSComboBoxCell to find out if the user has > clicked the combo arrow to show the pop-up list. How ca

NSComboBoxCell pop-up list showing

2011-12-11 Thread Ivan C Myrvold
I could not find any method for NSComboBoxCell to find out if the user has clicked the combo arrow to show the pop-up list. How can I do that?___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comment

Re: How to initiate drag&drop for a filename outside of NSView mouseDown

2011-12-11 Thread Vojtěch Meluzín
No you don't understand me, it will be called with mouse down, it's just there is some internal cross-platform event management system and I think it could be called outside mouseDown. Vojtech Dne 11. prosince 2011 1:44 Kyle Sluder napsal(a): > 2011/12/10 Vojtěch Meluzín : > >> > >> I need to i