Calude, AFAIK you cannot access the index of a popup within the
callback function. You could use the following to figure out the index:
Let's say 'popchoice' has the following options: 'choice 1' and 'choice
2'
Create a cell array:
choices = {'choice 1','choice 2'}
Now:
index = find(strcmp(get_param(gcb,'Mask','popchoice'),choices));
HTH,
Ashish.
Thank you Ashish.
Yes, I could use this method, but it would be equivalent to using
directly the strings in my "switch" cycle in the callback.
The reason for which I did not want to do this is that it requires me
to manually type twice the same string, which may be more error-prone
(especially in case of future modifications to the mask).
I thought there was an easy way to access mask variables from the
callbacks; if this is not the case, I'll have to live with it, I
guess...
Claude
Claude, if you don't want to type in the different strings in your
popup menu there is another thing you can do. Look at the output of
get_param(blockName,'MaskStyles')
You can then get the row corresponding to your popup and use regular
expressions to get the popup strings from this list of all popup
values.
HTH,
Ashish.