• 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
Newbie: Binding and NSPopUpButton question.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Newbie: Binding and NSPopUpButton question. Answered my self.
      • From: Scott Andrew <email@hidden>
  • Prev by Date: Re: NSTableView and Bindings
  • Next by Date: Re: [OT] Job hunting
  • Previous by thread: Re: create a server listening on a specific port
  • Next by thread: Re: Newbie: Binding and NSPopUpButton question. Answered my self.
  • Index(es):
    • Date
    • Thread