On Fri, Oct 10, 2008 at 12:55 PM, Scott Kirkpatrick
<[EMAIL PROTECTED]> wrote:
> John,
>
> That's what I had picked up from reading the Lua documentation and works
> if I want to use a wxWidgets object. Here's what I want to do:
>
> class Item
> {
> public:
>    wxString        RefID;
>    bool            InProcess;
>    double          Length;
>    double          Priority;
>
>    double CalculateValue();
> };
>
> WX_WX_DECLARE_LIST(Item, ListItems);
>
> ListItems   ProcessItems;
>
>
> The Item class is a very abbreviated version of what I have.  What I
> need to do is to pass ProcessItems to a Lua function that will determine
> what Item to process next.  The Lua function needs to access the public
> properties and the member function.  It of course has to iterate over
> all the Items in the wxList ProcessItems.

You need to make bindings for your class then.

http://wxlua.sourceforge.net/docs/binding.html

wxList is in wxLua/bindings/wxwidgets/wxbase_data.i

See wxLua/bindings/wxwidgets/wxadv_rules.lua as an example of the
rules to build the binding files using genwxbind.lua

note that in your interface files you should derive your "ListItems"
wxList class from the wxList binding to get all the wxList functions,
but also you might want to add some "overridden" functions to shortcut
the work to get the wxNode data, see wxNode comments in
wxLua/bindings/wxwidgets/wxbase_data.i.

Regards,
    John

-------------------------------------------------------------------------
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