several question about addlistener's input arguments
조회 수: 2 (최근 30일)
이전 댓글 표시
From this document
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?notify?callbackfunction?
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
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!