This site requires JavaScript, please enable it in your browser!
Greenfoot back
MrBradley
MrBradley wrote ...

2017/6/8

Hiding Methods from GF

MrBradley MrBradley

2017/6/8

#
Does anyone know of there is a way to hide methods from appearing in the context menu of an object (Actor/World). I have a scenario where I would like to hide say default or protected methods from appearing when the user right-clicks an Actor, in order to keep the method list clean. Related: Is there a way to group the display of Interface methods (or display only those) in the context menu. Could @JavaAnnotations be used for this?
danpost danpost

2017/6/8

#
MrBradley wrote...
Does anyone know of there is a way to hide methods from appearing in the context menu of an object (Actor/World). I have a scenario where I would like to hide say default or protected methods from appearing when the user right-clicks an Actor, in order to keep the method list clean.
Methods that are 'private' or 'protected' should not show up in the method lists. At least, they do not with my version of greenfoot -- only the 'public' ones appear there. Even the ones without explicitly specifying the access do not show -- only those that start with 'public'.
Super_Hippo Super_Hippo

2017/6/9

#
For me, every method which isn't private shows up (3.1.0).
MrBradley MrBradley

2017/6/9

#
I have tested it, and in GF 3.0.4 & 3.1.0 private methods are the only ones that do not appear. (as Hippo states) I think the ability to hide methods from appearing in the context menu is useful. Is there an alternative way of managing menu visibility? Dan, what version on GF are you using?
danpost danpost

2017/6/9

#
MrBradley wrote...
Dan, what version on GF are you using?
I still using GF 2.3.0 USB stand-alone.
You need to login to post a reply.