Re: Cocoa newbie question
Re: Cocoa newbie question
- Subject: Re: Cocoa newbie question
- From: Shawn Erickson <email@hidden>
- Date: Fri, 23 Jul 2004 15:30:57 -0700
On Jul 23, 2004, at 3:01 PM, joseph wrote:
Hello,
Is-it possible to create a GUI object (interface Builder) dynamically
(a NSTextField for instance) ?
I have not found an object's method in the class ...
Yes.
Note that NSTextField inherits from NSControl which inherits from
NSView, etc. (look at the top of the NSTextField docs).
NSControl defines an initWithFrame: method (as does NSView). Always
look up the inheritance stack to understand what methods are available
to you.
So create one with the appropriate frame, configured as desired and add
it to the appropriate super view adjusting resize behavior as desired
(NSView provided methods), etc.
-Shawn
_______________________________________________
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.