discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issue with auto-enable of Menus


From: Fred Kiefer
Subject: Re: issue with auto-enable of Menus
Date: Mon, 13 Nov 2017 08:08:42 +0100


> Am 12.11.2017 um 21:16 schrieb Riccardo Mottola <riccardo.mottola@libero.it>:
> 
> I enhanced Graphos to enable/disable automatically menus dependent on the 
> selection of objects.
> E.g. the idea is that you can edit something only if an object is selected.
> 
> I detect the menu depending on the connected action.
> 
> The code works for certain custom actions, but not for cut/copy/delete
> 
> This works fine on Mac, but not on GNUstep!
> I wonder why?
> 
>  if (action == @selector(copy:) || action == @selector(cut:) || action == 
> @selector(delete:))
>    {
>      if (selectedObjs)
>        return YES;
>      else
>        return NO;
>    }
> 
> the relevant code is in GRDocView.m
> 
> http://svn.savannah.gnu.org/viewvc/gap/trunk/user-apps/Graphos/GRDocView.m?revision=3565&view=markup

Could you please provide some additional information about this code. If you 
add a bit of logging you should be able to report all this:

- Is the code called at all? This could be caused by a bug in my menu handling 
change from last year.
- What is the value of selectedObjs? Does this match your expectations?
- Which compiler and runtime are you using? With gcc an the old GNUstep runtime 
this code cannot work at all. There you will have to use sel_isEqual()

Hope this helps,
Fred

> --
> Proudly sent with GNUMail !

Great to hear!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]