Trouble with EditBox and renderWidth

Hi. This time, I wanted my script to change the scene render size using data from Edit Box, but I have a hard time converting it to integer or something that would work. Google has been frugal about information on this matter, so I ask here.

Here's a part of the code:

editText set_w "W" pos:[20,85] width:80 height:17 text:"640"
 
	on set_w changed text do
(
	renderWidth =  int set_w.text
)

This generates an error "-- Unable to convert "MY ACTUAL INPUT NUMBER" to type: Integer". When I change the syntax to:

renderWidth =  int $.set_w.text

it gives me an "-- Unknown property: "set_w" in undefined" error. I played with brackets (selecting whole or a part of it), modifying the syntax about a hundred time but with no effect. I'm pretty good at generating errors though. :)

Any help much appreciated!
Thanks in advance.

(PS. Let me add that I'm working on 3DS Max 2009 x64, just for clarification.)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kuroiei's picture

Answer, already?

Wow, that was quick. I found some solution already. :P

Channing only this part:

	renderWidth =  set_w.text as integer

done wonders.

Posting on this forum is marvelous, if I didn't write I probably wouldn't come to this solution anyway.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.