I'm having a little trouble with this. I have changed my code to this :-
self.btnYrEnd = dabo.ui.dButton(self.basePanel, Left=155,
Top=200,RegID="btnYrEnd",
Width=130, Caption="Year End", OnHit=self.btnSetupClick())
and have the following :-
def btnSetupClick(self, evt):
frm = AccountsForm(self)
self.hide()
frm.show()
Now what happens is that whenever I open my first form up the AccountsForm
is opened at the same time ie its as if the button has been hit
automatically when it is created. I know I am passing the wrong number of
values, but playing around with that hasn't helped either.
Have I got the syntax wrong here? (I couldn't find it in dabodoc).
Thanks
Rodgy
----- Original Message -----
From: "Ed Leafe" <[email protected]>
To: "Dabo Users list" <[email protected]>
Sent: Tuesday, January 20, 2009 1:31 PM
Subject: Re: [dabo-users] Is this a bug?
> On Jan 19, 2009, at 4:41 PM, Roger Lovelock wrote:
>
>> Following Sample exhibits the behaviour!
>
>
> OK, there is a bug here, but it has to do with the way that auto-
> binding of events is handled. I'm not sure why it's looking in both
> forms for a matching method name, but it is.
>
> I would suggest not using this style of binding, even after we fix
> the bug. Now it's much simpler to simply pass the event binding in the
> constructor of the button:
>
> btn = dabo.ui.dButton(self.mainpanel, Caption="Click Me",
> OnHit=self.onButton1Click)
>
>
> -- Ed Leafe
>
>
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/d8370dafb1ec4c5f90d4a5ff90862...@roger