From: Yow on 20 Apr 2010 04:02 Dear all, I read Simple Event Listener Example in Matlab help file. I have deployed normal Matlab function for Java successfully before using Matlab Builder JA but now I want to deploy function which uses event listener using Matlab Builder JA but can't find the document. Is it possible ? I know the normal function method is stored as .m file but may i know what is the physical file extension for classdef like below ? Can both m and classdef files be packaged in the same JA project ? classdef SimpleEventClass < handle % Must be a subclass of handle properties Prop1 = 0; end events Overflow end methods function set.Prop1(obj,value) orgvalue = obj.Prop1; obj.Prop1 = value; if (obj.Prop1 > 10) % Trigger the event using custom event data notify(obj,'Overflow',SpecialEventDataClass(orgvalue)); end end end end Also may i know how to pass values to set.Prop1(obj,value) above from another function say fnTest ? Say i want to pass a value 15, how is the coding block looks like ? I am lost, thanks in advance for any help Yow
From: Yow on 7 May 2010 19:30 Hi, I have tested, the classdef is saved as .m file. Both the function m and classdef m files can be packaged in the same project. To pass value to set.Prop1(obj,value) : sec = SimpleEventClass; sec.Prop1 = 10; However, event listener is not supported for deployment to Java because MATLAB type MCOS is not supported in MWArray for use in Java. If the new release will include this support, kindly inform which future version. Thank you. Yow
|
Pages: 1 Prev: channge axis limit within loop Next: Examining Data in the Simulink Debugger |