• 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: NSToolbar(item) quirk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSToolbar(item) quirk


  • Subject: Re: NSToolbar(item) quirk
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 4 Feb 2005 02:27:29 -0500


On Feb 3, 2005, at 11:33 AM, Ed wrote:

Hi all!
I've got a Cocoa Multi-Document application (standard project kind),
and each of my MyDocuments has a toolbar on its associated window. To
ensure my toolbar button only becomes active when there is text
selected in an NSTextView in the window, I'm using simple validation
(If the selection length is 0, then it's not active, essentially).
However, when I have multiple documents open, if I select text in one,
all of the ToolbarItems of that type in the application become
activated! Not only that, but I can actually click on them (though if
I click on the window, they stop becoming deactivated, as they should
be)!
Has anyone come across this before and have an elegant solution, or I
am I just going to have to give each button its own string identifier
(using a random number gen, perhaps?)

where does the validate code for the toolbar reside?? I'm guessing it's not in the document class itself.


    you want that validation code in that class if you can..

_______________________________________________
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


References: 
 >NSToolbar(item) quirk (From: Ed <email@hidden>)

  • Prev by Date: How to show Newly added Object in the outline view
  • Next by Date: Re: NSToolbar(item) quirk
  • Previous by thread: Re: NSToolbar(item) quirk
  • Next by thread: Re: NSToolbar(item) quirk
  • Index(es):
    • Date
    • Thread