View Issue Details

IDProjectCategoryView StatusLast Update
0009780MMW v4Framework: Scripts/Extensionspublic2012-10-15 21:17
Reporterpeke Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version4.0.7 
Target Version4.1 
Summary0009780: ISDBUIEvents not working correctly on some objects
DescriptionIf 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 InformationForum:
http://www.mediamonkey.com/forum/viewtopic.php?f=19&t=68033
TagsNo tags attached.
Attached Files
bug9780Samples.rar (981 bytes)
Fixed in build

Activities

Ludek

2012-10-11 13:57

developer   ~0032431

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?

peke

2012-10-14 00:49

developer   ~0032533

Try to use these two sample scripts that were mentioned in Forum Topic and you should be able to reproduce.

Ludek

2012-10-15 12:04

developer   ~0032565

Last edited: 2012-10-15 12:11

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

peke

2012-10-15 21:17

developer   ~0032574

Thank you for clarification, I updated http://www.mediamonkey.com/wiki/index.php/ISDBUIButtonEvents::OnClick to evade future confusions.