[Gambas-user] How do I use tag property for a group of timers ?

nando_f at nothingsimple.com nando_f at nothingsimple.com
Sat Aug 17 16:08:53 CEST 2019


== A possible idea is ==
If you have an array of struct wherein a member of struct is a timer
then just add another parallel member that is your tag.

pseudo code:
struct 
   object <--> mytimer
   string <--> mytag
End

...

myarray array[1...100] of struct

...

myarray[17].mytag = "17"
myarray[17].mytimer.start






--
Open WebMail Project (http://openwebmail.org)


---------- Original Message -----------
From: Bruce <adamnt42 at gmail.com>
To: user at lists.gambas-basic.org
Sent: Sat, 17 Aug 2019 19:04:39 +0930
Subject: Re: [Gambas-user] How do I use tag property for a group of timers ?

> Well, not to answer your question, we have uo to several hundred timers 
> running during an auction .... each is defined within an object of a 
> class that only knows of one timer and raises an event with the "key" of 
> the timer class concerned.
> 
> IOW, I don't think you can do this with a struct. Others mileage may vary.
> b
> 
> On 17/8/19 3:57 pm, Vinode Singh Ujlain wrote:
> > Please see attached code
> > I am having an *array* of *struct* wherein a member of struct is a 
> > timer. Thus I have a set of timers firing.
> > Since timer object doesn't have a *tag* property , how do I figure out 
> > which timer has fired ?
> > 
> > Warm regards,
> > Vinode Singh Ujlain
> > ------------------------------------------------------------------------
> > 
> > 
> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> >
> 
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
------- End of Original Message -------



More information about the User mailing list