🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1476

Re: loadNibSection return value

#1476
From: Ali Ozer
Date: Wed, 14 Oct 1992 18:17
28 lines
1449 bytes
In article <1992Oct12.135220.27053@monu6.cc.monash.edu.au> Robert D. Nicholson writes:
>aozer@next.com (Ali Ozer) writes:
>>In article <BvrGB9.15x@oceania.com> chris@oceania.com writes:
>>>The method:
>>>window = [NXApp loadNibSection:"NibFile.nib" owner:self];
>>>currently returns a window pointer to one of the windows in the nib section.
>>This method is not documented to return a window, so don't rely on it. 
>>Use outlets.
>What does it return since, all *_main.m files use the return value in a if 
>statement.  So I guess in this case its checking if the file was found on
>disk I guess????

Oops, I guess I should've said what it does return. The return value does
indicate success of the load operation (nil on failure, non-nil on success); 
so you can write code like

- showInfo:sender
{
    if (!infoPanel) {
	if (![self loadNibSection:"Info.nib" owner:self withNames:NO]) {
	    NXLogError ("Couldn't find Info.nib");
	}	
    }
    [infoPanel makeKeyAndOrderFront:sender];
    return self;
}

Ali, Ali_Ozer@NeXT.com
Technical Details
Message-ID: <5426@rosie.NeXT.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!aozer
References: <BvrGB9.15x@oceania.com> <5378@rosie.NeXT.COM> <1992Oct12.135220.27053@monu6.cc.monash.edu.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!aozer
From: aozer@next.com (Ali Ozer)
Newsgroups: comp.sys.next.programmer
Subject: Re: loadNibSection return value
Message-ID: <5426@rosie.NeXT.COM>
Date: 14 Oct 92 18:17:07 GMT
References: <BvrGB9.15x@oceania.com> <5378@rosie.NeXT.COM> <1992Oct12.135220.27053@monu6.cc.monash.edu.au>
Sender: news@NeXT.COM
Organization: Next Computer, Inc.
Lines: 29