Container resizing with a Custom button ?

Discuss problems and solutions.
Post Reply
Glennzone
Newbie
Posts: 23
Joined: 18 Jan 2013 22:16

Container resizing with a Custom button ?

Post by Glennzone »

Hey folks ! S'been awhile, but I've been able to fly solo for a period of time. Now, I've a manoevre I can't manage which requires some perspective.

I find I'm still kind of inept with the coding of scripts where I don't have a functional example to guide me through. The code I was trying is :

if(firstof(x)==0) {
setobjectrect(cKORE2audioFX, rect[0,273,1022,208]);
}
else {
setobjectrect(cKORE2audioFX, rect[0,81,1022,400]);
}

The button is intended to toggle the container between two different sizes.
I'm probably all screwy, but I know folks here will know better.

Looking forward to your input.

Thanks in advance for your perspective.
Glennzone
Attachments
Test_Container_resize.jzml
Resizing the container with a custom button
(37.21 KiB) Downloaded 82 times
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Container resizing with a Custom button ?

Post by Phil999 »

I've done such things before, and looking at the code it should work.

I don't know right now where the problem lies, but it surely is only a typo or some other minor error. Try again with other means (for example with several if's).
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Glennzone
Newbie
Posts: 23
Joined: 18 Jan 2013 22:16

Re: Container resizing with a Custom button ?

Post by Glennzone »

I found it by looking at some other code. . . .

Stupid computers don't recognize spelling errors >?! :=D

"if(x==0) {
setobjectrect(cKORE2audioFX,{0,273,1022,208});
}
else {
setobjectrect(cKORE2audioFX,{0,81,1022,400});
}"


Thanks Phil. ;-)
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: Container resizing with a Custom button ?

Post by Phil999 »

good that you found the solution.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Post Reply