% DialogDemo
%
% Demonstrates Screen('Dialog').
% 
% See also GetNumberDemo, GetNumber, GetEchoNumber, Screen.

% 8/9/94		dhb		Wrote it.
% 3/8/97		dgp 	Updated.
% 8/16/97		dgp 	Updated.
% 4/6/02    awi   Added windows conditionals to exit. 
%                 Win: Screen 'Dialog' is not yet supported.

if strcmp(computer,'PCWIN')
    error('Win: Screen ''Dialog'' not yet supported.');
else
	windowPtr=Screen('GetFrontWindow');
	
	% Get a number.
	response=Screen(windowPtr,'Dialog','Type a number',10.3);
	fprintf('Response was %g\n',response);
	
	% Get text.
	% The length of the default answer determines the size of the answer box.
	response=Screen(windowPtr,'Dialog','What''s your name?','????????????????');
	fprintf('Response was %s\n',response);
end 


	

