Page 1 of 1

Text -lemur editor crash at open- [report]

Posted: 05 Jul 2013 15:26
by oran-outan
hi

from a custombutton for change text display on "Text" object...
when I am using :

(script) (mode: expression)

decl stateLabels = {'String','Noise','click'};
decl MAX = 3;

id += 1;
id %= MAX;
setattribute(Text,'content', stateLabels[id] );

Lemur editor crash when i'm loading the template. if i write the code and try it all is ok, but if I close lemur editor, launch it and load the template lemur editor crash at open...

Is there something wrong ???
If you have an idea to solve it ???

I'm using Version 4.0.3 on osx 10.7.5

best
0-0

Re: Text -lemur editor crash at open- [report]

Posted: 05 Jul 2013 19:14
by Softcore
on expression what?

and id is what?

Re: Text -lemur editor crash at open- [report]

Posted: 05 Jul 2013 21:52
by oran-outan
hi

id is just a counter : 1 / 2/ 3 /1 /2 /3 /...
when custombutton.x change id increase of 1...

expression = "On expression"

Re: Text -lemur editor crash at open- [report]

Posted: 06 Jul 2013 09:14
by Softcore
Im sorry but Im not understanding...

from the code you posted above "id" is NOT declared as a variable anywhere....I guess you have it defined as a custom variable but thats only a guess.

Also "on expression" is not enough - next to "on expression" you need to define on expression of "some" variable - be it x, y, z or a custom one.

If what you are trying to achieve is the custom button to change the text on each subsequent press then you need this