Message 1 of 3
macroscript function scope question
Not applicable
11-01-2012
05:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Guys,
I'm experiencing a strange problem that I can't figure out, even after reading the documentation. I have two macroscripts that are run from buttons on the max interface. They are very similar scripts at the moment as I am converting one into dotnet, so there are some functions in them that share the same name.
One of the functions i'm using is called RegisterCallbacks() and is in a separate file from the main script. It is in an include script, but this include script is not being shared between the scripts.
The problem is, that each macroscript is not using it's own RegisterCallbacks() function. It seems to use the last one that was evaluated. I'm possibly not doing something that makes these functions part of the macroscripts scope and they are in the global scope. But I wondered if this was a common occurence.
If it makes a difference, my scripts are saved in my documents and are edited and evaluated from there.
Any help is appreciated.
I'm experiencing a strange problem that I can't figure out, even after reading the documentation. I have two macroscripts that are run from buttons on the max interface. They are very similar scripts at the moment as I am converting one into dotnet, so there are some functions in them that share the same name.
One of the functions i'm using is called RegisterCallbacks() and is in a separate file from the main script. It is in an include script, but this include script is not being shared between the scripts.
The problem is, that each macroscript is not using it's own RegisterCallbacks() function. It seems to use the last one that was evaluated. I'm possibly not doing something that makes these functions part of the macroscripts scope and they are in the global scope. But I wondered if this was a common occurence.
If it makes a difference, my scripts are saved in my documents and are edited and evaluated from there.
Any help is appreciated.