Hi.
--- In [email protected], "entropyreduction" <[EMAIL PROTECTED]> wrote:
> In 4.04.7 the event.destroy in this situation:
> event.create(1, 0, "." ++ scriptname ++ "@startFinished(event.this)",
> "g_bStartDone and (not g_bHasHibernated)")
> quit
> ....
> @startFinished
> event.destroy(arg(1))
> fails with "invalid event handle -1". follwed usually by crash
> (probably because the event isn't destroyed and something happens 
many
> times which shouldn't)

Seems to be problem with event.this. In the current version event.this 
returns just a number, which is not the handle, that always has some 
special char before the number (and an additional "e" in this new 
version apparently). Don't know if this is intended, though. In the 
readme it says that event.this is to return a handle...

Anyway the passing of the event as an arg shouldn't be necessary in 
your case.

@startFinished
event.destroythis

should do (and seems to work in the current version as well)...

I always used to use a static for things like this
static e = event.create(...)
quit
@startFinished
e = event.destroy(e)

BTW:
I see that the handle number is incremented for every new event, even 
if a previous event was destroyed. I guess this is intentional...

Mockey








Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to