First time here? Check out the FAQ!
x

CheckBox in Encapsulation

+1 vote
37 views
Hello, Hello!

getting more and more excited for KISS 2019 :) and encapsulating new classes.

but I didnt understand which Type/Parameter I have to select if I want to visualize a field with a check box.

also, I do not really understand how to do if I want to have the possibility to put a parameter like "ShowIn VCS" of the STGC in my encapsulation.

is it correct to put a Parameter Transformer just after the Sound to Encapsulate (and right before the Script) and to put something like:

snd doNotExpandFirst.
snd doNotTransformSubSounds.
snd showInVCS: (?stealthMode not).

 

???

thanks for your help
asked Jul 18 in Capytalk & Smalltalk by domenico-cipriani (Adept) (2,120 points)

1 Answer

0 votes
 
Best answer

Hi Domenico!

Yes you are right, if you put a ParameterTransformer after an STGC you can access the boolean checkbox parameters:

In the above example I'm getting access to the Prezero parameter of a Delay.

You want to use the boolean type for your ?stealthMode parameter of your encapsulated class:

 

answered Jul 18 by alan-jackson (Virtuoso) (11,060 points)
selected Jul 19 by domenico-cipriani
thanks Alan!,
so,
boolean/boolean/constant
displays as a checkbox?
Yes it should do. The "constant" bit at the end just sets the category (the background colour) of the parameter. Occasionally I've found when I've changed a parameter's type in the class editor that it doesn't update immediately. But when I touch or change the input Sound parameter that seems to cause all the others to refresh.
...