%POPUPCB Script for handling Expo popup button callbacks.
%   This script is required to make sure that any data loaded
%   goes to the main workspace.

%   Ned Gulley, 6-21-93
%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 5.5 $  $Date: 2000/06/01 03:16:32 $

popupHndl=gco;
demoVal=get(popupHndl,'Value');
% if demoVal=1, then take no action, because no demo has
% been chosen (demoVal=1 -> 'Select a demo' option).
if demoVal>1,
    figNumber=watchon;
    drawnow;
    demoList=get(popupHndl,'UserData');
    demoName=demoList(demoVal,:);
    eval(demoName);
    set(popupHndl,'Value',1);
    watchoff(figNumber);
end

