[Closed] Callback troubles
I’m having some hassles with callbacks. I execute the following code when a dialog opens
callbacks.addScript #selectionSetChanged "RefreshList()"[size=2] id:#wtRN[/size]
[size=2]
[/size]
[size=2]and it gives me a “– Type Error: Call needs function or class, got: undefined” error when I select anything.[/size]
[size=2][/size]
[size=2]RefreshList() works if I execute it by itself, it doesn’t return anything and doesn’t take any parameters.[/size]
[size=2][/size]
[size=2]Thanks.[/size]
Have you declared RefreshList as a global?
The callback does not get executed in the same scope in which it was created. So you need to make sure RefreshList is also known outside of the current scope.
- Martijn
I’ve just tried that but no luck I get the same error, could somebody give me a practical example?
This should clear things up for you
Note: it’s not a zip! just remove the .zip extension…
- Martijn
I renamed the file to .ms and it comes out as jumbled garbage!?! Could you send it again please.