Not sure if this actually constitutes a bug, but it's an odd (and somewhat annoying) behavior I've observed recently.
I've written a program that creates certain buttons dynamically (e.g., at runtime). I also add a click event to those buttons using AddEvent.
When I run this program on the desktop ( F5>Run), open the form, close the form, and open it again, the buttons now have *two* events assigned to them, and both events get raised, even if it's the same event.
So...
AddButton ("Form1", "Button1", 20,20,60,60,"Click Me")
AddEvent ("Button1", Click, "MySub")
Sub MySub
msgbox( Sender.Text )
End Sub
would display the message box twice. I had to write a little routine to keep track of what events had been assigned to what controls, to avoid adding the same event to a control twice.
Okay, part II - if I compile the same program for either the desktop or the device, run it, open the same form, click on the same controls (buttons), the duplicate events don't get raised, no matter how many times I assign the event to the control. In this case, I am *not* checking beforehand to see if I've already added the event to the control... I just add it every time the control gets created. It works perfectly.
So why then, is the behavior different when run from inside B4PPC?
Is this a bug, or am I missing somwthing?
Gary