• 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
RE: Detecting changes to NSPopUpButtonCell in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Detecting changes to NSPopUpButtonCell in an NSTableView


  • Subject: RE: Detecting changes to NSPopUpButtonCell in an NSTableView
  • From: Ulai Beekam <email@hidden>
  • Date: Thu, 23 Apr 2009 23:39:06 +0000
  • Importance: Normal

I'm not sure how good approach bindings is in this case. It seems like a weird hack :S

Furthermore, it doesn't seem to make too much sense  to bind the selected index to a single variable because, as you say, I have multiple rows and the popupmenu for each one.

Actually I can think of one weird way of making it work: Having an instance variable "int selectedIndex" with ONLY a setter method (NOT a getter method). That way change in one of the rows will not propagate to other rows. And I can then do my stuff in the setter method. But hmm, this is just too weird to be the best solution available out there, assuming it even works :S

----------------------------------------
> From: email@hidden
> To: email@hidden
> Subject: Re: Detecting changes to NSPopUpButtonCell in an NSTableView
> Date: Fri, 24 Apr 2009 00:18:08 +0100
> CC: email@hidden
>
> You can bind the selection of the popup to a variable and then observe
> that variable via KVO. I did that on a single NSPopUpButton, you would
> still need to get the affected row.
>
> ALEXander.
>
>
> On 24.04.2009, at 00:12, Ulai Beekam wrote:
>
>>
>> Hi,
>>
>>
>> We all know that we can detect when regular text in an
>> NSTableView finishes editing using the control notification
>> method controlTextDidEndEditing:.
>>
>> My problem, however, is this: In one of the columns I have attached
>> an NSPopUpButtonCell. The pop up button has two predetermined
>> constant choices "Foo" and "Bar" (always these two fixed choices).
>> How can I detect it when these values are have been changed (after
>> having selected a menu item)? The problem is that abovementioned
>> notification method, controlTextDidEndEditing:, is not getting
>> called in this case.
>>
>>
>> How, then, can I do some stuff after an NSPopUpButtonCell has
>> changed a value? Is there any other notification method I can use? I
>> have not yet seen such a method in the docs.
>>
>>
>> Thanks, U.
>> _________________________________________________________________
>> Show them the way! Add maps and directions to your party invites.
>> http://www.microsoft.com/windows/windowslive/products/events.aspx_______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>

_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Detecting changes to NSPopUpButtonCell in an NSTableView
      • From: Jerry Krinock <email@hidden>
References: 
 >Detecting changes to NSPopUpButtonCell in an NSTableView (From: Ulai Beekam <email@hidden>)
 >Re: Detecting changes to NSPopUpButtonCell in an NSTableView (From: ALEXander <email@hidden>)

  • Prev by Date: Re: ObjectAlloc and objects that should have been released
  • Next by Date: RE: Bindings making NSNumberFormatter strange
  • Previous by thread: Re: Detecting changes to NSPopUpButtonCell in an NSTableView
  • Next by thread: Re: Detecting changes to NSPopUpButtonCell in an NSTableView
  • Index(es):
    • Date
    • Thread