Re: help with program please?
Re: help with program please?
- Subject: Re: help with program please?
- From: Shawn Erickson <email@hidden>
- Date: Thu, 7 Apr 2005 10:52:20 -0700
On Apr 7, 2005, at 10:34 AM, Brian O'Brien wrote:
I have a class called MyNSImageView which is derived from NSImageView.
I want my application to pop up and array of these depending on
application parameters....
Right now I've made 3 of them on my application in the interface
builder, but I may need more and
I obviously don't know how to do this dynamically.
How can I go about doing this?
Well alloc and init your MyNSImageView (not a good name by the way in
the long run [1]) instances with frames that make sense for how you
want them displayed in the view that will contain them. Then add them
to the view that will contain them.
Look at the docs for NSView addSubview: and
addSubview:positioned:relativeTo: and to remove an added instance
removeFromSuperview. Also if you want to support automatic resizing
review docs on setAutoresizingMask:.
Oh by the way.. Once you have set the superclass of your controller
class and done all the connections
how do you go about changing the superclass type?
Sorry I don't follow this.
-Shawn
[1]
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CodingGuidelines/Articles/NamingBasics.html#//apple_ref/doc/uid/
20001281/BBCIJGDB>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden