• 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: Binding Enabled property to NSArrayController selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding Enabled property to NSArrayController selection


  • Subject: Re: Binding Enabled property to NSArrayController selection
  • From: Stamenkovic Florijan <email@hidden>
  • Date: Mon, 19 Oct 2009 08:25:44 -0400


On Oct 19, 2009, at 07:59, Matthew Lindfield Seager wrote:

2009/10/19 Stamenkovic Florijan <email@hidden>

I think so... When binding the enabled state of a toolbar item you need to make sure that the item does not autovalidate. The "Autovalidates" checkbox can be found in the attributes panel of the inspector for a toolbar item. I am not sure if this is a bug or not, and it is NOT mentioned in the bindings reference for NSToolbarButton, so it's a bit tricky to figure out. Since usually bindings override the non-bound state I can see this as a bug, but my experience with Cocoa is not wide enough to judge... Anyone else?

 One little check box!!! Argh!

Thank you very much for your help!

Sure...

At the very least I should probably log a documentation request for the binding's reference (there's not much to the NSToolbarItem Bindings section but I read it several times to make sure I wasn't missing anything!).

Right... I was just thinking about this a bit. Unlike with most bindings, I guess it is possible to use both the standard autovalidation and the binding at the same time. As it seems that autovalidation is postponed until the next cycle of the run loop. So, if using autovalidation one could consider the current state of the item and add to that some custom validation logic. However, this is pure speculation.


I possibly should have cottoned on to the fact that every search I performed talked more about validation than bindings. If I didn't receive an answer I was going to delve into validation but I really don't have the time at this moment in time so I'm VERY grateful for your help!

Well, the toolbar programming documentation does not discuss this in it's validation part either. In fact, it does not even mention the "autovalidate" property of NSToolbarItem. So, even if this behavior is intended, it seems to be 100% undocumented. I will confirm this on Snow Leopard, as I didn't get around to it yet, and report it as a bug as well.


F
_______________________________________________

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


References: 
 >Binding Enabled property to NSArrayController selection (From: Matthew Lindfield Seager <email@hidden>)
 >Re: Binding Enabled property to NSArrayController selection (From: Stamenkovic Florijan <email@hidden>)
 >Re: Binding Enabled property to NSArrayController selection (From: Matthew Lindfield Seager <email@hidden>)

  • Prev by Date: Re: Binding Enabled property to NSArrayController selection
  • Next by Date: Re: unsleep the display programatically?
  • Previous by thread: Re: Binding Enabled property to NSArrayController selection
  • Next by thread: Recreating iPhone alarm Picker
  • Index(es):
    • Date
    • Thread