Skip to content

Toolbar VerticalSection button callbacks fail due to eventdata #174

Description

@rjackey

I added a vertical section with 3 buttons and then pressed one. I got this error:

warning: Error occurred while executing the listener callback for event ButtonPushed defined for class
wt.toolbar.VerticalSection:
Unrecognized function or variable 'evtOut'.

Error in wt.toolbar.HorizontalSection/onButtonPushed (line 119)
            addprop(evtOut,'Section');
                    ^^^^^^
Error in wt.toolbar.HorizontalSection>@(h,e)onButtonPushed(obj,e) (line 102)
                @(h,e)onButtonPushed(obj,e) );
                      ^^^^^^^^^^^^^^^^^^^^^
Error in wt.toolbar.VerticalSection/onButtonPushed (line 92)
            notify(obj,"ButtonPushed",evtOut);
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in wt.toolbar.BaseSection>@(h,e)onButtonPushed(obj,e) (line 91)
            button.ButtonPushedFcn = @(h,e)onButtonPushed(obj,e);
                                           ^^^^^^^^^^^^^^^^^^^^^ 
> In wt.toolbar/VerticalSection/onButtonPushed (line 92)
In wt.toolbar.BaseSection>@(h,e)onButtonPushed(obj,e) (line 91)
In appdesservices.internal.interfaces.model/AbstractModel/executeUserCallback (line 282)
In matlab.ui.control.internal.controller/ComponentController/handleUserInteraction (line 442)
In matlab.ui.control.internal.controller/PushButtonController/handleEvent (line 96)
In appdesservices.internal.interfaces.controller.AbstractController>@(varargin)obj.handleEvent(varargin{:}) (line 229)
In viewmodel.internal.factory.ManagerFactoryProducer>@(src,event)callback(src,viewmodel.internal.factory.ManagerFactoryProducer.convertStructToEventData(event)) (line 76) 
119             addprop(evtOut,'Section');

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions