This method should get called from the user interface to determine
whether an item is to be enabled or disabled. This currently doesn't
happen in GNUstep (as far as I know). What should happen inside this
method is that the object checks whether the action of the item is
currently applicable or not. The object should only check its own action
methods, not that of other classes. When ever we implement this
mechanism, the method on NSDocument will get called for these items
where the document itself is the target of the item.
What the document controller could do is to check if saveAllDocuments:,
newDocument: and openDocument: are currently possible. I think only the
first one make any sense here.
What I cannot remember at the moment is where the calling should happen
and whether it would be worthwhile to implement that.
Hope this helps,
Fred
DELHAISE Thierry wrote:
Hi the list,
I'm developping a Desktop GUI app based on
NSDocumentController/NSDocument implementation.
The current implementation of NSDocumentController (in
gnustep-gui(trunk) revision 26587 ) is :
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem
{
// FIXME
return YES;
}
Should the implementation could be :
call NSDocument "validateUserInterfaceItem", and return the return value.
Second , how [[NSDocumentController instance]
validateUserInterfaceItem:sender] get called ?
Thanks in advance for suggestions.
Thierry
PS : I quickly checked Apple doc's : no precision. And I don't have any
OSX machines to check.
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev