Re: [wxlua-users] GL library fails to link on Linux

2016-05-02 Thread John Labenski
On Thu, Mar 31, 2016 at 11:51 PM, Paul K  wrote:

> Hi John,
>
> I've added "gl" component to my wxwidgets library and am getting an
> error on Linux (Windows and OSX compiled without issues using the same
> configure call):
>
> [ 97%] Building CXX object
> modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxlua/wxlstate.cpp.o
> make[2]: *** No rule to make target `lib/libwx_gtk2u_gl-3.1.a', needed
> by `lib/MinSizeRel/libwx.so'.  Stop.
> make[2]: *** Waiting for unfinished jobs
> [100%] Building CXX object
> modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxlua/wxlua_bind.cpp.o
> make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
> make: *** [all] Error 2
> Error: failed to build wxLua
>
> Here is my configure call:
>
>   cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR"
> -DCMAKE_BUILD_TYPE=$WXLUABUILD -DBUILD_SHARED_LIBS=FALSE \
> -DwxWidgets_CONFIG_EXECUTABLE="$INSTALL_DIR/bin/wx-config" \
> -DwxWidgets_COMPONENTS="stc;gl;html;aui;adv;core;net;base" \
> -DwxLuaBind_COMPONENTS="stc;gl;html;aui;adv;core;net;base"
> -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE \
> -DwxLua_LUA_INCLUDE_DIR="$INSTALL_DIR/include"
> -DwxLua_LUA_LIBRARY="$INSTALL_DIR/lib/liblua.a" .
>
> (I don't get any failures if I remove "gl" from the list of components).
>
> Does anyone have a suggestion on how to fix this? Thank you.
>
>
What is the name of the 'gl' library that you do have in the wxWidgets
build directory? It is looking for 'lib/libwx_gtk2u_gl-3.1.a' which should
be in the same dir as the wx libs 'libwx_gtk2u_core-3.1.so.0.0.0' for
example.

You can check the wxWidgets config.log and search for opengl and you should
see some messages about detection of gl and whether it was usable. For
example, mine says "wx_cv_use_opengl=wxUSE_OPENGL=yes" and I configured
wxWidgets with --with-opengl.

Regards,
John
--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxllua.h

2016-05-02 Thread John Labenski
On Mon, May 2, 2016 at 1:29 AM, Eero Pajarre  wrote:

> Hi,
>
> After long break I am trying to compile the latest wxlua from svn (on
> latest Ubuntu)
>
> It seems that the Cmake configuration is missing installing the wxllua.h
> file
> (the file with double l )
>
> For my use I added it to CMakeLists.txt, is that the original place?
>

Yes, fixed in svn trunk, thanks.

-John
--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxLua x64

2015-10-23 Thread John Labenski
On Fri, Oct 23, 2015 at 3:56 AM, Laurent Renoux <lren...@ivory-tower.fr>
wrote:

> Thx for your answer.
>
>
>
> Sorry for my approximation, I only work under Windows. I use Visual 2012
> where size_t is defined as follow
>
>
Ok, thanks. Let me know if 'unsigned long long' doesn't work. It's
suboptimal for 32-bit, but I think compiler compatibility trumps that.
Someday I'll move the code into the 21st century.

Thanks,
John



>
>
>
>
> #ifndef _SIZE_T_DEFINED
>
> #ifdef  _WIN64
>
> typedef unsigned __int64size_t;
>
> #else
>
> typedef _W64 unsigned int   size_t;
>
> #endif
>
> #define _SIZE_T_DEFINED
>
> #endif
>
>
>
> In x64
>
>
>
> sizeof(long) = 4
>
> sizeof(long long) = 8
>
> sizeof(size_t) = 8
>
>
>
> In x86
>
>
>
> sizeof(long) = 4
>
> sizeof(long long) = 4
>
> sizeof(size_t) = 4
>
>
>
>
>
> Regards,
>
>
>
> Laurent
>
>
>
>
>
> *De :* John Labenski [mailto:jlaben...@gmail.com]
> *Envoyé :* vendredi 23 octobre 2015 05:13
> *À :* wxlua-users@lists.sourceforge.net
> *Objet :* Re: [wxlua-users] wxLua x64
>
>
>
> On Thu, Sep 3, 2015 at 8:03 AM, Laurent Renoux <lren...@ivory-tower.fr>
> wrote:
>
> Hi John,
>
>
>
> At first, i would like to tell you how big is your works : thanks for all.
>
>
>
> I use wxLua with wxWidget 3.0.2 since 1 year on x86 and x64 platforms on
> Windows 7 with no matter. Since I have jumped on Windows 10, wxLua crash on
> x64. Same dll, same code. I think, I have found the problem.
>
>
>
> In file wxlstate.cpp In function
>
>
>
> void* LUACALL wxluaT_getuserdatatype(lua_State* L, int stack_idx, int
> wxl_type)
>
>
>
>  long int o = (long int)wxlua_touserdata(L, stack_idx, false);
>
>
>
> should be changed in
>
>
>
>  size_t o = (size_t)wxlua_touserdata(L, stack_idx, false);
>
>
>
> on Windows platforms to avoid original pointer to be truncated in 32 bits.
> Why it doesn’t crash since 1 year on Win7, I really don’t know, probably
> I’m a lucky man and memory management has changed on Win10 !
>
>
>
>
>
> Humm, my understanding was that both long and size_t are 4 bytes on a
> 32-bit architecture and 8 bytes on a 64-bit architecture, but I see now
> that there are claims that Visual Studio kept long at 4 bytes on x64. It
> seems like there is no guarantees about size_t other than that it will be
> unsigned in the C++ standard.
>
> Can you please print sizeof(long) and sizeof(size_t) and let me know what
> compiler you use?
>
>
> I should use an uintptr_t, but older Visual Studio versions don't have
> inttypes.h so I've changed it to 'unsigned long long' so it'll work
> everywhere. The change is committed to svn.
>
> Regards,
>
>  John
>
>
> --
>
> ___
> wxlua-users mailing list
> wxlua-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>
>
--
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxLua x64

2015-10-22 Thread John Labenski
On Thu, Sep 3, 2015 at 8:03 AM, Laurent Renoux 
wrote:

> Hi John,
>
>
>
> At first, i would like to tell you how big is your works : thanks for all.
>
>
>
> I use wxLua with wxWidget 3.0.2 since 1 year on x86 and x64 platforms on
> Windows 7 with no matter. Since I have jumped on Windows 10, wxLua crash on
> x64. Same dll, same code. I think, I have found the problem.
>
>
>
> In file wxlstate.cpp In function
>
>
>
> void* LUACALL wxluaT_getuserdatatype(lua_State* L, int stack_idx, int
> wxl_type)
>
>
>
>  long int o = (long int)wxlua_touserdata(L, stack_idx, false);
>
>
>
> should be changed in
>
>
>
>  size_t o = (size_t)wxlua_touserdata(L, stack_idx, false);
>
>
>
> on Windows platforms to avoid original pointer to be truncated in 32 bits.
> Why it doesn’t crash since 1 year on Win7, I really don’t know, probably
> I’m a lucky man and memory management has changed on Win10 !
>
>
>

Humm, my understanding was that both long and size_t are 4 bytes on a
32-bit architecture and 8 bytes on a 64-bit architecture, but I see now
that there are claims that Visual Studio kept long at 4 bytes on x64. It
seems like there is no guarantees about size_t other than that it will be
unsigned in the C++ standard.

Can you please print sizeof(long) and sizeof(size_t) and let me know what
compiler you use?

I should use an uintptr_t, but older Visual Studio versions don't have
inttypes.h so I've changed it to 'unsigned long long' so it'll work
everywhere. The change is committed to svn.

Regards,
 John
--
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Using wxPalette:GetRGB

2015-06-15 Thread John Labenski
On Jun 15, 2015 12:31 PM, Дмитрий dm...@yandex.by wrote:

 Hello!

 I need to get a colour out of wxPalette (I need to create a wxMask out of
it later), and I can’t figure out how to translate the C++ function GetRGB
into Lua. In C++, the function returns data in pointers, but wxluaref.html
suggest these arguments are not used in Lua:

 // %override [bool, char red, char green, char blue]
wxPalette::GetRGB(int pixel) const;
 // C++ Func: bool GetRGB(int pixel, unsigned char* red, unsigned
char* green, unsigned char* blue) const;
 bool GetRGB(int pixel) const;

 Which practically means GetRGB is useless, since it just returns an error
code and gives no way to get R, G, and B..?

No, what it means is that it returns four values rather than returning them
through the input pointers.

 Am I missing something? How do I create a wxMask for the palette colour
with index #0?


 The documentation says that in Windows I can create a wxBitmap with a
palette and use wx.wxMask(bitmap, 0), but I didn’t get this to work
(probably because I’m using png and not bmp?). Also, I don’t really want my
code to run in Windows only.


I believe that wxWidgets supports palletized pngs, but I have not tried
this myself.

 I'm not sure if this is the right place for
Yes, though it may take a day for me to respond.

Regards,
John
--
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxString::ToAscii

2015-03-05 Thread John Labenski
On Thu, Mar 5, 2015 at 12:11 PM, Victor Bombi son...@telefonica.net wrote:



 What do you plan to do with this wxString? You won't be able to display it
 in the GUI since the high ASCII chars usually just show up as boxes not as
 the DOS smiley faces and whatnot. I recommend sanitizing the string for
 display by replacing the extended ascii and controls chars with '?' for
 example.

 Just would like to show áéíóú



Ahh, ok. Below is a list of the UTF8 chars to use.
http://www.utf8-chartable.de/

I ran this in wxLuaEdit and both wxMessageBoxes showed the char à I copied
and pasted from the site above.


lua_str=à
print (string.len(lua_str))
wx.wxMessageBox(lua_str)
wx_str = wx.wxString(lua_str)
print (wx_str:Len())
wx.wxMessageBox(wx_str)


output:

Running lua script 'untitled.lua*' : Thu Mar  5 13:02:55 2015
2  -- note 2 byte utf8 char
1  -- wx knows that this is just a single two-byte utf8 char

---

Does this not work for you?

Regards,
John
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxMenu:AppendSubMenu

2015-03-04 Thread John Labenski
  Hello,
 
  Is there any special reason for not having wxMenu:AppendSubMenu?
 


It probably didn't exist in previous versions of wxWidgets. Added in SVN
now.

Regards,
John
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxlua on debian jessie

2015-03-04 Thread John Labenski
On Sun, Jan 25, 2015 at 12:55 PM, Ulrich Schmidt u.sch...@gmx.de wrote:

 Hi.
 I installed Debian on a tiny pc. Caused by the fact jessie has packages for
 lua, luajit, rockspec and so on, installing a lua environment is a easy and
 quick task. wxWidgets-3.0.2 are available too.
 Unzipping wxlua, running cmake and compiling wxlua is easy too. (I wish it
 would be so easy on windows too.)

 Anyway there are 2 questions remaining:

 - The resulting lua module is named liblua.so instead wx.so. What is the
 idea
 behind? I renamed libwx.so to wx.so to allow standard cpath to work.


CMake prepends 'lib' to the name by default and I see that for the Mingw
build I do remove it. I'm not sure why I didn't do the same for Linux. I
think the right thing to do would be to actually name the 'wx.so' lib with
the Lua and wxWidgets versions and then symlink wx.so to it as most other
libs do.


 - make generates libwx.so + libwxlua_lua51-wx30gtk2u-2.8.12.3.so
 Why is there this libwxlua_lua51-wx30gtk2u-2.8.12.3.so? Is it possible to
 compile libwxlua_lua51-wx30gtk2u-2.8.12.3.so into (lib)wx.so? If not,
 where is
 a good place to store libwxlua_lua51-wx30gtk2u-2.8.12.3.so?


In order to use Lua's 'require' you need to have the lua exe linked to a
shared lua.so and the lib you want to 'require' also linked to the same
lua.so. If you will 'require' other Lua C libs then these will also need to
be built and linked against the same lua.so library. This is why the lua.so
lib is not rolled into the wx.so lib and the lua exe linked only to wx.so.

In terms of where to put the lua.so lib, you can put it anywhere. Use
LD_LIBRARY_PATH or the program chrpath to change the rpath of the lua exe
to find it.

Hope this helps,
 John
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxString::ToAscii

2015-03-04 Thread John Labenski
On Mon, Mar 2, 2015 at 3:54 AM, Victor Bombi son...@telefonica.net wrote:

 Where I say UNICODE it should be whatever internal widebyte encoding the
 system and wxWidgets is using



wxWidgets has recently changed so that the = 2.9 version always uses utf8
in the wxString.

There's a list of what it accepts in the section wxString
http://docs.wxwidgets.org/3.0/classwx_string.html can be created from.
http://docs.wxwidgets.org/3.0/classwx_string.html


the problem is converting from ANSI to UNICODE

 wxLua unicode build converts as if the string were UTF8 to UNICODE:  return
 wxString(luastr, wxConvUTF8);
 it works from code 1 to 127 (ASCii) but fails on 128-255 which are not
 valid
 UTF
 0 is discarded in lua2wx :if (luastr == NULL) return wxEmptyString; //
 check
 for NULL
 which is a problem for lua strings with embeded ceros


What do you plan to do with this wxString? You won't be able to display it
in the GUI since the high ASCII chars usually just show up as boxes not as
the DOS smiley faces and whatnot. I recommend sanitizing the string for
display by replacing the extended ascii and controls chars with '?' for
example.

You can make an ANSI build of wxWidgets (frowned upon in wx versions =
2.9) and see if that does what you want...

Regards,
John
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Add RegisterHotKey and UnregisterHotKey

2015-03-04 Thread John Labenski
On Tue, Jan 27, 2015 at 7:32 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 Could you enable RegisterHotKey and UnregisterHotKey method in wxwindow?

 Your comment says only under WinCE, but it's not correct, as it's
 available in Windows and should also be available on OSX with this fix:
 http://trac.wxwidgets.org/ticket/12354. Thank you.


Added in SVN, note that it is not available in GTK.

Regards,
John
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Installing wxWidgets OSX 10.9.5 wxWidgets 3.0.2 wxLua 2.8.12.3

2015-03-04 Thread John Labenski
On Sun, Jan 18, 2015 at 5:37 PM, Roy Hinkelman royh...@gmail.com wrote:

 I am still getting errors after trying new config settings for installing
 wxWidgets. Any pointers greatly appreciated.


I don't have a mac available for testing right now.


after make -j4

 ../src/osx/webview_webkit.mm:392:30: warning: incompatible pointer types
 sending 'WebViewUIDelegate *' to parameter of type
   'idWKUIDelegate' [-Wincompatible-pointer-types]
 [m_webView setUIDelegate:uiDelegate];
  ^~
 ../src/osx/webview_webkit.mm:464:34: warning: 'WKPreferences' may not
 respond to 'setUsesPageCache:'
 [[m_webView preferences] setUsesPageCache:NO];
  ~~~ ^
 ../src/osx/webview_webkit.mm:466:34: warning: 'WKPreferences' may not
 respond to 'setUsesPageCache:'
 [[m_webView preferences] setUsesPageCache:YES];
  ~~~ ^
 ../src/osx/webview_webkit.mm:936:25: error: cannot initialize a variable
 of type 'WebBackForwardList *' with an rvalue of type
   'WKBackForwardList *'
 WebBackForwardList* history = [m_webView backForwardList];
 ^ ~~~
 ../src/osx/webview_webkit.mm:954:25: error: cannot initialize a variable
 of type 'WebBackForwardList *' with an rvalue of type
   'WKBackForwardList *'
 WebBackForwardList* history = [m_webView backForwardList];



You're not alone, it looks like the current trunk SVN has a fix for it if I
understand the last comment correctly.

http://trac.wxwidgets.org/ticket/16329

Regards,
John
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Installing wxWidgets OSX 10.9.5 wxWidgets 3.0.2 wxLua 2.8.12.3

2015-03-04 Thread John Labenski
On Sun, Jan 18, 2015 at 6:28 PM, Roy Hinkelman royh...@gmail.com wrote:

 @Paul: Thanks for the pointer to ZeroBrane. I looked at your IDE, and it
 looks really interesting.

 Can you help with some newbie questions?

  I am looking to build cross-platform Lua based apps
 
 I can't help with this particular issue as I use gcc rather than
 clang, but I do build cross-platform lua apps using wxlua and support
 Windows, OSX, and various flavors of Linux.

 But I am not familiar with gcc or clang, and what effect they have with
 building cross platform apps. Can I not compile to certain platforms with
 gcc or clang?


Cross-platform compiling for different OSes from a single OS is not for the
faint of heart as it is usually very complicated. I'm also pretty sure that
the Apple provided clang compiler will not cross-compile to MSW or Linux.
The easiest way is to simply get a machine for each OS, dual-boot them, or
use virtual machines.

Note that Apple used to provide GCC as their XCode compiler, but they
switched to clang recently and I have not used it.



 I don't really understand the process here. I am assuming I build my app
 and compile it to Win, OSX, IOS or Droid. Do I need to have a 'production'
 build for wxWidgets as part of the process?


You need to have wxLua, Lua, and wxWidgets binaries built for each platform
you want to run on as they are the code that's actually interacting with
the OS. The Lua script code for wxLua simply calls the compiled binary
wxWidgets functions that eventually call the system provided functions to
create windows, menus, etc. Same for the 'os' Lua module and its functions
os.clock() for example.

Note that android and ios are experiment in wxWidgets and there is no
provision for them in wxLua.

Regards,
John
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Some feedback

2014-12-11 Thread John Labenski
On Thu, Dec 11, 2014 at 10:09 AM, Ulrich Schmidt u.sch...@gmx.de wrote:

 I compiled sucessfully wx.dll using wxWidgets 3.0 (mingw64/gcc4.8.1).
 So far so good.
 Now i want to compile the wx-lua-module as a static lib. Is this
 possible using cmake? I got a libwx.dll.a but this points to wx.dll and
 thats not what i want.


It is not possible, Lua needs a shared library for require() to load.
However, you can use wxLua.exe or wxLuaFreeze.exe to have a single
executable that does the same thing as calling 'require(wx)' without the
extra wx.dll lib since it's embedded in the exe.

Regards,
John





Am 06.12.2014 um 08:20 schrieb Ulrich Schmidt:
  Why are you not using a 3.x wxWidgets version? It should be better and
  wxLua compiles against it.
  I wasnt shure wxlua compiles with wxwidgets 3.x.
  Now i will try 3.x, thanks.
  Thanks for the reminder. What mingw are you using? It looks like
  things have changed since I last installed it.
 
  One of these?
 
 http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/
  I use MinGW-64 (http://sourceforge.net/projects/mingw-w64/) gcc4.8.1
 
 
 --
  Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
  from Actuate! Instantly Supercharge Your Business Reports and Dashboards
  with Interactivity, Sharing, Native Excel Exports, App Integration  more
  Get technology previously reserved for billion-dollar corporations, FREE
 
 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
  ___
  wxlua-users mailing list
  wxlua-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wxlua-users



 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE

 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to provide my own wxAuiDefaultTabArt?

2014-12-09 Thread John Labenski
On Mon, Nov 24, 2014 at 6:21 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I'm considering drawing my own tabs and the background for
 wxAuiNotebook, but don't see a way to do this in the current wxlua.
 There is wxAuiDefaultTabArt
 (http://docs.wxwidgets.org/trunk/classwx_aui_default_tab_art.html)
 with various methods like DrawTab and DrawBackground and calling those
 methods work, but what I need is to be able to provide my own class
 derived from wxAuiDefaultTabArt and to provide my own implementations
 for those methods, such that when I register this tab art with
 wxAuiNotebook, my methods are called and the tabs look like I want.

 Is this already available or is this something you'd need to
 implement? Thank you.


It would have to be done. Are you sure that this is something you really
want to do? The wrapping of the wxArtTabArt class would take many hours and
is very specialized. Maybe there's another way to do what you want? On the
other hand, if you could provide the patch I would be happy to apply it.

Regards,
John
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxGridEditor and wxGridRenderer classes should not be deleted

2014-12-05 Thread John Labenski
On Fri, Dec 5, 2014 at 11:48 AM, Les Newell les.new...@fastmail.co.uk
wrote:

 I'm not sure where to submit a patch but the wxGridCellEditor and
 wxGridCellRenderer classes should not be automatically deleted. The grid
 control takes ownership of these objects causing a crash after the grid is
 deleted. I have attached a patch for the grid binding file.


Ahh, yes I call IncRef() when adding them to the grid, but I believe that I
should actually call DecRef() on them instead of %delete. I should be able
to get to it next week.

Thanks,
John



--
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE

 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Error compiling wxLua on windows

2014-12-05 Thread John Labenski
On Tue, Dec 2, 2014 at 10:46 AM, Milind Gupta milind.gu...@gmail.com
wrote:

 The error is:
 /wxLua-2.8.12.3-src/modules/wxstedit/src/precomp.h:7:23: fatal error:
 wx/wxprec.h: No such file or directory
  #include wx/wxprec.h



When you run cmake you should see something like this:

-- * Found wxWidgets :
-- * - wxWidgets_VERSION   = 3.1.0 = 3.1.0
-- * - wxWidgets_COMPONENTS=
stc;webview;gl;xrc;xml;net;media;propgrid;richtext;aui;html;adv;core;base
-- * - wxWidgets_INCLUDE_DIRS  =
/home/jlabenski/jlabenski/devel/wx/wx/wxWidgets/wxWidgets-trunk/build_gtk2ud/lib/wx/include/gtk2-unicode-3.1;/home/jlabenski/jlabenski/devel/wx/wx/wxWidgets/wxWidgets-trunk/include
-- * - wxWidgets_LIBRARY_DIRS  =
-- * - wxWidgets_LIBRARIES =
-L/home/jlabenski/jlabenski/devel/wx/wx/wxWidgets/wxWidgets-trunk/build_gtk2ud/lib;-pthread;;;-Wl,-rpath,/home/jlabenski/jlabenski/devel/wx/wx/wxWidgets/wxWidgets-trunk/build_gtk2ud/lib;-lwx_gtk2u_stc-3.1;-lwx_gtk2u_webview-3.1;-lwx_gtk2u_gl-3.1;-lwx_gtk2u_xrc-3.1;-lwx_baseu_xml-3.1;-lwx_baseu_net-3.1;-lwx_gtk2u_media-3.1;-lwx_gtk2u_propgrid-3.1;-lwx_gtk2u_richtext-3.1;-lwx_gtk2u_aui-3.1;-lwx_gtk2u_html-3.1;-lwx_gtk2u_adv-3.1;-lwx_gtk2u_core-3.1;-lwx_baseu-3.1


You probably want to use the SVN head too since I believe that I have done
some work on the cmake build for mingw that might solve your problem.

Regards,
John
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Some feedback

2014-12-05 Thread John Labenski
On Sat, Nov 29, 2014 at 9:22 AM, Ulrich Schmidt u.sch...@gmx.de wrote:

 Hi all.

 I compiled wxlua (trunk)  using MinGW-64 gcc 4.8.1 on Win7 to get some
 32bit Windows exes/dlls.
 I compiled against wxwidgets 2.8.12 and 2.9.5
 I figured out some nessesary changes: (2.8.12 works. 2.9.5 not finished
 yet)


Why are you not using a 3.x wxWidgets version? It should be better and
wxLua compiles against it.


 1. alredy discussed in this mailing list:
 modules/wxbind/src/wxcore_bind.cpp
  The 2 #if defined(__MINGW32__) || defined(__GNUWIN32__) at line
 66 and 7553
  create a error and i removed the entire if-endif-blocks. It seems
 newer gcc compilers
  dont need this hack anymore.


Thanks for the reminder. What mingw are you using? It looks like things
have changed since I last installed it.

One of these?
http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/


 2. modules/wxbind/src/wxbase_bind.cpp
  2 constants not declared (in 2.9.5) - inserted 3 #if defined()'s
 below line 387

 --8X--
 #if wxUSE_FSWATCHER  wxCHECK_VERSION(2,9,4)
  { wxFSW_EVENT_WARNING, wxFSW_EVENT_WARNING },
  #if defined(wxFSW_WARNING_GENERAL)
  { wxFSW_WARNING_GENERAL, wxFSW_WARNING_GENERAL },
  #endif
  #if defined(wxFSW_WARNING_NONE)
  { wxFSW_WARNING_NONE, wxFSW_WARNING_NONE },
  #endif
  #if defined(wxFSW_WARNING_OVERFLOW)
  { wxFSW_WARNING_OVERFLOW, wxFSW_WARNING_OVERFLOW },
  #endif
 #endif // wxUSE_FSWATCHER  wxCHECK_VERSION(2,9,4)

 --8X--

 3. I linked a existing lua51.dll (luajit) and used the luajit header
 files to include.
  modules/wxlua/lbitlib.c: need a definition for LUAI_INT32, so i
 inserted at line 44:

 --8X--
 #if !defined(LUAI_INT32)
#define LUAI_INT32int
 #endif

 --8X--
 (probably not bullet proof but at least it worked.)


Humm, this should be fixed in SVN, but maybe I forgot to commit it.


 4. Suggestion: I compiled MinSizeRel. I need to strip manually.
  May be you can strip dll and exe files automatically for Release-
 and MinSizeRel-builds?


I'll probably leave this as an exercise for the user since there may be
some value in the non-stripped binaries.

Thanks for the feedback, I hope to get to these next week.
John
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxlua auidemo debug error

2014-10-11 Thread John Labenski
On Mon, Oct 6, 2014 at 5:24 AM, Victor Bombi son...@telefonica.net wrote:

  I tested auidemo C++ sample without errors, but there are less panes
 than in lua sample and my error appeared when trying to make wider
 the bottom right pane.


In linux with the wxWidgets 3.1 GTK build the wxLua auidemo doesn't crash
and the lower right pane is not resizeable, but I think that is right since
the Fixed() function is called on the pane info.

The C++ aui sample is simpler as you mentioned and there is only a single
pane filling the bottom width and it resizes with the frame size normally.

If you're interested in getting it fixed, I recommend that you submit a bug
report (or see if one already exists) on the wxWidgets site since it is
demonstrable in the C++ sample.

Regards,
John






  - Original Message -
 *From:* John Labenski jlaben...@gmail.com
 *To:* wxlua-users@lists.sourceforge.net
 *Sent:* Monday, October 06, 2014 6:18 AM
 *Subject:* Re: [wxlua-users] wxlua auidemo debug error

  On Fri, Oct 3, 2014 at 1:15 PM, Victor Bombi son...@telefonica.net
 wrote:

 Running auidemo from wxLua build from svn on mac osx 10.9 with
 wxWidgets3.0.1 ,
  if you try to make wider the bottom right pane:

 ../src/common/wincmn.cpp(3271): assert
 !wxMouseCapture::IsInCaptureStack(this) failed in CaptureMouse():
 Recapturing the mouse in the same window?


 Unfortunately, this is from within wxWidgets itself.

 Can you build the auidemo C++ sample and run that and does it show the
 same error? To build the C++ auidemo app simply go the the samples/aui dir
 in the wxWidgets configure build dir you created and type 'make.' I haven't
 check recently, but the wxLua sample was directly copied from the C++
 sample and the code for the two is probably still very similar.

 Regards,
 John




 Call stack:
 [00] wxEvtHandler::ProcessEventLocally(wxEvent)
 [01] wxEvtHandler::ProcessEvent(wxEvent)
 [02] wxEvtHandler::SafelyProcessEvent(wxEvent)
 [03] wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent*)
 [04] -[NSWindow(wxNSWindowSupport) WX_filterSendEvent:]
 [05] -[wxNSWindow sendEvent:]
 [06] -[NSApplication sendEvent:]
 [07] -[wxNSApplication sendEvent:]
 [08] -[NSApplication run]
 [09] wxGUIEventLoop::OSXDoRun()
 [10] wxCFEventLoop::DoRun()
 [11] wxEventLoopBase::Run()
 [12] wxAppConsoleBase::MainLoop()
 [13] wxApp::OnRun()
 [14] wxEntry(int, wchar_t**)
 [15] mainwxlua.cpp:11
 [16] start
 [17] 0x0003



 --
 Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
 Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
 Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
 Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer

 http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users


  --


 --
 Slashdot TV.  Videos for Nerds.  Stuff that Matters.

 http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk

 --

 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users



 --
 Slashdot TV.  Videos for Nerds.  Stuff that Matters.

 http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users


--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] build against luajit

2014-10-05 Thread John Labenski
On Fri, Oct 3, 2014 at 4:37 AM, Victor Bombi son...@telefonica.net wrote:

 Hello,

 When trying to build against a external lua library (luajit in mac osx
 10.9)
 it complains about not finding luaopen_bit32
 Isn't this a confusion with lua5.2?


I haven't build with luajit recently, does it not have the function
luaopen_bit32(lua_State* L) anymore or maybe it never did, I forget...

I committed a blind fix to svn trunk to have wxLua always compile the bit32
lib even for luajit. It's a tiny lib and provides Lua 5.2 compatibility,
which might be useful to some.


Regards,
John
--
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxlua auidemo debug error

2014-10-05 Thread John Labenski
On Fri, Oct 3, 2014 at 1:15 PM, Victor Bombi son...@telefonica.net wrote:

 Running auidemo from wxLua build from svn on mac osx 10.9 with
 wxWidgets3.0.1 ,
  if you try to make wider the bottom right pane:

 ../src/common/wincmn.cpp(3271): assert
 !wxMouseCapture::IsInCaptureStack(this) failed in CaptureMouse():
 Recapturing the mouse in the same window?


Unfortunately, this is from within wxWidgets itself.

Can you build the auidemo C++ sample and run that and does it show the same
error? To build the C++ auidemo app simply go the the samples/aui dir in
the wxWidgets configure build dir you created and type 'make.' I haven't
check recently, but the wxLua sample was directly copied from the C++
sample and the code for the two is probably still very similar.

Regards,
John




 Call stack:
 [00] wxEvtHandler::ProcessEventLocally(wxEvent)
 [01] wxEvtHandler::ProcessEvent(wxEvent)
 [02] wxEvtHandler::SafelyProcessEvent(wxEvent)
 [03] wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent*)
 [04] -[NSWindow(wxNSWindowSupport) WX_filterSendEvent:]
 [05] -[wxNSWindow sendEvent:]
 [06] -[NSApplication sendEvent:]
 [07] -[wxNSApplication sendEvent:]
 [08] -[NSApplication run]
 [09] wxGUIEventLoop::OSXDoRun()
 [10] wxCFEventLoop::DoRun()
 [11] wxEventLoopBase::Run()
 [12] wxAppConsoleBase::MainLoop()
 [13] wxApp::OnRun()
 [14] wxEntry(int, wchar_t**)
 [15] mainwxlua.cpp:11
 [16] start
 [17] 0x0003



 --
 Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
 Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
 Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
 Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer

 http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] fail to build wxlua on mac osx 10.9

2014-10-01 Thread John Labenski
On Wed, Oct 1, 2014 at 10:19 AM, Victor Bombi son...@telefonica.net wrote:

  more investigations

 it seems that clang++ and g++ are the same.
 what makes the difference between both results obtained is that one had
 the c++11 flag and the other not.


I don't have a Mac right now, are you saying that you have both gcc and
clang installed? That's what it seems like from the email with the compiler
logs, but now you say they're the same, but maybe with different default
flags? Or do you just mean that they're the same in that they both don't
work.



 So it seems that wxLua is not c++11 compliant as stated in previous
 building error messages (you will see a modification proposed but may be
 there are more)


wxLua doesn't use anything in c++11, the errors you get are for other
things.


This is a hack to get at the base class in a simple and quick way, maybe an
easy fix.

*/Users/Morundi/Downloads/wxLua-2.8.12.3-src/modules/wxbind/src/wxhtml_bind.cpp:5189:72:
**error: **non-constant-expression cannot be*
*narrowed from type 'long' to 'int' in initializer list [-Wc++11-narrowing]*
...((long
int)(wxHtmlWindowInterface*)(wxSimpleHtmlListBox*)wxluatype_TNONE) -
((long int)(wxSimpleHtmlListBox*)wxluatype_TNONE) };

Can you try compiling with this change? If it works I can commit the
changes to SVN.

static int wxluabaseclass_vtable_offsets_wxSimpleHtmlListBox[] = {
int(((long
int)(wxHtmlWindowInterface*)(wxSimpleHtmlListBox*)wxluatype_TNONE) -
((long int)(wxSimpleHtmlListBox*)wxluatype_TNONE)) };




 So now the problem is in the linking phase

  *Linking CXX shared library ../../lib/Debug/libwx.dylib*
 Undefined symbols for architecture x86_64:
 non-virtual thunk to wxHtmlListBox::RefreshAll(), referenced from:

 I have tested that the html component is build in wxWidgets by compiling
 the html samples
 what now?



What compiler is this one? GCC?

This means that wxWidgets doesn't have the body of this function linked in.
Strange, what does running 'nm -a wx-XXX.dylib | grep
GetHTMLBackgroundColour' on the wxWidgets libs say? I'm picking this
function since it's non-templated, but you can try it on any of them.

non-virtual thunk to wxHtmlWindow::GetHTMLBackgroundColour() const,
referenced from:
vtable for wxLuaHtmlWindow in wxhtml_wxlhtml.cpp.o

http://stackoverflow.com/questions/5831063/non-virtual-thunk-to-method-name-referenced-from-vtable-for-classnamein

I'm tempted to say that maybe the problem is that you're not linking to the
wxhtml lib. In CMakeCache.txt, does wxWidgets_COMPONENTS have html in the
list? You can also see the full linker command by looking at the link.txt
files in the cmake build dir you made.

This is an old thread, but maybe that's the problem.
http://lists.apple.com/archives/unix-porting/2003/Dec/msg00107.html

You can change the wxLua optimizations easily by editing CMakeCache.txt in
the build dir and changing CMAKE_CXX_FLAGS_RELEASE (or whatever your build
is) to -O? to match what wxWidgets used. Then just rerun 'cmake
../path/to/wxLua', then make clean, and make again. If this works... I
don't know how we'd automatically figure out how to use the same

---

By the way, you might want to use the wxLua SVN trunk as it has some
updates and is very stable.

-John
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxLua APPs issues against wxWidgets 3.0

2014-09-08 Thread John Labenski
On Fri, Sep 5, 2014 at 1:44 AM, Zhang, Ethan ethan.zh...@arrisi.com wrote:



 1. STC seems does not work for wxstc.wxSTC_LEX_CPP, I just changed the
 editor:SetLexer(wxstc.wxSTC_LEX_LUA) -
 editor:SetLexer(wxstc.wxSTC_LEX_CPP) in the editor.wx.wlua, then run the
 editor.wx.wlua, the editor did not show what inputted. the editor worked
 well for other languages.


Does the wxStEdit editor handle CPP highlighting correctly? In order to use
the lexer you need to set a fair number of extra things. You can look at
the code in editor.wx.lua for the Lua lexer and then look at the code in
wxStEdit, though I will admit that it is quite complicated, to see what
values to use for the cpp lexer.

2. The .exe file generated from wxLuaFreezed.exe cannot get run, even in
 cmd prompt, showed nothing.



That is very strange, does wxLua.exe run correctly? They aren't very
different at all.

 3. wxStEdit.exe and wxLuaEdit.exe take many time to start, about 15
 seconds.


Again, very strange, can you break into them with a debugger and see where
they are during this long time?



 BTW: Do you have plan to release official binary release against wxWidgets
 3.0, alpha or beta version, or even a work version is OK.


I do, but as you might guess I have little time to work on it. I do plan to
release one soonish.

Regards,
John
--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Build issue with wxGTK 3.0.1

2014-06-24 Thread John Labenski
On Tue, Jun 24, 2014 at 4:20 AM, Philipp Überbacher mu...@tuxfamily.org
wrote:

 On Mon, 23 Jun 2014 22:04:33 -0400
 John Labenski jlaben...@gmail.com wrote:

  On Mon, Jun 23, 2014 at 4:17 AM, Philipp Überbacher
  mu...@tuxfamily.org wrote:
 

 I just uploaded the script, you can find it here:
 https://aur.archlinux.org/packages/wxlua-svn/
 Klick on 'View PKGBUILD' to see the actual build script. Arch users can
 download this script and with a single command they can turn it into an
 installable package, handled by the package manager as any other
 package. Really simple.

 As you can see, there are two sed lines in there. I copied them from
 the wxlua PKGBUILD: https://aur.archlinux.org/packages/wx/wxlua/PKGBUILD
 I think they are both still necessary, so maybe this is something you
 could integrate?


Yes, thanks, I'll commit the changes so the 'sed' lines won't be needed
later tonight.



 Some of those were uninitialised variables as well, and I think they
 are more likely to be potential bugs.


[ 62%] Building CXX object
modules/luamodule/CMakeFiles/
wxLuaModule.dir/__/wxbind/src/wxadv_wxladv.cpp.o
/home/murks/cower/wxlua-svn/src/wxlua-svn-build/wxLua/modules/wxbind/src/wxadv_wxladv.cpp:
In member function ‘virtual wxGridCellAttr*
wxLuaGridTableBase::GetAttr(int, int,
wxGridCellAttr::wxAttrKind)’:
/home/murks/cower/wxlua-svn/src/wxlua-svn-build/wxLua/modules/wxbind/src/wxadv_wxladv.cpp:715:12:
warning: ‘attr’ may be used uninitialized in this function
[-Wmaybe-uninitialized] return attr;

Nah, your version of the compiler wasn't able to figure out that it would
be initialized in all cases. In any case, I'll commit a fix just to silence
it as it does seem suspicious.


Thanks,
John
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Build issue with wxGTK 3.0.1

2014-06-24 Thread John Labenski
On Mon, Jun 23, 2014 at 10:57 PM, Paul K paulclin...@yahoo.com wrote:

 John,



 Thank you for the update. Curious, can you run a simple script that
  checks if GetChildren() is available method for wxWindow? It's been
 reported that for some reason GetChildren() is not available when
 compiled with wxgtk3 (3.0.1) on Archlinux:

 wxLua: Unable to call an unknown method 'GetChildren' on a 'wxWindow' type.
 stack traceback:
 [C]: in function '__index'
 ...

 I haven't had a chance to test it myself yet, but I can use it when
 compiled on Windows and it was clearly present in previous versions as
 well (2.9.x).


This is because wxList for the STL build is nothing like the old wxList and
the function signatures are quite different. Add to this wx2.8
compatibility and this may take some doing, but luckily the use of wxLists
in wxLua should be minimal.

I may just make a new function to return the wxWindow::GetChildren() as a
Lua table and dispense with any attempt to get list iterators to work in
Lua. Though this is an incompatible change, the use of wxNodes in Lua is
awkward at best.

I have to look at it further.

Regards,
John
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Build issue with wxGTK 3.0.1

2014-06-23 Thread John Labenski
On Mon, Jun 23, 2014 at 4:17 AM, Philipp Überbacher mu...@tuxfamily.org
wrote:


 Thanks a lot John,
 it builds now.
 I'll prepare a buildscript for SVN so my fellow Arch users can
 comfortably build and use wxLua with wxgtk 3.


That sounds great, what else is needed to build on Arch?


 For the sake of completeness, here are the warnings I get.


Yeah, I've been lazy about those unused strings, they would be awkward to
#ifdef off. Fixed now in svn, at least for my version of gcc, Fedora 20,
gcc 4.8.2.

Regards,
John
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Build issue with wxGTK 3.0.1

2014-06-22 Thread John Labenski
On Fri, Jun 20, 2014 at 4:03 PM, Philipp Überbacher mu...@tuxfamily.org
wrote:

 [ 15%] Built target wxStEditLib
 Scanning dependencies of target wxStEdit
 [ 15%] Building CXX object
 modules/wxstedit/CMakeFiles/wxStEdit.dir/samples/stedit/wxstedit.cpp.o
 /home/murks/cower/wxlua-svn/src/wxlua-svn-build/wxLua/modules/wxstedit/samples/stedit/wxstedit.cpp:113:1:
 error: cannot convert ‘const wxString’ to ‘const char*’ in initialization
  };
  ^


The build for wxUSE_STD_CONTAINERS should be fixed in svn now.

Regards,
John
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] recursive calls runbuffer

2014-04-03 Thread John Labenski
On Wed, Apr 2, 2014 at 3:35 AM, klaas.holwerda n...@klaasholwerda.nl wrote:

  Hi John,

 Indeed if out commented, it works okay again.
 So recursive calls is not the problem it seems, only the assert.
 Don't know if the m_is_running is very important, but if yes or just handy
 to have, i think the up/down counter would deal with the situation.


Ok, I made the change to increment an int as you suggested. Now
m_is_running is just informational.

Regards,
John
--
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wx 3.1

2014-04-01 Thread John Labenski
On Sun, Mar 30, 2014 at 6:32 PM, klaas.holwerda n...@klaasholwerda.nlwrote:

 Hi,

 The internal FindwxWidgets.cmake, should also contains lines like:

wxbase31${_UCD}${_DBG}


Updated.

else it does not work for current wxWidgets svn.
 But even if that produces projects files with Cmake, it does not build,
 there are compile errors.

 But for 3.0 it works.


I'll look into it tomorrow.

Thanks,
John
--
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to provide wxApp::MacNewFile, wxApp::MacOpenFiles, and wxApp:MacReopenApp methods?

2014-04-01 Thread John Labenski
On Fri, Mar 28, 2014 at 3:11 PM, Joshua Jensen jjen...@workspacewhiz.comwrote:

 - Original Message -
 From: John Labenski
 Date: 3/28/2014 8:55 AM
  I added wxWebView support a while ago, but forgot to press send on my
  email. Let me know if it works for you. I just did the simplest test
  of creating a frame, a webview child and loaded a page.
 Awesome.  Can you add your sample to the wxLua distribution for easy out
 of box testing?


I've added it to the controls sample so you can see what events are emitted
and when, but this is all the code it takes to get a browser window.

f = wx.wxFrame(wx.NULL, -1, wxWebView!)
w = wxwebview.wxWebView.New(f, -1, http://wxlua.sourceforge.net;)
f:Show()

-John
--
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Problem installing wxWidgets/wxLua on OSX

2014-03-12 Thread John Labenski
On Tue, Mar 11, 2014 at 5:13 PM, Roy Hinkelman royh...@gmail.com wrote:


  Sure could use some help.

 The wxWidgets install looked to go smoothly with no errors in the log.
 BUT, when I tried to run /samples/widgets, nothing happens, and the
 terminal goes unresponsive.


How are you running it? You need to run the app as a bundle meaning that
you either double click the bundle dir (usually ProgramName.app) or run
this on the command line.

$ open /path/to/Program.app



 I am following the directions here:
 http://wxlua.sourceforge.net/docs/install.html , installed in it's own
 directory as OSX, debug, unicode build.

 How would I debug this?


Using gdb if I remember correctly. I don't have a working Mac right now,
but I believe that XCode comes with the command line gcc compiler tools and
gdb is the debugger for it.



 I don't know what logs to look at. The system.log is giving me this for
 what it is worth:

 Mar 11 14:04:54 Roys-MacBook-Pro.local Console[394]: CGSCopyDisplayUUID:
 Invalid display 0x1a493041
 Mar 11 14:04:54 Roys-MacBook-Pro.local firefox[393]: CGSCopyDisplayUUID:
 Invalid display 0x1a493041


Don't know about this; do you sometimes use two monitors and the settings
are stale or something?

Regards,
John
--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxPropertyGrid+wxWebView bindings

2014-02-20 Thread John Labenski
On Thu, Feb 20, 2014 at 11:36 AM, Paul K paulclin...@yahoo.com wrote:

 I didn't realize we don't have wxWebView binding. I'm very much
 interested in that as well.


wxWebView shouldn't be too hard to wrap, it looks like a single c++ header
file and a new lib to link to, wx30+ only.



 I asked previously about wxPropertyGrid, but I believe John said that
 it's going to be more work than seems from the API, so I found a
 different way to do what I wanted.


Yes, wxPropertyGrid is a huge project with lots of little helper classes.
Admittedly, most people need only a tiny part of it. I remember that there
was something funny about it though, something about #defines and pointers
that seemed like wrapping it might be awkward, but looking now I don't see
why I thought that.

John
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to make invalid UTF-8 data to appear in wxSTC in Unicode builds?

2014-02-19 Thread John Labenski
On Wed, Feb 19, 2014 at 1:27 AM, Paul K paulclin...@yahoo.com wrote:


 Do we also get To8BitData(), as I may need it to save the data back to a
 file?


Yes, note that From8BitData() is static and To8BitData() is not.

Regards,
John
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Compilation errors without compat28 setting with the trunk version

2014-02-07 Thread John Labenski
On Fri, Feb 7, 2014 at 6:48 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I came across few more compilation errors when compat28 flag is not used:


Yes, there are far more differences than I realized, you'll have to use
--enable-compat28 for the near future. I have also seen some problems with
the wxLua app (editor.wx.lua) not exiting for some reason with 3.0, but not
2.9.x if I remember correctly.

I am also thinking that the switch to 3.0 without compat28 will probably
pose problems for people since Lua won't give compile time errors for
missing/changed functions. It might not be too hard to make some sort of
diff file using the code from bindings.wx.lua to print the full list of
functions for each version.

John
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to implement URLDropTarget similar to wxLuaFileDropTarget

2014-02-03 Thread John Labenski
On Thu, Jan 30, 2014 at 1:22 AM, John Labenski jlaben...@gmail.com wrote:

 On Tue, Jan 28, 2014 at 12:06 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

  It looks like there is nothing special with their URLDropTarget. I
 think that simply using the wxLuaTextDropTarget would work. I have added a
 few more methods to wxDropTarget, namely SetDataObject(), which is probably
 the key to making it work.


Unfortunately I had to add a whole new class to handle it since the
wxURLDataObject doesn't drive from wxTextDataObject in MSW as it does in
the other ports. There is a very basic sample of its usage in
htmlwin.wx.lua.

Regards,
John
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to implement URLDropTarget similar to wxLuaFileDropTarget

2014-01-29 Thread John Labenski
On Tue, Jan 28, 2014 at 12:06 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

  It looks like there is nothing special with their URLDropTarget. I think
 that simply using the wxLuaTextDropTarget would work. I have added a few
 more methods to wxDropTarget, namely SetDataObject(), which is probably the
 key to making it work.

 Do you by any chance have a simple example of how URLDropTarget can be
 done (similar to the one you have for FileDropTarget)? I'm struggling
 with converting C++ examples to Lua when these DropTarget objects are
 involved as the code doesn't seem to map 1-to-1. Thank you!


I'll give it a try tomorrow and let you know.

John
--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] bindings.wx.lua correction

2014-01-27 Thread John Labenski
On Sun, Jan 5, 2014 at 10:20 AM, Andre Arpin ar...@kingston.net wrote:

 please change line 512 to:
 t[i][3] = string.format(0x%X, t[i][2]  0 and 2^32 + t[i][2] or t[i][2])


Thanks for the patch, applied to svn head.

Regards,
John






 or

 t[i][3] = string.format(((t[i][2]  0) and '-' or '') .. 0x%X,
  math.abs(t[i][2]))


 The first one displays 0x for -1

 The second -0x1 for -1

 I prefer the first solution.

 Thank you
 Andre






 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics
 Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Deprecated: GetBeginIter(), GetEndIter1() and GetEndIter2()

2014-01-27 Thread John Labenski
On Sun, Jan 5, 2014 at 10:09 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 It appears that GetBeginIter(), GetEndIter1() and GetEndIter2() have
 been deprecated in the favor of GetBeginIter(), GetEndIter1() and
 GetEndIter2().


#if WXWIN_COMPATIBILITY_2_8
 // use GetBeginIter(), GetEndIter1() and GetEndIter2() instead
 wxDEPRECATED( inline int GetBeginPos() const );
 wxDEPRECATED( inline int GetEndPos1() const );
 wxDEPRECATED( inline int GetEndPos2() const );
 #endif // WXWIN_COMPATIBILITY_2_8


I have simply removed these for wx30, I don't think anyone uses them anyway.


 Also, I ran into a strange issue with wxPrintf; I could not compile
 wxlua until I uncommented includes in luamodule.cpp:


I have started to update wxLua for wxWidgets 3.0 without
WX_COMPATIBILITY_2_8 defined, but there are far more changes than I
expected and it will take a few more days. Note that wxLua builds ok with
compat 28 defined in wx30.

Regards,
John
--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to provide wxApp::MacNewFile, wxApp::MacOpenFiles, and wxApp:MacReopenApp methods?

2014-01-27 Thread John Labenski
On Wed, Jan 22, 2014 at 1:57 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

  I'm looking for a way to provide MacNewFile, MacOpenFiles, and
  MacReopenApp methods
  (http://docs.wxwidgets.org/trunk/classwx_app.html), but can't figure
  out how to do this in wxlua and don't see this in any of the examples.

 Can these methods be used with the current version of wxlua or do they
 need to be added first?


They need to be added, it should be doable.

I also asked about some other things earlier: wxRegKey, CallAfter
 (
 http://wxwidgets.blogspot.com/2013/01/about-benefits-of-procrastination.html
 )
 and wxSTC:GetLibraryVersionInfo calls. wxRegKey is a low priority for
 me as I'll probably be using winapi that provides the same
 functionality.


I'll try to remember, these. I'm glad you have an alternative for wxRegKey,
I would rather not add it. CallAfter() may be tricky.

Regards,
John
--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to implement URLDropTarget similar to wxLuaFileDropTarget

2014-01-27 Thread John Labenski
On Thu, Jan 23, 2014 at 10:24 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 Thank you for adding wxLuaFileDropTarget and TextDropTarget; these
 work well for me. Now I'm trying to detect URLs dropped from the
 browser, but I can't it to work. I'm looking at an example here
 (
 http://books.google.com/books?id=CyMsvtgnq0QCpg=PA299lpg=PA299dq=urldroptarget+url
 ),
 but can't figure out how this can be done in wxlua. Any hint? Thank
 you.


It looks like there is nothing special with their URLDropTarget. I think
that simply using the wxLuaTextDropTarget would work. I have added a few
more methods to wxDropTarget, namely SetDataObject(), which is probably the
key to making it work.

Hope this helps,
John
--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] client data in wxChoice

2014-01-27 Thread John Labenski
On Mon, Jan 27, 2014 at 8:33 PM, Moses McKnight mo...@texband.net wrote:

 Hi,

 I am using wxlua which is embedded in a program using wxwidgets 2.8.12.

 I am trying to set client data to items in a wxChoice something like
 this like this:

 somenumber = 3
 cbJointType:Append(Bevel, somenumber)

 But if I try to get the client data later it just always returns 0.
 According to the wxlua ref manual it looks like this should work to me:

 int Append(const wxString item, voidptr_long number); // C++ is (void
 *clientData) You can put a number here

 http://wxlua.sourceforge.net/docs/wxluaref.html#wxItemContainer

 Am I doing something wrong here?


No, this looks like a bug in how overloaded class member functions declared
in more than one base class are handled. What you're seeing is that the
call to GetClientData() is actually calling the  wxEvtHandler base class
function, similarly, SetClientData(n, val) also calls the wxEvtHandler
function. This will require some work to fix it right.

Regards,
John
--
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Building wxLua with wxWidgets-3.0.0

2014-01-07 Thread John Labenski
On Tue, Jan 7, 2014 at 3:27 PM, Les Newell les.new...@fastmail.co.ukwrote:

 Hi,

 I'm trying to build wxLua with wxWidgets-3.0.0, unicode shared release
 on Linux. Using cmake-gui, when I press the 'configure' button I get a
 warning 'Error in configuration process'.  I don't know if it makes a
 difference but I am using a non-standard install prefix.



CMake Warning at build/CMakeFunctions.cmake:271 (message):
File doesn't exist on disk : 'src/lcode.c' from dir
'/home/les/Documents/src/wxlua/build'
 Call Stack (most recent call first):
build/CMakeFunctions.cmake:807 (ADD_FILE_TO_LIST)
modules/CMakeLists.txt:156 (ADD_LIBRARY_FULL)
modules/lua-5.1/CMakeLists.txt:3 (wxLua_Modules_Lua_TARGETS)

 ...



 CMake Warning at bindings/CMakeLists.txt:48 (if):
given arguments:

  GREATER -1

Unknown arguments specified
 Call Stack (most recent call first):
bindings/CMakeLists.txt:92 (FUNCTION_ARG_PARSER)
bindings/CMakeLists.txt:183 (ADD_WXLUABIND_GENERATION)




What Linux distro and what version of CMake do you use? I suspect that it
may be CMake 2.6 which is fairly old and is missing the string(FIND ...)
function.  I have committed a change that may fix the problem, but there
may be more.

CMake builds from source pretty easily on most systems, but you can also
use the CMake binaries here:

http://www.cmake.org/cmake/resources/software.html


Hope this helps,
John
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] character 194

2013-12-27 Thread John Labenski
On Fri, Dec 27, 2013 at 4:28 PM, Victor Bombi son...@telefonica.net wrote:

 Have tried your fixUTF8, works perfect, thank you.
 I thought that if I couldnt use setcodepage as expected in wxSTC I would be
 able to use wxString:ToUTF8() but it is not working for me.


Don't forget that there is a utf8 translation layer between Lua and
wxWidget's wxString. wxLua's Unicode build must translate every string from
Lua's ANSI 8-bit string (which may be Unicode or not) to wxWidget's
wxString class to call the C++ functions with and this must also succeed.

Regards,
John
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Adding wxRegKey

2013-12-25 Thread John Labenski
On Wed, Dec 25, 2013 at 1:42 AM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 Would it be possible to add a binding for wxRegKey:
 http://docs.wxwidgets.org/trunk/classwx_reg_key.html? Thank you!


Yes, and for the other things too, but not before the new year when things
settle down for me.

Regards,
John
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] EVT_MOUSE_EVENTS

2013-12-04 Thread John Labenski
On Wed, Dec 4, 2013 at 3:06 PM, Victor Bombi son...@telefonica.net wrote:

 Hello

 Is there in wxlua a way to Connect afunction to all mouse events?
 I get nil for w.wxEVT_MOUSE_EVENTS


No, EVT_MOUSE_EVENTS is a C++ macro that expands into a Connect() for all
the mouse event types which can't easily be duplicated. However, I prefer
to connect to only the needed events. Note that you can call Connect()
multiple times with the same Lua function to get similar behavior and be
careful to minimize the work done in that function to avoid any
sluggishness in the GUI.

For reference:

http://wxwidgets.10942.n7.nabble.com/EVT-MOUSE-EVENTS-func-and-wxEVT-MOUSE-EVENTS-td84404.html

Regards,
John
--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Overriding OnRightClick

2013-11-24 Thread John Labenski
On Sun, Nov 24, 2013 at 5:13 AM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

 Hi John,


  I'm trying to port some C++ code to wxLua that derives a new class from
  wxTextCtrl and then overrides the OnRightClick() method of this class
  to do some custom stuff when the user presses RMB over the widget.
   Catch EVT_RIGHT_UP and call event.Skip() for normal processing.
  Calling virtual functions like this is discouraged and may not
  continue to work in the future for all platforms.

 Tried it like this but it doesn't work:

 frame:Connect(100, wx.wxEVT_RIGHT_UP, function(e) print(hello) end)



What is supposed to happen? wxWidgets 2.8 and 3.0 don't seem to have a
OnRightClick() function at all.

http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/include/wx/textctrl.h?view=markup
http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/include/wx/msw/textctrl.h?view=markup
...

http://svn.wxwidgets.org/viewvc/wx/wxWidgets/branches/WX_2_8_BRANCH/include/wx/textctrl.h?view=markup
http://svn.wxwidgets.org/viewvc/wx/wxWidgets/branches/WX_2_8_BRANCH/include/wx/msw/textctrl.h?view=markup
...

Regards,
John
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] compiling v 3.0

2013-11-20 Thread John Labenski
On Tue, Nov 19, 2013 at 4:07 PM, Andre Arpin ar...@kingston.net wrote:

 file FindwxWidgets

 please add:

 wxbase30${_UCD}${_DBG}
 wxbase30${_UCD}${_DBG}_${LIB}
 wxmsw${_UNV}30${_UCD}${_DBG}
 wxmsw${_UNV}30${_UCD}${_DBG}_${LIB}

 in the various FIND_LIBRARY invocation.


Thanks, I'll add it later today.

I'm not sure what to do in the long term as this file is a little bit of a
mess (not my code) and having hard-coded versions like it has is a bad
idea, but I don't want to have to completely rewrite it.

Regards,
   John
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Referencing objects

2013-11-17 Thread John Labenski
On Sun, Nov 17, 2013 at 9:21 AM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

 Hi,

 what's the recommended way to prevent objects from being garbage collected?
 For example, I create a wxImageList and pass it to
 wxNotebook::SetImageList().
 As wxNotebook::SetImageList() doesn't take ownership of the list it could
 happen that the garbage collector kills the wxImageList that I passed to
 SetImageList().

 To prevent it from being collected I could assign the wxImageList to a
 global
 variable but that doesn't look like a nice solution it would be nicer
 if it were possible to reference the wxImageList somehow but I don't see
 how this is possible. wxObject has a Ref() method but that doesn't seem to
 be up for the job.



You're right, wxObject::Ref() is not what you want, in wxLua it will cause
a memory leak unless you remember to call UnRef() on it.

The best way is to either make it a global or attach the image list to some
other object that will live at least as long as the window it's attached
to.

You can also simply add it to the window itself.

local notebook = wx.wxNotebook(...)
local imagelist = wx.wxImageList(...)

notebook.imagelist = imagelist -- it is now a member of the notebook's table
notebook.SetImageList(imagelist)

Regards,
John
--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] four tabs one in each cornerwithwxAuiNotebook:Split()

2013-11-17 Thread John Labenski
On Sun, Nov 17, 2013 at 12:57 PM, Victor Bombi son...@telefonica.netwrote:

 Hello John

 It looks like wxTabFrame is not exposed though any header file.

 It is defined in auibook.cpp:2799 (2.8.12) (should it be a header file?)



Probably, but there's not a lot we can do about it. Normal wxWidgets
installs will not install the cpp files so there's no good way to find it
and it doesn't look like you can #include it since it actually contains
code and we'd get linker errors about duplicate functions.

I do have a scheme that may work, but it is quite fragile. wxLua declares
the wxTabFrame itself and we cross our fingers that it doesn't change too
much. If it does then wxLua will become a mess of #if wxverX then declare
one version, #else if wxverY then a different one, #else ... This is hacky
to me and I really prefer to keep wxLua reasonably clean, but in this
case it may be unavoidable.

Regards,
John
--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Manual delete on wx

2013-11-15 Thread John Labenski
On Fri, Nov 15, 2013 at 5:34 PM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

 On 15.11.2013 at 23:28 John Labenski wrote:

  You are supposed to use myButton:Destroy() to let wxWidgets
  properly delete it. The delete() function is available only for
  objects that are not owned by something else. It works on wxRects
  for example, but all wxWindows are supposed to be owned by their parent.

 Ok, but is myButton:Destroy() really equivalent to doing a delete
 myButton
 in C++? I ask because I'm porting some C++ code to wxLua and the code
 often deletes and then re-creates the button and I'm trying to imitate
 this behaviour in wxLua


Your C++ code is doing the wrong thing, the wxWidgets manual explicitly ask
you to use Destroy() and not delete. You can call Show(false) if you want
to make sure it is immediately hidden from the user (if necessary).

http://docs.wxwidgets.org/trunk/classwx_window.html#a6bf0c5be864544d9ce0560087667b7fc

Regards,
John
--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] four tabs one in each corner withwxAuiNotebook:Split()

2013-10-23 Thread John Labenski
On Wed, Oct 23, 2013 at 1:50 AM, Paul K paulclin...@yahoo.com wrote:

 Hi John/Victor,

 I've seen suggested patches (like this one:
 http://www.kirix.com/forums/viewtopic.php?f=15t=542#p1479), but they
 have never made it into the library. It *may* be possible to reproduce
 the same logic that is used when this is done manually, but
 unfortunately, I don't see a way to get access to wxAuiTabCtrl that is
 needed for this manipulation.


I don't know why these patches never made it into wxWidgets, but earlier
this year there was more talk about updating wxAui on the wx-dev mailing
list and I think saving the perspective was part of it. I don't know what
came of it though.


John, a side note; it's a shame that there doesn't seem to be a way to
 get wxAuiTabCtrl from wxAuiNotebook. The only way I found was through


If this is part of the C++ api I can add it for sure, it is?


 panes = nbmgr:GetAllPanes()
 tabframe = panes:Item(1).window:DynamicCast(wxTabFrame) -- this
 should work, but fails with Cannot cast a wxLua type 'wxWindow' with
 wxClassInfo 'wxWindow' to a 'wxTabFrame'.


It looks like wxTabFrame is not exposed though any header file.


 It would be great to have access to FindTab, which returns both the
 tab control and tab index for the page in that control, but it's
 marked as protected:

 protected:
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);

 What are your thoughts on exposing protected classes in the wxlua API?
 There are two more in that category wxStat and wxLstat that I'd love
 to have in wxlua.


It is unfortunately not really possible to expose these in a generic way.
wxLua can compile against a system installed copy of wxWidgets and we can't
expect people to be able to change protected: to public:. There really
isn't a viable way to do this in C++ that isn't a complete hack that will
just lead to frustrating people with compilation errors.

A quick google search hints that wxPython has implemented this, how did
they do it?

Regards,
John
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] four tabs one in each corner with wxAuiNotebook:Split()

2013-10-21 Thread John Labenski
On Mon, Oct 21, 2013 at 2:01 PM, Victor Bombi son...@telefonica.net wrote:

 Hello:

 How could I use wxAuiNotebook:Split() to get four tabs one in each corner.


I think you may need to insert a page into the beginning to get that last
split. Add three pages, split into three parts. That part is
straightforward, but to get that last split you probably need to insert a
page before/after the single half-page then split that to get four
quarter-pages.

Regards,
John
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Adding QueueEvent to wxEvtHandler

2013-09-19 Thread John Labenski
On Thu, Sep 19, 2013 at 7:07 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 Would it be possible to add QueueEvent to wxEvtHandler? It's used in
 wx2.9 as a (safer) replacement for AddPendingEvent and I'd like to
 switch to using it. Thank you.


I added it, but note that is only safer for multi-threaded programs, to be
sure coroutines are single-threaded.

Regards,
John
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] [ANN] wxLua 2.8.12.3

2013-09-13 Thread John Labenski
On Fri, Sep 13, 2013 at 1:22 PM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

 Hi John,

 thanks. May I suggest that you add a link to an archive containing the
 sources
 for wxLua 2.8.12.3 for people preferring to build their own version of
 wxLua to
 this site?

 http://wxlua.sourceforge.net/download.php


Thanks, I forgot to update that part of the page.



 When I first started out with wxLua I found it quite confusing that only
 binary
 builds were available and there was no direct link to the sources of the
 latest version so I had to go and check out the current SVN trunk but this
 always
 makes me slightly worried because I don't know how stable checked out
 version is...


I try to keep SVN in a working state at all times, though I feel the same
unease sometimes.

Regards,
John
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] [ANN] wxLua 2.8.12.3

2013-09-12 Thread John Labenski
I am pleased to announce the 2.8.12.3 release of wxLua.

wxLua 2.8.12.3 is a long overdue stable bugfix release. There are a few new
wxWidgets classes and functions. The binding generator has been changed to
accept simple valid C++ code. The precompiled versions are linked against
the SVN trunk of the wxWidgets 2.8 branch (2.8.12 with bug fixes). Note
that the wxLua source code can be compiled against wxWidgets 2.9.x too.

---

wxLua is a Lua scripting language wrapper around the wxWidgets
cross-platform GUI library. It consists of an executable for running
standalone wxLua scripts and a library for extending C++ programs with a
fast, small, fully embeddable scripting language.

More information can be found here: http://wxlua.sourceforge.net

Regards,
John Labenski
--
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxlua fails to build against LuaJIT 2.0.2

2013-09-11 Thread John Labenski
On Wed, Sep 11, 2013 at 5:52 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I'm trying to build wxlua against LuaJIT and get compilation errors. I
 know, I can build against normal Lua 5.1 and use it with LuaJIT (and
 that's exactly what I'm doing now), but I'd like to avoid that extra
 step if possible. These are the errors:

 ../wxLua/modules/wxlua/lbitlib.c:83: error: expected ‘=’, ‘,’, ‘;’,
 ‘asm’ or ‘__attribute__’ before ‘lua_Unsigned’
 more errors here


Please provide as much info as possible to make my life easier. I'm just
looking at the wxLua code I have and the LuaJIT code online and this error
makes no sense to me.



 Is it something that can be addressed? It would also be great if wxlua
 would only load its own bitlib into bit table if it's not already
 loaded.


I vaguely remember reading that LuaJIT provides its own bit32 lib and
there's at least a declaration of it here.
http://repo.or.cz/w/luajit-2.0.git/blob/HEAD:/src/lualib.h

wxLua only added the bit32 lib for 5.1 since 5.2 already had it. I have
blindly added a check for LuaJIT to not add it there either.

Let me know if it works for you.
John
--
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] BUILD_INSTALL_PREFIX is not respected in wxlua trunk (most likely broken in r190 or later)

2013-09-10 Thread John Labenski
On Mon, Sep 9, 2013 at 7:50 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I get wx.dll installed in /usr/local/lib/ even though I have
 BUILD_INSTALL_PREFIX specified. It worked as expected just few weeks
 ago and most likely got broken in r190 or later.


Sorry, that was a hack of some sorts and I can't remember anymore why I did
it. Please set the CMAKE_INSTALL_PREFIX variable instead. To the best of my
knowledge it was something for CMake 2.6 (very old version), but since
CMake advertises that CMAKE_INSTALL_PREFIX is the install dir I went back
to using that to make it more familiar to CMake users.

I'll try to remember to update the docs. There is one catch, if you merely
update from SVN you will still have the old BUILD_INSTALL_PREFIX defined,
but it will not be used.

Regards,
   John
--
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to accept drag and drop files on all platforms?

2013-09-08 Thread John Labenski
On Mon, Aug 26, 2013 at 12:14 AM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

  Sorry yes, I looked into this, but it does require a few more virtual
 functions in
  wxFileDropTarget. I believe that it should be pretty easy.

 Are you saying that it would be pretty easy for you to add them or
 that it will be pretty easy after you add them ;). In any case, I'd


Both, but it is always a matter of time for me. I have added
wxTextDropTarget and wxFileDropTarget, there is a demo in editor.wx.lua.
Drag some files onto the notebook tabs to open them. Note that you must
create a new wxFile/TextDropTarget for every window you call
SetDropTarget() for, i.e. you can't reuse them.

Regards,
   John
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to call OnLinkClicked for wxLuaHtmlWindow?

2013-09-08 Thread John Labenski
On Thu, Aug 29, 2013 at 9:32 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I've been trying to add some reaction based on link clicked in
 wxLuaHtmlWindow and can't figure out how to set it.

 This is what I've tried:

   wx.wxLuaHtmlWindow.OnLinkClicked = function(self, link)
 -- do something
   end

 but don't see any reaction (I tried to output something and to call
 error).


That should be right. I have never used this function so I don't know what
triggers it. In any case I think you should just get the wxHtmlLinkEvent
and handle it there, I believe that this also applies for wx 2.8.x too.

http://docs.wxwidgets.org/trunk/classwx_html_window.html#a519281dbfbddc163b5e73fd6a10cf90a



 What is the right way to set it? Also, I see the code that resets some
 internal flag after OnLickClicked is called:

 m_wxlState.SetCallBaseClassFunction(false); // clear flag always

 Does this mean I need to re-set it every time the link is clicked? Thank
 you.


No, this is just an internal wxLua flag for when the Lua code wants to call
the base class function, if you call obj:_OnLinkClicked() for example.

Regards,
John
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Rich Text interface file

2013-09-03 Thread John Labenski
On Tue, Sep 3, 2013 at 4:02 PM, Milind Gupta milind.gu...@gmail.com wrote:

 Hi,
   I am looking and learning how to create rich text binding in wxlua.
 I have a lot of questions

 1. Are all the interface files that are used by the genwxbind program in
 the bindings/wxlua directory? There doesn't seem to be a lot of them there?


Yes, they're all there.


 2. I do see a rich text interface file, can I start from there? What is it
 missing so that it was not included in wxlua yet?


There probably are a few things missing now, but more importantly there is
surely some work needed to make it compile. As the wxrichtext_richtext.i
file says, it is mostly copied from the wxWidgets headers, but typically I
have to massage the function signatures to simplify them for the binding
generator.


 3. If I create an interface file, I need all the interface files and then
 run genwxbind to generate the C code and then compile it to get the final
 executables and libraries?


Start from the existing one, note that most of it is remmed out /* ... */
and try to add bits at a time until it works. See the Makefile or
genwxbind.bat files to see how to regenerate the bindings.

I don't remember anymore, but I probably didn't finish it since I've never
used that control myself and don't know what parts are important and what
can be skipped.

Regards,
John
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to easily override wxWindow::Destroy in wxLua

2013-08-25 Thread John Labenski
On Sun, Aug 25, 2013 at 4:24 PM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

...


 But how should I do it in wxLua? If I'd derive a whole new class from
 wxWindow I'd have to create new bindings for it etc. This all sounds
 quite complicated so I'd to know if there is an easier way to hook into
 the wxWindow::Destroy method for every wxWindow object created by
 wxLua.

 Connecting to wxEVT_DESTROY is probably not sufficient because AFAICS
 destruction is already in process when this event is sent, but I'd
 like to run my custom code *before* the destruction process is actually
 started.


wxLua only supports using wxEVT_DESTROY. Usually you can handle destroying
windows by managing how and who deletes them. wxWidgets only deletes the
children of a window when it is destroyed and only top level windows
(wxFrame/wxDialog) can be destroyed by themselves, but you can veto
wxEVT_CLOSE events.  I would try to refactor your code to work either with
wxEVT_DESTROY or manage deletion from the top down by doing what you need
to do before calling Destroy() on the window yourself.

Regards,
John
--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Difference between Lua and wxLua executable

2013-08-25 Thread John Labenski
On Fri, Aug 23, 2013 at 7:04 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

  After that wxlua and lua produce the same (calendar) results. You can
  also tweak the manifest before embedding it to see the effect.

 Were you able to reproduce the same effect?


No, my last commit actually didn't add the manifest file correctly (the
#ifdefs were not set), but when I do set a proper manifest file I get a
pop-up dialog error when running that msvcr90d.dll is missing. If I copy
the msvcr90d.dll file over it works and I get the new calendar control, if
I remove the correct manifest it runs without msvcr90d.dll copied over, but
I get the old calendar control.

I think my problem is like this persons, but I have MSVC 2008 with SP1
already installed and turning off incremental linking doesn't help.
http://go4answers.webhost4life.com/Example/mscvp90ddll-reported-missing-23640.aspx

I doesn't seem like a common problem, it might be some strangeness with
MSVC 2008 since turning off incremental linking to fix a missing
msvcr90d.dll file seems like a strange fix.

Regards,
John
--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to accept drag and drop files on all platforms?

2013-08-25 Thread John Labenski
On Fri, Aug 23, 2013 at 2:16 AM, Paul K paulclin...@yahoo.com wrote:

  Anyone has an example that allows to accept a filename after DD that
 works on Windows/OSX/Linux?

 Nobody knows? John? I'll be happy with any hints I can try...



Sorry yes, I looked into this, but it does require a few more virtual
functions in wxFileDropTarget. I believe that it should be pretty easy.

Regards,
John
--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Difference between Lua and wxLua executable

2013-08-18 Thread John Labenski
On Sun, Aug 18, 2013 at 10:58 PM, Paul K paulclin...@yahoo.com wrote:

 I'm very interested in what manifest needs to be used as well. My
 executable *does* include a manifest, but it doesn't statically
 compile wx.dll and loads it at run-time. My calendar looks like a
 generic one (the one that Milind has on the left side), so I either
 need to have a different content in the manifest or needs to include
 in the DLL file itself.


I too have tried to add an appropriate mainifest file to lua.exe and found
that it didn't change anything. Note that wx.dll already uses the same
resource file as wxlua.exe, but I think that the manifest file only matters
for the exe.

If anyone can find out how to fix this I will happily add it to wxLua.

Regards,
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Difference between Lua and wxLua executable

2013-08-17 Thread John Labenski
On Fri, Aug 16, 2013 at 3:16 PM, Milind Gupta milind.gu...@gmail.comwrote:


 So when you do this do you get the same differences or is it just
 something on my system? Since these are run from the same Lua package but
 show different renderings I am really curious why this happens.


Hummm, I do see the same differences you do and I get the same results even
when I compile it fresh using MSVC 2008 (the sourceforge packages were
built with MSVC 6).

I ran depends[1] on them and found that they all use the exact same DLLs
except for these differences :

They both use these two DLLS (note I built using 64-bit arch)
c:\windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_418ab7ef718b27ef\COMCTL32.DLL
c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\COMCTL32.DLL

wx.dll also uses this which is older and that may explain the older looking
calendar control.
c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.DLL

I believe it has something to do with the manifest file, lua.exe is not
compiled with one, but all the wxLua apps use the wxWidget manifest file.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx

I suppose I could try building lua.exe using a similar manifest file and
see if that changes anything.

Regards,
 John


[1] http://www.dependencywalker.com/
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] unsigned char* wxImage::GetAlpha() missing

2013-08-15 Thread John Labenski
On Thu, Aug 15, 2013 at 8:59 AM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

 Hi,

 I noticed that the second method of wxImage::GetAlpha() is missing. AFAICS
 wxLua
 only has the first one. So I've quickly adapted this for wxLua. Here's the
 code in
 case you want to merge this with the official branch:



Thanks! I really appreciate these patches.



 I'm not sure if the wxluatype_NULL return is consistent with wxLua's
 standard.
 What is the function expected to return if wxImage::GetAlpha() returns
 NULL?
 Currently it returns wx.NULL but of course it could also be made to return
 NIL,
 an empty string, or even nothing here not sure how wxLua is supposed to
 behave in this case.


I made it return nil since that's probably more natural.

Regards,
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Bug in wxlua_getBindMethodArgsMsg()?

2013-08-15 Thread John Labenski
On Thu, Aug 15, 2013 at 12:04 PM, Andreas Falkenhahn andr...@falkenhahn.com
 wrote:


 I think there is a bug in wxlua_getBindMethodArgsMsg(). Try the following
 code:


Yes and thanks for the fix! I really appreciate these.

Regards,
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Superfluous condition in scribble.wx.lua?

2013-08-13 Thread John Labenski
On Tue, Aug 13, 2013 at 9:01 AM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

 Hi,

 there is the following code in scribble.wx.lua:

 if colourWin:GetToolTip() ~= s then
 colourWin:SetToolTip(s)
 end

 But AFAICS, wxWindow::GetToolTip() will never return a string,
 but will always push a value of type userdata on the stack. Thus,
 the condition check is superfluous because it is always TRUE and
 SetToolTip() will always be called.


Good eye, you're right, fixed in SVN, thanks.
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Bug in wxImage::SetAlphaData()?

2013-08-13 Thread John Labenski
On Tue, Aug 13, 2013 at 11:26 AM, Andreas Falkenhahn andr...@falkenhahn.com
 wrote:

 Hi,

 in the override function for wxImage::SetAlpha() in wxcore_override.hpp
 there is
 the following code:

 size_t size = 3*self-GetWidth()*self-GetHeight();
 memcpy(self-GetData(), data, wxMin(len, size));

 I think this is wrong because alpha channel data is only one byte per
 pixel.


Fixed in SVN, thanks!
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Typo in calculator.wx.lua

2013-08-11 Thread John Labenski
On Sat, Aug 10, 2013 at 6:43 PM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

 Hi,

 just discovered some small typos in the calculator.wx.lua sample: when
 setting up the
 accelerator table it uses wx.VXK_NUMPADx several times... but this is
 apparently a
 nil reference. The correct reference is wx.WXK_NUMPADx, i.e. WXK instead
 of VXK.


Thanks! Fixed in SVN.

Regards,
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Potential memory fault in wxLua

2013-08-11 Thread John Labenski
On Sat, Aug 10, 2013 at 3:41 PM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:

 Hi,

 I've just seen that there seems to be a potential memory access fault in
 wxLua in
 wxlua_getchararray() in wxlstate.cpp. Have a look at this code:

 int table_len = lua_objlen(L, stack_idx);
 if (table_len  0)
 arrChar = new const char *[table_len];

 if (arrChar != NULL)
 {
 for (int n = 0; n  table_len; ++n)
 {
 lua_rawgeti(L, stack_idx, n+1); // Lua array starts at 1
 const char *s = wxlua_getstringtype(L, -1);
 arrChar[n] = s; // share Lua string
 lua_pop(L, 1);
 }
 }

 You can see here that the pointer returned by lua_tostring() [which is
 usually
 called by wxlua_getstringtype()] is stored inside arrChar[n] here and then
 the string is popped from the stack. But AFAIK lua guidelines say that
 pointers
 only remain valid as long as they're on the stack. Once they've been
 popped,
 they could become invalid at any time. Thus, the code posted above could
 lead to a memory access fault under certain conditions.


The string exists also in the Lua table where it was pushed on the stack
from and it should definitely live for the life of this and its parent's
function call. Now if you find a place where this function is called and
the return value is stored for use later after more Lua code could be run
that could be a problem.

Regards,
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Crash on lua_close() [was: Using wxLua with Lua 5.0.2]

2013-08-11 Thread John Labenski
On Sat, Aug 10, 2013 at 1:37 PM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:


  Build wxLua using the provided CMakeFiles as described in the
  install.html in the docs dir.

 This unfortunately doesn't work here for me. I don't have Visual Studio
 but just its compiler
 collection that is freely available with the Windows SDK. That's why I use
 the generator named

NMake Makefiles in the CMake GUI. Here is my CMake configuration:

 http://www.falkenhahn.com/tmp/cmake.png


This is because you did not allow SVN to checkout externals I believe.


 When I try to build wxLua then by typing nmake, it first builds some parts
 of lua 5.1 but
 then it fails completely saying:

 NMAKE : fatal error U1073: don't know how to make
 'modules\lua-5.1\LuaLib.dir\.\lapi.obj'
 Stop.
 NMAKE : fatal error U1077: 'C:\Program Files (x86)\Microsoft Visual
 Studio 9.0\VC\bin\nmake.exe' : return code '0x2'
 Stop.
 NMAKE : fatal error U1077: 'C:\Program Files (x86)\Microsoft Visual
 Studio 9.0\VC\bin\nmake.exe' : return code '0x2'
 Stop.


These are very strange error messages, I'm not sure what they mean.
Googling seems to suggest that your paths and env variables may not be
right. There is no reason why lapi.obj should be built any differently than
every other Lua source file. Some people claim that if you rerun it / clean
the build nmake will succeed.

I just built wxLua using the CMakeFiles for MSVC 2008 using nmake 64-bit
and it builds and runs without error.

You run vcvars32.bat in a DOS prompt right?
c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\bin\amd64\vcvars32.bat

Then you run cmake-gui.exe from that command prompt or do you do something
else?

Have you installed all the service packs for your MSVC? The cl.exe that
comes with MSVC 2008 (what I use) is exactly the same version as what you
use;
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.30729.01 and the
service packs for it had some very important fixes.


 Yes, luamodule.cpp is actually exactly the code I used in my example. The
 app is
 instantiated in luaopen_wx(). Is there anything else that needs to be done?


No, if you follow the code in the example programs it should work.

Regards,
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Crash on lua_close() [was: Using wxLua with Lua 5.0.2]

2013-08-10 Thread John Labenski
On Sat, Aug 10, 2013 at 7:18 AM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:


 I've included the source code and makefile in the archive but it's really
 nothing more than an unmodified version of Lua 5.1 and of wxLua taken
 from the SVN. I also tried it with an older wxLua (version 2.8.10.0) but


...


 The only modification I made is in the main() function of lua.c. I
 inserted the call to luaopen_wx() directly after creating the lua_State
 using lua_open() because I wanted to have everything in a single program,
 i.e. wxLua isn't loaded as a DLL but is statically linked to the lua
 interpreter. But this really shouldn't do any harm.


Hi Andreas,

You have two things that could be the problem here; your custom build and
your modified code.

Build wxLua using the provided CMakeFiles as described in the install.html
in the docs dir. Run some of the samples and verify that they work. Do they?

1) About your custom build, I would really just use wxLua's build files,
please let me know why they aren't suitable for you.  Also, make sure that
wxLua is compiled with the same Lua source files as the lib you are linking
to, you may be using mismatched Lua libs. I noticed that you use /MT for
linking, wxWidgets and wxLua use /MD by default, did you build wxWidgets as
/MT too? I obviously recommend using /MD since I think it's better to use
the system default.

http://stackoverflow.com/questions/3469841/mixing-code-compiled-with-mt-and-md
http://stackoverflow.com/questions/757418/should-i-compile-with-md-or-mt

2) Rem out your luaopen_wx() call and run one of the samples that use '
require(wx) ' call to use the built wx.dll and see if you can do that. I
believe that instead of adding luaopen_wx() you should simply just run
wxluafreeze.exe since its code does what wxLua needs to install itself into
Lua properly.

This code shows how to properly instantiate wxLua using a wxApp as main().
http://sourceforge.net/p/wxlua/svn/184/tree/trunk/wxLua/apps/wxluafreeze/wxluafreeze.cpp

or this which is for loading from a DLL, note the wxApp too.
http://sourceforge.net/p/wxlua/svn/184/tree/trunk/wxLua/modules/luamodule/luamodule.cpp


Your crash in

void wxLua_wxGridCellCoords_delete_function(void** p)

makes no sense if you never created a wxGridCellCoords. You must be
overwriting some variable and mangling the code. You can use the program
ApplicationVerifier to find memory overflows, it works great. But, I
would definitely fix the above problems first.


Regards,
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Crash on lua_close() [was: Using wxLua with Lua 5.0.2]

2013-08-09 Thread John Labenski
On Fri, Aug 9, 2013 at 6:05 PM, Andreas Falkenhahn
andr...@falkenhahn.comwrote:


  But of course that's not really a solution for me because the crash
  in lua_close() tells me that there is something going wrong... it
 doesn't
  happen with the official builds of wxLua for Windows. This is why I'm
 even
  more curious what could be the cause for this crash... any other ideas?

  I agree; I don't like that either, but couldn't track down the source
  of the issue.


Hi Andreas,

I missed the description of original issue and details of how to reproduce
it, can you please describe them again.



 Do the maintainers of wxLua follow this list and is there a chance that


Yes.

they look into such issues? I think the test case I uploaded to

 http://www.falkenhahn.com/tmp/wxLua.zip


I do try to look into issues, but my time is limited. Please try to
reproduce the problem in one of the samples.


Ok, maybe I'll try it with mingw but I can hardly believe that the problem
 is with Visual C...


The wxLua binaries on sourceforge were compiled using MSVC 6 and I use
wxLua compiled with MSVC 2008 regularly.

Regards,
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] New Bindings etc.

2013-08-09 Thread John Labenski
On Fri, Aug 9, 2013 at 5:26 PM, klaas.holwerda n...@klaasholwerda.nl wrote:


 For the rest i had to remove media from the CmakeLists file, since it
 did not work in wxWidgest right away also.
 After that i need to first clear the cmake cache, else somehow it does not
 believe it, and gives an error still.


Glad you got it working.

The CMake code is supposed to find what wxWidgets libs actually exist and
automatically not build the wxLua ones that are missing. I will look into
that.



 All in all nice improvements.
 The Unix and windows libs are now named almost the same, makes it easier.
 The bindings can now much easier be extended.
 Maybe the default install location can be set to /usr/local on unix.


I had preferred to install to a safer place in the build dir, but I suppose
that /usr/local is more standard.


 Just wondering if you already have something to compare them to the
 interface header files of wx?
 Or is using them the next step :-)


I can actually run the binding generator on about half of the the wxWidgets
2.9 interface files. It has been slow going and the generated code doesn't
compile, I have to handle void* etc. and instead of remming things out I
need to make proper doxygen comments so they can be used to generate the
docs too.



 Thanks for all the work, wxLua rocks!


Thanks!
John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] New Bindings etc.

2013-08-08 Thread John Labenski
On Thu, Aug 8, 2013 at 5:58 PM, klaas.holwerda n...@klaasholwerda.nl wrote:

  Hi John,

 I managed to update wxArt2D to use the new binding rules.


Great, hopefully it wasn't too hard and the benefit is that the binding
headers are now valid C++ code, though they need to be very simple.

On windows all works again.
 On Linux (Centos 6.4 and openSuse12.3) i am able to compile and install
 wxLua. (-fPIC stilled needed for wxWidgest2.9.5)


I use Centos 6 and I didn't need to add -fPIC to either building wxWidgets
or wxLua. Do you remember what you added -fPIC to?



 Also i am able to compile wxArt2D with wxLua within again.
 Now i need to link and i get this the errors down here.
 I build wxLua with BUILD_SHARED_LIBS disabled, and debug.

 I have the libraries, the libwxlua_lua51-wx29gtk2ud-2.8.12.so is not
 static it seems, don't know why?



I made the static build also optionally build the shared libwx.so, for
Lua's require(wx), and this needs a shared Lua lib. You can also make
this static by setting wxLua_LUA_LIBRARY_BUILD_SHARED=TRUE.



 klaas@dhcppc2:/usr/local/lib ls libwxlua*
 libwxlua_bind-wx29gtk2ud-2.8.12.a  libwxlua_debugger-wx29gtk2ud-2.8.12.a
 libwxlua_debug-wx29gtk2ud-2.8.12.a  libwxlua_lua51-wx29gtk2ud-2.8.12.so
 libwxlua-wx29gtk2ud-2.8.12.a

 Do you see something wrong? Like order of libraries to link, or maybe a
 missing library??
 I know they are there several times, but normally that does not cause
 problems, although order of libraries did before.


It looks ok, this would be the ideal order of the libs.

wxart2d libs
libwxlua_bind-wx28gtk2ud-2.8.12.a
libwxlua_debugger-wx28gtk2ud-2.8.12.a
libwxlua_debug-wx28gtk2ud-2.8.12.a
libwxlua-wx28gtk2ud-2.8.12.a
libwxlua_lua51-wx28gtk2ud-2.8.12.so
wxwidgets libs
libpng etc.

The only thing I can really suggest is to do the clean and rebuild thing
and hope it fixes it. The functions you're missing are in
libwxlua-wx28gtk2ud-2.8.12.a, which is the main wxLua lib.

Regards,
 John
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Using wxlua with Lua 5.1 and Twoface ABI mapper

2013-07-20 Thread John Labenski
On Fri, Jul 19, 2013 at 7:54 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I've been looking into using twoface ABI mapper
 (http://corsix.github.io/twoface/) to run ZeroBrane Studio on top of
 Lua 5.2 without recompiling wxlua and luasocket (both are compiled for
 Lua 5.1). For those not familiar with it, it allows to run Lua 5.2
 engine with modules compiled for Lua 5.1 without any changes to those
 modules. In my case, I use it with ZBS that is compiled for Lua 5.1
 and can make it run with Lua 5.2 by replacing lua51.dll with a
 different one (and adding lua52.dll).


Interesting, but that means that they're emulating the removed functions
and I wonder what their setfenv() does.



 I have been able to run it with wxlua, but I ended up patching wxlua
 in one place. For some reason when I ran it originally, I was getting
 wxLua: wxEvtHandler::Connect() in wxLuaEventCallback::OnEvent(),
 callback function is not a Lua function. messages in more or less
 random places. This error comes from an event handler check in
 wxlcallb.cpp and it appears to be only active for Lua 5.1:

 #if LUA_VERSION_NUM  502
 // lua_setfenv() is not in Lua 5.2 nor can you set an env for
 a function anymore
 wxlState.GetGlobals();
 if (wxlState.lua_SetFenv(-2) != 0)
 #endif // LUA_VERSION_NUM  502
 {
 // Don't track the wxEvent since we don't own it and tracking
 it
 // causes clashes in the object registry table since many can
 be
 // created and deleted and the mem address is resused by C++.
 wxlState.wxluaT_PushUserDataType(event, event_wxl_type, false);
 wxlState.LuaPCall(1, 0); // one input no returns
 }
 #if LUA_VERSION_NUM  502
 else
 wxlState.wxlua_Error(wxLua: wxEvtHandler::Connect() in
 wxLuaEventCallback::OnEvent(), callback function is not a Lua
 function.);
 #endif // LUA_VERSION_NUM  502

 I have never seen this error with 5.1 and am not sure what the purpose
 of it is. Given that it doesn't even run for Lua 5.2, I completely
 disabled this check and everything appears to be working as expected.


It's there for backwards compatibility so that programs run as expected in
5.1, but in 5.2 things are a little different. See below.



 Is there any reason for this check (especially given that it behaves
 differently for lua 5.1 and 5.2) and is it possible to remove/disable
 it?


In  5.2 wxLua used the globals as the environment for the callback
function to give a uniform state. This was how it was before I took over
wxLua and though it wasn't strictly necessary I didn't see any reason to
change it.

In 5.2 setfenv() function was removed and the environment for a function is
set by the _ENV table which should be the first upvalue for the function. I
believe that this is automatic so the 5.2 behavior should be more expected,
but I haven't rigorously tested what happens with callbacks in modules or
even if you swap out the _ENV before setting the callback.

http://stackoverflow.com/questions/14290527/recreating-setfenv-in-lua-5-2



Is there any way to detect when the twoface DLL is being used so that the
code can take the 5.2 path? Or maybe compile wxLua for 5.2 and use woface
to treat 5.1 as 5.2 instead of the other way around.


Regards,
John
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxlua trunk build fails on Windows using Mingw

2013-07-20 Thread John Labenski
On Fri, Jul 19, 2013 at 3:34 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I tried to compile the current trunk on Windows using mingw and ran
 into a compilation error:

 ...wxLua/modules/wxbind/src/wxcore_bind.cpp: In member function
 'virtual bool wxLuaBinding_wxcore::RegisterBinding(const
 wxLuaState)':
 ...wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp:7495:46: error:
 'wxEVT_COMMAND_DIRPICKER_CHANGED' was not declared in this scope
 ...wxLua/modules/wxbind/src/wxcore_bind.cpp:7496:46: error:
 'wxEVT_COMMAND_FILEPICKER_CHANGED' was not declared in this scope

 This follows a warning about re-definition:

 ...wxLua/modules/wxbind/src/wxcore_bind.cpp:73:0: warning:
 wxEVT_COMMAND_DIRPICKER_CHANGED redefined [enabled by default]
 ...include/wx-2.9/wx/filepicker.h:418:0: note: this is the location of
 the previous definition
 ...wxLua/modules/wxbind/src/wxcore_bind.cpp:74:0: warning:
 wxEVT_COMMAND_FILEPICKER_CHANGED redefined [enabled by default]
 ...include/wx-2.9/wx/filepicker.h:417:0: note: this is the location of
 the previous definition

 The issue seems to be caused by this #if in
 modules/wxbind/src/wxcore_bind.cpp:

 #if defined(__MINGW32__) || defined(__GNUWIN32__)
 // FIX: internal compiler error: output_operand: invalid
 expression as operand

 I'm not sure if the comment still applies, but I removed this #if (and
 another one around line 7488 in the same file) and compiled without
 any errors/issues.


When you say remove the #if you mean just the #if statement or all of the
code in the #if statement. As you can tell that is a strange hack for that
compiler and I wish I documented the version.



 Can you please take a look at this and check if this #if is still
 needed? It's seems like you can safely remove it. Thank you.



 I'm using the latest wxwidgets (2.9.5 release candidate) and gcc 4.6.2.


What gcc are you using? MingW as per these directions or something else and
from where and why?

http://wxlua.sourceforge.net/docs/install.html#C2.4
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/

The 
mingw-get-inst-20120426http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/is
gcc 4.7.0 and I do believe that that #if is needed for that compiler.

Regards,
John
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Adding wxDIR_NO_FOLLOW and GetContentScaleFactor

2013-06-20 Thread John Labenski
On Thu, Jun 20, 2013 at 11:51 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 Can you add a new method GetContentScaleFactor that can be used to
 detect Retina displays
 (https://groups.google.com/d/msg/wx-users/waj_tC1AU4k/q55_Q3Z4TGUJ)
 and a missing constant (wxDIR_NO_FOLLOW) when you get a chance? Thank
 you!


 Sure, I can do that on Monday.

Regards,
John
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Strange (occasional) crash in wxLuaState::LuaPCall

2013-06-13 Thread John Labenski
On Thu, Jun 13, 2013 at 1:17 AM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I got several reports (from the same machine) of crashes in my
 application when a user types something in wxSTC control. It's
 difficult to reproduce and seems to happen infrequently, but the
 captured stack trace points to wxLuaState::LuaPCall call. This is
 running wxlua 2.8.12.2 and wxwidgets 2.9.5 (compiled at the end of
 April).


The wxLua C++ event handler callback uses LuaPCall() to run your Lua event
handler function for the wxStyledTextEvent. From the stack it looks like
the event is a char added event.

I'm including the top part of the stack trace below (the full stack is
 in this ticket:
 https://github.com/pkulchenko/ZeroBraneStudio/issues/164), but there
 are several odd things I noticed.

 1. The trace shows lua51!lua_yield call after wxLuaState::LuaPCall
 call, but I don't see any lua_yield calls in that function.


lua_yield is a coroutine function, are you running coroutines? If so, then
Lua will be swapping lua_States in and out and pausing them whenever it
wants to, making the stack seem very strange.

You're not trying to install event handlers in a coroutine are you? As we
discussed, that's always a bad idea.


 2. The trace shows wxProgressDialog_delete_function call in the stack,
 but I don't use that component anywhere in the application; the stack
 looks wrong at that point as I wouldn't expect any wxProgressDialog
 call from lua_getinfo.


Did you ever create a wxProgressDialog? The Lua garbage collector may
simply be running and finally getting around to deleting it.

3. The crash seems to be in this fragment in wxlua/wxlcallb.cpp:

 // Don't track the wxEvent since we don't own it and tracking
 it
 // causes clashes in the object registry table since many can
 be
 // created and deleted and the mem address is resused by C++.
 wxlState.wxluaT_PushUserDataType(event, event_wxl_type, false);
 wxlState.LuaPCall(1, 0); // one input no returns

 What events are being referred to here as we don't own it? Is it
 possible to check for these events explicitly? Any idea why it may be
 crashing here and how to avoid this? Thank you!


We meaning, wxLua/Lua, does not own the allocated memory for the wxEvent
class so even though wxLua pushes it onto the Lua stack wxLua/Lua will not
try to delete it when the function ends. Think of wxMouseEvents, if you
have a very simple event handler function it may happen that each
successive wxMouseEvent will use the same memory. Therefore, wxLua cannot
track the event since the Lua garbage collector can be slow to clean up
and we get seemingly duplicate tracked items, but the first one is long
gone, this is merely book keeping.

The event is a wxStyledTextEvent based on the stack.

Can you rebuild in debug mode? The stack should have line numbers which
will clear things up. Everything is normal up to LuaPCall, but then I
presume you're running a coroutine that's calling the lua_yield, and wxLua
does use lua_getinfo for a few things so that may be normal, but the
lua_close is very wrong unless you're closing a coroutine, perhaps the
coroutine had a wxProgressDialog and that's why it's getting deleted at
this point? I can't imagine who's calling AddPendingEvent though, are you?

In any case, if you do create a wxProgressDialog I suggest that you
explicitly call dlg:Destroy() on it to ensure that it's cleaned up
immediately instead of waiting for the garbage collector.

Regards,
John


 0028eb1c 5dac0207 unknown!unknown+0x0
 0028eb20 02270b3f wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0x1b
 0028eb40 01ed3fe7 wx!Z38wxLua_wxProgressDialog_delete_functionPPv+0x88a
 0028eb60 66d85a49 lua51!lua_getinfo+0x1015
 0028eb70 66d8ddd1 lua51!lua_close+0x1eb9
 0028ebb0 66d8ea14 lua51!lua_close+0x2afc
 0028ec50 66d85e34 lua51!lua_getinfo+0x1400
 0028ed00 66d85f89 lua51!lua_yield+0x81
 0028ed10 66d86431 lua51!lua_yield+0x529
 0028ed80 01f65c4e wx!ZN10wxLuaState8LuaPCallEii+0x7c
 0028edc0 01f5b2da wx!ZN18wxLuaEventCallback7OnEventEP7wxEvent+0x1f4
 0028ee20 01f5b09b wx!ZN18wxLuaEventCallback11OnAllEventsER7wxEvent+0x59
 0028ee70 02197e3a

 wx!ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent+0x42
 0028eec0 02199839

 wx!ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent+0x65
 0028eef0 02199aa3
 wx!ZN12wxEvtHandler23SearchDynamicEventTableER7wxEvent+0x4f
 0028ef20 02199ae2 wx!ZN12wxEvtHandler11TryHereOnlyER7wxEvent+0x28
 0028ef40 02199b48 wx!ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent+0x1a
 0028ef60 02199bc9 wx!ZN12wxEvtHandler12ProcessEventER7wxEvent+0x63
 0028ef90 01f72fb0
 wx!ZN16wxStyledTextCtrl12NotifyParentEP14SCNotification+0x252
 0028f070 01f75022 wx!ZN11ScintillaWX12NotifyParentE14SCNotification+0x1e
 0028f090 01f82de0 wx!ZN6Editor10NotifyCharEi+0x3a
 0028f160 01f92f85 wx!ZN6Editor10AddCharUTFEPcjb+0x3e1
 0028f1c0 01f7c151 

Re: [wxlua-users] How to use wxHandleFatalExceptions and OnFatalExceptions?

2013-06-13 Thread John Labenski
On Mon, Jun 3, 2013 at 2:13 AM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 I've been looking for ways to catch and report run-time errors in the
 application.  Lua errors are covered with your recent support for
 EVT_LUA_ERROR (http://sourceforge.net/p/wxlua/svn/180/), but there are
 still fatal exceptions in the application that may happen.

 As far as I can see from wxwdigets docs, these are controlled by
 wxHandleFatalExceptions and OnFatalExceptions; wxlua does provide a
 methods for wxHandleFatalExceptions, but I don't see anything similar
 to OnFatalExceptions? How do I get set up a handler that gets called
 when a fatal exception happens? It would be super useful to also have
 a way to access Lua state from it to gather Lua stack information to
 include in the crash report. Or is there an existing alternative I am
 missing?


I have not used these functions, but typically there is not a lot that can
be done at that point since, it is... fatal. Digging through the Lua stack,
which may have been the problem in the first place, may be too much.


 Would it be possible to use OnFatalExceptions to set a callback (a Lua
 function) that will be called when a fatal exception happens?


This is a MSVC only thing, do you use it or MingW?

http://docs.wxwidgets.org/trunk/group__group__funcmacro__appinitterm.html#ga28a4fb827b93fa6bac18c9666c23ee10


 While we are on the topic of crash reports, there is wxDebugReport,
 but it doesn't seem to be available in the binding. Does it make sense
 to expose it, or is it better try to gather and report as much as
 possible at the Lua level?


It would be nice to have, but I have not used it so I don't know how much
work it is. At first glance it seems like you could use it without having
to override any virtual functions which makes binding it much simpler.


 Also, there are some other methods documents (OnExceptionInMainLoop
 and OnUnhandledException) and I can't figure out if these are also
 needed or if OnFatalExceptions is enough if exposed in wxlua. Thank
 you!



I can't tell from the docs what the difference between them really are.
Presumably, OnExcept... and OnUnhandl... are caught earlier? I think for
your purpose OnFatal... is what you want.

Regards,
John
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Patch: trunk won't run on pre-XP systems

2013-05-01 Thread John Labenski
On Tue, Apr 30, 2013 at 9:27 AM, Les Newell les.new...@fastmail.co.ukwrote:

 The trunk version of wxLua won't run on pre-XP systems because it depends
 on AttachConsole in kernel32 (introduced in XP). The attached patch only
 calls AttachConsole if it is available.


Thanks for the patch, applied in SVN trunk.

Regards,
John
--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxTreeCtrl:SetItemState is missing in wxLua 2.8.12.x

2013-05-01 Thread John Labenski
On Mon, Apr 22, 2013 at 2:54 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 Can you add wxTreeCtrl:SetItemState (2.9.x call) as well as related
 constants (wxTREE_ITEMSTATE_*)?


Sure, added in SVN trunk.

Regards,
John
--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxLua dispatching Asynchronous events?

2013-04-12 Thread John Labenski
On Fri, Apr 12, 2013 at 4:13 PM, Javier Mr javiersdevm...@ymail.com wrote:
 Hi,

 i'm using wxLua to make an interface, but i'm facing several crashed and 
 after looking for the source of them i could find it. I have an idea of a 
 posible reason so i will ask in case this is a known behaviour. First several 
 questions?

 1. First in wxWidgets, are events (click, cell changes, tree item activation, 
 etc...) dispatched synchronously or asynchronously?

Asynchronously (in a way), but single threaded. wxWidgets apps
basically hang in the native OS event loop until the mouse is moved,
key pressed, etc. You can pump the event loop by requesting a
wxIdleEvent or using a wxTimer.

 2. If asynchronously, could it be posible that to events are dispatcher 
 against the same lua state simultaneaously?.

You will never have two functions called at once by the wxWidgets event loop.

 What i have is a tree control with several items and a grid, so when a item 
 in the tree is activated the grid is filled up. I'm currently connected to 
 events for tree item activation, tree item right click, grid cell changed.

 Let's suppose the wxWidget thread running on the main loop is A ( 3. which i 
 belive is the thread that load the lua script, isn't it? ),

Yes, same thread.

 when i activate a tree node a event (evt1) will be queued in the event queue 
 (4. isn't it?), and the main loop will check for pending events it will find 
 the event (evt1) and will dispatch it (5. but will the lua function from the 
 event handler be called by the thread running the main loop (A) or will a 
 second thread be created (B) ?).


Never a second thread.


 In case question 5 is that a new thread will be created for executing the 
 handler, could another event in the tree (evt2) be queued in the events queue 
 and then the main loop thread (A) dispatch it creating a new thread (C) 
 **accesing** and modifiying the lua state while the previous event thread (B) 
 hasn't return yet?


Nobody, including your code, should *ever* try to access any wxWidgets
control from any other thread than the one it was created in.

 My hole test so far have been repainting the grid while clicking several 
 timer over a tree item so the event handler doesn't return inmediatly.

 I think all previous questions could be summariazed but, does wxLua protect 
 the access to the lua state from within wxLua?

No, there would be way too many places to put mutexes, it would be really ugly.

A wxLua app works this way.

1) Start Lua... load the libs require(wx) etc.
2) Execute the Lua code, but it quickly gets to the end of the code.
The code defines functions, creates the wxFrame add child windows,
connect events... but doesn't really do any work
3) Then if any wxFrames (or any wxTopLevelWindow derived class) exist,
wxLua starts the wxWidgets event loop and the app hangs in it
waiting for user input.

Hope this makes sense,
 John

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] undefined reference to wxLuaState::Ok()

2013-04-10 Thread John Labenski
On Wed, Apr 10, 2013 at 5:39 PM, andreas graeper
agrae...@googlemail.com wrote:
 hi,
 lubuntu12
 lua5.1.5
 wx2.8.12 gtk2du
 wxlua2.8.10.0 this downloaded as source archive

 now i tried svn version:


 CMake Error at build/CMakewxAppLib.cmake:112 (get_filename_component):
   get_filename_component called with incorrect number of arguments
 Call Stack (most recent call first):
   CMakeLists.txt:25 (include)

What version of CMake and did you compile it yourself? wxLua is tested
mostly with 2.8.4 - 2.8.9 in Windows and Fedora, RHEL, and Mandriva.
I'm guessing that the variable CMAKE_EDIT_COMMAND is somehow not set
by CMake? It should point to cmake-gui falling back to ccmake which
should be a part of any normal CMake install.

Please add this line shown below and let me know what the output is :

Index: wxLua/build/CMakewxAppLib.cmake
===
--- wxLua/build/CMakewxAppLib.cmake (revision 178)
+++ wxLua/build/CMakewxAppLib.cmake (working copy)
@@ -109,6 +109,7 @@

 if (UNIX)
 # We want to open it in the gui, not in the curses ccmake which
is broken in the gnome terminal (RHEL6)
+MESSAGE( '${CMAKE_EDIT_COMMAND}')
 get_filename_component(CMAKE_EDIT_COMMAND_PATH ${CMAKE_EDIT_COMMAND} PATH)

 if (EXISTS ${CMAKE_EDIT_COMMAND_PATH}/cmake-gui)


 and other output tells, that installed lua is not used.

Don't worry about that yet, as long as you're getting the error
anything else is meaningless.

Regards,
John

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Asyncronous updates

2013-04-09 Thread John Labenski
On Tue, Apr 9, 2013 at 9:06 AM, Javier Mr javiersdevm...@ymail.com wrote:
 Hi,

 Thanks for your response. But, as i have understand, with that aproach i need 
 to subclass wx (affordable) and connect my native app directly with 
 wxWidgets; this is not desirable in my case since my app will mostly run in a 
 terminal just with a text interface and in certain cases bring up the GUI. 
 Doing that would imply that i have to compile against wxWidgets and also the 
 i would have one dependency more in the proyect.

You might want to consider using a plugin type architecture for the
data/status handler. In your Lua work module you provide a function
that allows people to register functions to use as callbacks when new
data is available. On new data/status the work module loops through
the list of handler functions and calls them. This separates the wxLua
part from your worker code and in the function you push from wxLua you
call wxPostEvent with whatever upvalues you need to make it work...


Regards,
John

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] undefined reference to wxLuaState::Ok()

2013-04-09 Thread John Labenski
Hi Andreas,

You got a lot going on here. First things first, what OS are you on,
what wxLua version are you compiling? I recommend using the SVN
version and the CMake build since it is far easier to work with. Use
the install.html file in the SVN docs/ dir.

Regards,
John

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] RawControlDown, SetRawControlDown, wxMOD_RAW_CONTROL, wxACCEL_RAW_CTRL, and WXK_RAW_CONTROL not present in wxlua 2.8.12.3

2013-04-09 Thread John Labenski
On Apr 9, 2013 11:41 PM, Paul K paulclin...@yahoo.com wrote:

 Hi John,

 Would it be possible to add missing calls and constants? Thank you.

 BTW, ControlDown() has changed its behavior between 2.8 and 2.9 wxwidgets
as it used to mean Ctrl on all platforms (with CmdDown() meaning Ctrl/Cmd),
but it now means Ctrl/Cmd (and CmdDown() is deprecated). RawControlDown()
replaced the old ControlDown(). wxMOD_* modifiers have been updated in a
similar way.


What class? wxKeyEvent?

Regards,
John
--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Asyncronous updates

2013-04-08 Thread John Labenski
On Mon, Apr 8, 2013 at 7:23 AM, Javier Mr javiersdevm...@ymail.com wrote:
 Hi,

 i'm getting a crash when running my app and i wonder if i'm doing it wrong.

 The situation is like this:
 I have a native C++ application wich has a Lua interpreter embedded. This
 embedded interpreter load a lua script that contains wxLua. The idea is, the
 native code is multithraeded a modifies interal structures (protected with
 mutex) and i want to observe that values so i load the lua script with
 wxLua.

This sounds reasonable.

 I think my problem is that my native app do call the lua state to notify
 that changes to the internal data have occur, and the same?¿ lua state is
 called by wx as callbacks to the GUI events, could be this the reason for
 crash? Is there a way to avoid this? Not ideal but would be OK to do pooling

Neither Lua or wxWidgets/wxLua are threadsafe (way too much overhead).
I believe it is possible, but I wouldn't recommend running the GUI in
a single secondary thread, I would reserve the main thread for that.

 in the MainLoop, so i could (every second for example) retrieve the new data
 from the native side and update the GUI with the current data.

You can use wxPostEvent() to asynchronously send a message from other
threads to the GUI thread (though a wxWindow derived class perhaps)
notifying them that there is new data to show. You can send any
derived wxEvent class and wxEventType (wxEVT_COMMAND_ENTER) you like
and use the ID to discriminate your event from anything else.
Depending on the size of the data you could even put it into the
wxString member of a wxCommandEvent.

Regards,
John

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] undefined reference to wxLuaState::Ok()

2013-04-07 Thread John Labenski
On Sun, Apr 7, 2013 at 2:41 PM, andreas graeper agrae...@googlemail.com wrote:

 g++
  -o ../bin/wxlua
  app_wxlua_lconsole.o
  app_wxlua_wxlua.o

...
 lconsole.cpp:(.text+0x53e): undefined reference to `wxLuaState::Ok() const'
...
 libwxlua_gtk2u_wxlua-2.8.so:0001fc90 T _ZNK10wxLuaState2OkEv
...
 symbol should be defined in libwxlua_gtk2u_wxlua-2.8.so ?!

It should be and looks like it is. How did you build wxLua? Did you
build wxLua libs and apps using the CMake build files?

Regards,
John

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] svn request password

2013-03-30 Thread John Labenski
On Sat, Mar 30, 2013 at 12:16 PM, Victor Bombi son...@telefonica.net wrote:
 Hello,

 I cant get the lattest svn : a password and user is requested

Is this for wxstedit? The external in wxLua/modules? Try deleting the
wxLua/modules/wxstedit dir and update again.

Sourceforge changed their repo address for their new platform and
wxCode updated to to, but wxLua has not yet.

http://sourceforge.net/apps/trac/sourceforge/wiki/Subversion#Access
The claim is that No username and password will be requested when
performing read operations.

Is this not true?

I will try to delete my stored passwords and try as a normal user.

Regards,
John

--
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxLua Windows Binaries from 2004/2005

2013-03-21 Thread John Labenski
On Thu, Mar 21, 2013 at 7:26 AM, Reinhard Pollice [White Rabbit]
reinh...@whiterabbitinteractive.com wrote:
 Hey,

 I need wxLua Binary versions from 2004/2005. Reason I need it is that for a
 specific tool we wrote which seems to have problems with newer wxLua
 versions.
 Would be great if somebody still has kept those old stuff.

I don't think I have copy of a binary that old anymore, but there is a
version from 2006 that might not be too different.

http://sourceforge.net/projects/wxlua/files/wxlua/

Regards,
John

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to configure wxlua to *not* link wxpng library?

2013-03-18 Thread John Labenski
On Mon, Mar 18, 2013 at 1:55 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I ended up patching the makefile
 (luamodule/CMakeFiles/wxLuaModules.dir/link.txt), but would prefer
 something a bit more robust.

This is not a good idea.

 On Sun, Mar 17, 2013 at 9:58 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I ran into an issue with configuring wxlua to use system libpng
 library. I tried both --with-libpng=builtin and --with-libpng=sys, but
 I get exactly the same result.

wxLua does not have switches --with-libpng are you talking about
building the wxWidgets library?

 This discussion
 (https://groups.google.com/forum/?fromgroups=#!topic/wx-users/2QWQD0qUVUc)
 indicates that it's better to use a system library, but I can't

Yes, it nearly always is best to use the system libraries for such
basic libs (zlib, png, tiff, jpeg, and gtk).

Reread that thread, it explains exactly what your problem is and how
to fix it by using the system libs. Hint: don't specify --with-libpng
at all and last few lines of the output of configure tells you what
will be used. Don't forget to clean or preferably delete the old
wxWidgets build dir to be sure that you're getting what you think
you're getting.

 configure wxlua to *not* link builtin library as can be see from this
 output from cmake:

 -- * - wxWidgets_LIBRARIES =
 -L/home/paul/zbs/build/deps/lib;-pthread;;;/home/paul/zbs/build/deps/lib
 /libwx_gtk2u_stc-2.9.a;/home/paul/zbs/build/deps/lib/libwx_gtk2u_aui-2.9.a;/home/paul/zbs/build/deps/lib
 /libwx_baseu_net-2.9.a;/home/paul/zbs/build/deps/lib/libwx_gtk2u_html-2.9.a;/home/paul/zbs/build/deps/lib
 /libwx_gtk2u_adv-2.9.a;/home/paul/zbs/build/deps/lib/libwx_gtk2u_core-2.9.a;/home/paul/zbs/build/deps/lib
 /libwx_baseu-2.9.a;-lwxscintilla-2.9;-pthread;-lgthread-2.0;-lrt;-lX11;-lXxf86vm;-lgtk-x11-2.0;-lgdk-x11-2.0;-latk-
 1.0;-lgio-2.0;-lpangoft2-1.0;-lpangocairo-1.0;-lgdk_pixbuf-2.0;-lcairo;-lpango-1.0;-lfreetype;-lfontconfig;-lgobject-
 2.0;-lglib-2.0;-lwxregexu-2.9;-lwxjpeg-2.9;-lwxpng-2.9;-lwxzlib-2.9;-ldl;-lm

 (note the last last that includes -lwxpng-2.9). I tried (using brute
 force) to exclude wxpng from the link command, but failed. Ideally
 wxlua should somehow check if the library is configured as builtin
 or sys, but for now I just need to check if this is going to work

Check what and from whom?

 for me, so, I'm fine with modifying it manually. I need to exclude
 libpng as it creates problems with systems libraries required by GTK
 on Linux.

 What is the way for me to tell wxlua *not* to include wxpng-2.9? Thank you.

wxLua links to whatever libraries that wxWidgets was linked to. Please
see the docs below and run the appropriate wx-config command to
understand how your wxWidgets libs were built and where the values in
wxWidgets_LIBRARIES come from.

http://wxlua.sourceforge.net/docs/install.html#C2.5

As I have mentioned before and as people on the Lua mailing explained
recently (though not definitively enough) you cannot just link
together random versions or builds of libraries together. For example,
if you want to use the system png library then everything your app
(wx.so) links to must have been built against that same lib. It is a
recipe for disaster to try mix versions. It may work, but you should
have no expectation that it should or will the next time you build it.
The problem with using another random version/build of a png lib (for
example) on Linux is that GTK will definitely be linked to the sys
version and GTK cannot be easily (or maybe ever) be linked to
staticly.

Regards,
 John

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Segfaults in wxlua on Linux (when using assert or return)

2013-03-18 Thread John Labenski
On Mon, Mar 18, 2013 at 5:29 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I'm using assert() to check some of the conditions in my code before I
 start the event loop and noticed that when the script exits after
 require 'wx', but before the main loop is started, it triggers
 segfault on Linux (tested on Fedora 18, but I saw the same thing on
 Ubuntu).

Well, I'm not sure there is much difference between what is happening
and what you're asking to happen by calling assert(), which is to
terminate the program violently. But, in any case, I don't get the
same result so I suspect something is wrong with your build. I would
review your build and clean and rebuild it after sorting out any
inconsistencies with multiple png libs or anything else like that.

I just tried the program test.lua using the lastest wxLua SVN using
wxLua's provided Lua5.1 in CentOS 6. (I just noticed that you have to
do mv libwx.so wx.so, I will fix that)

-- --
-- test.lua
local wx = require(wx)
--os.exit()
--assert(false)
--return
print(hello)
-- --

Note that I'm in the build-2.9-wx_gtk2/lib/Debug dir and run $gdb
../../bin/Debug/lua. That could also be a problem, are you building
using one version/build of Lua then running with a different one?

-- THIS HAS os.exit() unremmed
(gdb) run test.lua
Starting program:
/home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua
test.lua
[Thread debugging using libthread_db enabled]
Program exited normally.

-- THIS HAS assert(false) unremmed
(gdb) run test.lua
Starting program:
/home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua
test.lua
[Thread debugging using libthread_db enabled]
/home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua:
test.lua:5: assertion failed!
stack traceback:
[C]: in function 'assert'
test.lua:5: in main chunk
[C]: ?

Program exited with code 01.

-- THIS HAS return unremmed
(gdb) run test.lua
Starting program:
/home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua
test.lua
[Thread debugging using libthread_db enabled]
hello
Program exited normally.

-- THIS just lets it run through.
(gdb) run test.lua
Starting program:
/home/john/wx/wx-svn/wx-svn/wx/build-2.9-wx_gtk2/bin/Debug/lua
test.lua
[Thread debugging using libthread_db enabled]
hello
Program exited normally.
(gdb)

--

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxDir is missing Traverse method in wxlua 2.8.12

2013-03-15 Thread John Labenski
On Fri, Mar 15, 2013 at 11:05 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Thank you for the link to Traverse implementation; I should have
 looked there myself. VZ uses GetFirst and GetNext, whereas I actually
 use FindFirst and FindNext. I'm not sure what exactly the differences
 are, but I'll re-implement Traverse in Lua and see if it is
 sufficiently fast for my needs.

It'll definitely be no slower than using a wxDirTraverser since you
won't have the overhead of extra calls to the traverser itself.
Directory reading is already slow enough and I couldn't see the use of
the traverser in Lua since it's far more flexible than C++ code.

Regards,
John

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Compilation errors with latest wxlua (2.8.12.3; rev 165)

2013-03-07 Thread John Labenski
On Thu, Mar 7, 2013 at 2:46 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 You can already choose to build whatever libs and apps you want right
 now. Choose the project you want to build in MSVC or run make help
 for GCC to list all the targets.

 There is one small issue when I select wxLuaModule as the only target
 for make; subsequent make install fails with this message when it
 tries to install (missing) wxstedit libs:

 (...more Installing... messages)
 -- Installing: .../apps/wxluafreeze/wxluafreeze.lua
 CMake Error at modules/wxstedit/cmake_install.cmake:31 (FILE):
   file INSTALL cannot find
   .../wxlua/wxLua/lib/MinSizeRel/libwxstedit-wx29-1.6.0.a.
 Call Stack (most recent call first):
   cmake_install.cmake:129 (INCLUDE)

 make: *** [install/strip] Error 1

 It would be nice to skip installing components that haven't been built.

You can already do that too... see CMAKE_SKIP_INSTALL_ALL_DEPENDENCY here :
http://wxlua.sourceforge.net/docs/install.html#C4

The svn install doc is far more complete.

Regards,
   John

--
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Compilation errors with latest wxlua (2.8.12.3; rev 165)

2013-03-06 Thread John Labenski
On Wed, Mar 6, 2013 at 11:56 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I tried to compile the latest wxlua and ran into compilation errors
 (both on OSX and Windows). I also tried with rev 163 (before Lua 5.2
 changes) and compiled it successfully (also on both platforms). The
 error messages I got are at the bottom of the email.

Thanks for reporting, it should be fixed now.

 Tangentially related; would it be possible to expose
 wxstc.wxStyledTextCtrl.GetLibraryVersionInfo in the API? I'd like to
 show Scintilla version number in the About screen.

Sure.

 While we are on the topic of building wxlua, is it possible to provide
 a parameter for configure to disable building of all
 executables/applications and also disable building of debug/socket
 libraries (which I don't need)? I regularly rebuild from source and
 this would noticeably speed up the process (I only need
 wx.dll/dylib/so). Thank you.

You can already choose to build whatever libs and apps you want right
now. Choose the project you want to build in MSVC or run make help
for GCC to list all the targets.

Regards,
 John

--
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxLua apperantly not giving the window frame to functions defined in frame:Connect()

2013-02-27 Thread John Labenski
On Wed, Feb 27, 2013 at 7:29 PM, Mitchell Monahan
soccermit...@gmail.com wrote:
 Hello, when I use the code that is on http://wxlua.sourceforge.com (here is
 the code in case you forgot:)

 frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, wxLua Minimal Demo,
wx.wxDefaultPosition, wx.wxSize(450, 450),
wx.wxDEFAULT_FRAME_STYLE)
...
 --
 I  get an error when I go to help -- about(in it's own window):
 Lua: Error while running chunk
 E:\lua\wxLua\init.lua:38: wxLua: expected a 'wxWindow'
 for parameter 4, but got a 'nil'.
 Function called: 'wxMessageBox(string,string,number,nil)'
 01. wxMessageBox([string,string,number,wxWindow,number,number])
 stack traceback:
 [C]: in function 'wxMessageBox'
 E:\lua\wxLua\init.lua:38: in function
 E:\lua\wxLua\init.lua:37
[C]: in function 'MainLoop'
 C:\Program Files (x86)\Lua\5.1\lExecuter.wlua:799: in
 function '__main'
 C:\Program Files (x86)\Lua\5.1\lExecuter.wlua:802: in main
 chunk
 [C]: ?

I don't understand how/why the frame variable is nil in the callback?

 Yes, I did start this in the lexecutor that was included with Lua for
 Windows, and I am also using the wxLua that was included with Lua for
 Windows.

I don't know about lexecutor or much about Lua for Windows.

The code runs fine using the official wxLua binaries here:
http://sourceforge.net/projects/wxlua/files/wxlua/

Regards,
John

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] GetLineVisible always returns true?

2013-02-25 Thread John Labenski
On Mon, Feb 25, 2013 at 1:30 PM, Paul K paulclin...@yahoo.com wrote:
 In the best tradition of self-answering, it turned out that
 GetLineVisible doesn't do what I need: it only checks against whether
 the line is hidden because of folding (not if it's outside of the
 visible area, which is what I'm looking for). I don't see any other
 API method that does this, so I calculate it myself using
 GetFirstVisibleLine, LinesOnScreen, and DocLineFromVisible.

Yes. It doesn't have the clearest name. I think you know this, but the
wxStyledTextCtrl function names map pretty closely to Scintilla's
message names.

http://www.scintilla.org/ScintillaDoc.html#SCI_GETLINEVISIBLE


This is how I do it in stedit.cpp in the modules/wxstedit/src dir.

int first_line= top_line  0 ? GetFirstVisibleLine() : top_line;
int line_count= GetLineCount();
int lines_visible = LinesOnScreen();
int last_line = bottom_line  0 ? wxMin(line_count, first_line
+ lines_visible) : bottom_line;


Regards,

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Multiple views for wxSTC in wxlua

2013-01-29 Thread John Labenski
On Tue, Jan 29, 2013 at 1:53 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I also looked at wxSTEditor::RefEditor (src/stedit.cpp) that has
 similar logic, but it didn't shed any light on why what I am doing
 below is not working.

 local docpointer = e1:GetDocPointer()
 e2:AddRefDocument(docpointer)  crashes here

Please update from SVN, it should work now. Sorry, I was not correctly
handling the void* DocPointers pushed as lightuserdata into Lua
correctly.


Regards,
 John

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxRichText

2013-01-22 Thread John Labenski
On Sun, Jan 20, 2013 at 2:06 AM, Milind Gupta milind.gu...@gmail.com wrote:
 Hi,
 Is the wxRichText class available in wxLua 2.9? Are there any plans
 to add it?

There are plans, but it has not been added yet. Unfortunately, I don't
know when I
ll have free time to do it.


Regards,
John

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


  1   2   3   4   5   6   7   8   >