View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009780 | MMW v4 | Framework: Scripts/Extensions | public | 2012-10-04 21:17 | 2012-10-15 21:17 |
Reporter | peke | Assigned To | |||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 4.0.7 | ||||
Target Version | 4.1 | ||||
Summary | 0009780: ISDBUIEvents not working correctly on some objects | ||||
Description | If Event is registered as it (doesn't work): Script.RegisterEvent Btn2, "OnClick", "Btn2Click" But if it is registered as (Works): Script.RegisterEvent Btn2.Common, "OnClick", "Btn2Click" Wiki Reference: http://www.mediamonkey.com/wiki/index.php/SDBUIButton NOTE: I changed Wiki Page from "Use Common.OnClick" to "Use Common.OnClick instead" To clarify behavior. | ||||
Additional Information | Forum: http://www.mediamonkey.com/forum/viewtopic.php?f=19&t=68033 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Fixed in build | |||||
|
I cannot reproduce, registering the OnClick event works fine for me, e.g. this sample script works fine http://www.mediamonkey.com/wiki/index.php/Sample_ListBox_script and it includes code Set Btn = SDB.UI.NewButton(Form) Btn.Common.SetRect 10, 350, 80, 25 Btn.Caption = "Add item" Script.RegisterEvent Btn, "OnClick", "BtnClick" that works, tested 1602, skinned. Does the sample script works for you too? Could you attach a sample that doesn't work? |
|
Try to use these two sample scripts that were mentioned in Forum Topic and you should be able to reproduce. |
|
The example from the forum thread doesn't work, because there is used Sub Btn2Click (Form) instead of Sub Btn2Click i.e. - if you RegisterEvent for Btn2.Common then there needs to be Sub Btn2Click( Obj) viz http://www.mediamonkey.com/wiki/index.php/ISDBUICommonEvents::OnClick - but if you RegisterEvent just for Btn2 then there needs to be just Sub Btn2Click viz http://www.mediamonkey.com/wiki/index.php/ISDBUIButtonEvents::OnClick |
|
Thank you for clarification, I updated http://www.mediamonkey.com/wiki/index.php/ISDBUIButtonEvents::OnClick to evade future confusions. |