Newbie: Binding and NSPopUpButton question.
Newbie: Binding and NSPopUpButton question.
- Subject: Newbie: Binding and NSPopUpButton question.
- From: Scott Andrew <email@hidden>
- Date: Wed, 23 Mar 2005 01:23:04 -0800
I have an data object that looks like so:
@interface PBGallery : NSObject
{
NSString* name;
NSString* number;
NSString* title;
bool isPublic;
}
-(id)init;
-(id)initWithData:(NSString*)anID name:(NSString*)aName
title:(NSString*)aTitle isPublic:(bool)isItPublic;
-(NSString *) name;
-(NSString*) number;
-(NSString*) title;
-(bool) isPublic;
// set accessors
-(void) setName:(NSString*)newName;
-(void) setNumber:(NSString*)newNumber;
-(void) setTitle:(NSString*)newTitle;
-(void) setisPublic:(bool)goingPublic;
In Interface builder I have created an Array controller for my gallery
items.
I bind my contents of the popup to the gallery's arrange object with a model
key of title. I add my data by hand by calling addobject on my controller
once the data is retrieved from the web. Any my list is populated properly.
Am I supposed to bind to the popup cell?
I have an edit control that I want updated every time the popup changes. I
want to show the "name" (this is a web name that can be edited). I have the
content set to my controller's selected key, with the model key set to
name..
Do I need to setup another controller? Of selected PBGallery objects that
gets updated with my selection? When I edit the selected does the object in
the original array get updated?
_______________________________________________
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