On Tue, Oct 7, 2008 at 10:50 AM, John Labenski <[EMAIL PROTECTED]> wrote:

>
> wxSOCKET_INPUT is an enum wxSocketNotify, an integer with a value of
> 0, not an event type.
>

Aha - I think the docs were throwing me off the trail on that point, as
wxSOCKET_INPUT is listed in a table under "wxSocket Events". I thought they
would be on par with other event types.

The mapping between the EVT_XXX() macros and the dynamic event types
> are described in the doc below. Search for EVT_SOCKET and you'll see
> that you want to use wxEVT_SOCKET and that you will get a
> wxSocketEvent object in your callback function. Note that the names
> aren't always so easy to guess.
>

In the wxLua reference I had found the line

 *%define_event* wxEVT_SOCKET // EVT_SOCKET(id, func)

...but didn't know what it meant. So the approach, then, is to do something
like this?

sock:SetEventHandler(someHandler, wxEVT_SOCKET)
someHandler:Connect(wxEVT_SOCKET, function (ev) if ev == wxSOCKET_INPUT then
... end)

Hope this helps,
>     John
>

Thank you, it definitely does - I'll try it out tonight and post back if I
run into any roadblocks.

Evan
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to