Re: User interface validation doesn't work, right?

2009-08-23 Thread Houdah - ML Pierre Bernard
Just ran into the same problem and came up with HHValidatedButton: http://www.bernard-web.com/pierre/blog/index.php?id=6542976061063123843 Pierre Bernard On Jul 1, 2009, at 11:24 PM, Bill Cheeseman wrote: For years, the Implementing Validation section of Apple's User Interface Validation

Re: User interface validation doesn't work, right?

2009-08-23 Thread Bill Cheeseman
On Aug 23, 2009, at 9:39 AM, Houdah - ML Pierre Bernard wrote: Just ran into the same problem and came up with HHValidatedButton: http://www.bernard-web.com/pierre/blog/index.php? id=6542976061063123843 I actually came up with the answer after this thread

Re: User interface validation doesn't work, right?

2009-07-03 Thread Bill Cheeseman
On Jul 2, 2009, at 8:38 PM, Quincey Morris wrote: It remains totally mysterious what's going to cause individual validatable interface items to trigger their own validation. Perhaps there's no automatic general mechanism at all, and each interface item class has to solve the problem for

Re: User interface validation doesn't work, right?

2009-07-03 Thread Quincey Morris
On Jul 3, 2009, at 01:20, Bill Cheeseman wrote: In the case of buttons, you likewise have to implement - validateUserInterfaceItem: yourself. But that isn't enough, because Cocoa does not call it automatically just because you implemented it. A generic solution is to implement the

Re: User interface validation doesn't work, right?

2009-07-03 Thread Keary Suska
On Jul 2, 2009, at 11:52 AM, Bill Cheeseman wrote: On Jul 2, 2009, at 12:24 PM, Keary Suska wrote: Because the two protocols in question are formal protocols, the @interface declaration must specify conformance. If it doesn't, then no assumption of conformance should be made. Pure and

Re: User interface validation doesn't work, right?

2009-07-03 Thread John C. Randolph
On Jul 2, 2009, at 10:52 AM, Bill Cheeseman wrote: Apple will probably say I should move on to Cocoa Bindings and get over it. I certainly would. -jcr ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: User interface validation doesn't work, right?

2009-07-02 Thread Bill Cheeseman
On Jul 2, 2009, at 12:02 AM, mmalc Crawford wrote: On Jul 1, 2009, at 4:33 PM, Bill Cheeseman wrote: But it doesn't work at all for user controls in general, and the docs are misleading (i.e., wrong) about that. although I'm not sure I'd agree with Bill that the docs are *wrong*, they

Re: User interface validation doesn't work, right?

2009-07-02 Thread Bill Cheeseman
On Jul 1, 2009, at 9:15 PM, Keary Suska wrote: So I think you are claiming this works because the documentation says so. I'm saying the documentation is wrong because it doesn't work. I would love to see a project proving me wrong. Can you show me one? No, I am saying that it works as

Re: User interface validation doesn't work, right?

2009-07-02 Thread Andy Lee
On Thursday, July 02, 2009, at 03:48AM, Bill Cheeseman b...@cheeseman.name wrote: I'm not assuming that it works with all user controls. The document I quoted from says it does, explicitly and in detail, without qualification. This is why in my Radar I suggested the validated item

Re: User interface validation doesn't work, right?

2009-07-02 Thread Keary Suska
On Jul 2, 2009, at 1:48 AM, Bill Cheeseman wrote: I'm not assuming that it works with all user controls. The document I quoted from says it does, explicitly and in detail, without qualification. All I asked in my original post is whether I'm correct in concluding that in fact buttons don't

Re: User interface validation doesn't work, right?

2009-07-02 Thread Michael Ash
On Thu, Jul 2, 2009 at 3:48 AM, Bill Cheesemanb...@cheeseman.name wrote: I did find it confusing when I read the NSMenuItem and NSToolbarItem Class Reference documents, which say that they conform to the other protocol, the NSValidatedUserInterface protocol. But this tends to suggest that

Re: User interface validation doesn't work, right?

2009-07-02 Thread Bill Cheeseman
On Jul 2, 2009, at 12:24 PM, Keary Suska wrote: Because the two protocols in question are formal protocols, the @interface declaration must specify conformance. If it doesn't, then no assumption of conformance should be made. Pure and simple. Also, protocol conformance is not inheritable

Re: User interface validation doesn't work, right?

2009-07-02 Thread Andy Lee
On Thursday, July 02, 2009, at 01:52PM, Bill Cheeseman b...@cheeseman.name wrote: On Jul 2, 2009, at 12:24 PM, Keary Suska wrote: Because the two protocols in question are formal protocols, the @interface declaration must specify conformance. If it doesn't, then no assumption of

Re: User interface validation doesn't work, right?

2009-07-02 Thread Quincey Morris
On Jul 2, 2009, at 14:05, Andy Lee wrote: Hm, you know what, it seems odd to me that the NSValidatedUserInterfaceItem protocol doesn't include setEnabled: or some such. The doc says, If no responder returns YES, the item is disabled. But how can the application know it *can* disable the

Re: User interface validation doesn't work, right?

2009-07-02 Thread Quincey Morris
Er, sorry about all the typos in the previous post on this subject. On Jul 2, 2009, at 16:33, Quincey Morris wrote: Something (presumabl[y] NSApp) presumabl[y] calls 'update' for the main NSMenu, and the 'update' calls trickle down to the NSMenuItems, which then initiate their own

Re: User interface validation doesn't work, right?

2009-07-02 Thread Andy Lee
On Thursday, July 02, 2009, at 07:33PM, Quincey Morris quinceymor...@earthlink.net wrote: I really all makes sense, I think, I think it makes the most sense if you figure out the validateMenuItem: mechanism, then figure out the validateToolbarItem: mechanism, then see they're closely related

User interface validation doesn't work, right?

2009-07-01 Thread Bill Cheeseman
For years, the Implementing Validation section of Apple's User Interface Validation document has said the following: Before it is displayed, a user interface item checks to see if its target implements validateUserInterfaceItem:. If it does, then the enabled status of the item is

Re: User interface validation doesn't work, right?

2009-07-01 Thread Keary Suska
On Jul 1, 2009, at 3:24 PM, Bill Cheeseman wrote: For years, the Implementing Validation section of Apple's User Interface Validation document has said the following: Before it is displayed, a user interface item checks to see if its target implements validateUserInterfaceItem:. If it

Re: User interface validation doesn't work, right?

2009-07-01 Thread Bill Cheeseman
On Jul 1, 2009, at 5:56 PM, mmalc Crawford wrote: It depends on the sort of user interface element. This does work for menu items and tab bar items... Hi, mmalc. It works perfectly well with menu items and toolbar items because they're specially coded to make it work. The docs are clear

Re: User interface validation doesn't work, right?

2009-07-01 Thread Gregory Weston
Bill Cheeseman wrote: For years, the Implementing Validation section of Apple's User Interface Validation document has said the following: Before it is displayed, a user interface item checks to see if its target implements validateUserInterfaceItem:. If it does, then the enabled status of

Re: User interface validation doesn't work, right?

2009-07-01 Thread Keary Suska
On Jul 1, 2009, at 5:27 PM, Bill Cheeseman wrote: My controller is the target, which according to Apple's documentation, and according to my understanding for many years, means simply that it implements the button's action method. My controller does in fact implement the action method. In

Re: User interface validation doesn't work, right?

2009-07-01 Thread mmalc Crawford
On Jul 1, 2009, at 6:15 PM, Keary Suska wrote: No, I am saying that it works as advertised for objects that it works for. NSButton is not one of them, and never has been. You seem to assume that all user interface items should, but they don't, and never have, and the documentation has

Re: User Interface Validation doesn't work, right?

2009-07-01 Thread Andy Lee
On Jul 1, 2009, at 7:32 PM, Bill Cheeseman wrote: NSButton does conform to the NSValidatedUserInterfaceItem protocol, as its header file confirms According to the header file and documentation I'm looking at, NSButton conforms to the *other* protocol (NSUserInterfaceValidations), which is