Callbacks error
Whenever I test my code I generally do it in the listener window. The Callback I created works fine when executed from there, but when implemented into my script it gives me a "Call needs function or class, got: undefined"
I defined my function... :/ Why is it not seeing it?
I believe this has something to do with globals and placement (scope) of the code but that stuff blows my mind. lol Been sorta self teaching myself through the maxscript help and scouring forums for help... super slow learning process.
Any help would be greatly appreciated :)
macroScript Bigley_Test category:"Bigley" toolTip:"" ( global MainDialog global rloutOtherRollouts if MainDialog == undefined do( MainDialog = newrolloutfloater "Main Dialog" 232 806 ) if MainDialog !=undefined do ( closerolloutfloater MainDialog MainDialog = newrolloutfloater "Main Dialog" 232 806 ) rollout rloutOtherRollouts "Other Rollouts" ( -- Other Rollouts ) fn MainDialog_Refresh = ( closerolloutfloater MainDialog macros.run "Bigley" "Bigley_Test" ) callbacks.addscript #selectionSetChanged "MainDialog_Refresh()" id:#MainDialogCallbacks -- callbacks.removeScripts #selectionSetChanged id:#MainDialogCallbacks addrollout rloutOtherRollouts MainDialog )

Comments
Fantastic! Sorry for the
Fantastic! Sorry for the delayed response. Been super busy at work so I haven't been able to get back to the script. Everything seems to be working awesomely though! You rock man!
:DDDDD
yes, you get it rigth
Your function should be visible in the global scope.For example, as your
rloutOtherRolloutsis already defined as global, you can put your function inside that rollout and then register it using the full path -rloutOtherRollouts.MainDialog_Refresh, ie something like this:my recent MAXScripts RSS (archive here)