View Issue Details

IDProjectCategoryView StatusLast Update
0011515MMW v4Framework: Scripts/Extensionspublic2013-11-25 07:43
Reporterzvezdan Assigned To 
PrioritynoneSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0011515: Skinned SpinEdit doesn't fire OnChange with keyboard after Value is set
DescriptionIf I programaticaly set Value, after that the SpinEdit control doesn't fire OnChange event when I try to type some value using keyboard. In non-skinned versions this works fine. Here is the test script:

Option Explicit

Dim spnTest
Dim lblTest

Sub OnStartUp()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = "SpinEdit test"
    oMenuItem.OnClickFunc = "Test"
    oMenuItem.UseScript = Script.ScriptPath
End Sub

Sub Test(oMenuItem)
    Dim oForm
    Dim btnClose
    Dim btnSet
    Dim i

    Set oForm = SDB.UI.NewForm
    oForm.Common.SetRect 100, 100, 337, 130
    oForm.BorderStyle = 3
    oForm.FormPosition = 4
    oForm.Caption = oMenuItem.Caption

    Set spnTest = SDB.UI.NewSpinEdit(oForm)
    spnTest.Common.SetRect 10, 10, 300, 21
    spnTest.MinValue = -1000
    spnTest.MaxValue = 1000
    Script.RegisterEvent spnTest, "OnChange", "spnTest_OnChange"

    Set lblTest = SDB.UI.NewLabel(oForm)
    lblTest.Common.SetRect 10, 35, 300, 17

    Set btnSet = SDB.UI.NewButton(oForm)
    btnSet.Caption = SDB.Localize("&Set value")
    btnSet.Common.SetRect 90, 60, 77, 25
    Script.RegisterEvent btnSet, "OnClick", "btnSet_OnClick"

    Set btnClose = SDB.UI.NewButton(oForm)
    btnClose.Caption = SDB.Localize("&Close")
    btnClose.Common.SetRect 170, 60, 77, 25
    btnClose.Cancel = True
    btnClose.ModalResult = 2

    oForm.showModal
End Sub

Sub spnTest_OnChange(oCtrl)
    lblTest.Caption = spnTest.Value
End Sub

Sub btnSet_OnClick()
    spnTest.Value = Int(Rnd * 1000)
End Sub
Steps To Reproduce- Copy to Auto folder and restart;
- choose Edit \ SpinEdit test;
- type some value in the spinedit control -> the typed value is correctly displayed in the label;
- click the "Set value" button;
- type some value in the spinedit control -> the typed value is not displayed in the label;
- click on the arrow buttons of the spinedit control;
- type some value in the spinedit control -> the typed value is now correctly displayed in the label.
TagsNo tags attached.
Fixed in build

Relationships

related to 0006258 closedLudek SpinEditEvent OnChange is not fired consistently (skinned) 

Activities

There are no notes attached to this issue.