• 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
PopUp button + Controller Layer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PopUp button + Controller Layer


  • Subject: PopUp button + Controller Layer
  • From: Raphael Sebbe <email@hidden>
  • Date: Wed, 12 Nov 2003 18:30:42 +0100

Hi there,

Working with NSController...

here is my data structure:
MALayer
.name (NSString)
.height (float)
MACurve
.layer (MALayer, not retained)
MADocument
.selectedCurve (MACurve)
.layers (NSMutableArray of MALayer)

Buimding the inspector, I want a popup that 1. shows all layers name (document.layers) and that 2. selects the one from the selectedCurve.

For this, I create an NSObjectController for the selected curve and an NSArrayController for the layers from Interface Builder. They are respectively bound to App.mainWindow.document.selectedCurve and App.mainWindow.document.layers .

1. works perfectly, by binding popup's contentValues to arrayController.arrangedObjects.name . 2. seems to work too by binding popup's selectedValue to objectController.layer, but when I put an NSLog inside MACurve's setLayer:layer, I see that the passed "layer" is actually a string (layer.name), not the layer itself...

What is the problem ? Do I need to use value transformers ?

Help greatly appreciated. Thanks,

Raphael Sebbe _______________________________________________
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.
  • Follow-Ups:
    • Re: PopUp button + Controller Layer
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: No man pages when installing xcode?
  • Next by Date: Re: cocoa help
  • Previous by thread: Fwd: Missing man pages SOLVED
  • Next by thread: Re: PopUp button + Controller Layer
  • Index(es):
    • Date
    • Thread