1. wxEuphoria v0.11 on Vista - events don't work

I have 3 programs using v0.11 that work correctly on GNU/Linux but the events
don't work on Vista. Click on a button, nothing happens.

v0.11 seems to be installed correctly on Vista. I downloaded the most recent
version of v0.11 and followed instructions. It quit complaining about it requires
v0.11 but loaded v0.10.

What's with the events? Did anyone else have this problem?

new topic     » topic index » view message » categorize

2. Re: wxEuphoria v0.11 on Vista - events don't work

Jerry Story wrote:
> 
> I have 3 programs using v0.11 that work correctly on GNU/Linux but the events
> don't work on Vista. Click on a button, nothing happens.

I tracked it out.

This (with the parent) works on Linux but not on Windows:

set_event_handler( {frmWin,btnFave}, get_id(btnFave),
  wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))

But this (without the parent) works on Windows but not on Linux:

set_event_handler( {btnFave}, get_id(btnFave),
  wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))


Do I gotta do this?

if platform() = LINUX then
    set_event_handler( {frmWin,btnFave}, get_id(btnFave),
     wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))
  else
    set_event_handler( {btnFave}, get_id(btnFave),
      wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))
  end if


Or is there something better?

new topic     » goto parent     » topic index » view message » categorize

3. Re: wxEuphoria v0.11 on Vista - events don't work

Jerry Story wrote:
> 
> Jerry Story wrote:
> > 
> > I have 3 programs using v0.11 that work correctly on GNU/Linux but the
> > events
> > don't work on Vista. Click on a button, nothing happens.
> 
> I tracked it out.
> 
> This (with the parent) works on Linux but not on Windows:
> 
> set_event_handler( {frmWin,btnFave}, get_id(btnFave),
>   wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))
> 
> But this (without the parent) works on Windows but not on Linux:
> 
> set_event_handler( {btnFave}, get_id(btnFave),
>   wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))
> 
> 
> Do I gotta do this?
> 
> }}}
<eucode>
>   if platform() = LINUX then
>     set_event_handler( {frmWin,btnFave}, get_id(btnFave),
>      wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))
>   else
>     set_event_handler( {btnFave}, get_id(btnFave),
>       wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))
>   end if
> </eucode>
{{{

> 
> Or is there something better?

This has been one of my big struggles.  The actual objects that are passed
are passed on different conditions, and with different data.  I'll have 
to investigate further.  Although I thought the issue was limited to
menus.  Assuming btnFave is a real wxButton, it should be able to handle
its own events.

Then again, this might be a Vista specific issue (I only have XP).  Could 
you post a minimal program that displays this behavior for you?

Matt

new topic     » goto parent     » topic index » view message » categorize

4. Re: wxEuphoria v0.11 on Vista - events don't work

Matt Lewis wrote:
> 
> Jerry Story wrote:

> > Do I gotta do this?
> > 
> > }}}
<eucode>
> >   if platform() = LINUX then
> >     set_event_handler( {frmWin,btnFave}, get_id(btnFave),
> >      wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))
> >   else
> >     set_event_handler( {btnFave}, get_id(btnFave),
> >       wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))
> >   end if
> > </eucode>
{{{

> > 
> > Or is there something better?
> 
> This has been one of my big struggles.  The actual objects that are passed
> are passed on different conditions, and with different data.  I'll have 
> to investigate further.  Although I thought the issue was limited to
> menus.  Assuming btnFave is a real wxButton, it should be able to handle
> its own events.
> 
> Then again, this might be a Vista specific issue (I only have XP).  Could 
> you post a minimal program that displays this behavior for you?
> 
> Matt

I think figured it out.
The following code seems to work on both Linux and Vista.

set_event_handler( btnFave, get_id(btnFave),
  wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "FaveSF" ))


An atom instead of a sequence, except for get_menuitem_id.
With get_menuitem_id, a sequence works for both Linux and Vista.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu