Re: WxEuphoria on ARM
- Posted by mattlewis (admin) Nov 21, 2011
- 2651 views
Jerome said...
Any thoughts on what the difference could be? I see that wxEuphoria uses a different wxMouseEvent procedure than the example ( GetX() vs. GetPosition() ), but neither method works on my device.
It doesn't make sense to me why one would break and the other work. Try changing the wxEuphoria code to:
object WXEUAPI mouse_event_position(intptr_t event) { s1_ptr pos = NewS1(2); wxMouseEvent * e = (wxMouseEvent*) event; e->getPosition( pos->base + 1, pos->base + 2 ); return MAKE_SEQ( pos ); }
That code should be equivalent. Maybe that's what you already tried. The only quirk I'm really aware of is the problems with reading unaligned data. I wouldn't have thought it would be an issue here. Alternatively, you could try:
object WXEUAPI mouse_event_position(wxMouseEvent *event) { s1_ptr pos = NewS1(2); event->getPosition( pos->base + 1, pos->base + 2 ); return MAKE_SEQ( pos ); }
This breaks my convention that allows easy automatic wrapping, but maybe it will fix whatever weirdness you're running into with this function.
Matt