• 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: help with program please?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >help with program please? (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: Re: REST API & Cocoa Programming
  • Next by Date: Re: ADC Core Data article
  • Previous by thread: Re: help with program please?
  • Next by thread: Re: help with program please?
  • Index(es):
    • Date
    • Thread