Brush error within multiple function gui

조회 수: 2 (최근 30일)
curoi
curoi 2014년 11월 14일
편집: curoi 2014년 11월 14일
I'm getting the following error when trying to run the function brush 'on' in a function being called by another function being called by a guide gui:
Error using set
Handle must be a uicontextmenu
Error in datamanager.brushobj/addContextMenu (line 40)
set(this.SelectionHandles(k),'uicontextmenu',cmenu);
Error in datamanager.lineseries/draw (line 39)
this.addContextMenu;
Error in datamanager.series/init (line 36)
this.draw;
Error in datamanager.lineseries (line 4)
this.init(h);
Error in datamanager/enableBrushing (line 37)
hout = datamanager.lineseries(h);
Error in brush>locGetMode (line 212)
datamanager.enableBrushing(objs(k));
Error in brush (line 114)
locGetMode(f); % Creates the mode
Error in f_edit_timecoord (line 38)
brush on;
Error in f_determine_coords2 (line 65)
[j_R,k_R,x_a,y_a] = f_edit_timecoord(aa,AA,tog,savepath,listname);
Error in marigram2>ProcessGroup_SelectionChangeFcn (line 532)
[j_R, k_R, x_a, y_a, filedata, presavepath, guios] = ...
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in marigram2 (line 44)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)marigram2('ProcessGroup_SelectionChangeFcn',get(hObject,'SelectedObject'),eventdata,guidata(get(hObject,'SelectedObject')))
Error in hgfeval (line 63)
feval(fcn{1},varargin{:},fcn{2:end});
Error in uitools.uibuttongroup/childAddedCbk>manageButtons (line 79)
hgfeval(cbk, source, evdata);
Error while evaluating uicontrol Callback
The error comes after the following code in the function:
load( [savepath, '\', listname, '_HiLoMisc_pts.mat'] );
cla;
imshow( AA );
hold on;
h2 = plot( aa, jlo, klo, 'ro', 'MarkerSize', 16, 'LineWidth', 2 );
h3 = plot( aa, jhi, khi, 'go', 'MarkerSize', 16, 'LineWidth', 2 );
h4 = plot( aa, jmisc, kmisc, 'co', 'MarkerSize', 16, 'LineWidth', 2 );
hold off;
brush on;
hBrushLine = findall( aa, 'tag', 'Brushing' );
pause;
This was working earlier when I was running the gui.m file but now it just looks like it isn't working with the current figure. I've tried to do the following alternatives:
hFig = gcf;
hbrush = brush( hFig );
set( hbrush, 'Enable', 'on' );
and
hFig = gcf;
hbrush = brush( hFig, 'on' );
But neither of these work.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by