From: Marco on
i'm creating a gui that, given a time series and a time axis, displays the data and gives the user some controls on it.

so its prototype will be something like

fig_handle=GUI_displayTS(time_series, time_axis)


since i want to be able to change the data displayed without completely redrawing the interface i'd like to be able, once the GUI is created, to load new data into it and then trigger the redrawing and its general updating.

loading new data is quite easy (i will load the data into the "Userdata" of the figure from the invoking function), but i can't figure out how to configure the system to trigger the update when the value of userdata is changed.

can anyone suggest me a way to do it?
From: us on
"Marco " <fake.marco.fake.minini(a)treuropa.com> wrote in message <i23k0d$s9u$1(a)fred.mathworks.com>...
> i'm creating a gui that, given a time series and a time axis, displays the data and gives the user some controls on it.
>
> so its prototype will be something like
>
> fig_handle=GUI_displayTS(time_series, time_axis)
>
>
> since i want to be able to change the data displayed without completely redrawing the interface i'd like to be able, once the GUI is created, to load new data into it and then trigger the redrawing and its general updating.
>
> loading new data is quite easy (i will load the data into the "Userdata" of the figure from the invoking function), but i can't figure out how to configure the system to trigger the update when the value of userdata is changed.
>
> can anyone suggest me a way to do it?

a hint:

doc refreshdata; % <- look at the example section(!)...

us
From: Marco on
well..my problem is a bit more complicated than that:
i don't simply have to refresh the plots but i need to launch functions to update a series of ancillary informations and perform other actions (all inclueded in the gui).

that's why i think a solution might be linking an event to the update of the variable, so i can manage on my own the actions to perform...

but maybe there's a smarter solution i can't think of...


thanks anyway for the suggestion!




"us " <us(a)neurol.unizh.ch> wrote in message <i23s3q$1id$1(a)fred.mathworks.com>...
> "Marco " <fake.marco.fake.minini(a)treuropa.com> wrote in message <i23k0d$s9u$1(a)fred.mathworks.com>...
> > i'm creating a gui that, given a time series and a time axis, displays the data and gives the user some controls on it.
> >
> > so its prototype will be something like
> >
> > fig_handle=GUI_displayTS(time_series, time_axis)
> >
> >
> > since i want to be able to change the data displayed without completely redrawing the interface i'd like to be able, once the GUI is created, to load new data into it and then trigger the redrawing and its general updating.
> >
> > loading new data is quite easy (i will load the data into the "Userdata" of the figure from the invoking function), but i can't figure out how to configure the system to trigger the update when the value of userdata is changed.
> >
> > can anyone suggest me a way to do it?
>
> a hint:
>
> doc refreshdata; % <- look at the example section(!)...
>
> us
From: Steven_Lord on


"Marco " <fake.marco.fake.minini(a)treuropa.com> wrote in message
news:i245fl$iak$1(a)fred.mathworks.com...
> well..my problem is a bit more complicated than that:
> i don't simply have to refresh the plots but i need to launch functions to
> update a series of ancillary informations and perform other actions (all
> inclueded in the gui).
>
> that's why i think a solution might be linking an event to the update of
> the variable, so i can manage on my own the actions to perform...
>
> but maybe there's a smarter solution i can't think of...

Have whatever callback function loads the data also call a function that
updates the GUI?

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

From: Marco on
it would be nice, wouldn't it? ;)

the problem is that the load of the new data must be done in the invoking function, not in the gui itself!





"Steven_Lord" <slord(a)mathworks.com> wrote in message <i247s3$m76$1(a)fred.mathworks.com>...
>
>
> "Marco " <fake.marco.fake.minini(a)treuropa.com> wrote in message
> news:i245fl$iak$1(a)fred.mathworks.com...
> > well..my problem is a bit more complicated than that:
> > i don't simply have to refresh the plots but i need to launch functions to
> > update a series of ancillary informations and perform other actions (all
> > inclueded in the gui).
> >
> > that's why i think a solution might be linking an event to the update of
> > the variable, so i can manage on my own the actions to perform...
> >
> > but maybe there's a smarter solution i can't think of...
>
> Have whatever callback function loads the data also call a function that
> updates the GUI?
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com