Building and access objects at runtime
Building and access objects at runtime
- Subject: Building and access objects at runtime
- From: "Peter Karlsson" <email@hidden>
- Date: Mon, 02 Aug 2004 13:25:31 +0000
Dear list!
I can build a object programatically this way:
NSButton *myButton = [[NSButton alloc] initWithFrame:(0, 0, 100, 100)];
I use the name 'myButton' when I for some reason want to access the object,
so far so good. If I need another button I name it 'myButton2' and
everything is ok but...
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...
Besta regards Peter
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
_______________________________________________
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.