From: Adam Chapman on 14 Jul 2010 04:53 On Jul 14, 9:41 am, "us " <u...(a)neurol.unizh.ch> wrote: > Adam Chapman > > > I've actually just found out the problem. In the "set command I was > > defining a string but giving a number instead. > > > changing > > set(handles.batteryCapacity, 'String', 200) > > to > > set(handles.batteryCapacity, 'String',' 200') > > > solved that issue. > > > Thanks > > hmm... this is VERY intriguing(!)... > why should this syntax problem cause this error message... > > > > "???Error using ==> set > > > Invalid handle object. > > instead of the better known error > ??? Error using ==> set > > -and- why should this error disappear with your tricky HANDLES(;) line... > > us I think I get what you are saying, that somehow the structure array "handles" needs to be defined somewhere before this line? I thought that handles was retrieved from the GUI figure window, since it does in the examples and I've copied from those anyway
From: us on 14 Jul 2010 05:06 Adam Chapman <adamchapman1985(a)hotmail.co.uk> wrote in message <44270eaf-6e39-48e1-bc41-2f198a054be0(a)d16g2000yqb.googlegroups.com>... > On Jul 14, 9:41 am, "us " <u...(a)neurol.unizh.ch> wrote: > > Adam Chapman > > > > > I've actually just found out the problem. In the "set command I was > > > defining a string but giving a number instead. > > > > > changing > > > set(handles.batteryCapacity, 'String', 200) > > > to > > > set(handles.batteryCapacity, 'String',' 200') > > > > > solved that issue. > > > > > Thanks > > > > hmm... this is VERY intriguing(!)... > > why should this syntax problem cause this error message... > > > > > > "???Error using ==> set > > > > Invalid handle object. > > > > instead of the better known error > > ??? Error using ==> set > > > > -and- why should this error disappear with your tricky HANDLES(;) line... > > > > us > > I think I get what you are saying, that somehow the structure array > "handles" needs to be defined somewhere before this line? I thought > that handles was retrieved from the GUI figure window, since it does > in the examples and I've copied from those anyway what happens if you put a DEBUG statement right ...before... the HANDLES line and - during runtime - do a which handles -all; disp(handles); us
From: Adam Chapman on 14 Jul 2010 05:12 On Jul 14, 10:06 am, "us " <u...(a)neurol.unizh.ch> wrote: > Adam Chapman <adamchapman1...(a)hotmail.co.uk> wrote in message <44270eaf-6e39-48e1-bc41-2f198a054...(a)d16g2000yqb.googlegroups.com>... > > On Jul 14, 9:41 am, "us " <u...(a)neurol.unizh.ch> wrote: > > > Adam Chapman > > > > > I've actually just found out the problem. In the "set command I was > > > > defining a string but giving a number instead. > > > > > changing > > > > set(handles.batteryCapacity, 'String', 200) > > > > to > > > > set(handles.batteryCapacity, 'String',' 200') > > > > > solved that issue. > > > > > Thanks > > > > hmm... this is VERY intriguing(!)... > > > why should this syntax problem cause this error message... > > > > > > "???Error using ==> set > > > > > Invalid handle object. > > > > instead of the better known error > > > ??? Error using ==> set > > > > -and- why should this error disappear with your tricky HANDLES(;) line... > > > > us > > > I think I get what you are saying, that somehow the structure array > > "handles" needs to be defined somewhere before this line? I thought > > that handles was retrieved from the GUI figure window, since it does > > in the examples and I've copied from those anyway > > what happens if you put a DEBUG statement right ...before... the HANDLES line and - during runtime - do a > > which handles -all; > disp(handles); > > us- Hide quoted text - > > - Show quoted text - the whole output is: handles is a variable. figure1: 1.5000e+003 uipanel1: 1.5010e+003 text8: 1.5130e+003 confirm: 1.5120e+003 Multi: [1.5110e+003 1.5090e+003] maxRecharge: 400 text4: 1.5080e+003 maxDischarge: 600 cellNum: 98 text3: 1.5050e+003 text2: 1.5040e+003 batteryCapacity: 200 text1: 1.5020e+003 output: 1.5000e+003 ??? Error using ==> set Invalid handle object. Error in ==> battery_gui>initialize_gui at 80 set(handles.batteryCapacity, 'String', '200'); Error in ==> battery_gui>battery_gui_OpeningFcn at 69 initialize_gui(hObject, handles, false); Error in ==> gui_mainfcn at 221 feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:}); Error in ==> battery_gui at 47 gui_mainfcn(gui_State, varargin{:}); ------ I'm also getting an error 50% of the time about "maxRecharge_CreateFcn" not existing, which also appears to be nonsense lol. I'm trying to concentrate on this one first though
From: us on 14 Jul 2010 05:34 Adam Chapman > the whole output is: handles is a variable. > figure1: 1.5000e+003 > uipanel1: 1.5010e+003 > text8: 1.5130e+003 > confirm: 1.5120e+003 > Multi: [1.5110e+003 1.5090e+003] > maxRecharge: 400 > text4: 1.5080e+003 > maxDischarge: 600 > cellNum: 98 > text3: 1.5050e+003 > text2: 1.5040e+003 > batteryCapacity: 200 > ??? Error using ==> set > Invalid handle object. well... THAT explains it, though: batteryCapacity: 200 % <- is NOT a handle... % do this while debuggin... ishandle(handles.batteryCapacity) us
From: Adam Chapman on 14 Jul 2010 05:42 On Jul 14, 10:34 am, "us " <u...(a)neurol.unizh.ch> wrote: > Adam Chapman > > > the whole output is: handles is a variable. > > figure1: 1.5000e+003 > > uipanel1: 1.5010e+003 > > text8: 1.5130e+003 > > confirm: 1.5120e+003 > > Multi: [1.5110e+003 1.5090e+003] > > maxRecharge: 400 > > text4: 1.5080e+003 > > maxDischarge: 600 > > cellNum: 98 > > text3: 1.5050e+003 > > text2: 1.5040e+003 > > batteryCapacity: 200 > > ??? Error using ==> set > > Invalid handle object. > > well... THAT explains it, though: > > batteryCapacity: 200 % <- is NOT a handle... > % do this while debuggin... > ishandle(handles.batteryCapacity) > > us Aha! That's making more sense! Does it need to be a handle or can it remain a variable? I would of thought it should be a handle, because on line 63: handles.output = hObject; I would have thought hObject is a handle, but I'll check now
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Making some parts of image fully transparent Next: Extracting subvector between boundary |