Re: NSComboBox problem in 10.6.2
Re: NSComboBox problem in 10.6.2
- Subject: Re: NSComboBox problem in 10.6.2
- From: "H. Miersch" <email@hidden>
- Date: Fri, 19 Mar 2010 19:21:48 +0000
just had another surprise: i inserted NSLogs into the method that initializes the array and into -numberOfItemsInComboBox, trying to see the contents of my array and find out why -numberOfItemsInComboBox returns zero. the surprise was that -numberOfItemsInComboBox is called BEFORE the method that initializes the array. then i commented the line that sends -selectItemAtIndex to the combobox, and the combobox worked normally.
now the question is, why is -numberOfItemsInComboBox called first when the first call in awakeFromNib is to the initialisation method? weird...
-awakeFromNib {
init array;
[combobox selectItemAtIndex:0]; // if this line is turned into a comment, it works normally.
[combobox2 selectItemAtIndex:2];
[combobox3 selectItemAtIndex:0];
register for notifications from combobox;
}
not exactly objective-c, but i think you get the idea._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden