Re: Nib loading cycle

2011-07-09 Thread Dale Miller
On July 7, Manfred Schwind wrote:On OS X all objects of the nib including the file's owner get an awakeFromNib. I don't think I ever found the doc for that, either, but I did learn the hard way. I was instantiating a NIB multiple times with InstantiateNibWithOwner:topLevelObjects, but I

Re: Nib loading cycle

2011-07-09 Thread Quincey Morris
On Jul 8, 2011, at 23:06, Dale Miller wrote: On July 7, Manfred Schwind wrote:On OS X all objects of the nib including the file's owner get an awakeFromNib. I don't think I ever found the doc for that, either, but I did learn the hard way. I was instantiating a NIB multiple times with

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-07 Thread Manfred Schwind
On Mac OS X, all top-level objects get an -awakeFromNib. On iOS, top-level objects do not get -awakeFromNib. Uh? This was news to me and I immediately tested this. My tests show: - On OS X all objects of the nib including the file's owner get an awakeFromNib. - On iOS also all objects of the

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-07 Thread vincent habchi
Le 7 juil. 2011 à 11:43, Manfred Schwind li...@mani.de a écrit : - On OS X all objects of the nib including the file's owner get an awakeFromNib. - On iOS also all objects of the nib (including top-level objects!) but NOT the file's owner get an awakeFromNib. BTW, I can't find this

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-07 Thread Roland King
it's documented in The NIB Object Life Cycle, a page you should have bookmarked!! It sends an awakeFromNib message to the appropriate objects in the nib file that define the matching selector: In Mac OS X, this message is sent to any interface objects that define the method. It is also sent to

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-07 Thread Kyle Sluder
On Jul 7, 2011, at 2:43 AM, Manfred Schwind li...@mani.de wrote: On Mac OS X, all top-level objects get an -awakeFromNib. On iOS, top-level objects do not get -awakeFromNib. Uh? This was news to me and I immediately tested this. My tests show: - On OS X all objects of the nib including

NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-06 Thread Vincent Habchi
Re-hi, implementing Alexander's idea, I wrote this code to load Nibs ending with Connector: - (void)fetchAndInitializeConnectors { // Search all NIB files ending with connector and load them for (NSString * path in [[NSBundle mainBundle] pathsForResourcesOfType:@nib

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-06 Thread Ken Thomases
On Jul 6, 2011, at 9:08 AM, Vincent Habchi wrote: implementing Alexander's idea, I wrote this code to load Nibs ending with Connector: - (void)fetchAndInitializeConnectors { // Search all NIB files ending with connector and load them for (NSString * path in [[NSBundle

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-06 Thread Kyle Sluder
On Wed, Jul 6, 2011 at 7:08 AM, Vincent Habchi vi...@macports.org wrote: However, I end up in a cycle, whereby the call to [NSBundle loadNibNamed:name owner:self] generates a (unexpected) callback to -awakeFromNib. How come? Is this normal behavior? This is normal behavior on Mac OS X. It is

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-06 Thread Vincent Habchi
Le 6 juil. 2011 à 17:09, Kyle Sluder a écrit : On Wed, Jul 6, 2011 at 7:08 AM, Vincent Habchi vi...@macports.org wrote: However, I end up in a cycle, whereby the call to [NSBundle loadNibNamed:name owner:self] generates a (unexpected) callback to -awakeFromNib. How come? Is this normal