[Gambas-user] Gambas EVENT - RAISE
Vince Scott (SBC)
vince.scott at ...770...
Wed Mar 14 22:26:26 CET 2007
Thanks, I think I am doing the same thing you are...
Here is what I did:
Inside cKeyboard class
'*** Defined Outside Methods
EVENT SendKey(p_Key AS String) as Boolean
'*** Group Click Event From Button Group
Public SUB grpKeys_Click()
Dim Ret as Boolean
Ret = RAISE SendKey(LAST.Tag)
END
'*** Inside FORM or an Encapsulated Class module
Dim oKeyboard as New cKeyboard
'*** Setup to Capture Event
PUBLIC SUB oKeyboard_SendKey(p_Key AS String)
'NEVER GET THIS EVENT
END
-----Original Message-----
From: gambas-user-bounces at lists.sourceforge.net
[mailto:gambas-user-bounces at lists.sourceforge.net] On Behalf Of timothy
Sent: Wednesday, March 14, 2007 1:36 PM
To: 'mailing list for gambas users'
Subject: Re: [Gambas-user] Gambas EVENT - RAISE
> -----Original Message-----
> From: gambas-user-bounces at lists.sourceforge.net [mailto:gambas-user-
> bounces at lists.sourceforge.net] On Behalf Of Vince Scott (SBC)
> Sent: Wednesday, 14 March 2007 02:47 PM
> To: gambas-user at lists.sourceforge.net
> Subject: [Gambas-user] Gambas EVENT - RAISE
>
> Hello,
>
>
>
> I'm using Gambas version 1.9.46 and cannot get the EVENT - RAISE event
to
> work. I need my classes to be able to generate an event. Can anyone
help
> me?
> I try accessing the archives on the web site but the page seems to be
> broken.
>
>
>
> Vince
>
Create a new class and place this code in it
PRIVATE Ten AS Timer
PUBLIC SUB _new()
Ten = NEW Timer AS "Ten"
Ten.Delay = 5000
Ten.Enabled = TRUE
END
EVENT Pulse(t AS Date)
PUBLIC SUB Ten_Timer()
RAISE Pulse(Now)
END
Now put this code in your startup form:
PRIVATE Pulse AS Every5Seconds
PUBLIC SUB Form_Open()
Pulse = NEW Every5Seconds AS "Pulse"
END
PUBLIC SUB Pulse_Pulse(t AS Date)
PRINT t
END
You should see the time printed every 5 seconds.
Thanks
8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list