The attachment is blocked. Could you send them again by compress them in a zip file?
Thanks,
Xihui
________________________________________
From: PaweÅ PrÄdki [[email protected]]
Sent: Thursday, August 05, 2010 10:00 AM
To: Chen, Xihui
Subject: Re: CSS/BOY macro substitution problem
Hi Xihui,
Thanks for such a quick answer. Please find the .opi files attached to
this message.
Hi Pawel,
I've started using the CSS ennvironment and BOY for creating GUIs but
I've come across a problem with macro substitution.
Thanks for using BOY and ask the questions!
I'm creating a GUI for a data acquisition system which consists of
several DAQ boards. My aim is to have only one XY graph visible at once
on the screen and be able to switch between them using, for example,
action buttons.
There may be other options which can make this task easier: using Tab widget or change the pv name of a trace from action button via script.
I don't really want to use the Tab widget and copy the same setup
(mainScreen) to all the tabs and changing the names of the PVs connected
to the widgets. This will require many manual changes if I want to add
another DAQ card, for example. Macros work perfectly in this case.
Changing the trace pv name via script could be a good solution but I
have little experience with JavaScript. On the other hand, I still use
the macro value in other screens so I would like to keep it.
However, when I specify the macro value for the whole display I am not able to change
it using the action buttons. Somehow, the display macro value definition
trumps the one given by the action button.
The macros property cannot be changed via script during runtime. It is only loaded once during opi startup. The display macros will replace the same one from its parents.
The only way I was able to make it work was not specifying any display
macro value. This, however, results in an ugly first screen where all
the controls are disconnected since the macro is undefined. Clicking one
of the action buttons connects to the correct card.
Still cannot understand that clearly. Could you send me the opi files?
When you run the mainScreen.opi the $(cardno) macro is not expanded
because it is not defined at the global level. Clicking one of the CARD
buttons replaces the current mainScreen with the same screen but with
the $(cardno) macro defined. I would like to start the application with,
for example, cardno=0 and then change it according to the button
pressed. It was possible in EDM.
Also, maybe you are able to answer another question. In the GroupConfig
screen there is a group of controls (Signal Amplitude, Signal Phase)
that I want to become invisible if one of the options in the nearby
Combobox is chosen. Is it necessary to use JavaScript to do so? Would
you be able to give me a hint how to do this?
Thanks,
Xihui
Thanks,
Pawel