|
|
Error in Custom datatip string function
Posted:
Dec 30, 2012 11:13 PM
|
|
Hello everyone,
I am using a custom datatip string function in my GUI, the call to the function is made in the following format:
set(dcmObj,'Enable','on',... 'SnapToDataVertex','on', ... 'DisplayStyle','datatip',... 'UpdateFcn',@datatextbox);
where datatextbox is the custom datatip function and the following is it's format:
function [txt,pos] = datatextbox(~,event_obj) pos = get(event_obj,'Position'); txt = {['Vector Length: ',num2str(pos(1))],['MOS: ',num2str(pos(2))]}; myhandles = guidata(gcbo); sobj1= myhandles.sobj1; sobj2 = myhandles.sobj2; myhandles.txt = txt; set(myhandles.txt1,'string',txt); [imno,imind,vlength,ssim,axes] = lselection(sobj1,sobj2,pos);
However, I am getting a "Error in Custom datatip string function" error message when I add the last function (lselection) in my function definition. If I remove this function everything works alright. The lselection function works alright when used separately, I need to be able to pass and update the position information from this function and I am wondering what could be the problem and I appreciate any suggestions.
|
|