several question about addlistener's input arguments

2 次查看(过去 30 天)
1、Are there two forms or three forms?
two:
el = addlistener(hSource,EventName,callback)
el = addlistener(hSource,PropertyName,EventName,callback)
three:
el = addlistener(hSource,EventName,callback)
el = addlistener(hSource,PropertyName,EventName,callback)
addlistener(___)
2、Does this grammar match this example?
el = addlistener(hSource,PropertyName,EventName,callback)
propListener = addlistener(fig,'Color','PostSet',@(src,evnt)disp('Color changed'));
if it is,that means PropertyName='Color' EventName='PostSet'??
but I think it's weird.'PostSet' seems like an option.because it "Event Occurs" is "Immediately after the property value is set"
3、if the classes don't build in a set or get method, is it unnecessary to use this format "el = addlistener(hSource,PropertyName,EventName,callback)" ?
4、what situation do I need to use PreSet PreGet?
PreSet:Immediately before the property value is set, before calling its set access method
PreGet:Immediately before a property value query is serviced, before calling its get access method
Whose “property”? The Event source property?
If it is Event source property,it is weird!
“before………………” who is going to react to this?notifycallbackfunction
Why is it ’before’ ,not ’after’?’ befor……set’,that means event didn't change? If it is ,Why the listener should react befor event change?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 App Building 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by