• 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: Building and access objects at runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building and access objects at runtime


  • Subject: Re: Building and access objects at runtime
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 02 Aug 2004 12:13:38 -0700

On Mon, 02 Aug 2004 13:25:31 +0000, "Peter Karlsson" <email@hidden>
said:
>If the user programatically build objects at runtime, how do I access the
>objects if I don't know how many objects there will be? I suppose I must use
>a NSMutableArray to store the objects. But how do I access them separately?
>
>Example:
>
>I want to move the first object in my array to a new position on my view,
>then I want to move the second object to another positon and so on...

If these "objects" are all views, assign a tag as a unique identifier. Then
you can ask the superview for its subview with that tag. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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.


  • Prev by Date: Re: NSBorderless and acceptsFirstMouse
  • Next by Date: Re: Custom Field Editors
  • Previous by thread: Building and access objects at runtime
  • Next by thread: Preference pane lifecycle when opened from Finder/CFMessagePortSendRequest fails silently
  • Index(es):
    • Date
    • Thread