Tags: action, application, callbacks, dynamic, flash, inpython, matlab, parses, programming, scripts, similar, variables, write
dynamic variables, callbacks
I need to write a simple application (I used to write similar things in
Python and Flash action scripts).
The application parses comma-delimitered files and populates variables
with vectors. Ea file would like like this:
The vectors then get plotted in a figure as individual lines. I
designed a simple GUI using which the user can select a specific line,
and modify it (e.g. filter). The user should be able to delete existing
data, move data between figures obtained from diff files, etc. So far I
use the variable's names as they are, since I know what's in my file -
x,y,z, but I want them to be dynamic.
I am about two things.
(1) Where to store the (dynamic) variables corresponding to x,y,z,r?
Should they be included into the current figure's object, like this?
figure1.variable1.name = 'x';
figure1.variable1.value = [12 ...];
Or can I access the data from the figure's properties directly using
(2) I am about using dynamic arguments with callbacks.
Suppose, I have a button for "Filter" with a callback defined like this
(syntax might be messed up):
the variable "data" changes during runtime. Is the callback going to
see "data" as it existed when the callback was defined? Or does it only
get a handle to the data?
Sorry for the long post and thanks a lot in advance for help.
Leave a comment...
- 0 Comments