Hi,
John Labenski wrote:
> On 6/26/07, Hakki Dogusan <[EMAIL PROTECTED]> wrote:
>>> What about just this? Remove the IsEmpty and NULL. Does it work just
>>> using c_str()?
>> No, it didn't work. ( "" != NULL Isn't it?)
>
> It should be the same.
> const char* str = "";
> should be the same as
> const char* str = {0};
> since strings are always NULL terminated.
>
> Maybe w_char (for unicode) is different, but IIRC unicode (utf16 at
> least) just uses two NULLS as a termination?
>
> Anyway, I applied a fix using "str.IsEmpty() ? NULL : str.c_str()"
>
>> BTW, I'm testing for gcc-3.4.5 now. Compiler dies at static struct
>> definitions while compiling wx_bind.cpp.
>>
>> To see, I commented following, and it compiles:
>>
>> static wxLuaBindEvent eventList[] = {
>> /* ... */
>> { 0, 0, 0 },
>> };
>
> And if you comment out the first and then the second half of the
> arrays it doesn't work? I'd guess that one of the elements is
> problematic or that there's too many #if statements.
>
Exact positions are:
wxLuaBindEvent* wxLuaGetEventList_wx(size_t &count)
{
static wxLuaBindEvent eventList[] =
{
...
/*hd...
#if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) &&
((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) &&
(wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL ))
{ "wxEVT_COMMAND_DIRPICKER_CHANGED",
&wxEVT_COMMAND_DIRPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent },
#endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) &&
((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) &&
(wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL ))
{ "wxEVT_COMMAND_ENTER", &wxEVT_COMMAND_ENTER,
&s_wxluatag_wxCommandEvent },
#if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) &&
((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) &&
(wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL ))
{ "wxEVT_COMMAND_FILEPICKER_CHANGED",
&wxEVT_COMMAND_FILEPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent },
#endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) &&
((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) &&
(wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL ))
*/
...
{ 0, 0, 0 },
};
count = sizeof(eventList)/sizeof(wxLuaBindEvent) - 1;
return eventList;
}
wxLuaBindString* wxLuaGetStringList_wx(size_t &count)
{
static wxLuaBindString stringList[] =
{
...
/*hd...
{ "wxDirSelectorPromptStr", wxDirSelectorPromptStr },
{ "wxFILE_SEP_DSK", wxT(":") },
{ "wxFILE_SEP_EXT", wxT(".") },
{ "wxFILE_SEP_PATH", wxLua_FILE_SEP_PATH },
{ "wxFILE_SEP_PATH_DOS", wxT("\\") },
{ "wxFILE_SEP_PATH_MAC", wxT(":") },
{ "wxFILE_SEP_PATH_UNIX", wxT("/") },
{ "wxFILE_SEP_PATH_VMS", wxT(".") },
#if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG
{ "wxFileSelectorDefaultWildcardStr",
wxFileSelectorDefaultWildcardStr },
{ "wxFileSelectorPromptStr", wxFileSelectorPromptStr },
#endif // wxLUA_USE_wxFileDialog && wxUSE_FILEDLG
*/
...
{ 0, 0 },
};
count = sizeof(stringList)/sizeof(wxLuaBindString) - 1;
return stringList;
}
> Thanks,
> John Labenski
>
--
Regards,
Hakki Dogusan
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users