Rank: 425491 based on 0 downloads (last 30 days) and 0 file submitted
photo

Urs

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Urs
Updated File Comments Rating
30 Mar 2010 FindJObj - find java handles of Matlab graphic objects Find java objects contained within a specified java container or Matlab GUI handle Author: Yair Altman

Hi Guys,

I have written the following code in _OpeningFcn(because I have used GUIDE!),

pause(0.01);
drawnow;
jb=findjobj('class','pushbutton');
drawnow;
set(jb(2), 'MousePressedCallback', @UpVertTest);
guidata(hObject, handles);
--------------------

Up to here everything works fine,

But at the end of my m file where I define the related function(UpVertTest) I have problem,
I want to have access to normal handles and do some changes, But I get this error:

??? Undefined function or method 'toDouble' for input arguments of type 'java.awt.Dimension'.

Error in ==> opaque.double at 80
dbl = toDouble(opaque_array(1));

Error in ==> guidata at 85
if isscalar(h) && ishghandle(h)

Error in ==> RatRobot_GUI4>UpVertTest at 523
handlesData=guidata(src);

this is the code I have written:

function UpVertTest(src, evnt)
% trying to access to handles
handlesData=guidata(src);

% set new initial value in GUI
set(handlesData.VerticalPosStart,'string',handlesData.initZ-handles.Step(3));drawnow;
-----------

I think there is something wrong with my function definition,
any ideas?

Contact us