Create an empty array of class event.listener
이전 댓글 표시
Is it possible to create an empty array of the class event.listener?
I want to create event listeners (which calls callbackFcn when event listenEvent occurs for object listenObj) and save the handles to the event listeners in the property hListenerArray of an object obj so that the delete method of obj can delete the event listeners. My idea was to do this:
obj.hListenerArray(end+1) = addlistener(listenObj, listenEvent, callbackFcn);
but it fails
??? The following error occurred converting from event.listener to double: Error using ==> double Conversion to double from event.listener is not possible.
I think this is because the property hListenerArray is initialized as class double.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Events에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!