Prev: Javabuilder problem; Can't find nativemcl.dll
Next: weird issue with complex signum, see below:
From: Matt Fig on 19 Jun 2010 12:08 Did you see my comment above? I understood you were using nested functions for one type of callback but a switchyard for another. Is this the case?
From: Ryan on 19 Jun 2010 13:28 hey thanks for the help. i ended up getting rid of the switch and global FG in my function and setting all of the callbacks as functions, and it seems to be working great. "Matt Fig" <spamanon(a)yahoo.com> wrote in message <hvhls8$hs$1(a)fred.mathworks.com>... > I do not understand why you seem to be mixing switchyard programming for the callbacks with function handles for the selectionchangefcn. Why not just use nested functions for all callback types, thus getting rid of the switchyard and the globals in one step? In any case, this does seem to work: > > > > function NA(Action) > global FG > > if nargin==0 > Action = 'Initial'; > end > > switch (Action) > case 'Initial' > FG.g1 = uibuttongroup(... > 'selectionchangefcn',@g1func); > FG.b1 = uicontrol('style','toggle',... > 'Callback','NA(''test1'')'); % This is evaluated at the command line. > > case 'test1' > FG % Display what is in FG.... > end
First
|
Prev
|
Pages: 1 2 3 Prev: Javabuilder problem; Can't find nativemcl.dll Next: weird issue with complex signum, see below: |