Re: bad problem

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

i ran your version and it killed the phone. Arguments of 0 and 1 made no
difference...

..george

----- Original Message -----
From: "Irv Mullins" <irvm at ellijay.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: bad problem


>
>
> ----- Original Message -----
> From: George Walters <gwalters at sc.rr.com>
> To: EUforum <EUforum at topica.com>
> Sent: Tuesday, August 07, 2001 2:41 PM
> Subject: Re: bad problem
>
>
> >
> > I've not done this yet but here is what I did and it did kill the
phone..
> >
> > I ran this directly from a dos prompt
> >
> > include win32lib.ew
> >
> > -- create a control in the window
> >
> > constant
> > TheWindow   = create( Window, "Close Window", 0, Default, Default, 200,
> 100,
> > 0 ),
> > CloseButton = create( DefPushButton, "Close Window", TheWindow, 40, 10,
> 120,
> > 30, 0 )
> >
> >
> > -- tell Windows when to do the action
> > onClick[CloseButton] = system_exec("exw
> d:/euphoria/training/arf020.exw",1)
> > WinMain( TheWindow, Normal )
> >
> > I didn't get a chance to click the button but it killed the phone
> > anyway....Does this mean we have a problem with EU??
> >
> > ..george
>
> I don't think you can set an onClick[] event that way.. AFAIK, it needs a
> routine_id. Besides which, system_exec is a function, and returns
> success/fail code,
> so what your progam is doing is calling system_exec on startup, and
> assigning the
> return value to the onClick event.
>
> Pretty much guaranteed not to work.
>
> Try this instead:
> --  code generated by Win32Lib IDE v0.10.5
>
> include Win32Lib.ew
> without warning
>
> ----
> --  Window Window1
> global constant Window1 = create( Window, "Window1", 0, Default, Default,
> 400, 300, 0 )
> global constant PushButton2 = create( PushButton, "PushButton2", Window1,
> 52, 16, 90, 30, 0 )
> ----
> procedure PushButton2_onClick ()
> atom ok
>  ok = system_exec("exw d:/euphoria/training/arf020.exw",1) -- try zero,
also
> end procedure
> onClick[PushButton2] = routine_id("PushButton2_onClick")
>
> WinMain( Window1, Normal )
>
>
>
>
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu