On Mon, Mar 8, 2010 at 10:58 AM, David Blanton <aired...@tularosa.net> wrote: > @implementation View
I would not recommend using this as the name for your NSView subclass, since ObjC lacks namespaces. I doubt there's still a View class hanging around anywhere, but it's safer to prefix it with some initialism of your own. > - (void)validate { > [self setEnabled:YES]; > } First of all, as the documentation you quoted explains, -validate is an NSToolbarItem method, not an NSView method. If you want custom validation logic for your view-based NSToolbarItem, you must subclass NSToolbarItem and override -validate. But since you're not actually doing any validation logic, there's no need to implement custom validation at all, at least until you provide an overflow menu representation for your toolbar item (which as the documentation describes is disabled by default). > and set this class to be the class of the enclosing tool bar item: Looks like you changed your NSToolbarItem into a View by mistake. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com