Re: NSView setVisible: method -- NOT
Re: NSView setVisible: method -- NOT
- Subject: Re: NSView setVisible: method -- NOT
- From: Jeffrey Mattox <email@hidden>
- Date: Mon, 31 Mar 2003 12:01:35 -0600
In Cocoa, then, if I have a view that has been made invisible by
AppleScript, how do I set it back to visible? I assume AS saves the
superview somewhere. Do I have to do the same earlier, when the view
is still visible? The superview will usually be the view of the main
window, but couldn't it also be the view of a box or tab, etc.?
Jeff
At 9:29 AM -0600 3/31/03, Brian Webster wrote:
On Sunday, March 30, 2003, at 11:24 PM,
email@hidden wrote:
How come AppleScript has a "visible" property for a view that can be
set true/false, but there are no setVisible:(BOOL)flag or isVisible
methods in Cocoa for NSView?
The isVisible and setIsVisible methods are implemented in the
AppleScriptKit framework as a category on NSView. This is revealed
by class-dump, since of course the ASK framework has no header
files. The implementation of these methods simply adds and removes
the view in question from its superview. This can be seen by
setting the visible flag of a view to false and then trying to
access its window property, which will then return a missing value,
indicating that the view is no longer contained in any window.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.