sDecimalSpinEdit bug

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32869
    rodneyb
    Participant

    Hi Guys,
    There seems to be a small bug in the sDecimalSpinEdit control.
    The problem is that under certain circumstances, the sDecimalSpinEdit .OnChange event gets called before the FormCreate method of the parent form is called. This is not the desired behaviour as no standard controls have their OnChange events called before their parent form is properley created.
    I have included an example project.
    The criteria to make is happen is;
    1) create an available form (not an Auto Create form)
    2) place a sDecimalSpinEdit control on that form
    3) change the sDecimalSpinEdit .Text property to eg. '0.0' (appears to make the OnChange event get called while the form is being created)
    4) attach an OnChange event to the spin edit control.
    Run the program and hit a button to create the form with the spin edit on it.

    The attached program exhibits the problem. However, if you play around with the forms and controls in design time, it is quite easy to make the problem disappear. It can be hard to make the problem appear again.

    A work around is to set the OnChange event handler in the FormCreate method (after setting the OnChange event to nil in the Object Inspector!)

    I'm using D7, AlphaSkins 6.22 (but happens at least as far back as 6.03), TntControls enabled, XP SP2

    #38787
    Support
    Keymaster

    Hello and thank you for demo, I will try it soon

    Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.