• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing window in document applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Accessing window in document applications (From: Lucas Haley <email@hidden>)

  • Prev by Date: Re: Retain, then autorelease and then release does what?
  • Next by Date: Re: Retain, then autorelease and then release does what?
  • Previous by thread: Accessing window in document applications
  • Next by thread: Re: Accessing window in document applications
  • Index(es):
    • Date
    • Thread