First time here? Check out the FAQ!
x

Am I transforming the Looping boolean of TimeIndex correctly?

0 votes
120 views

I'm having a wee bit of trouble transforming the Looping boolean of the K7 TimeIndex Class, ready for encapsulation. I don't seem to be able to set it via my own green variable ?looping with parameter transformer directly in front of the TimeIndex Class and the following code. Am I doing it correctly?

snd doNotExpandFirst.
snd doNotTransformSubSounds.
snd Looping isNil ifFalse: [
    ?Looping
        varIfTrue: [snd Looping: true]
        ifFalse: [snd Looping: false]
].

In fact whilst we are here, could SSC shed some light on the doNotTransformSubSounds message. What does it do exactly?

asked Jul 7, 2016 in Capytalk & Smalltalk by cristian-vogel (Master) (7,790 points)

2 Answers

0 votes

The parameter name (looping) should not begin with an uppercase L but with a lowercase l:

snd doNotExpandFirst.
snd doNotTransformSubSounds.
snd looping isNil ifFalse: [
    ?Looping
        varIfTrue: [snd looping: true]
        ifFalse: [snd looping: false]].

answered Jul 8, 2016 by ssc (Savant) (110,320 points)
0 votes
Regarding doNotTransformSubSounds: As far as I know that means the ParameterTransformer only affects the one Sound to its left.
answered Jul 8, 2016 by kymaguy (Virtuoso) (10,580 points)
...