Re: Newbie: Binding and NSPopUpButton question. Answered my self.
Re: Newbie: Binding and NSPopUpButton question. Answered my self.
- Subject: Re: Newbie: Binding and NSPopUpButton question. Answered my self.
- From: Scott Andrew <email@hidden>
- Date: Wed, 23 Mar 2005 08:36:47 -0800
Duh.. I am dumb just had to do more searching.. Just had to bind
selectedIndex.
On 3/23/05 1:23 AM, "Scott Andrew" <email@hidden> wrote:
> 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
_______________________________________________
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