Thanks it worked!

The docs can be hard to read some times for the  untrained...

On Sun, Aug 2, 2009 at 10:40 PM, John Labenski<jlaben...@gmail.com> wrote:
> On Sun, Aug 2, 2009 at 9:33 PM, Daniel Aquino<mr.danielaqu...@gmail.com> 
> wrote:
>> I set a string value for an item using
>>
>> combo_box:Append('localhost', wx.wxStringClientData('127.0.0.1'))
>> combo_box:Select(0)
>>
>> Then I try to access the value again
>>
>> local selection = combo_box:GetSelection()
>> local object = combo_box:GetClientObject( selection )
>> local address = object:GetData()
>>
>> But the stack appears to stop at GetData()
>
> Yes, you can verify that that return of combo_box:GetClientObject()
> returns a wxClientData by printing it. Use the function below that is
> defined in the wxControlWithItems class.
>
> http://wxlua.sourceforge.net/docs/wxluaref.html#wxControlWithItems
>
> wxClientData* GetClientObject(unsigned int n) const
> %rename GetStringClientObject wxStringClientData*
> GetClientObject(unsigned int n) const
>
>> I imagine it's because a wxClientData is returned by GetClientObject
>> instead of the proper wxStringClientData but I'm not sure...
>
> No it returns the proper data type since C++ allows you to pass
> objects as their base classes and it's up to the programmer to cast it
> to the desired data type. For wxLua we have to add functions to cast
> to any particular type.
>
> Regards,
>    John
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> wxlua-users mailing list
> wxlua-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to