Re: Accessing window in document applications
Re: Accessing window in document applications
- Subject: Re: Accessing window in document applications
- From: Thomas Lachand-Robert <email@hidden>
- Date: Sat, 4 May 2002 13:40:26 +0200
Le samedi 4 mai 2002, ` 08:55 , Lucas Haley a icrit :
Heya --
I would like to programmatically set the maxWidth and minWidth of a
document window. I foolishly assumed I could use the predefined
"window" outlet, but when I call "[window setMaxSize: newSize];" from
the document controller, I get an "undeclared" error.
Is there a simple way of getting access to the window from the
document controller?
Use [[self window] setMaxSize:newSize]. That's the puprpose of "getter"
methods.
Don't use outlets, especially whose you didn't declare yourself. This is
unsafe.
For instance, in the case of controllers, [self window] will return the
window but BEFORE will check that the window is actually loaded (and load
it if necessary).
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.