Re: broken buttons

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message -----=20
From: "Jonas Temple" <jtemple at yhti.net>
To: "EUforum" <EUforum at topica.com>
Subject: RE: broken buttons


>=20
>=20
> George,
>=20
> Yep, you're right.  I also remembered the following "fix" if you don't =

> want to go through converting to setHandler.  Add this line of code=20
> right before WinMain():
>=20
> void =3D onXXX(True)
>=20

Yes, this is the technique to use while converting over to setHandler(). =
This works because each call to setHandler() also calls onXXX(False). =
Using both methods is a bit slower than just using setHandler.

On way of converting over is to this sort of thing...

---old code ---

procedure onClick_Btn()
  . . .
end procedure
onClick[Btn]=3Droutine_id("onClick_Btn")
. . .
  if xxx then
     onClick_Btn()
  end if

--converted code--

procedure onClick_Btn()
  . . .
end procedure
procedure Btn_Click(integer self, integer event, sequence parms)
   onClick_Btn()
end procedure
setHandler(Btn, w32HClick,routine_id("Btn_Click"))
. . .
  if xxx then
     onClick_Btn()
  end if
----------------

You can also invoke a handler using invokeHandler(Btn, w32HClick, {})

--=20
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu