Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Maxscript BUG in 3dsmax Design 2012 : addHandler function doesn't stand the paramStr parameter
  RSS 2.0 ATOM  

Maxscript BUG in 3dsmax Design 2012 : addHandler function doesn't stand the paramStr parameter
Rate this thread
 
60440
 
Permlink of this thread  
avatar
  • ncazanav
  • Posted: 28 September 2011 04:45 AM
  • Total Posts: 16
  • Joined: 03 April 2007 04:34 PM

The following correct code leads to a syntax error in the MAXSCRIPT listener in 3dsmax Design 2012 (sp1 & sp2), which is not normal :

rci rolloutCreator "myRollout1" "My Rollout1"
rci.begin()
rci.addControl #checkbutton #myButton0 "My Button"

rci.addHandler #myButton0 #changed paramStr:"state" codestr:"print \"test !\""

rci.end()

createDialog rci.def

As a test, the following code shows not error by the listener

rci rolloutCreator "myRollout1" "My Rollout1"
rci.begin()
rci.addControl #checkbutton #myButton0 "My Button"

rci.addHandler #myButton0 #changed  codestr:"print \"test !\""

rci.end()

createDialog rci.def

but leads to an argument error when pressing the checkbutton, which is normal as the addHandler function is missing the ‘paramStr’ argument.

Is this bug known? Any chance to get an hotfix?

Thanks for any comments/response



Replies: 0
avatar
  • lo_
  • Posted: 28 September 2011 08:47 AM

it is a known bug. You can over work around it by making sure the first character in your param string is a space.



VFB+ : An enhanced 3dsmax frame buffer (free)

Replies: 0
avatar
  • ncazanav
  • Posted: 28 September 2011 08:19 PM

lo_ 28 September 2011 08:47 AM

it is a known bug. You can over work around it by making sure the first character in your param string is a space.

Actually it is not the first character but the last that should be a space in the param string.

To be explicit, the following code shows no syntax error

rci rolloutCreator "myRollout1" "My Rollout1"
rci.begin()
rci.addControl #checkbutton #myButton0 "My Button"

rci.addHandler #myButton0 #changed paramStr:"state " codestr:"print \"test !\""

rci.end()

createDialog rci.def

Thank for your reply!!



Replies: 1
/img/forum/dark/default_avatar.png

hmm yeah maybe it was the other way around… oh well, as long as it’s working.

Author: lo_

Replied: 28 September 2011 08:33 PM