Re: [wxlua-users] How to check type when iterating over wxWindowList

2012-06-14 Thread Paul K
Hi John,

This looks like exactly the information I was looking for. DynamicCast
is the method I was missing. Thank you for the detailed examples.

Paul.

On Tue, Jun 12, 2012 at 8:57 PM, John Labenski jlaben...@gmail.com wrote:
 On Tue, Jun 12, 2012 at 2:26 AM, Paul K paulclin...@yahoo.com wrote:

 I have the same problem as described here
 (https://groups.google.com/forum/?fromgroups#!topic/wxpython-users/T78KWU6vS_A):
 when tabs in AuiNotebook are moved using drag and drop, their order
 changes on the screen, but not internally and I'd like to enumerate
 them in the right order.

 Use a unique wxWindow ID or wxWindow::Get/SetName() to give each
 notebook page a unique name so you can find the window no matter what.
 You can also use wxWindow::FindWindowById/Name(). Doing this should be
 the cleanest solution since you will definitely know what window
 you're getting.

 I can get the list of children for my notebook
 (notebook:GetChildren()) and can enumerate those using
 GetFirst()/GetNext() and then get their target using GetData(), but
 all their targets are of wxWindow type. How do I know which one is
 AuiTabCtrl and how do I cast it to AuiTabCtrl to call GetPage()?

 Here's how to get information about what an object is and how to cast
 wxObject derived classes up and down their class hierarchy.

 The wxClassInfo is may not be right for all classes and this function
 only works for wxObject derived classes, but it will work for all
 major classes. You can also just call Lua's tostring() function to get
 the object type as string name. NOTE! The integer number is NOT fixed
 between versions, but will be constant within a single run.

 Here's some code run in the wxLuaEdit console to show some of the
 possibilities and what works and what doesn't.

 f = wx.wxFrame(wx.NULL, -1, Hello)
 w = wx.wxWindow(f, -1)
 f:Show(true)
 c = wx.wxComboBox(w, -1)
 ci = c:GetClassInfo() -- from wxObject
 print(ci)
 userdata: 0x161d918 [wxClassInfo(0x7f33d2cf8b40, 23)]
 print(ci:GetClassName())
 wxComboBox
 print(tostring(c))
 userdata: 0x161b368 [wxComboBox(0x1614c00, 134)]
 cw = c:DynamicCast(wxWindow)
 print(cw)
 userdata: 0x16273f8 [wxWindow(0x1614c00, 368)]
 ciw = ci:DynamicCast(wxWindow)

 Error: Lua: Error while running chunk
 [string wxLuaShell]:1: wxLua: Unable to call an unknown method
 'DynamicCast' on a 'wxClassInfo' type.
 stack traceback:
        [C]: ?
        [string wxLuaShell]:1: in main chunk

 c_from_win = cw:DynamicCast(wxComboBox)
 print(c_from_win)
 userdata: 0x161b368 [wxComboBox(0x1614c00, 134)]
 dialog_from_combobox = cw:DynamicCast(wxDialog)

 Error: Lua: Error while running chunk
 [string wxLuaShell]:1: wxLua: wxObject::DynamicCast() Unable to cast
 a 'wxComboBox' to a 'wxDialog' with wxClassInfo 'wxDialog'.
 Function called: 'DynamicCast(wxWindow, string)'
 01. wxObject::DynamicCast(wxObject(self), string)
 stack traceback:
        [C]: in function 'DynamicCast'
        [string wxLuaShell]:1: in main chunk

 Hope this helps,
    John

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] UPDATE_UI events not triggered for menu items in full-screen mode

2012-06-27 Thread Paul K
Hi John,

I think this is a bug in wxwidgets, but I'm looking for suggestions
about a workaround.

Essentially, if the application has menu items that change their
state, the change in that state is not detected when the application
is in full screen mode (and the menu is hidden). The same issue is
described here (http://forums.wxwidgets.org/viewtopic.php?f=1t=32224)
and this ticket may be related too
(http://trac.wxwidgets.org/ticket/4843).

I can see that UPDATE_UI event is triggered in a normal case when an
accelerator key is used (even when the menu is disabled), but it is
NOT triggered when the menu is hidden, which doesn't allow to fix
its state. I tried using

frame:UpdateWindowUI(wx.wxUPDATE_UI_RECURSE) and
frame:UpdateWindowUI(wx.wxUPDATE_UI_FROMIDLE)

but I don't see the UPDATE_UI triggered for that particular item. I
also tried your code from wxLua (btw, why did you use it in your
case?):

function UpdateUIMenuItems()
if frame and frame:GetMenuBar() then
for n = 0, frame:GetMenuBar():GetMenuCount()-1 do
frame:GetMenuBar():GetMenu(n):UpdateUI()
end
end
end

but it doesn't trigger UPDATE_UI either (in full screen mode). I tried
putting this code in KEY_DOWN and ON_IDLE events with the same result.

Is there a way to force UPDATE_UI on those menu items to make the
accelerator keys work? Is there another workaround?

This is on Win32 using wxwidgets 2.8.7. Thank you.

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-06-29 Thread Paul K
Hi John,

Thank you for making the binaries available! I gave the Unicode
binaries a try, but the results are a mixed bag. I can barely get them
running for my application, which allows me to confirm that UTF-8
encoding is now working, but other encodings stopped working. For
example, if I set font encoding to wx.wxFONTENCODING_CP1251, I see no
difference (it looks like it's always fixed to utf-8). This may be a
feature though. If this is going to be the way it is, I'm fine with
it.

Also, I can't get the binaries to work correctly with my application.
The first issue is that the existing lua socket binaries fail to load:

...\bin\lua.EXE: error loading module 'socket.core' from file
'bin/clibs/socket\core.dll':
The specified module could not be found.

even though the module *is* there and loads fine using the old
binaries. This may be related to the fact that socket\core.dll seems
to be compiled against lua5.1.dll, which you didn't include in the
package (and my existing one didn't work as it's not for 5.1.5).

If I comment luasocket out, the app crashed somewhere in
wxlua_lua_shared-wx28mswu-2.8.12.dll:

Problem Event Name: APPCRASH
  Application Name: lua.exe
  Application Version:  0.0.0.0
  Application Timestamp:4fed3948
  Fault Module Name:wxlua_lua_shared-wx28mswu-2.8.12.dll
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   4fed3947
  Exception Code:   c005
  Exception Offset: d8b2
  OS Version:   6.0.6002.2.2.0.256.6
  Locale ID:1033
  Additional Information 1: fd00
  Additional Information 2: ea6f5fe8924aaa756324d57f87834160
  Additional Information 3: fd00
  Additional Information 4: ea6f5fe8924aaa756324d57f87834160

This is running on Windows Vista (32bit). I only deployed wx.dll and
wxlua_lua_shared-wx28mswu-2.8.12.dll (not sure what
wxlua_lua_shared-wx28mswu-2.9.4.dll was for as wx.dll didn't want to
work without 2.8.12.dll). I thought I could pick what version of
wxwidgets I want to use (2.8.12 vs. 2.9.4), but it didn't work that
way.

I don't quite understand the difference between lua.exe and
lua_shared.exe. It seems like lua.exe doesn't need lua51.dll, but
lua_shared.exe runs without that dll also, as you don't seem to
include the dll.

Also,  wxLua* binaries (Freeze, Edit, etc.) seem to be statically
compiled and the previous version had them dynamically compiled (which
would be my preference, although other people may prefer it
differently).

Paul.

On Thu, Jun 28, 2012 at 10:29 PM, John Labenski jlaben...@gmail.com wrote:
 These are not well tested and things are not as complete as I would
 like, but better sooner than never.

 https://sourceforge.net/projects/wxlua/files/wxlua/2.8.12.0/

 Enjoy!

 -John Labenski

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-06-29 Thread Paul K
Hi John,

Couple of other things. The new version seems to be using
significantly less memory. When I can get the app to start, it's only
using about 7.8M memory, where the old one was using 13-14M. This may
be related to the reduced size of the dlls.

Also, the error message box is gone and the app seems to be failing
silently where the old one was reporting errors in a nice dialog with
wxLua title and a message Lua: error while running chunk. This was
one of the primary reasons we stayed with the binaries we are
currently using and I'd love to have that error message back.

The error messages we used to be getting seem to be coming from
wxString wxlua_LUA_ERR_msg(int LUA_ERRx) function in wxlstate.cpp
with the value LUA_ERRRUN. I'm not sure why the new version doesn't
trigger/report that anymore.

Paul.

On Thu, Jun 28, 2012 at 11:34 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Thank you for making the binaries available! I gave the Unicode
 binaries a try, but the results are a mixed bag. I can barely get them
 running for my application, which allows me to confirm that UTF-8
 encoding is now working, but other encodings stopped working. For
 example, if I set font encoding to wx.wxFONTENCODING_CP1251, I see no
 difference (it looks like it's always fixed to utf-8). This may be a
 feature though. If this is going to be the way it is, I'm fine with
 it.

 Also, I can't get the binaries to work correctly with my application.
 The first issue is that the existing lua socket binaries fail to load:

 ...\bin\lua.EXE: error loading module 'socket.core' from file
 'bin/clibs/socket\core.dll':
        The specified module could not be found.

 even though the module *is* there and loads fine using the old
 binaries. This may be related to the fact that socket\core.dll seems
 to be compiled against lua5.1.dll, which you didn't include in the
 package (and my existing one didn't work as it's not for 5.1.5).

 If I comment luasocket out, the app crashed somewhere in
 wxlua_lua_shared-wx28mswu-2.8.12.dll:

 Problem Event Name:     APPCRASH
  Application Name:     lua.exe
  Application Version:  0.0.0.0
  Application Timestamp:        4fed3948
  Fault Module Name:    wxlua_lua_shared-wx28mswu-2.8.12.dll
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:       4fed3947
  Exception Code:       c005
  Exception Offset:     d8b2
  OS Version:   6.0.6002.2.2.0.256.6
  Locale ID:    1033
  Additional Information 1:     fd00
  Additional Information 2:     ea6f5fe8924aaa756324d57f87834160
  Additional Information 3:     fd00
  Additional Information 4:     ea6f5fe8924aaa756324d57f87834160

 This is running on Windows Vista (32bit). I only deployed wx.dll and
 wxlua_lua_shared-wx28mswu-2.8.12.dll (not sure what
 wxlua_lua_shared-wx28mswu-2.9.4.dll was for as wx.dll didn't want to
 work without 2.8.12.dll). I thought I could pick what version of
 wxwidgets I want to use (2.8.12 vs. 2.9.4), but it didn't work that
 way.

 I don't quite understand the difference between lua.exe and
 lua_shared.exe. It seems like lua.exe doesn't need lua51.dll, but
 lua_shared.exe runs without that dll also, as you don't seem to
 include the dll.

 Also,  wxLua* binaries (Freeze, Edit, etc.) seem to be statically
 compiled and the previous version had them dynamically compiled (which
 would be my preference, although other people may prefer it
 differently).

 Paul.

 On Thu, Jun 28, 2012 at 10:29 PM, John Labenski jlaben...@gmail.com wrote:
 These are not well tested and things are not as complete as I would
 like, but better sooner than never.

 https://sourceforge.net/projects/wxlua/files/wxlua/2.8.12.0/

 Enjoy!

 -John Labenski

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-06-29 Thread Paul K
Hi John,

One more update. I didn't mention how I got the app running, which is
the best configuration I can get so far. I deployed wx.dll and
wxlua_lua_shared-wx28mswu-2.8.12.dll as well as lua_shared.exe
(renamed as lua.exe) and kept my *current lua5.1.dll* file. This way I
could get the app started even though it still crashes in several
places (but at least the luasocket library is working).

I'm also getting strange errors where I had none before; for example,

Expected an 'unsigned integer' for parameter 1, but got a 'number'.
Function called: 'wxMilliSleep(number)'
01. wxMilliSleep(integer)

Is it possible that there is something wrong with the binding as
unsigned integer should be easily mappable to number?

Another strange error is this:

wxLua: Creating a callback function in a coroutine is not allowed
since it will only be called when the thread is either suspended or
dead.
stack traceback:
[C]: in function 'Connect'

This is probably in reference to this normally looking code (it's not
using any coroutines):

  frame:Connect(wx.wxEVT_CLOSE_WINDOW,
function(event)
  if inloop then event:Skip() frame = nil else os.exit() end
end)

In addition to that, I'm getting an appcrash when I close the app
(inside ntdll.dll), but this is likely because I'm using your lua.exe
with my dll from a previous version. For some reason using my current
lua.exe crashes the app with an error in
wxlua_lua_shared-wx28mswu-2.8.12.dll (which I reported earlier).

Paul.

On Thu, Jun 28, 2012 at 11:51 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Couple of other things. The new version seems to be using
 significantly less memory. When I can get the app to start, it's only
 using about 7.8M memory, where the old one was using 13-14M. This may
 be related to the reduced size of the dlls.

 Also, the error message box is gone and the app seems to be failing
 silently where the old one was reporting errors in a nice dialog with
 wxLua title and a message Lua: error while running chunk. This was
 one of the primary reasons we stayed with the binaries we are
 currently using and I'd love to have that error message back.

 The error messages we used to be getting seem to be coming from
 wxString wxlua_LUA_ERR_msg(int LUA_ERRx) function in wxlstate.cpp
 with the value LUA_ERRRUN. I'm not sure why the new version doesn't
 trigger/report that anymore.

 Paul.

 On Thu, Jun 28, 2012 at 11:34 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Thank you for making the binaries available! I gave the Unicode
 binaries a try, but the results are a mixed bag. I can barely get them
 running for my application, which allows me to confirm that UTF-8
 encoding is now working, but other encodings stopped working. For
 example, if I set font encoding to wx.wxFONTENCODING_CP1251, I see no
 difference (it looks like it's always fixed to utf-8). This may be a
 feature though. If this is going to be the way it is, I'm fine with
 it.

 Also, I can't get the binaries to work correctly with my application.
 The first issue is that the existing lua socket binaries fail to load:

 ...\bin\lua.EXE: error loading module 'socket.core' from file
 'bin/clibs/socket\core.dll':
        The specified module could not be found.

 even though the module *is* there and loads fine using the old
 binaries. This may be related to the fact that socket\core.dll seems
 to be compiled against lua5.1.dll, which you didn't include in the
 package (and my existing one didn't work as it's not for 5.1.5).

 If I comment luasocket out, the app crashed somewhere in
 wxlua_lua_shared-wx28mswu-2.8.12.dll:

 Problem Event Name:     APPCRASH
  Application Name:     lua.exe
  Application Version:  0.0.0.0
  Application Timestamp:        4fed3948
  Fault Module Name:    wxlua_lua_shared-wx28mswu-2.8.12.dll
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:       4fed3947
  Exception Code:       c005
  Exception Offset:     d8b2
  OS Version:   6.0.6002.2.2.0.256.6
  Locale ID:    1033
  Additional Information 1:     fd00
  Additional Information 2:     ea6f5fe8924aaa756324d57f87834160
  Additional Information 3:     fd00
  Additional Information 4:     ea6f5fe8924aaa756324d57f87834160

 This is running on Windows Vista (32bit). I only deployed wx.dll and
 wxlua_lua_shared-wx28mswu-2.8.12.dll (not sure what
 wxlua_lua_shared-wx28mswu-2.9.4.dll was for as wx.dll didn't want to
 work without 2.8.12.dll). I thought I could pick what version of
 wxwidgets I want to use (2.8.12 vs. 2.9.4), but it didn't work that
 way.

 I don't quite understand the difference between lua.exe and
 lua_shared.exe. It seems like lua.exe doesn't need lua51.dll, but
 lua_shared.exe runs without that dll also, as you don't seem to
 include the dll.

 Also,  wxLua* binaries (Freeze, Edit, etc.) seem to be statically
 compiled and the previous version had them dynamically compiled (which
 would be my preference, although other people may prefer it
 differently).

 Paul

Re: [wxlua-users] UPDATE_UI events not triggered for menu items in full-screen mode

2012-06-29 Thread Paul K
Hi John,

 I think this is a bug in wxwidgets, but I'm looking for suggestions
 about a workaround.
 ...
 This is on Win32 using wxwidgets 2.8.7. Thank you.

 Try these newer binaries:
 https://sourceforge.net/projects/wxlua/files/wxlua/2.8.12.0/

Thank you. Accelerator keys seem to be working in full screen with the
new binaries, although I only did limited testing because of other
problems (as described in the thread about the binaries).

Paul.

On Thu, Jun 28, 2012 at 10:27 PM, John Labenski jlaben...@gmail.com wrote:
 On Thu, Jun 28, 2012 at 1:50 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I think this is a bug in wxwidgets, but I'm looking for suggestions
 about a workaround.
 ...
 This is on Win32 using wxwidgets 2.8.7. Thank you.

 Try these newer binaries:
 https://sourceforge.net/projects/wxlua/files/wxlua/2.8.12.0/

 Personally, I don't use update ui events as they are sent a little too
 often for my likes. I find that a single function that updates the gui
 state, menus, toolbars, buttons, etc.. works very well and is less cpu
 intensive. All you have to do is call it whenever there is a chance
 the state will change. This also has the benefit of getting all the
 update code in one place since the state of various items are often
 interrelated.

 Regards,
    John

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-06-30 Thread Paul K
Hi John,

(combining responses from three different messages)

It all makes sense; I agree on UTF8.

 You can't always expect that a lib compiled with one version of code
 to work with another. Ideally you would build wxLua and the socket lib
 together to ensure they both are using the same Lua library. In this
 case they are trying to use different lua51.dlls which is a real
 problem, they have to both use the same one.

I understand. Any chance you can compile luasocket and luasec or at
least provide details on your build environment, so that I can match
it with my own compatible versions for those modules. I bet it's going
to be a problem for many people using new binaries (as binaries for
both of those modules will end up incompatible and many people will be
confused and disappointed).

 Someday it may be possible to relax the conditions, but only for
 certain hand-picked functions. However, the reality is that I don't
 have the time to write docs for each exception so it's best to stick
 to the wxWidgets documentation since it's free and it's right.

That's okay, I'll add an explicit conversion. I just wasn't sure what
has changed and if this should be addressed in my code.

 People complained about the error box. I plan to replace it with a
 text console (like wxLua -c) so that when running error message will
 stream to it. This will be something that in Lua you can enable or
 disable it, e.g. wxlua.ShowConsoleOnPrint(true/false) or something.

I think this would be an inferior solution comparing with the error
box. For me as a developer, it's critical to know when something is
not working. Right now, if I made a mistake, I get a detailed error
messages in my face. With a text console, I'll need to keep it on and
monitor all the time.

It's even worse for my users. If one of my bugs slips through and
something is not working (let's say I made a mistake in EVT_CLOSE
event handler), the window will fail to close without any visible
indication as to what's wrong (and also possibly leaving the app in
some inconsistent state without any indication either). And there is
nothing to report back to me. I can't ask my users to turn the console
on if something looks strange in their application.

 I don't understand this. The logic to trigger this error is very
 simple, when wxLua starts it saves a pointer to the lua_State* in the
 Lua registry. When an event callback is created the given lua_State*
 is compared with the original lua_State* in the registry and if they
 don't match you must be in a coroutine which means that Lua will give
 you an error about running code in a suspended or dead coroutine so
 instead of that rather cryptic message given later I error out
 earlier.

It's possible that it's from using two dlls, but I'll need to re-test this.

Essentially, even with the current binaries I should be able to remove
socket calls and add explicit type conversion and use it without any
issues. What I'm concerned about it the crash I was getting:

 If I comment luasocket out, the app crashed somewhere in
 wxlua_lua_shared-wx28mswu-2.8.12.dll:

 No message?

Right, no message, just a windows crash report. I'll re-test shortly
as I now understand better what the different DLLS are for, but I
don't expect this to change.

 I am working on using a proxydll along the lines of this :
 http://lua-users.org/wiki/LuaProxyDllFour

What do we gain by using LuaProxyDll? I thought I could do require
'wx' from a statically linked LuaFreeze even today?

Paul.

On Sat, Jun 30, 2012 at 9:32 AM, John Labenski jlaben...@gmail.com wrote:
 On Fri, Jun 29, 2012 at 2:34 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Thank you for making the binaries available! I gave the Unicode
 binaries a try, but the results are a mixed bag. I can barely get them
 running for my application, which allows me to confirm that UTF-8
 encoding is now working, but other encodings stopped working. For
 example, if I set font encoding to wx.wxFONTENCODING_CP1251, I see no
 difference (it looks like it's always fixed to utf-8). This may be a
 feature though. If this is going to be the way it is, I'm fine with
 it.

 I have never needed to change the wxFONTENCODING so I don't think it
 is necessary. I bet you were trying to change it to map upper ASCII
 chars appropriately to a font, a poor mans Unicode that probably works
 well for Latin languages with tildes and such, but that's about it.
 When you use Unicode you don't need to mess with all that since UTF8,
 for example, can describe any character.

 Note the comment about  Please note that we will only discuss 8-bit
 fonts here and not Unicode (see Unicode Support in wxWidgets).
 http://docs.wxwidgets.org/trunk/overview_fontencoding.html

 Unfortunately you either work in Unicode or ANSI and hope that the
 upper ASCII chars map to the letters you need. I don't think you can
 ever have it both ways as the upper ASCII chars are not
 compatible/equivalent to Unicode chars in any format.

 Also

Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-06-30 Thread Paul K
Hi John,

A bit more information on my testing without luasocket.

I removed all the existing DLLs and deployed your lua.exe, wx.lua and
wxlua_lua_shared-wx28mswu-2.8.12.dll.

When I start my app, it crashes immediately (without any error
message) with this report:

Problem Event Name: APPCRASH
  Application Name: lua.exe
  Application Version:  0.0.0.0
  Application Timestamp:4fed3948
  Fault Module Name:wxlua_lua_shared-wx28mswu-2.8.12.dll
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   4fed3947
  Exception Code:   c005
  Exception Offset: d8b2
  OS Version:   6.0.6002.2.2.0.256.6
  Locale ID:1033
  Additional Information 1: fd00
  Additional Information 2: ea6f5fe8924aaa756324d57f87834160
  Additional Information 3: fd00
  Additional Information 4: ea6f5fe8924aaa756324d57f87834160

If I start a bit simpler version, it does show the editor window, but
when I close the app (without doing anything else), it crashes with
another crash report:

Problem Event Name: APPCRASH
  Application Name: lua.exe
  Application Version:  0.0.0.0
  Application Timestamp:4fed3948
  Fault Module Name:lua.exe
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   4fed3948
  Exception Code:   c005
  Exception Offset: 7c52
  OS Version:   6.0.6002.2.2.0.256.6
  Locale ID:1033
  Additional Information 1: fd00
  Additional Information 2: ea6f5fe8924aaa756324d57f87834160
  Additional Information 3: fd00
  Additional Information 4: ea6f5fe8924aaa756324d57f87834160

Both seem to trigger the same error, just at different addresses. I
don't have any additional information unfortunately, but please let me
know if there is something I can try to assist in troubleshooting.

Paul.

On Sat, Jun 30, 2012 at 10:34 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 (combining responses from three different messages)

 It all makes sense; I agree on UTF8.

 You can't always expect that a lib compiled with one version of code
 to work with another. Ideally you would build wxLua and the socket lib
 together to ensure they both are using the same Lua library. In this
 case they are trying to use different lua51.dlls which is a real
 problem, they have to both use the same one.

 I understand. Any chance you can compile luasocket and luasec or at
 least provide details on your build environment, so that I can match
 it with my own compatible versions for those modules. I bet it's going
 to be a problem for many people using new binaries (as binaries for
 both of those modules will end up incompatible and many people will be
 confused and disappointed).

 Someday it may be possible to relax the conditions, but only for
 certain hand-picked functions. However, the reality is that I don't
 have the time to write docs for each exception so it's best to stick
 to the wxWidgets documentation since it's free and it's right.

 That's okay, I'll add an explicit conversion. I just wasn't sure what
 has changed and if this should be addressed in my code.

 People complained about the error box. I plan to replace it with a
 text console (like wxLua -c) so that when running error message will
 stream to it. This will be something that in Lua you can enable or
 disable it, e.g. wxlua.ShowConsoleOnPrint(true/false) or something.

 I think this would be an inferior solution comparing with the error
 box. For me as a developer, it's critical to know when something is
 not working. Right now, if I made a mistake, I get a detailed error
 messages in my face. With a text console, I'll need to keep it on and
 monitor all the time.

 It's even worse for my users. If one of my bugs slips through and
 something is not working (let's say I made a mistake in EVT_CLOSE
 event handler), the window will fail to close without any visible
 indication as to what's wrong (and also possibly leaving the app in
 some inconsistent state without any indication either). And there is
 nothing to report back to me. I can't ask my users to turn the console
 on if something looks strange in their application.

 I don't understand this. The logic to trigger this error is very
 simple, when wxLua starts it saves a pointer to the lua_State* in the
 Lua registry. When an event callback is created the given lua_State*
 is compared with the original lua_State* in the registry and if they
 don't match you must be in a coroutine which means that Lua will give
 you an error about running code in a suspended or dead coroutine so
 instead of that rather cryptic message given later I error out
 earlier.

 It's possible that it's from using two dlls, but I'll need to re-test this.

 Essentially, even with the current binaries I should be able to remove
 socket calls and add explicit type conversion and use it without any
 issues. What I'm concerned about it the crash I was getting:

 If I comment luasocket out, the app crashed somewhere in
 wxlua_lua_shared-wx28mswu

Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-06-30 Thread Paul K
Hi John,

 Download 2.8.12.1 and try it. I have tested with
 luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip downloaded from Lua binaries
 and it works.

This is huge progress; very close to where I'd like to be. I got the
application working with these binaries (including luasocket) and
almost all the functions I tested are working correctly. The UTF
characters are also displayed and copied correctly.

Couple of things that are not working. Shortcuts in the full screen
mode I reported earlier are not working. Either something has changed
or I did not test them correctly with the previous version.

The other thing that is not working is the debugging for wxwidgets
apps I have, which triggers this wxLua: Creating a callback function
in a coroutine is not allowed since it will only be called when the
thread is either suspended or dead. message. This seems to be caused
by the fact that I have two main loop in the application. Your earlier
explanation sheds some light on this:

 The logic to trigger this error is very
 simple, when wxLua starts it saves a pointer to the lua_State* in the
 Lua registry. When an event callback is created the given lua_State*
 is compared with the original lua_State* in the registry and if they
 don't match you must be in a coroutine which means that Lua will give
 you an error about running code in a suspended or dead coroutine so
 instead of that rather cryptic message given later I error out earlier.

It seems like the check is too aggressive, as this functionality has
been working fine before in many different situations (I have never
had a single problem with it) and this is a deal breaker for me. As
far as I can tell, any debugger that executes the main script in a
separate co-routine (as mine does) will get this error.

You can check it with this simple script:

local func,err = loadfile('minimal.wx.lua')
if err then error(err) end
local ok, err = coroutine.resume(coroutine.create(func))
if err then error(err) end

If you run this, you will get minicoro.lua:4: minimal.wx.lua:49:
wxLua: Creating a callback function in a coroutine is not allowed
since it will only be called when the thread is either suspended or
dead., which should not really happen.

 ps. Note that I don't think you ever got error messages from wx.dll...
 When lua.exe is run it does a pcall() on the input file and so it gets
 the error messages, I don't believe it's even possible for wxLua to
 get them. I think what you got are print() statements? Though, it has
 been a long time since 2.8.10 and I have not retested it. I have
 reinstated the error handler, but it's never called, but it's there
 and will pop up a dialog if it ever gets called. Run your program from
 a DOS prompt and the print and error messages will be printed to the
 console.

This part seems to be working as I expect it to work (or even better).
I do get a window with an error AND the same error reported to the
console, which is good. I won't attach the screenshot, but you can see
the same message I'm talking about if you take minimal.wx.lua sample
and change wx.wxMessageBox to wx.wxMessageBox1 (anything that causes
run-time error will do). I get a messageBox with wxLua Runtime Error
title and this error message (also reported to stdout):

wxLua Runtime Error:
Lua: Error while running chunk
minimal.wx.lua:79: attempt to call field 'wxMessageBox1' (a nil value)
stack traceback:
minimal.wx.lua:79: in function minimal.wx.lua:78
[C]: in function 'MainLoop'
minimal.wx.lua:96: in main chunk
[C]: ?

So, my main issue is that check for coroutine that breaks my debugging
and some other functionality. Thank you!

Paul.

On Sat, Jun 30, 2012 at 1:48 PM, John Labenski jlaben...@gmail.com wrote:
 Ok... lets start fresh and not try to debug the old stuff.

 Download 2.8.12.1 and try it. I have tested with
 luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip downloaded from Lua binaries
 and it works.

 This is how I did it, put luasocket's bin/ mime/ socket/ dirs as
 subdirs of the wxLua/bin dir (or anywhere, but then adjust
 LUA_PATH...) then you can run :

 lua myapp.lua
 wxLua myapp.lua
 wxLuaFreeze myapp.lua
 wxLuaEdit myapp.lua

 where myapp.lua has

 --
 require(socket)
 print(Is socket here ? , socket)

 require(wx)
 print(print, print_lua)

 f = wx.wxFrame(wx.NULL, -1, Hello)
 f:Show()
 wx.wxGetApp():MainLoop()
 --

 Success!

 Please read here to understand what lua51.dll and lua5.1.dll are all about:

 http://wxlua.svn.sourceforge.net/viewvc/wxlua/trunk/wxLua/modules/luaproxydll/proxydll.c?revision=100view=markup

 DO NOT COPY someone else's lua51.dll into the wxLua bin dir, it will never 
 work.

 ps. Note that I don't think you ever got error messages from wx.dll...
 When lua.exe is run it does a pcall() on the input file and so it gets
 the error messages, I don't believe it's even possible for wxLua to
 get them. I think what you got are print() statements? Though, it has
 been a long time since 2.8.10 and I have not 

Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-06-30 Thread Paul K
Hi John,

On that coroutine check; it seems like it is the result of this
commit, which specifically added this functionality:
http://wxlua.cvs.sourceforge.net/viewvc/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp?r1=1.62r2=1.63

I cannot speak to the reasoning behind this (I read the description,
but don't have the background), but I can say that I've extensively
used the previous version in various situations involving co-routines
(including connecting event handlers from coroutines, which is part of
my debugger logic) and have never had problems with the application
because of that.

My suggestion is to revert this change.

Paul.

On Sat, Jun 30, 2012 at 6:00 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Download 2.8.12.1 and try it. I have tested with
 luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip downloaded from Lua binaries
 and it works.

 This is huge progress; very close to where I'd like to be. I got the
 application working with these binaries (including luasocket) and
 almost all the functions I tested are working correctly. The UTF
 characters are also displayed and copied correctly.

 Couple of things that are not working. Shortcuts in the full screen
 mode I reported earlier are not working. Either something has changed
 or I did not test them correctly with the previous version.

 The other thing that is not working is the debugging for wxwidgets
 apps I have, which triggers this wxLua: Creating a callback function
 in a coroutine is not allowed since it will only be called when the
 thread is either suspended or dead. message. This seems to be caused
 by the fact that I have two main loop in the application. Your earlier
 explanation sheds some light on this:

 The logic to trigger this error is very
 simple, when wxLua starts it saves a pointer to the lua_State* in the
 Lua registry. When an event callback is created the given lua_State*
 is compared with the original lua_State* in the registry and if they
 don't match you must be in a coroutine which means that Lua will give
 you an error about running code in a suspended or dead coroutine so
 instead of that rather cryptic message given later I error out earlier.

 It seems like the check is too aggressive, as this functionality has
 been working fine before in many different situations (I have never
 had a single problem with it) and this is a deal breaker for me. As
 far as I can tell, any debugger that executes the main script in a
 separate co-routine (as mine does) will get this error.

 You can check it with this simple script:

 local func,err = loadfile('minimal.wx.lua')
 if err then error(err) end
 local ok, err = coroutine.resume(coroutine.create(func))
 if err then error(err) end

 If you run this, you will get minicoro.lua:4: minimal.wx.lua:49:
 wxLua: Creating a callback function in a coroutine is not allowed
 since it will only be called when the thread is either suspended or
 dead., which should not really happen.

 ps. Note that I don't think you ever got error messages from wx.dll...
 When lua.exe is run it does a pcall() on the input file and so it gets
 the error messages, I don't believe it's even possible for wxLua to
 get them. I think what you got are print() statements? Though, it has
 been a long time since 2.8.10 and I have not retested it. I have
 reinstated the error handler, but it's never called, but it's there
 and will pop up a dialog if it ever gets called. Run your program from
 a DOS prompt and the print and error messages will be printed to the
 console.

 This part seems to be working as I expect it to work (or even better).
 I do get a window with an error AND the same error reported to the
 console, which is good. I won't attach the screenshot, but you can see
 the same message I'm talking about if you take minimal.wx.lua sample
 and change wx.wxMessageBox to wx.wxMessageBox1 (anything that causes
 run-time error will do). I get a messageBox with wxLua Runtime Error
 title and this error message (also reported to stdout):

 wxLua Runtime Error:
 Lua: Error while running chunk
 minimal.wx.lua:79: attempt to call field 'wxMessageBox1' (a nil value)
 stack traceback:
        minimal.wx.lua:79: in function minimal.wx.lua:78
        [C]: in function 'MainLoop'
        minimal.wx.lua:96: in main chunk
        [C]: ?

 So, my main issue is that check for coroutine that breaks my debugging
 and some other functionality. Thank you!

 Paul.

 On Sat, Jun 30, 2012 at 1:48 PM, John Labenski jlaben...@gmail.com wrote:
 Ok... lets start fresh and not try to debug the old stuff.

 Download 2.8.12.1 and try it. I have tested with
 luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip downloaded from Lua binaries
 and it works.

 This is how I did it, put luasocket's bin/ mime/ socket/ dirs as
 subdirs of the wxLua/bin dir (or anywhere, but then adjust
 LUA_PATH...) then you can run :

 lua myapp.lua
 wxLua myapp.lua
 wxLuaFreeze myapp.lua
 wxLuaEdit myapp.lua

 where myapp.lua has

 --
 require(socket)
 print(Is socket here

Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-07-01 Thread Paul K
Hi John,

 Please read this thread to understand a little more about why it was blocked.
 http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg02296.html

I read the thread, but don't see anything that warranted that
particular change. You provided workable solutions to the problem that
the original poster had and in the end the problem was solved:

I've solved the problem by creating a small module that allows to
execute, from a coroutine, a function in the main thread. It helps to
keep the main thread code independant from the coroutine code. My
application works fine now, thanks for the help.

 How exactly are you using the coroutines? You're creating one to run a
 Lua script and somehow debug it. Can the wxFrame live for longer than
 the life of coroutine?

 This is for ZeroBraneStudio? How do I run it and where is the code?
 There seems to be a lot of binary files there. Where is the code that
 uses the coroutines?
 https://github.com/pkulchenko/ZeroBraneStudio

You don't need any of those binary files as long as you can run lua
src/main.lua zbstudio command. in fact, just use your binaries with
luasocket and you should be able to run it (just clear the bin/ folder
and put your files and lua.exe there).

No, wxFrame can't live for longer than the life of coroutine. It is
indeed for ZeroBraneStudio, but indirectly; the IDE itself doesn't
depend on this, but the debugging component (provided by MobDebug:
https://github.com/pkulchenko/MobDebug) does.

The logic in question is part of the controller() function and is a
completely generic code:

  local coro_debugee = coroutine.create(debugee)
  debug.sethook(coro_debugee, debug_hook, lcr)
  local status, err = coroutine.resume(coro_debugee)

It creates a coroutine for debugee (which is a function created as a
result of loadstring/loadfile, for example, debugee =
loadfile('minimal.wx.lua')), sets a debug hook on it and resumes it.
All wxlua logic is encapsulated there, but with this fix the execution
fails.

 The issue is that doing this is dangerous and sometimes you have to
 stop people from trying to shoot themselves in the foot.

It may be a valid reason in some cases, but I think in this case it
broke a completely legitimate use of this functionality. In fact, in
the original case the user was getting a reasonably informative error.

 been working fine before in many different situations (I have never
 had a single problem with it) and this is a deal breaker for me. As

 Deal?

In the sense that I'd like to upgrade to the new version, but with the
debugger being a critical component and not working, I won't be able
to.

Paul.

On Sun, Jul 1, 2012 at 7:52 PM, John Labenski jlaben...@gmail.com wrote:
 On Sat, Jun 30, 2012 at 9:00 PM, Paul K paulclin...@yahoo.com wrote:

 Couple of things that are not working. Shortcuts in the full screen
 mode I reported earlier are not working. Either something has changed
 or I did not test them correctly with the previous version.

 I would test the old version to see if the behavior has changed, in
 any case it would be something that wxWidgets has changed. It may just
 be that when the menu is removed the accelerators are removed too. You
 can supplement or replace them using a wxAcceleratorTable.

 The other thing that is not working is the debugging for wxwidgets
 apps I have, which triggers this wxLua: Creating a callback function
 in a coroutine is not allowed since it will only be called when the
 thread is either suspended or dead. message. This seems to be caused
 by the fact that I have two main loop in the application. Your earlier
 explanation sheds some light on this:

 As explained in the code you've seen, there are many things wrong with
 allowing it, the least of which is that you definitely cannot call
 coroutine.resume() from the event handler in the coroutine.
 Search for cannot resume non-suspended coroutine here:
 http://wxlua.svn.sourceforge.net/viewvc/wxlua/trunk/wxLua/modules/lua/src/ldo.c?revision=100view=markup

 The worst is that wxLua can't tell when a coroutine is collected so
 wxLua will crash if an event handler is called into that coroutine.

 Please read this thread to understand a little more about why it was blocked.
 http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg02296.html

 The issue is that doing this is dangerous and sometimes you have to
 stop people from trying to shoot themselves in the foot.

 How exactly are you using the coroutines? You're creating one to run a
 Lua script and somehow debug it. Can the wxFrame live for longer than
 the life of coroutine?

 This is for ZeroBraneStudio? How do I run it and where is the code?
 There seems to be a lot of binary files there. Where is the code that
 uses the coroutines?
 https://github.com/pkulchenko/ZeroBraneStudio

 It seems like the check is too aggressive, as this functionality has
 been working fine before in many different situations (I have never
 had a single problem

Re: [wxlua-users] Preliminary wxLua Binaries for 2.8.12 for MSW

2012-07-01 Thread Paul K
Hi John,

Just to elaborate a bit on use cases. I currently use it for
non-invasive debugging and have also been working on a profiler that
is using the same mechanism. In general, any application that needs to
set a debug hook without modifying the code of the script, will
trigger this check and run into the same problem.

Paul.

On Sun, Jul 1, 2012 at 8:50 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Please read this thread to understand a little more about why it was blocked.
 http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg02296.html

 I read the thread, but don't see anything that warranted that
 particular change. You provided workable solutions to the problem that
 the original poster had and in the end the problem was solved:

 I've solved the problem by creating a small module that allows to
 execute, from a coroutine, a function in the main thread. It helps to
 keep the main thread code independant from the coroutine code. My
 application works fine now, thanks for the help.

 How exactly are you using the coroutines? You're creating one to run a
 Lua script and somehow debug it. Can the wxFrame live for longer than
 the life of coroutine?

 This is for ZeroBraneStudio? How do I run it and where is the code?
 There seems to be a lot of binary files there. Where is the code that
 uses the coroutines?
 https://github.com/pkulchenko/ZeroBraneStudio

 You don't need any of those binary files as long as you can run lua
 src/main.lua zbstudio command. in fact, just use your binaries with
 luasocket and you should be able to run it (just clear the bin/ folder
 and put your files and lua.exe there).

 No, wxFrame can't live for longer than the life of coroutine. It is
 indeed for ZeroBraneStudio, but indirectly; the IDE itself doesn't
 depend on this, but the debugging component (provided by MobDebug:
 https://github.com/pkulchenko/MobDebug) does.

 The logic in question is part of the controller() function and is a
 completely generic code:

       local coro_debugee = coroutine.create(debugee)
       debug.sethook(coro_debugee, debug_hook, lcr)
       local status, err = coroutine.resume(coro_debugee)

 It creates a coroutine for debugee (which is a function created as a
 result of loadstring/loadfile, for example, debugee =
 loadfile('minimal.wx.lua')), sets a debug hook on it and resumes it.
 All wxlua logic is encapsulated there, but with this fix the execution
 fails.

 The issue is that doing this is dangerous and sometimes you have to
 stop people from trying to shoot themselves in the foot.

 It may be a valid reason in some cases, but I think in this case it
 broke a completely legitimate use of this functionality. In fact, in
 the original case the user was getting a reasonably informative error.

 been working fine before in many different situations (I have never
 had a single problem with it) and this is a deal breaker for me. As

 Deal?

 In the sense that I'd like to upgrade to the new version, but with the
 debugger being a critical component and not working, I won't be able
 to.

 Paul.

 On Sun, Jul 1, 2012 at 7:52 PM, John Labenski jlaben...@gmail.com wrote:
 On Sat, Jun 30, 2012 at 9:00 PM, Paul K paulclin...@yahoo.com wrote:

 Couple of things that are not working. Shortcuts in the full screen
 mode I reported earlier are not working. Either something has changed
 or I did not test them correctly with the previous version.

 I would test the old version to see if the behavior has changed, in
 any case it would be something that wxWidgets has changed. It may just
 be that when the menu is removed the accelerators are removed too. You
 can supplement or replace them using a wxAcceleratorTable.

 The other thing that is not working is the debugging for wxwidgets
 apps I have, which triggers this wxLua: Creating a callback function
 in a coroutine is not allowed since it will only be called when the
 thread is either suspended or dead. message. This seems to be caused
 by the fact that I have two main loop in the application. Your earlier
 explanation sheds some light on this:

 As explained in the code you've seen, there are many things wrong with
 allowing it, the least of which is that you definitely cannot call
 coroutine.resume() from the event handler in the coroutine.
 Search for cannot resume non-suspended coroutine here:
 http://wxlua.svn.sourceforge.net/viewvc/wxlua/trunk/wxLua/modules/lua/src/ldo.c?revision=100view=markup

 The worst is that wxLua can't tell when a coroutine is collected so
 wxLua will crash if an event handler is called into that coroutine.

 Please read this thread to understand a little more about why it was blocked.
 http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg02296.html

 The issue is that doing this is dangerous and sometimes you have to
 stop people from trying to shoot themselves in the foot.

 How exactly are you using the coroutines? You're creating one to run a
 Lua script and somehow debug it. Can

[wxlua-users] Can't compiling monolithic lib on MacOS

2012-07-04 Thread Paul K
Hi John,

I'm having troubles compiling monolithic dylib on MacOS. I've read the
description here (http://wxlua.sourceforge.net/docs/install.html#C4)
about SHARED and MONOLITHIC options, but can't find what corresponds
to them in the new make configuration. I've tried different
combinations, but can't get one dylib for wx lib that I need. This is
using the latest configuration from svn and wxwidgets 2.8.12.

This is what I'm using:

CFLAGS=-arch i386 LDFLAGS=-arch i386 CPPFLAGS=-arch i386
CXXFLAGS=-arch i386 ./configure --disable-debug --enable-shared
--enable-unicode --enable-monolithic-luamodule
--with-wxdir=/Users/paul/Downloads/wxMac-2.8.12

The closest options I see are --enable-shared and
--enable-monolithis-luamodule, but it still generates a bunch of
dylibs with *bind* names:

./lib/liblua5.1.0.0.0.dylib
./lib/liblua5.1.0.dylib
./lib/liblua5.1.dylib
./lib/libwxlua_macu_wxbindadv-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindadv-2.8.0.dylib
./lib/libwxlua_macu_wxbindadv-2.8.dylib
./lib/libwxlua_macu_wxbindaui-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindaui-2.8.0.dylib
./lib/libwxlua_macu_wxbindaui-2.8.dylib
./lib/libwxlua_macu_wxbindbase-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindbase-2.8.0.dylib
./lib/libwxlua_macu_wxbindbase-2.8.dylib
./lib/libwxlua_macu_wxbindcore-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindcore-2.8.0.dylib
./lib/libwxlua_macu_wxbindcore-2.8.dylib
./lib/libwxlua_macu_wxbindhtml-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindhtml-2.8.0.dylib
./lib/libwxlua_macu_wxbindhtml-2.8.dylib
./lib/libwxlua_macu_wxbindnet-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindnet-2.8.0.dylib
./lib/libwxlua_macu_wxbindnet-2.8.dylib
./lib/libwxlua_macu_wxbindrichtext-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindrichtext-2.8.0.dylib
./lib/libwxlua_macu_wxbindrichtext-2.8.dylib
./lib/libwxlua_macu_wxbindxml-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindxml-2.8.0.dylib
./lib/libwxlua_macu_wxbindxml-2.8.dylib
./lib/libwxlua_macu_wxbindxrc-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxbindxrc-2.8.0.dylib
./lib/libwxlua_macu_wxbindxrc-2.8.dylib
./lib/libwxlua_macu_wxlua-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxlua-2.8.0.dylib
./lib/libwxlua_macu_wxlua-2.8.dylib
./lib/libwxlua_macu_wxluadebug-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxluadebug-2.8.0.dylib
./lib/libwxlua_macu_wxluadebug-2.8.dylib
./lib/libwxlua_macu_wxluasocket-2.8.0.0.7.dylib
./lib/libwxlua_macu_wxluasocket-2.8.0.dylib
./lib/libwxlua_macu_wxluasocket-2.8.dylib

wxwidgets were compiled with this config:

CFLAGS=-arch i386 LDFLAGS=-arch i386 CPPFLAGS=-arch i386
CXXFLAGS=-arch i386 ./configure --enable-monolithic --disable-debug
--enable-shared --enable-unicode
--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
--with-macosx-version-min=10.6 --without-lib tiff

What do I need to specify to get one libwx.dylib file or something like that?

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] Compilation error with the latest svn code (rev.102)

2012-07-04 Thread Paul K
Hi John,

I'm getting a compilation error on the latest wxlua revision (102) from svn:

/Users/paul/svn/wxlua/trunk/wxLua/bk-deps g++ -c -o
wxbindcore_dll_wxcore_bind.o -I./.pch/wxprec_wxbindcore_dll
-I../modules/wxbind/setup -I../modules -I./.. -I/usr/include/lua5.1
-DWXMAKINGDLL_WXBINDCORE -dynamic -fPIC -DPIC
-I/Users/paul/Downloads/wxMac-2.8.12/lib/wx/include/mac-unicode-release-2.8
-I/Users/paul/Downloads/wxMac-2.8.12/include
-I/Users/paul/Downloads/wxMac-2.8.12/contrib/include
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__  -arch i386
-DwxLUA_USEBINDING_WXGL=0 -DwxLUA_USEBINDING_WXMEDIA=0
-DwxLUA_USEBINDING_WXSTC=0 -O2 -fno-common
./wxbind/src/wxcore_bind.cpp
./wxbind/src/wxcore_bind.cpp: In function ‘int
wxLua_function_wxGetAccelFromString(lua_State*)’:
./wxbind/src/wxcore_bind.cpp:3456: warning: ‘wxGetAccelFromString’ is
deprecated (declared at
/Users/paul/Downloads/wxMac-2.8.12/include/wx/utils.h:577)
./wxbind/src/wxcore_bind.cpp:3456: warning: ‘wxGetAccelFromString’ is
deprecated (declared at
/Users/paul/Downloads/wxMac-2.8.12/include/wx/utils.h:577)
./wxbind/src/wxcore_bind.cpp: In function ‘wxLuaBindClass*
wxLuaGetClassList_wxcore(size_t)’:
./wxbind/src/wxcore_bind.cpp:7130: error: ‘wxPopupTransientWindow’ has
not been declared
./wxbind/src/wxcore_bind.cpp:7134: error: ‘wxPopupWindow’ has not been declared
make[1]: *** [wxbindcore_dll_wxcore_bind.o] Error 1
make: *** [modules] Error 2

It can't find definitions for wxPopupWindow and
wxPopupTransientWindow; commenting out defines in
wxLua/modules/wxbind/setup/wxluasetup.h (wxPopupWindow and
wxPopupTransientWindow) allows the compilation to complete without
problems.

This is on MacOS.

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] Multiple view with StyledTextCtrl

2012-07-26 Thread Paul K
Does anyone have an example of how I can implement multiple views in
wxLua? I have read through this description
(http://www.yellowbrain.com/stc/mult_views.html), but still can't
figure out what the required calls are.

What I want to do is quite simple: I have an editor window that I want
to display and I also need a second window that will only show *some
of the lines* shown in the editor window. If the lines are updated in
the editor window, they should be updated in the other window. I'll
hide some of the lines in the other window using HideLines/ShowLines
(http://www.yellowbrain.com/stc/folding.html#hidelines).

What is the minimum set of required commands to add a second view to
an existing wxstc.wxStyledTextCtrl object? Thank you.

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] Compiling monolithic version on Windows (using 2.8.12.2)

2012-08-08 Thread Paul K
Hi John,

I've read through the installation/compilation instructions and am
still searching for a combination of settings I need to apply to get
one wx.dll produced.

Here is the command I used:

mingw32-make -f makefile.gcc BUILD=release UNICODE=1 SHARED=1
MONOLITHIC=1 WX_MONOLITHIC=0 WX_SHARED=0 USE_LUAMODULE=1
USE_WXBINDGL=0 LINK_DLL_FLAGS=-shared

I compiled wxwidgets with SHARED=0 and MONOLITHIC=0 to genterate .a
files as I expect those to be linked into wx.dll
I specified SHARED=1 and MONOLITHIC=1 for wxlua. For some reason it
still tries to generate all the individual DLLs, like
wxlua_msw28u_wxlua.dll.

Also, I get an error on linking against _gl library
(mingw32/bin/ld.exe: cannot find -lwxmsw28u_gl) and I indeed don't
have that library. I tried adding USE_WXBINDGL=0, but it didn't help.
What parameter do I need to provide to skip gl library?

Can you share the command line for mingw that should get me wx.dll or
settings for vs you used to build wx.dll? Thank you.

Paul.

P.S. btw, until I added LINK_DLL_FLAGS=-shared, I was getting

Creating library file: ..\..\..\lib\gcc_dll\liblua5.1.a
./libmingw32.a(main.o): In function `main':
C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference
to `WinMain@16'

error, even though LINK_DLL_FLAGS is set at the top of the makefile:

# Compiler flags to link shared library
LINK_DLL_FLAGS ?= -shared

P.P.S the installation instructions refer to mingw32-make -f
makefile.mingw, but there is no .mingw makefile, only .gcc one.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Compiling monolithic version on Windows (using 2.8.12.2)

2012-08-09 Thread Paul K
Hi John,

I think I'm close, but still not there yet. I did get luawx.dll
library, but it's 12+M in size and it depends on
libwxlua_lua51-wx28mswu-2.8.12.dll (which seems to be a renamed lua
dll). There are also several other libraries, but the application
seems to work without them:

12,318,932 libwx.dll
 3,480,509 libwxlua-wx28mswu-2.8.12.dll
11,973,978 libwxlua_bind-wx28mswu-2.8.12.dll
 3,413,790 libwxlua_debug-wx28mswu-2.8.12.dll
   215,408 libwxlua_lua51-wx28mswu-2.8.12.dll
 3,405,545 libwxlua_socket-wx28mswu-2.8.12.dll
61,395 lua.exe
   219,561 luac.exe

Why do all the names start from libwx? Also, the library seems to be
much larger in size than yours (12M vs. 5.5M) and this is in
MinSizeRel configuration. I couldn't find any setting that would
affect the size.

Is this possible to link against an existing *real* lua.dll
(lua5.1.dll or lua51.dll), rather than against
libwxlua_lua51-wx28mswu-2.8.12.dll?

All I need is a standalone wx.dll I can compile in Unicode
configuration that I can use with my lua dll. Is this possible?

Paul.

On Wed, Aug 8, 2012 at 7:22 PM, John Labenski jlaben...@gmail.com wrote:
 On Wed, Aug 8, 2012 at 8:42 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I've read through the installation/compilation instructions and am
 still searching for a combination of settings I need to apply to get
 one wx.dll produced.

 Here is the command I used:

 mingw32-make -f makefile.gcc BUILD=release UNICODE=1 SHARED=1
 MONOLITHIC=1 WX_MONOLITHIC=0 WX_SHARED=0 USE_LUAMODULE=1
 USE_WXBINDGL=0 LINK_DLL_FLAGS=-shared

 Please use the CMake generated build files now. The old ones are not
 nearly configurable enough. I recommend building static wxWidgets libs
 and then you will get a single wx.dll with no other dependencies.

 http://wxlua.sourceforge.net/docs/install.html#C2.4
 http://wxlua.sourceforge.net/docs/install.html#C4.2

 Regards,
 John

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] GetCwd() doesn't return unicode path on windows

2012-08-16 Thread Paul K
It seems like I can't get a proper unicode path from GetCwd() on
windows using wxLua 2.8.12.2.

I'm running the following code:

wx.wxFileName.SetCwd(D:\\Lua\\下载\\); print(wx.wxFileName.GetCwd())

and this prints D:\Lua\?? whereas I expect the original path to be
printed. SetCwd() returns true. I look at some other calls, and others
I checked seem to be working correctly, for example,
wx.wxStandardPaths.Get():GetExecutablePath() returns
D:\\Lua\\下载\\zbstudio.exe (which is correct).

Is this a bug in GetCwd() or am I doing something wrong with it?

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] How to disable logging window with error message in wxlua?

2012-08-16 Thread Paul K
Hi all,

I'm working with an application that saves data in files and some of
the operations may trigger file errors. I'm handling those errors
myself and don't want to see the standard error message shown by
wxwidgets. How do I disable it? Here is the code that I have:

  local file = wx.wxFile(filename, wx.wxFile.write)
  file:Write(something, #something)

If the file is write protected, I get can't open file '...' (error 5:
access is denied). I know, I can check for that condition, but this
is not what the question is about. I'd like to disable that message.

Here is what I tried so far:

1. use wxLogNull. I read C++ examples, but not sure how this should be
used in wxlua (according to examples, you just need to instantiate
this logNull object):

local log = wx.wxLogNull()
file:Write()
log:delete()

This has no effect.

2. use SetActiveTarget()

local log = wx.wxLog.SetActiveTarget(wx.wxLogNull())
file:Write()
wx.wxLog.SetActiveTarget(log)

This doesn't work as SetActiveTarget expects wxLog object, but
wxLogNull doesn't seem to be inherited from wxLog (according to wxlua
docs).

3. use EnableLogging on either wx.wxLogGui() or wx.wxLog()

local curr = wx.wxLogGui().EnableLogging(false)
file:Write()
wx.wxLogGui().EnableLogging(curr)

This has no effect.

What is the right way to (temporarily) disable logging such that I
don't get the log window? Thanks.

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] How to disable logging window with error message in wxlua?

2012-08-16 Thread Paul K
Hi John,

 This does not show the error dialog for me in Linux.

it seems like you need to have a frame open to see the effect (your
code works regardless of whether LogNull is there). Try the code
below.

The solution is indeed to use local log = wx.wxLogNull(), but it
needs to be used *before* wxFile constructor, because this is where it
is failing (not in the Write method as I thought initially). Thanks
for getting me on the right track.

require wx

function FileWrite(file,content)
  -- local log = wx.wxLogNull()  LogNull code should be here
  local file = wx.wxFile(file, wx.wxFile.write)
  if not file:IsOpened() then return nil, wx.wxSysErrorMsg() end

  local log = wx.wxLogNull()
  file:Write(content, #content)
  file:Close()
  log:delete() -- this doesn't seem to be needed
  return true
end

function main()
-- create the wxFrame window
local frame = wx.wxFrame( wx.NULL,-- no parent for
toplevel windows
wx.wxID_ANY,  -- don't need a wxWindow ID
wxLua Minimal Demo, -- caption on the frame
wx.wxDefaultPosition, -- let system place the frame
wx.wxSize(450, 450),  -- set the size of the frame
wx.wxDEFAULT_FRAME_STYLE ) -- use default frame styles

-- show the frame window
frame:Show(true)

if not FileWrite(/my-read-only-file, something) then
  wx.wxMessageBox(Unable to save file., Error, wx.wxOK + wx.wxCENTRE)
end
end

main()

wx.wxGetApp():MainLoop()

Paul.

On Thu, Aug 16, 2012 at 8:21 PM, John Labenski jlaben...@gmail.com wrote:
 On Thu, Aug 16, 2012 at 10:56 PM, Paul K paulclin...@yahoo.com wrote:
 Hi all,

 I'm working with an application that saves data in files and some of
 the operations may trigger file errors. I'm handling those errors
 myself and don't want to see the standard error message shown by
 wxwidgets. How do I disable it? Here is the code that I have:

   local file = wx.wxFile(filename, wx.wxFile.write)
   file:Write(something, #something)

 If the file is write protected, I get can't open file '...' (error 5:
 access is denied). I know, I can check for that condition, but this
 is not what the question is about. I'd like to disable that message.

 1. use wxLogNull. I read C++ examples, but not sure how this should be
 used in wxlua (according to examples, you just need to instantiate
 this logNull object):

 This does not show the error dialog for me in Linux.

 local log = wx.wxLogNull()
 local file = wx.wxFile(/aaa, wx.wxFile.write)
 print(file:IsOpened())
 if (file:IsOpened())
  -- This asserts as it should if the file is not opened
  file:Write(something, #something)
 end()
 log:delete()

 Regards,
 John

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] GetCwd() doesn't return unicode path on windows

2012-08-19 Thread Paul K
Hi John,

 Using the unicode build right?

Yes. Everything else Unicode-related is working as far as I can tell.

 Does wx.wxFileName.FileExists(SomethingInThatDir.txt) work, showing
 that SetCwd() worked?
 If so then, it'd be a problem with GetCwd(), but I cannot think of any
 reason why it wouldn't work off the top of my head...

yes, it does seem like the problem is with GetCwd, and it should be
easy to reproduce:

 wx.wxFileName.SetCwd([[D:\Lua\下载\下载\]]); 
 print(wx.wxFileName.FileExists(foo.lua)); print(wx.wxGetCwd()); 
 print(wx.wxFileName.SetCwd(wx.wxGetCwd()))
true
D:\Lua\??\??
false

As you can see, the file is there, but using the result of GetCwd to
set it as the current folder fails (returns false the second time).

Paul.

On Sun, Aug 19, 2012 at 7:53 PM, John Labenski jlaben...@gmail.com wrote:
 On Thu, Aug 16, 2012 at 11:24 AM, Paul K paulclin...@yahoo.com wrote:
 It seems like I can't get a proper unicode path from GetCwd() on
 windows using wxLua 2.8.12.2.

 Using the unicode build right?

 I'm running the following code:

 wx.wxFileName.SetCwd(D:\\Lua\\下载\\); print(wx.wxFileName.GetCwd())

 and this prints D:\Lua\?? whereas I expect the original path to be
 printed. SetCwd() returns true. I look at some other calls, and others

 Does wx.wxFileName.FileExists(SomethingInThatDir.txt) work, showing
 that SetCwd() worked?

 If so then, it'd be a problem with GetCwd(), but I cannot think of any
 reason why it wouldn't work off the top of my head...

 Regards,
 John

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] debugging lua scripts

2012-08-27 Thread Paul K
Hi Milind,

I quickly tried that in wxLua, but couldn't figure out how to specify
the folder to run scripts in so that loadfile and io.open would work.

I also tried to do this in ZeroBrane Studio
(https://github.com/pkulchenko/ZeroBraneStudio) and it seems like it
may work for you (the IDE is wxlua based). I'm not sure what your code
looks like, but let's say you have loadedfile.lua script that you are
trying to load and it has the following lines:

-- loadedfile.lua
print 123
print 456
function foo()
  print foo
end

You also have loadfile.lua script which has something like this:

-- loadfile.lua
--local func = loadfile('loadedfile.lua')
local f = assert(io.open('loadedfile.lua'))
local str = f:read('*all')
f:close()
local func = loadstring(str, 'loadedfile.lua')
func()
foo()
print 'Done'

If you open both of these files in ZeroBrane Studio and start
debugging with loadfile.lua being in the active editor window, you
should be able to step through both of them. You can also set a
breakpoint on either of the files and it should work.

Note that I added loadedfile.lua as a parameter for loadstring(),
which informs the debug interface as to where to search for the source
code.

Paul.

On Mon, Aug 27, 2012 at 3:37 PM, Milind Gupta milind.gu...@gmail.com wrote:
 Hi,
   I have a lua program in which I load a lua script as a string
 (loadstring) and then execute it. Is it possible to debug this script in
 wxLua.exe? How would I add a breakpoint in there?

 Thanks,
 Milind

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] [ANN] ZeroBrane Studio 0.32; now with unicode support, moai integration, and wxlua 2.8.12 upgrade

2012-09-03 Thread Paul K
(crossposting to wxlua-users as this is a wxlua-based application;
thanks to John Labenski for all the support and assistance with wxlua
upgrade.)

ZeroBrane Studio is a lightweight Lua IDE with code completion, syntax
highlighting, live coding, remote debugger, code analyzer, and
hypertext/markdown formatting support for integrating learning
materials (examples and demos provided).

Thanks to everyone who provided feedback and suggestions. Here is the
summary with the most important changes (full changelog:
https://github.com/pkulchenko/ZeroBraneStudio/blob/master/CHANGELOG.md):
- Added Unicode support for file encoding and file paths on Windows (fixes #30).
- Added Moai integration and debugging (including debugging of Moai
threads and callbacks).
- Added refresh of Stack and Watch windows after executing a statement
in remote shell.
- Added display of complex values on multiple lines in shell with '='.
- Added calltip on mouseover for functions during editing and for
variables/expressions during debugging.
- Added configuration options to set paths to lua and love2d executables.
- Added support for coroutine debugging with stepping through
coroutine.resume/.yield calls.
- Updated wx.dll to wxlua 2.8.12.2 and wxwidgets 2.8.12.
- Signed zbstudio app and executable to avoid issues with files not
being saved without admin privileges and to remove warning about
'unknown publisher' on windows (fixes #25).

There were several changes to improve running on Linux, but more
complete Linux support is still work in progress.

I also posted a screencast that shows live coding with Löve:
http://notebook.kulchenko.com/zerobrane/live-coding-with-love; here is
a similar screencast with a demo running on OSX:
http://nikdudnik.com/post/30067678839/ive-spent-last-day-looking-for-a-suitable
(Nikita only saw mine after he published his screencast).

The code and the packages (.dmg, .exe, and .zip) are available on
github: https://github.com/pkulchenko/ZeroBraneStudio/downloads.

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] mingw compiling wxlua problems

2012-09-17 Thread Paul K
Hi Victor,

 I have always wanted to require wx in a lane but because of only once dll
 initialization it does not work. I am able to require wx from a lane if it
 has not been required from the main lua_State.

I might have seen a similar issue, but for a different reason: I
wanted to be able to load and run wx from a co-routine. We had a
discussion with John couple of months ago as to why this may not be
working with wxlua 2.8.12 (even though it was working before with
2.8.7 and 2.8.10). You can see the discussion here:
http://www.mail-archive.com/wxlua-users@lists.sourceforge.net/msg03010.html.
Essentially, there was a fix that was applied in rev100 (in svn),
which was then partially rolled back in rev104
(http://wxlua.svn.sourceforge.net/viewvc/wxlua/trunk/wxLua/modules/wxlua/src/wxlcallb.cpp?r1=100r2=104pathrev=104).
The partial rolled back caused the issue with aborting a coroutine
when wx module was loaded into that coroutine space (the application
was crashing).

I know it's a long shot and it may be just a coincidence that your
symptoms look similar, but you may want to try to comment out this
line in the diff I referenced (I haven't checked where it is in the
current revision):

m_wxlState = wxLuaState(wxlState.GetLuaState(),
wxLUASTATE_GETSTATE|wxLUASTATE_ROOTSTATE);

At least that fixed the issue for me (without any consequences as far
as I can tell). I've been using this patched version for about 6 weeks
running on Windows, Mac and Linux.

Paul.

On Mon, Sep 17, 2012 at 3:15 AM, Victor Bombi son...@telefonica.net wrote:
 Can you add this line to modules/luamodule/luamodule.cpp to help
 figure out what is happening and recompile?

 50 BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
 LPVOID )
 51 {

 printf(AAA %p %d : a %d d %d\n, hModule,
 (int)ul_reason_for_call, (int)DLL_PROCESS_ATTACH,
 (int)DLL_PROCESS_DETACH); fflush(stdout);

 52 switch (ul_reason_for_call)
 53 {
 ...


 Thank you for answering. I have solved the problems in my lualanes and wx
 application. It seems that something is not working if I do
 requiresomething inside a lane that has not been required in the lua_state
 where wx is loaded. When the lane is finished wx gets hanged (I guess that
 when unloading the dll) so I am now requiring everything in the main
 lua_state even if I dont need it. Another problem came from wx defining bit
 instead of wx.bit so when I use bit from luaBitOp lanes get confused also (I
 renamed it bitOp for solving).

 I have always wanted to require wx in a lane but because of only once dll
 initialization it does not work. I am able to require wx from a lane if it
 has not been required from the main lua_State. Do you thing it could be
 changed anyhow so that luaopen_wx does not return lua_getglobal(L, wx);?
 Would that break wx?

 Best Regards
 Victor Bombi


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] Detecting opening wxChoice on Mac

2012-09-19 Thread Paul K
Hi All,

I have a wxChoice dropdown, which I'm populating on wx.wxEVT_SET_FOCUS
event. Unfortunately, this event is not triggered on Mac, which seems
to be a feature. I found a ticket related to this:
http://trac.wxwidgets.org/ticket/10047.

The fix seems to be using EVT_CHILD_FOCUS instead of EVT_SET_FOCUS
event, but my problem is that *neither* is triggered on Mac (tested
with wxlua 2.8.12.2 on OSX 10.7). I understand that this is probably
wxwidget issue (if it's indeed a real issue), but I'm interested to
hear if this worked for someone on Mac and if not, what workaround may
I use.  All I want is to be able to detect when a wxChoice control is
activated. Thank you.

Paul.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] wx.wxMOD_* constants not defined on Mac

2012-09-19 Thread Paul K
Hi John,

I just noticed that for some reason wx.wxMOD_NONE is not defined on
Mac (wxlua 2.8.12.1) while it is defined correctly on Windows. This
breaks logic like event:GetModifiers() == wx.wxMOD_NONE. In fact, it
seems like none of the wx.wxMOD_* constants is defined on Mac.
GetModifiers() returns correct values for those modifiers (I checked
Alt/Cmd/Ctrl and they match the docs).

I haven't had a chance to check the code yet, but wanted to let you
and others know (as this led to some subtle bugs for me).

Paul.

ZeroBrane Studio - slick Lua IDE and debugger for Windows, OSX, and
Linux - http://studio.zerobrane.com/

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Can't read output with wxPROCESS_REDIRECT and wxEXEC_ASYNC

2012-10-01 Thread Paul K
Hi João,

Thank you for the solution. I ended up using the following, as it
allows me to implemented synchronous processing (while still using
EXEC_ASYNC):

local proc = wx.wxProcess.Open(cmd) -- this is using EXEC_ASYNC
proc:Redirect()
local streamin = proc:GetInputStream()
local str = streamin:Read(4096)

:Read() blocks waiting for input, which is exactly what I need.

Paul.

On Mon, Oct 1, 2012 at 4:03 AM, João Mendes lord@gmail.com wrote:
 Hi Paul,

 Did you try this:

 proc = wx.wxProcess()

 proc:Connect(wx.wxEVT_END_PROCESS,
   function(event)
   print(Hello - the process is over and won't be deleted.)
   -- event:Skip(true) -- will crash since wxWidgets will delete it
 too
   -- proc = nil
   -- collectgarbage( collect ) -- not necessary, but it tests the
 problem
   end
 )

 proc:Redirect()
 wx.wxExecute( cmd, wx.wxEXEC_ASYNC, proc )

 I get this code somewhere and work fine for me.

 --
 João Mendes de Oliveira Neto


 2012/9/30 Paul K paulclin...@yahoo.com

 Hi All,

 I'm trying to read output from a program and am having trouble with
 the following three lines of code:

   local proc = wx.wxProcess(wx.NULL, wx.wxPROCESS_REDIRECT)
   local pid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC, proc)
   local streamin = proc:GetInputStream()

 The app crashes on any attempt to get input stream. The following code
 with EXEC_SYNC works fine though:

   local pid = wx.wxExecute(cmd, wx.wxEXEC_SYNC)

 But this doesn't give me any way to access the output of the command I
 execute.

 I suspect the problem is in the first parameter in wxProcess:
 wx.wxProcess(wx.NULL, but I don't see any other way to not provide
 wxEvtHandler or create a dummy one (replacing wx.NULL with
 wx.wxEvtHandler() has the same effect: the app crashes).

 This is all on windows 7 running fairly recent 2.8.12.2 code. I'd
 appreciate any ideas on how to get program output. Thanks.

 Paul.


 --
 Got visibility?
 Most devs has no idea what their production app looks like.
 Find out how fast your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219671;13503038;y?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users



 --
 Got visibility?
 Most devs has no idea what their production app looks like.
 Find out how fast your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219671;13503038;y?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users


--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Can't read output with wxPROCESS_REDIRECT and wxEXEC_ASYNC

2012-10-01 Thread Paul K
Hi John,

 Please read the description of wxProcess where they describe how to
 use the streams. You will also want to check the status of the process
 before trying to use it as well.

Is there any particular problem with the logic I described? I know how
to use streams (I use it in other parts of the application), but I
wanted to have something very simple here (and ideally synchronous). I
oversimplified the logic (there is also CanRead() and few other
things), but the idea is as I described. I do check if the returned
value is not nil. Is there anything else you suggest I need to do?
Thanks.

Paul.

ZeroBrane Studio - slick Lua IDE and debugger for Windows, OSX, and
Linux - http://studio.zerobrane.com/

On Mon, Oct 1, 2012 at 8:49 PM, John Labenski jlaben...@gmail.com wrote:
 On Mon, Oct 1, 2012 at 11:41 AM, Paul K paulclin...@yahoo.com wrote:
 Hi João,

 Thank you for the solution. I ended up using the following, as it
 allows me to implemented synchronous processing (while still using
 EXEC_ASYNC):

 local proc = wx.wxProcess.Open(cmd) -- this is using EXEC_ASYNC
 proc:Redirect()
 local streamin = proc:GetInputStream()
 local str = streamin:Read(4096)

 :Read() blocks waiting for input, which is exactly what I need.

 Please read the description of wxProcess where they describe how to
 use the streams. You will also want to check the status of the process
 before trying to use it as well.

 http://docs.wxwidgets.org/stable/wx_wxprocess.html#wxprocessredirect

 Regards,
 John

 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Can't read output with wxPROCESS_REDIRECT and wxEXEC_ASYNC

2012-10-05 Thread Paul K
Hi João,

Thanks again for your example, as I ended up with something that was
closer to yours than to my original plan (as mine was blocking the app
if the other application wasn't printing anything). For those who are
following the thread, this is what I ended up with:

local proc = wx.wxProcess()
proc:Redirect()
proc:Connect(wx.wxEVT_END_PROCESS, function(event) proc = nil end)
local bid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC +
wx.wxEXEC_MAKE_GROUP_LEADER, proc)
if not bid or bid == -1 or bid == 0 then
  DisplayOutput((Program unable to run as '%s'\n):format(cmd))
  return
end

local streamin = proc:GetInputStream()
for _ = 1, 10 do
  if streamin:CanRead() then
-- do something with streamin:Read(4096)
  end
  wx.wxSafeYield()
  wx.wxWakeUpIdle()
  wx.wxMilliSleep(250)
end

-- kill process if couldn't read after 10 attempts
-- wx.wxProcess.Kill(bid, wx.wxSIGKILL, wx.wxKILL_CHILDREN)

Paul.

On Mon, Oct 1, 2012 at 4:03 AM, João Mendes lord@gmail.com wrote:
 Hi Paul,

 Did you try this:

 proc = wx.wxProcess()

 proc:Connect(wx.wxEVT_END_PROCESS,
   function(event)
   print(Hello - the process is over and won't be deleted.)
   -- event:Skip(true) -- will crash since wxWidgets will delete it
 too
   -- proc = nil
   -- collectgarbage( collect ) -- not necessary, but it tests the
 problem
   end
 )

 proc:Redirect()
 wx.wxExecute( cmd, wx.wxEXEC_ASYNC, proc )

 I get this code somewhere and work fine for me.

 --
 João Mendes de Oliveira Neto


 2012/9/30 Paul K paulclin...@yahoo.com

 Hi All,

 I'm trying to read output from a program and am having trouble with
 the following three lines of code:

   local proc = wx.wxProcess(wx.NULL, wx.wxPROCESS_REDIRECT)
   local pid = wx.wxExecute(cmd, wx.wxEXEC_ASYNC, proc)
   local streamin = proc:GetInputStream()

 The app crashes on any attempt to get input stream. The following code
 with EXEC_SYNC works fine though:

   local pid = wx.wxExecute(cmd, wx.wxEXEC_SYNC)

 But this doesn't give me any way to access the output of the command I
 execute.

 I suspect the problem is in the first parameter in wxProcess:
 wx.wxProcess(wx.NULL, but I don't see any other way to not provide
 wxEvtHandler or create a dummy one (replacing wx.NULL with
 wx.wxEvtHandler() has the same effect: the app crashes).

 This is all on windows 7 running fairly recent 2.8.12.2 code. I'd
 appreciate any ideas on how to get program output. Thanks.

 Paul.


 --
 Got visibility?
 Most devs has no idea what their production app looks like.
 Find out how fast your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219671;13503038;y?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users



 --
 Got visibility?
 Most devs has no idea what their production app looks like.
 Find out how fast your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219671;13503038;y?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxlua docs up-to-date? (Windows)

2012-10-12 Thread Paul K
Hi Mike,

 BUT another thing that I did was to install the ZeroBrane IDE before running 
 the wx examples.  Maybe this changes the associated program for .wlua files  
 (which incidentally appears as 'Lua Windows Standalone Interpreter' on my 
 system.)

I can tell you to the best of my knowledge ZeroBrane Studio IDE
doesn't change file associations.

Paul.

On Fri, Oct 12, 2012 at 3:38 AM, Mike Parr mikep...@live.com wrote:


 Thanks for your detailed reply, John.  I understand.  In particular,
  I will want to create standalone wx exe files, and I see elsewhere
 that it can be done.

 To reply to your questions, yes, I'm using Windows 7.
 The Lua version was from the main lua site, ans is:
 LuaForWindows_v5.1.4-46.exe

 BUT another thing that I did was to install the ZeroBrane IDE before
  running the
 wx examples.  Maybe this changes the associated program for .wlua files
   (which incidentally appears as 'Lua Windows Standalone Interpreter'
  on my system.)
 Thanks
 Mike








 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] Checkboxes don't react to clicks in editor.wx.lua on Mac OSX

2012-10-13 Thread Paul K
Hi John,

One of the users noticed that checkboxes in Find/Replace dialogs in
ZeroBraneStudio don't react to clicks on Mac OSX; I tested
Find/Replace dialog in your editor.wx.lua sample and it shows exactly
the same issue (using wxlua 2.8.12.1). Other checkboxes (for examples
in controls.wx.lua) work as expected, so I think it's not wxCheckBox
problem. I suspect it's some sort of interaction between sizers and
controls (and only on Mac OSX as both Windows and Linux versions work
correctly). Radioboxes on the same panel also work correctly. Any help
or ideas to test would be appreciated.

Paul.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Checkboxes don't react to clicks in editor.wx.lua on Mac OSX

2012-10-13 Thread Paul K
Hi John,

I think it's indeed a sizer-related issue; for example, if I comment
out the following in the editor.wx.lua example, then one of the
checkboxes works, (it is in the top left corner):

local optionSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog)
--optionSizer:Add(wholeWordCheckBox,  0, wx.wxALL + wx.wxGROW +
wx.wxCENTER, 3)
optionSizer:Add(matchCaseCheckBox,  0, wx.wxALL + wx.wxGROW +
wx.wxCENTER, 3)
optionSizer:Add(wrapAroundCheckBox, 0, wx.wxALL + wx.wxGROW +
wx.wxCENTER, 3)
optionSizer:Add(regexCheckBox,  0, wx.wxALL + wx.wxGROW +
wx.wxCENTER, 3)

Any idea on how to fix this?

Paul.

On Sat, Oct 13, 2012 at 11:07 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 One of the users noticed that checkboxes in Find/Replace dialogs in
 ZeroBraneStudio don't react to clicks on Mac OSX; I tested
 Find/Replace dialog in your editor.wx.lua sample and it shows exactly
 the same issue (using wxlua 2.8.12.1). Other checkboxes (for examples
 in controls.wx.lua) work as expected, so I think it's not wxCheckBox
 problem. I suspect it's some sort of interaction between sizers and
 controls (and only on Mac OSX as both Windows and Linux versions work
 correctly). Radioboxes on the same panel also work correctly. Any help
 or ideas to test would be appreciated.

 Paul.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Checkboxes don't react to clicks in editor.wx.lua on Mac OSX

2012-10-16 Thread Paul K
Hi John,

Ok, I narrowed it down to a problem with wxStaticBoxSizer as the
following short script shows (this is with wxlua 2.8.12.1 and
wxwidgets 2.8.12 running on OSX10.7.4):

require wx
local findDialog = wx.wxFrame( wx.NULL, wx.wxID_ANY, Checkbox in sizer demo,
  wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxDEFAULT_FRAME_STYLE)
local wholeWordCheckBox  = wx.wxCheckBox(findDialog, wx.wxID_ANY,
Match whole word)
local matchCaseCheckBox  = wx.wxCheckBox(findDialog, wx.wxID_ANY, Match case)
local wrapAroundCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY,
Wrap around)

local optionSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog)
optionSizer:Add(matchCaseCheckBox,  0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
optionSizer:Add(wrapAroundCheckBox, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)

local optionsSizer = wx.wxStaticBoxSizer(wx.wxVERTICAL, findDialog,
Options )  change to wxBoxSizer to fix
optionsSizer:Add(optionSizer, 0, 0, 5)

local optionScopeSizer = wx.wxBoxSizer(wx.wxHORIZONTAL)
optionScopeSizer:Add(optionsSizer, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 5)
optionScopeSizer:SetSizeHints(findDialog)
findDialog:SetSizer(optionScopeSizer)
findDialog:Show(true)
wx.wxGetApp():MainLoop()

Replacing wxStaticBoxSizer with wxBoxSizer fixes the issue (but
obviously changes the layout of the form). The problem is only on OSX
(Windows and Linux show no issue) and it seems like it's a wxwidgets
issue, but I can't find anything about it online, so I'm not 100%
sure.

I'm looking for a fix/workaround. Is there an easy way to check what
object gets those clicks and to propagate the clicks to my checkboxes?

Paul.

On Sat, Oct 13, 2012 at 11:29 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I think it's indeed a sizer-related issue; for example, if I comment
 out the following in the editor.wx.lua example, then one of the
 checkboxes works, (it is in the top left corner):

 local optionSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog)
 --optionSizer:Add(wholeWordCheckBox,  0, wx.wxALL + wx.wxGROW +
 wx.wxCENTER, 3)
 optionSizer:Add(matchCaseCheckBox,  0, wx.wxALL + wx.wxGROW +
 wx.wxCENTER, 3)
 optionSizer:Add(wrapAroundCheckBox, 0, wx.wxALL + wx.wxGROW +
 wx.wxCENTER, 3)
 optionSizer:Add(regexCheckBox,  0, wx.wxALL + wx.wxGROW +
 wx.wxCENTER, 3)

 Any idea on how to fix this?

 Paul.

 On Sat, Oct 13, 2012 at 11:07 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 One of the users noticed that checkboxes in Find/Replace dialogs in
 ZeroBraneStudio don't react to clicks on Mac OSX; I tested
 Find/Replace dialog in your editor.wx.lua sample and it shows exactly
 the same issue (using wxlua 2.8.12.1). Other checkboxes (for examples
 in controls.wx.lua) work as expected, so I think it's not wxCheckBox
 problem. I suspect it's some sort of interaction between sizers and
 controls (and only on Mac OSX as both Windows and Linux versions work
 correctly). Radioboxes on the same panel also work correctly. Any help
 or ideas to test would be appreciated.

 Paul.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Checkboxes don't react to clicks in editor.wx.lua on Mac OSX [fixed]

2012-10-16 Thread Paul K
In the best tradition of answering my own question, the solution was
easy: create wxStaticBox (or wxStaticBoxSizer) *before* checkboxes are
created.

There seems to be a bug (or feature) in how the order in event
traversal is handled and if the staticbox is created after the
checkboxes, none of the checkboxes get their events on OSX (you can
still click on the area of the checkbox label if it sticks outside of
the static box).

Paul.

On Tue, Oct 16, 2012 at 11:27 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Ok, I narrowed it down to a problem with wxStaticBoxSizer as the
 following short script shows (this is with wxlua 2.8.12.1 and
 wxwidgets 2.8.12 running on OSX10.7.4):

 require wx
 local findDialog = wx.wxFrame( wx.NULL, wx.wxID_ANY, Checkbox in sizer demo,
   wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxDEFAULT_FRAME_STYLE)
 local wholeWordCheckBox  = wx.wxCheckBox(findDialog, wx.wxID_ANY,
 Match whole word)
 local matchCaseCheckBox  = wx.wxCheckBox(findDialog, wx.wxID_ANY, Match 
 case)
 local wrapAroundCheckBox = wx.wxCheckBox(findDialog, wx.wxID_ANY,
 Wrap around)

 local optionSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog)
 optionSizer:Add(matchCaseCheckBox,  0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)
 optionSizer:Add(wrapAroundCheckBox, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 3)

 local optionsSizer = wx.wxStaticBoxSizer(wx.wxVERTICAL, findDialog,
 Options )  change to wxBoxSizer to fix
 optionsSizer:Add(optionSizer, 0, 0, 5)

 local optionScopeSizer = wx.wxBoxSizer(wx.wxHORIZONTAL)
 optionScopeSizer:Add(optionsSizer, 0, wx.wxALL + wx.wxGROW + wx.wxCENTER, 5)
 optionScopeSizer:SetSizeHints(findDialog)
 findDialog:SetSizer(optionScopeSizer)
 findDialog:Show(true)
 wx.wxGetApp():MainLoop()

 Replacing wxStaticBoxSizer with wxBoxSizer fixes the issue (but
 obviously changes the layout of the form). The problem is only on OSX
 (Windows and Linux show no issue) and it seems like it's a wxwidgets
 issue, but I can't find anything about it online, so I'm not 100%
 sure.

 I'm looking for a fix/workaround. Is there an easy way to check what
 object gets those clicks and to propagate the clicks to my checkboxes?

 Paul.

 On Sat, Oct 13, 2012 at 11:29 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I think it's indeed a sizer-related issue; for example, if I comment
 out the following in the editor.wx.lua example, then one of the
 checkboxes works, (it is in the top left corner):

 local optionSizer = wx.wxBoxSizer(wx.wxVERTICAL, findDialog)
 --optionSizer:Add(wholeWordCheckBox,  0, wx.wxALL + wx.wxGROW +
 wx.wxCENTER, 3)
 optionSizer:Add(matchCaseCheckBox,  0, wx.wxALL + wx.wxGROW +
 wx.wxCENTER, 3)
 optionSizer:Add(wrapAroundCheckBox, 0, wx.wxALL + wx.wxGROW +
 wx.wxCENTER, 3)
 optionSizer:Add(regexCheckBox,  0, wx.wxALL + wx.wxGROW +
 wx.wxCENTER, 3)

 Any idea on how to fix this?

 Paul.

 On Sat, Oct 13, 2012 at 11:07 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 One of the users noticed that checkboxes in Find/Replace dialogs in
 ZeroBraneStudio don't react to clicks on Mac OSX; I tested
 Find/Replace dialog in your editor.wx.lua sample and it shows exactly
 the same issue (using wxlua 2.8.12.1). Other checkboxes (for examples
 in controls.wx.lua) work as expected, so I think it's not wxCheckBox
 problem. I suspect it's some sort of interaction between sizers and
 controls (and only on Mac OSX as both Windows and Linux versions work
 correctly). Radioboxes on the same panel also work correctly. Any help
 or ideas to test would be appreciated.

 Paul.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] WxApp::FilterEvent available in wxlua?

2012-10-17 Thread Paul K
Hi John,

 You should be able to call Connect() on the window you're interested
 in getting them from.

 window:Connect(wx.wxEVT_KEY_DOWN, Lua function)

I'm looking for reducing the number of windows to check as there are
many that can trigger those events. I tried attaching the handlers to
the main window, but I don't get the events I need. I think the
difference is that FilterEvent is called before any of the regular
handlers are called, but the handler that is attached to the main
window is called only if the event is propagated up the chain and it
depends on how that event is handled.

Paul.

On Wed, Oct 17, 2012 at 9:00 PM, John Labenski jlaben...@gmail.com wrote:
 On Wed, Oct 17, 2012 at 7:26 PM, Paul K paulclin...@yahoo.com wrote:
 Hi All,

 I've been looking for a way to process events globally in the app and
 saw FilterEvent
 (http://docs.wxwidgets.org/2.8/wx_wxapp.html#wxappfilterevent) offered
 as one of the possible options to do this. Unfortunately all the
 examples I saw were for C/C++ and I don't see it being used anywhere
 in wxlua.

 Is there a way to use it with wxlua or an alternative way to at least
 handle EVT_KEY_DOWN and EVT_MOTION events? Thank you.

 You should be able to call Connect() on the window you're interested
 in getting them from.

 window:Connect(wx.wxEVT_KEY_DOWN, Lua function)

 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_sfd2d_oct
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
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_sfd2d_oct
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] WxApp::FilterEvent available in wxlua?

2012-10-18 Thread Paul K
Hi John,

 A wxIdleEvent event is sent after every event or batch of events so
 you are guaranteed to get it. You could be tricked that a user was
 active with your app if a different window is dragged on top and a
 paint event sent, but does that matter?

I saw that code, but he is using GetLastInputInfo, which is Windows
only and I need something that works on Windows, OSX, and Linux. It is
also tracking *user* idle time (across all applications), rather than
application idle time (which is what I am after).

I also couldn't get wxIdleEvent to work as I'd expect, because it's
always generated on Windows (I get a stream of IDLE events), but only
after some other events on OSX and Linux (as documented).

Also, I registered EVT_KILL_FOCUS handler on the main frame in the
application, but it's not triggered when the focus is changed to
another application.

Right now I simply set a timer for X/2 seconds (where X is the period
I want to track) and track document modification events that happen
during that time. I don't get the exact interval I need, but it's not
critical; I'm never more than X/2 seconds off. I was looking for
something more centralized and simpler than what I have now, but
couldn't find it.

Paul.

On Thu, Oct 18, 2012 at 9:43 PM, John Labenski jlaben...@gmail.com wrote:
 On Thu, Oct 18, 2012 at 11:14 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 If you can you explain what you are trying to do I might be able to help.

 Sure; I'm trying to detect idle time in the application when a user
 doesn't do any activity for X seconds. Any activity is defined as
 EVT_MOTION and EVT_KEY_DOWN events, but I'll settle for EVT_KEY_DOWN
 if it's difficult to track both. I don't want to keep adding my
 handlers to all the components I have and am looking for as few places
 to modify as possible.

 How about something like this?
 http://utmostlogic.wordpress.com/tag/wxwidgets/

 A wxIdleEvent event is sent after every event or batch of events so
 you are guaranteed to get it. You could be tricked that a user was
 active with your app if a different window is dragged on top and a
 paint event sent, but does that matter?

 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_sfd2d_oct
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
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_sfd2d_oct
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] [ANN] ZeroBrane Studio 0.33; now with Linux support, Gideros debugging, and MOAI auto-complete

2012-10-29 Thread Paul K
ZeroBrane Studio is a lightweight Lua IDE with code completion, syntax
highlighting, live coding, remote debugger, code analyzer, and
hypertext/markdown formatting support for integrating learning
materials (examples and demos provided).

The IDE is available at http://studio.zerobrane.com/. The most recent
version implements a large number of features with several most
important ones being:

- Added Linux support (tested in 32bit and 64bit configuration on
Ubuntu and Mint distributions).
- Added Gideros debugging, auto-complete, and live coding.
- Added Moai auto-complete.
- Added syntax aware indentation.
- Added re/storing open files and interpreter when switching project folders.

Full details are in the changelog:
https://github.com/pkulchenko/ZeroBraneStudio/blob/master/CHANGELOG.md.
Some users also tested and reported that ZeroBrane Studio and MobDebug
work with clients running Lua 5.2, which may be of interest; you only
need to use David's compat_env
(https://raw.github.com/davidm/lua-compat-env/master/lua/compat_env.lua)
to get the debugger working. This way you can run ZeroBrane Studio
(using Lua 5.1) and debug applications that use Lua 5.2 interpreter.

Thank you all for your continuing support in the development of this IDE!

Paul.

--
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxEVT_STC_STYLENEEDED is not called in wxlua 2.8.12.2?

2012-11-15 Thread Paul K
Hi John,

 If you choose to use the container to do the styling you can use the
 SCI_SETLEXER command to select SCLEX_CONTAINER, in which case the
 container is sent a SCN_STYLENEEDED notification each time text needs
 styling for display.

You are absolutely right. In fact, I was reading this fragment and
somehow missed that STYLENEEDED is going to be *only* called when the
lexer is set to SCLEX_CONTAINER.

 I think the idea is that you will have to style everything all the
 time. Though, I don't remember having tried it myself.

Ok, related question then. Is it possible to use SCLEX_CONTAINER, but
still make a call that will apply styling using some lexer (for
example, Lua) and I'll do the rest of the styling as needed?

Paul.

On Thu, Nov 15, 2012 at 1:12 PM, John Labenski jlaben...@gmail.com wrote:
 On Thu, Nov 15, 2012 at 3:56 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I've been doing custom styling and realized that the work that I've
 done is mostly in UPDATEUI handlers, whereas it should probably be in
 STYLENEEDED handlers. I looked at your editor and see that you also
 only use UPDATEUI, but not STYLENEEDED.

 The Scintilla docs are pretty complete and map reasonably well to the
 wxWidgets wrapper.
 http://www.scintilla.org/ScintillaDoc.html

 If you choose to use the container to do the styling you can use the
 SCI_SETLEXER command to select SCLEX_CONTAINER, in which case the
 container is sent a SCN_STYLENEEDED notification each time text needs
 styling for display.

 I think the idea is that you will have to style everything all the
 time. Though, I don't remember having tried it myself.

 Regards,
 John

 --
 Monitor your physical, virtual and cloud infrastructure from a single
 web console. Get in-depth insight into apps, servers, databases, vmware,
 SAP, cloud infrastructure, etc. Download 30-day Free Trial.
 Pricing starts from $795 for 25 servers or applications!
 http://p.sf.net/sfu/zoho_dev2dev_nov
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
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-30 Thread Paul K
 Please update from SVN, it should work now. Sorry, I was not correctly
 handling the void* DocPointers pushed as lightuserdata into Lua
 correctly.

Works now; thanks John!

Paul.

On Tue, Jan 29, 2013 at 9:18 PM, John Labenski jlaben...@gmail.com wrote:
 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

--
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] GetLineVisible always returns true?

2013-02-25 Thread Paul K
Hi John,

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

Should have checked there; I came up with very similar code, but also
included DocLineFromVisible:

function isLineVisible(line)
  local firstline = editor:DocLineFromVisible(editor:GetFirstVisibleLine())
  local lastline = math.min(editor:GetLineCount(),
editor:DocLineFromVisible(editor:GetFirstVisibleLine() +
editor:LinesOnScreen()))
  return line = firstline and line = lastline
end

This is needed because lines can be wrapped (as they are in my case),
but LinesOnScreen counts those as well (so the number on the screen
will be larger than the number in the document).

Paul.

On Mon, Feb 25, 2013 at 9:28 PM, John Labenski jlaben...@gmail.com wrote:
 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

--
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] Patch to wxlua to allow setting event handlers from coroutines

2013-02-28 Thread Paul K
Hi John,

 To be sure, for debugging you create a coroutine then run the whole
 app in that coroutine state using debug hooks and yields to pause it?

This is exactly correct. Debug hook is registered to that coroutine,
but the debugger itself runs in yet another coroutine.

 What happens when a wxLua app is paused at a breakpoint and an event
 handler is called? Don't you get an error saying something about
 resuming a suspended coroutine or is the coroutine not yielded to
 pause the execution?

No; never got this message. The application itself is suspended, so it
can't really receive any messages. In fact, I actually *do* set event
handlers from the debug coroutine while it's suspended to minimize
busyness of the application (it's around lines 540-550 in
mobdebug.lua), but I have never seen any crashes related to that.

 I would also like to understand what the advantages of the coroutine
 method of debugging are over the wxLua blocking socket method?

I don't use wxlua sockets because the debugger uses exactly the same
mechanism running wxlua or any other lua application.

 In any case, normally anyone who tries to connect an event handler in
 a coroutine will crash their program in a very hard to debug way,
 especially if the coroutine they installed the callback in gets
 garbage collected.

It seems like this has been working fine for me for as long as the
code that handles the callback is in the same coroutine as the code
that sets it (which is my case).

What I also do to support live coding is to call error from the
debug hook in the main coroutine, which allows me to reload the code
while the application is running. This is when it crashes with the
current wxlua code and doesn't crash with the patch. It seems like the
line I commented out in the patch does something to the Lua state that
causes the crash.

 I would like to find a way to have it work for your case, but also not
 frustrate new wxLua users who might imagine that they can somehow
 create a threaded GUI app using coroutines, not understanding that
 events are already sent asynchronously as has happened in the past.

 Maybe it is enough to simply have a strongly worded comment in the
 documentation, but please explain a little about your debugging
 methods.

A strongly worded comment would definitely make sense. Please let me
know if you'd need any additional details or a small example that
demonstrates the issue.

Paul.

On Wed, Feb 27, 2013 at 9:39 PM, John Labenski jlaben...@gmail.com wrote:
 On Wed, Feb 27, 2013 at 6:26 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I'd like to resurrect this discussion as the issue hasn't been fully
 put to bed and as I'm preparing for 2.9 wxwidgets upgrade I'd like to
 figure out whether I still need to patch wxlua to support my use case.

 I ended up patching wxlua and removing that one line that was added in
 the revision 104 (line 103 in this diff:
 http://wxlua.svn.sourceforge.net/viewvc/wxlua/trunk/wxLua/modules/wxlua/src/wxlcallb.cpp?r1=100r2=104pathrev=104).

 To be sure, for debugging you create a coroutine then run the whole
 app in that coroutine state using debug hooks and yields to pause it?
 What happens when a wxLua app is paused at a breakpoint and an event
 handler is called? Don't you get an error saying something about
 resuming a suspended coroutine or is the coroutine not yielded to
 pause the execution?

 I would also like to understand what the advantages of the coroutine
 method of debugging are over the wxLua blocking socket method?

 In any case, normally anyone who tries to connect an event handler in
 a coroutine will crash their program in a very hard to debug way,
 especially if the coroutine they installed the callback in gets
 garbage collected.

 I would like to find a way to have it work for your case, but also not
 frustrate new wxLua users who might imagine that they can somehow
 create a threaded GUI app using coroutines, not understanding that
 events are already sent asynchronously as has happened in the past.

 Maybe it is enough to simply have a strongly worded comment in the
 documentation, but please explain a little about your debugging
 methods.

 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

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

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

2013-03-06 Thread Paul K
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.

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.

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.

Paul.

--Windows (MinGW)--

Linking CXX shared library ../../bin/MinSizeRel/libwx.dll
Creating library file:
../../lib/MinSizeRel/libwx.dll.aCMakeFiles/wxLuaModule.dir/objects.a(luamodule.cpp.obj):luamodule.cpp:(.text+0x297):
undefined reference to `wxLuaBinding_wxbase_init()'
CMakeFiles/wxLuaModule.dir/objects.a(luamodule.cpp.obj):luamodule.cpp:(.text+0x29c):
undefined reference to `wxLuaBinding_wxcore_init()'
CMakeFiles/wxLuaModule.dir/objects.a(luamodule.cpp.obj):luamodule.cpp:(.text+0x2a1):
undefined reference to `wxLuaBinding_wxadv_init()'
CMakeFiles/wxLuaModule.dir/objects.a(luamodule.cpp.obj):luamodule.cpp:(.text+0x2a6):
undefined reference to `wxLuaBinding_wxnet_init()'
CMakeFiles/wxLuaModule.dir/objects.a(luamodule.cpp.obj):luamodule.cpp:(.text+0x2ab):
undefined reference to `wxLuaBinding_wxhtml_init()'
CMakeFiles/wxLuaModule.dir/objects.a(luamodule.cpp.obj):luamodule.cpp:(.text+0x2b0):
undefined reference to `wxLuaBinding_wxaui_init()'
CMakeFiles/wxLuaModule.dir/objects.a(luamodule.cpp.obj):luamodule.cpp:(.text+0x2b5):
undefined reference to `wxLuaBinding_wxstc_init()'
CMakeFiles/wxLuaModule.dir/objects.a(wxluadebugger_bind.cpp.obj):wxluadebugger_bind.cpp:(.text+0x40c):
undefined reference to `wxluatype_wxWindow'
CMakeFiles/wxLuaModule.dir/objects.a(wxluadebugger_bind.cpp.obj):wxluadebugger_bind.cpp:(.data+0x5e4):
undefined reference to `wxluatype_wxWindow
'
collect2: ld returned 1 exit status
make[2]: *** [bin/MinSizeRel/libwx.dll] Error 1
make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
make: *** [all] Error 2
Error: failed to build wxLua

--OSX--

Linking CXX shared library ../../lib/MinSizeRel/libwx.dylib
Undefined symbols for architecture i386:
  wxLuaBinding_wxbase_init(), referenced from:
  _luaopen_wx in luamodule.cpp.o
  wxLuaBinding_wxcore_init(), referenced from:
  _luaopen_wx in luamodule.cpp.o
  wxLuaBinding_wxadv_init(), referenced from:
  _luaopen_wx in luamodule.cpp.o
  wxLuaBinding_wxnet_init(), referenced from:
  _luaopen_wx in luamodule.cpp.o
  wxLuaBinding_wxhtml_init(), referenced from:
  _luaopen_wx in luamodule.cpp.o
  wxLuaBinding_wxaui_init(), referenced from:
  _luaopen_wx in luamodule.cpp.o
  wxLuaBinding_wxstc_init(), referenced from:
  _luaopen_wx in luamodule.cpp.o
  _wxluatype_wxWindow, referenced from:
  s_wxluatypeArray_wxLua_wxLuaDebuggerServer_DisplayStackDialog
   in wxluadebugger_bind.cpp.o
  wxLua_wxLuaDebuggerServer_DisplayStackDialog(lua_State*)  in
wxluadebugger_bind.cpp.o
 (maybe you meant: _p_wxluatype_wxWindow)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[2]: *** [lib/MinSizeRel/libwx.dylib] Error 1
make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs
make: *** [all] Error 2
Error: failed to build wxLua

--
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-07 Thread Paul K
Hi John,

 Thanks for reporting, it should be fixed now.

Indeed; fixed now.

 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.

yes, this is exactly what I need. I was looking for it in the
configure parameters instead of make.

Paul.

On Wed, Mar 6, 2013 at 11:39 PM, John Labenski jlaben...@gmail.com wrote:
 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

--
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-07 Thread Paul K
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.

Paul.

On Thu, Mar 7, 2013 at 10:15 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 Thanks for reporting, it should be fixed now.

 Indeed; fixed now.

 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.

 yes, this is exactly what I need. I was looking for it in the
 configure parameters instead of make.

 Paul.

 On Wed, Mar 6, 2013 at 11:39 PM, John Labenski jlaben...@gmail.com wrote:
 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

--
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-08 Thread Paul K
Hi John,

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

I added -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=TRUE and ran make
wxLuaModule (to get wx.* library), but still got the same error and
didn't get to wx.* file:

 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

Paul.

On Thu, Mar 7, 2013 at 8:19 PM, John Labenski jlaben...@gmail.com wrote:
 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

--
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-08 Thread Paul K
 To be honest, this this not something I have any interest in
 implementing. Even if it was made to work by silently ignoring missing
 parts then people who wanted to use the wxLua package as a whole may
 end up missing parts by accident and that would be far worse then you
 having extra parts. I recommend simply building it as is and taking
 the parts you want.

That is what I ended up doing. Thanks for taking look at this.

Paul.

On Fri, Mar 8, 2013 at 10:41 AM, John Labenski jlaben...@gmail.com wrote:
 On Fri, Mar 8, 2013 at 12:45 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

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

 I added -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=TRUE and ran make
 wxLuaModule (to get wx.* library), but still got the same error and
 didn't get to wx.* file:


 To be honest, this this not something I have any interest in
 implementing. Even if it was made to work by silently ignoring missing
 parts then people who wanted to use the wxLua package as a whole may
 end up missing parts by accident and that would be far worse then you
 having extra parts. I recommend simply building it as is and taking
 the parts you want.

 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

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


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

2013-03-15 Thread Paul K
Hi John,

I noticed that wxlua is missing the Traverse method in wxDir object
(http://docs.wxwidgets.org/2.8/wx_wxdir.html#wxdirtraverse).

Is it possible to add it or is there something more fundamental that
prevents it? I'd also like to make sure that wxDirTraverser
(http://docs.wxwidgets.org/2.8/wx_wxdirtraverser.html#wxdirtraverser)
will work as it's required for Traverse to be useful. Thank you!

Paul.

--
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 Paul K
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.

Paul.

On Fri, Mar 15, 2013 at 6:24 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I do that now (I use GetFirst() and GetNext()), but it's a bit slow
 for my purposes. GetAllFiles is much faster, but my main problem with
 it is that I can't exclude directories I don't need (for example,
 .git, .svn and others), and those can be quite slow to scan (due to a
 large number of directories and files).

 For example, when I try GetAllFiles it scans a folder with 278 files
 (including subfolders, most of these are in .git folder), it takes
 0.8s to scan (and subsequent runs only take 0.08s or so). Same folder
 without .git subfolder takes only 3ms or so to scan (17 files).

 I'm hoping that the Traverse method would give me a way to do it fast,
 but also allow me to filter out those folders I don't need.
 Unfortunately I can't test it without having access to it.

 Paul.

 On Fri, Mar 15, 2013 at 5:51 PM, John Labenski jlaben...@gmail.com wrote:
 On Fri, Mar 15, 2013 at 8:25 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I noticed that wxlua is missing the Traverse method in wxDir object
 (http://docs.wxwidgets.org/2.8/wx_wxdir.html#wxdirtraverse).

 Please use GetAllFiles() or roll your own GetFirst() GetNext()
 recursive function instead.
 http://wxlua.sourceforge.net/docs/wxluaref.html#wxDir

 An example of how to do that is here, see wxDir::Traverse()
 http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/src/common/dircmn.cpp?view=markup

 I don't really see any gain in using it for Lua programs as it just
 adds a layer of complexity and without enumeration type-safety can
 cause more problems than it would solve.

 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

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


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

2013-03-17 Thread Paul K
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.

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

Paul.

--
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] svn request password

2013-03-30 Thread Paul K
Hi John,

As far as I understand, wxstedit is only needed when wxlua is compiled
with wxwidgets 2.8.12; it's no longer required for 2.9.x. Or am I
mistaken?

If it's not needed for 2.9.x, then svn checkout --ignore-externals
can probably be used to skip it (I can't test it at the moment).

Paul.

On Sat, Mar 30, 2013 at 12:49 PM, John Labenski jlaben...@gmail.com wrote:
 On Sat, Mar 30, 2013 at 2:27 PM, Victor Bombi son...@telefonica.net wrote:

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

 Yes, it is related to wxstedit. I did a new svn checkout and it does not
 work

 I will change the svn:externals to use http and not https... sigh. You
 may have to delete wxLua/modules/wxstedit and recheckout.


 For future reference:

 https://sourceforge.net/p/forge/site-support/2768/
 http://sourceforge.net/apps/trac/sourceforge/ticket/19669

 Hopefully this will be fixed soon.

 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

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


[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 Paul K
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.

Just wanted to let you and others know as I got burned by this a bit...

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


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

2013-04-22 Thread Paul K
Hi John,

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

The click event for the item state is there
(EVT_(COMMAND_)TREE_STATE_IMAGE_CLICK), but not the state setting
method. Thank you.

Paul.

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


[wxlua-users] How to install custom EVT_LUA_ERROR handler?

2013-04-22 Thread Paul K
Hi John,

I'm trying to provide my own custom error handler that will replace
the default dialog shown after run-time errors in wxlua
(wxLuaModuleApp::OnLuaError), but I'm having trouble with it as
wxEVT_LUA_ERROR doesn't seem to be available to Lua scripts.

Was that intentional and is it possible to make it available as it
would be very convenient for my app to capture and report errors and
to provide a customized error message?

I also tried providing my own debug.traceback call to hadle this (and
to return nil from it), but wxlua still shows an empty dialog in this
case (and I'd prefer the dialog to be completely removed). Having
ability to assign EVT_LUA_ERROR handler would be the easiest/proper
way to handle this. Thank you.

Paul.

--
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] Debugging wxlua programs in Zerobrane studio

2013-05-14 Thread Paul K
Hi Milind,

 I just started using the studio and it is very good. Only thing is when I go 
 into debug it executes my program using lua. I like to execute it using 
 wxlua. How can I configure that?

You can change the executable that is used to run/debug the scripts.
The example is here
(https://github.com/pkulchenko/ZeroBraneStudio/blob/master/cfg/user-sample.lua#L44)
and instruction are here
(http://studio.zerobrane.com/doc-configuration.html)

 Also is the UI done in wxlua? If yes how do you implement the main text with 
 down with different colors, breakpoint mark and line numbers?

Yes, everything is done in wxlua. The editing component is Scintilla,
so all I need to do is to configure it to display proper margins,
markers, and set colors I want. This is mostly done in
src/editor/editor.lua (CreateEditor) and src/editor/style.lua (where
all the style information is processed).

Paul.


On Tue, May 14, 2013 at 12:42 PM, Milind Gupta milind.gu...@gmail.com wrote:
 Hi Paul,
   I just started using the studio and it is very good. Only thing is
 when I go into debug it executes my program using lua. I like to execute it
 using wxlua. How can I configure that?
   Also is the UI done in wxlua? If yes how do you implement the main
 text with down with different colors, breakpoint mark and line numbers?

 Thanks,
 Milind


 On Fri, May 3, 2013 at 9:41 AM, Paul K paulclin...@yahoo.com wrote:

 Hi All,

 Does anyone have a simple drag and drop example that works with wxlua?
 I've seen an example in this ticket

 (http://sourceforge.net/tracker/index.php?func=detailaid=3060958group_id=140042atid=745327),
 but can't get it to work. It seems like I'm missing SetDropTarget
 call, but I can't figure out what to pass it as a parameter. According
 to the docs
 (http://docs.wxwidgets.org/2.8/wx_wxwindow.html#wxwindowsetdroptarget)
 it expects wxDropTarget, but wx.wxDropTarget is an empty table for me,
 so I'm not sure how to instantiate it.

 I need to implement it for wxTreeCtrl and wxStyledTextCtrl, but any
 working example will help. Thank you.

 Paul.


 --
 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://p.sf.net/sfu/appdyn_d2d_ap2
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users



 --
 AlienVault Unified Security Management (USM) platform delivers complete
 security visibility with the essential security capabilities. Easily and
 efficiently configure, manage, and operate all of your security controls
 from a single console and one unified framework. Download a free trial.
 http://p.sf.net/sfu/alienvault_d2d
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
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-05-18 Thread Paul K
Hi Milind,

The only difference should be is that wxluafreeze includes wx library
statically compiled (so you don't need anything else) and in other
cases your executables expect wx.dll.

I'm not sure what graphics are different. Can you do two screenshots
and mark the differences on them? I don't use wxluafreeze, but I
wouldn't expect to see any differences.

Paul.

On Sat, May 18, 2013 at 2:11 AM, Milind Gupta milind.gu...@gmail.com wrote:
 Hi,
I have installed Lua for windows and when I run my program with
 Lua.exe (my program has require(wx)) the graphics are a little different
 compared to if I run it with an executable wlua also in the package. I see
 the same graphics as wlua if I run my program using wxluafreeze from the
 downloaded wxlua binary package.
Is there a difference of launching the program through Lua or through
 wLua? I am not sure what is different in wLua because it is just a 35KB
 executable and if I remove all wx.dll from the system then it is not able to
 execute the program while wxluafreeze still can execute the program without
 the wx.dll file.

 So what is the difference?

 Thanks,
 Milind


 --
 AlienVault Unified Security Management (USM) platform delivers complete
 security visibility with the essential security capabilities. Easily and
 efficiently configure, manage, and operate all of your security controls
 from a single console and one unified framework. Download a free trial.
 http://p.sf.net/sfu/alienvault_d2d
 ___
 wxlua-users mailing list
 wxlua-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wxlua-users


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


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

2013-06-03 Thread Paul K
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?

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

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?

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!

Paul.

--
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://p.sf.net/sfu/appdyn_d2d_ap2
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


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

2013-06-12 Thread Paul K
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).

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.

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.

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!

I also asked in wx-user maillist, but it may be more wxlua related
than wxwidgets related. I'll post an update if I get any additional
information.

Paul.

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 wx!ZN13ScintillaBase10AddCharUTFEPcjb+0x9f
0028f200 01f766a9 wx!ZN11ScintillaWX9DoAddCharEi+0x6f
...

--
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-17 Thread Paul K
Hi John,

 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.

I do (in general), but it's in a completely different part (for
debugging) and is not involved there; so, it's indeed puzzling.

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

No; this affects the applications that I debug, but not ZBS itself.
I'm careful not to even open new windows while in coroutines and all
events like this are delayed in the application until it's safe to do
(and is only done in the main thread).

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

No; and that's another puzzling part. I don't use wxProgressDialog at
all. Not sure why it would be deleted...

 Can you rebuild in debug mode? The stack should have line numbers which will 
 clear things up.

That's a good suggestion; I prepared a debug build, but haven't heard
back from the user yet. BTW, the dll is 186M in debug more ;).

 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?

I agree; everything looks normal up to that LuaPCall, but very
strange after that. I do have one AddPendingEvent call (and it's in
one of the branches for AddChar event, so it *can* be related), but
definitely not from wxProgressDialog destructor.

Thank you for confirming my suspicions. I'll see if I can get any
additional information from the debug build...

Paul.

--
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] Adding wxDIR_NO_FOLLOW and GetContentScaleFactor

2013-06-24 Thread Paul K
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?

 Sure, I can do that on Monday.

It would be great! I also noticed that we don't expose wxOverlay
(http://docs.wxwidgets.org/trunk/classwx_overlay.html). Can you add it
as well? It includes only a couple of methods and can be useful for
drawing on top of other controls, for example, over a minimap as
suggested here:
https://groups.google.com/d/msg/wx-dev/OMOTMN-D3F4/ETrm7M7qTpcJ.

Thank you!

Paul.

On Thu, Jun 20, 2013 at 9:34 PM, John Labenski jlaben...@gmail.com wrote:
 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


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


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

2013-07-19 Thread Paul K
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.

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.

Paul.

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


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

2013-07-19 Thread Paul K
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).

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.

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?

Paul.

--
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] Using wxlua with Lua 5.1 and Twoface ABI mapper

2013-07-20 Thread Paul K
Hi John,

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

Right; the code for setfenv is here:
https://github.com/corsix/twoface/blob/master/twoface.c#L492-L532

 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

yes, I'm familiar with this logic (in fact, one of the answers is
mine), but only on the Lua side. I'm not sure how it maps to C calls.

 Is there any way to detect when the twoface DLL is being used so that the 
 code can take the 5.2 path?

Possibly, but I can't answer that question.

 Or maybe compile wxLua for 5.2 and use woface to treat 5.1 as 5.2 instead of 
 the other way around.

No, this won't work as Twoface only works one way (mapping 5.1 calls
to 5.2 engine).

For now I patched my build process to remove those fragments and so
far have been running with twoface and Lua 5.2 without issues. I'm
still not sure what that fragment I removed does as my event callbacks
use various upvalues and seem to work correctly without that setfenv
check (and they were throwing the error before I removed the checks),
which makes me think that the check is not really needed.

I'll leave the decision up to you and let you know if I run into any
issues, but so far I only have two patches that make my wxlua
libraries deviate from yours: this change (not deployed yet) and the
live coding fix I applied
(http://comments.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user/3273).

Actually, there is one more interesting issue, related to the live
coding fix. I'll describe it briefly here, maybe you can add some
details to it.

The classes you create in wxlua conveniently allow additional
properties to be assigned to them. For example, I can do local editor
= wxstc.wxStyledTextCtrl(...) and then editor.foo = 'bar' and it
all works. However, if I then try to access editor.foo from *another*
coroutine, it doesn't see that property and I get wxLua: Unable to
call an unknown method ... error, even though the property is there.
I haven't been able to figure out where exactly it fails and for now I
just worked around these cases, but it would be great if this could be
fixed (if there is a fix for that).

Ideally, editor.foo should return nil and editor.foo() should return
an error, but the comment you have in the code seems to point out that
it may not be possible to distinguish between these two cases. I think
it's because in editor.foo(), it gets the value of editor.foo first
and then calls it as a function. I'll be fine if it returns `nil` and
then fails on the function call.

Paul.

On Sat, Jul 20, 2013 at 11:26 AM, John Labenski jlaben...@gmail.com wrote:

 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

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

2013-08-09 Thread Paul K
Hi Andreas,

 So somebody who knows the internals of wxLua  wxWidgets should
 probably be able to find the problem pretty quickly. For me it's complicated
 because I hardly know anything about C++. I have 15+ years of experience in
 plain C but C++ still makes me shiver :) That's why it's very hard for me to
 find out what's actually going on here.

I'm in a similar situation. I'm sure John L reads the maillist, but he
may not be able to respond right away.

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

I tend to agree, especially given that it still crashes for me in some
cases. You may want to re-compile using the latest trunk to see if it
makes it any better as I tend to work with the latest versions of
wxlua.

Paul.

--
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-18 Thread Paul K
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.

It seems like the required addition to the manifest is quite simple
(as per 
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx):

  dependency
dependentAssembly
  assemblyIdentity
type=win32
name=Microsoft.Windows.Common-Controls
version=6.0.0.0
  /
/dependentAssembly
  /dependency

I added it to my executable, but the controls are still shown as generic ones.

I also removed this part of the manifest from wxlua and it indeed
turned the native controls into generic ones. It seems like this
is what is missing from the lua.exe file, but I'm not sure (yet) why
it's not working in my case...

Paul.

On Sun, Aug 18, 2013 at 6:34 PM, Milind Gupta milind.gu...@gmail.com wrote:
 Thanks John for putting time on this. When I posted this question on
 wxWidgets (http://forums.wxwidgets.org/viewtopic.php?f=23t=37587) they also
 said about the manifest file. I didn't explore it further from there.
   But would not the manifest file not compiled with the wx.dll itself
 why would Lua need to be compiled with it?

 Thanks,
 Milind




 On Sat, Aug 17, 2013 at 9:07 PM, John Labenski jlaben...@gmail.com wrote:

 On Fri, Aug 16, 2013 at 3:16 PM, Milind Gupta milind.gu...@gmail.com
 wrote:


 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



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


--
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] How to accept drag and drop files on all platforms?

2013-08-23 Thread Paul K
 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...

Paul.

On Sat, Aug 3, 2013 at 9:11 PM, Paul K paulclin...@yahoo.com wrote:
 Hi All,

 I'm trying to make my application accept files that can be dragged on
 it. This is what I currently have:

   pcall(function() frame:DragAcceptFiles(true) end)
   frame:Connect(wx.wxEVT_DROP_FILES, function(evt)
   local files = evt:GetFiles()
   -- do something to open files
 end)

 This works on Windows, but doesn't work on OSX at all (this is why I
 have the call wrapped in pcall) and only copies filename on Linux
 (instead of opening the file).

 I read that DragAcceptFiles is deprecated and should be replaced with
 drop target processing
 (http://wxwidgets.10942.n7.nabble.com/Why-EVT-DROP-FILES-is-not-on-all-wx-ports-td7164.html).

 This is what I'm trying to do:

   local filedo = wx.wxFileDataObject()
   local droptarget = wx.wxDropTarget --(filedo) -- doesn't work, see below
   function droptarget:OnData(x, y, result) return result end
   function droptarget:OnDrop() return true end
   frame:SetDropTarget(droptarget)

 SetDropTarget requires wxDropTarget object passed to it, but
 wx.wxDropTarget is an empty table and doesn't have new method to
 construct an object. Also, theer is no wxFileDropTarget (only
 wxDropTarget), so I'm not sure how it's supposed to work. I found one
 relevant feature request
 (http://sourceforge.net/p/wxlua/feature-requests/3/) that was closed
 as fixed, but the Lua code that is in that ticket doesn't work for
 me.

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

 Paul.

--
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-23 Thread Paul K
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?

Paul.

On Mon, Aug 19, 2013 at 8:44 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I just added a resource and manifest file for wxLua's lua.exe, but it didn't 
 change how the calendar control looked.
 Is there anything that you did differently?

 I went the easy way: I extracted the manifest from wxlua and added it
 to lua.exe:

 C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe
 -inputresource:wxlua.exe -out:extracted.manifest
 C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe -manifest
 extracted.manifest -outputresource:lua.exe

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

 I don't know what you mean. What DLL is included with Windows that you ship?

 Not sure; when I tried the same manifest with my wx.dll compiled with
 mingw, I get side-by-side error:

 Activation context generation failed for ...zbstudio.exe. Dependent
 Assembly 
 Microsoft.Windows.Common-Controls,publicKeyToken=6595b64144ccf1df,type=win32,version=6.0.0.0
 could not be found.

 When I copy all the dlls from 2.8.12 and run with the same executable,
 everything is fine. I'm not sure what dll I'm missing, but I thought
 it was one of wxmsw28_*vc_custom.dll.

 Paul.

 On Mon, Aug 19, 2013 at 8:06 PM, John Labenski jlaben...@gmail.com wrote:
 On Mon, Aug 19, 2013 at 12:33 AM, Paul K paulclin...@yahoo.com wrote:

  It seems like the required addition to the manifest is quite simple
 (as per
 http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx):

 okay, I managed to get my application running with the right manifest
 (and I'm even using mingw instead of VS). What I mentioned earlier was
 correct, but I was missing a proper way to reference the manifest.

 It turned out that the way I included manifest was not correct as my
 .rc file had 1 RT_MANIFEST zbstudio.manifest and it should have been
 1 24 zbstudio.manifest. After I added the correct reference (and
 included dependentAssembly reference)  the manifest was recognized
 and I could run my application using wxlua 2.8.12 DLLs and could see
 the expected results.


 I just added a resource and manifest file for wxLua's lua.exe, but it didn't
 change how the calendar control looked.

 http://sourceforge.net/p/wxlua/svn/190/
 https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/msw/wx.manifest

 Is there anything that you did differently?



 Unfortunately, this doesn't really help me as I was hoping to
 reference a DLL that is included with Windows, rather than ship mine,
 but maybe this will help others...


 I don't know what you mean. What DLL is included with Windows that you ship?

 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


--
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 Paul K
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
appreciate if you could add the missing functions and provided a
simple example I can use as a starting point. Thank you!

Paul.

On Sun, Aug 25, 2013 at 9:06 PM, John Labenski jlaben...@gmail.com wrote:
 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


[wxlua-users] Can't call some wxKeyboardState methods on wxMouseEvent, but should

2013-09-08 Thread Paul K
Hi John,

I'm trying to call wx.wxMouseEvent():GetModifiers(), but get wxLua:
Unable to call an unknown method 'GetModifiers' on a 'wxMouseEvent'
type.

wxMouseEvent is inherited from wxKeyboardState (among other things),
so it should definitely work. In fact, I can call some methods (like
ControlDown() and CmdDown()) just fine, but none of the modifier
methods (GetModifiers(), HasModifiers(), HasAnyModifiers(), and so on)
work (http://docs.wxwidgets.org/trunk/classwx_keyboard_state.html).

I checked wxbind and indeed GetModifiers only shows up for wxKeyEvent
and nothing else. Can you please add it to wxMouseEvent as well? Thank
you.

Paul.

--
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] Can't call some wxKeyboardState methods on wxMouseEvent, but should

2013-09-11 Thread Paul K
Hi John,

 That function (and class hierarchy) only exists in wxWidgets 2.9 onwards. 
 It's just an alternative to the current ControlDown(), AltDown(), ShiftDown() 
 functions. Will those work for you in the near term?

Yes, but instead of checking event:GetModifiers() ==
wx.wxMOD_CONTROL I need to do event:ControlDown() and not
event:AltDown() and not event:ShiftDown() and not event:MetaDown() or
something along those lines.

Paul.

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


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

2013-09-11 Thread Paul K
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
../wxLua/modules/wxlua/lbitlib.c:348: error: too many arguments to
function ‘lua_pushunsigned’
make[2]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxlua/lbitlib.c.o]
Error 1
make[2]: *** Waiting for unfinished jobs
make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
make: *** [all] Error 2
Error: failed to build wxLua

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.

Paul.

--
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-11 Thread Paul K
Hi John,

 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.

yes, replacing BUILD_INSTALL_PREFIX with CMAKE_INSTALL_PREFIX worked. Thank you.

Paul.

--
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] Adding QueueEvent to wxEvtHandler

2013-09-19 Thread Paul K
Hi John,

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

Thank you; I still get occasional crash on win7 64bit that I attribute
to AddPendingEvent and QueueEvent may eliminate it.

Paul.

--
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] wxWindows 3.0.0, wxLua 2.8.12.3 and OS X?

2013-11-16 Thread Paul K
Hi Kent,

I just compiled my wxlua based application with wxwidgets 3.0 couple
of days ago and haven't seen any issues/crashes yet. I'll try to run
the samples tomorrow (don't have access to my MacBook right now) to
check if there are any issues with them.

 - Is this setup supposed to work at all, i.e. wxLua with wxWindows 3?

I'd say so. I've been using wxwidgets 2.9.5 for several months and
have compiled/run wxwidgets 3.0 (including different pre-release
versions) without issues.

 How do I run the samples on OS X? I don't have a wxLua exe, but a
  wxLua.app. I tried open -a wxLua bindings.wx.lua when this
  still did not crash, but the sample program argument seemed to be
   ignored.

You should be able to pass parameters after --args, so it should probably be:

open -a wxLua --args bindings.wx.lua

You should also be able to use a normal lua interpreter and
libwx.dylib (or whatever the default name for wxlua library is).

Paul

ZeroBrane Studio - slick Lua IDE/editor/debugger for Windows, OSX, and
Linux - http://studio.zerobrane.com/

On Sat, Nov 16, 2013 at 5:11 PM, Kent Boortz kent.boo...@oracle.com wrote:

 Hi,

 I tried compile from source and run wxWindows 3.0.0, wxLua 2.8.12.3 on
 OS X 10.8.5 (XCode 5.0.2). The actual compile went fine

   cd wxWidgets-3.0.0
   ./configure --prefix=/usr/local
   make
   sudo make install
   cd ../wxLua-2.8.12.3-src
   mkdir obj ; cd obj
   cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
   make
   sudo make install

 I'm a bit puzzled how to run the samples, but for some minutes doing
 open -a wxLua kind of did work. It did display some sort of
 editor/debugger or something (I could not figure out how to run the
 samples from it). But then running wxLua stopped working and crash
 each time I try run it. Crash report for the crashing thread included
 below.

 My questions are

  - Is this setup supposed to work at all, i.e. wxLua with wxWindows 3?

  - If supposed to work, did I configure it wrong?

  - If not supposed to work, any hope of a wxLua that works with
wxWindwows 3 any time soon?

  - How do I run the samples on OS X? I don't have a wxLua exe, but a
wxLua.app. I tried open -a wxLua bindings.wx.lua when this
still did not crash, but the sample program argument seemed to be
ignored.

 kent


 Process: wxLua [64176]
 Path:/Users/USER/*/wxLua.app/Contents/MacOS/wxLua
 Identifier:  ???
 Version: 2.8.12.3 (2.8.12.3)
 Code Type:   X86-64 (Native)
 Parent Process:  launchd [212]
 User ID: 501

 Date/Time:   2013-11-17 02:00:18.564 +0100
 OS Version:  Mac OS X 10.8.5 (12F45)
 Report Version:  10

 Interval Since Last Report:  1434861 sec
 Crashes Since Last Report:   13
 Per-App Interval Since Last Report:  181 sec
 Per-App Crashes Since Last Report:   10
 Anonymous UUID:  344778B4-77CB-BE9D-2088-1E8765A77BDC

 Crashed Thread:  0  Dispatch queue: com.apple.main-thread

 Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
 Exception Codes: KERN_INVALID_ADDRESS at 0xfff8

 VM Regions Near 0xfff8:
 -- shared memory  7ff3b000-7ff3c000 [4K] r-x/r-x 
 SM=SHM

 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
 0   libwx_baseu-3.0.dylib  0x00010da5332f (anonymous 
 namespace)::wxFileSystemObjectExists(wxString const, int) + 367
 1   libwx_baseu-3.0.dylib  0x00010da53139 
 wxFileName::FileExists() const + 57
 2   libwx_baseu-3.0.dylib  0x00010da23f36 wxFileConfig::Init() + 
 1718
 3   libwx_baseu-3.0.dylib  0x00010da2a658 
 wxFileConfig::wxFileConfig(wxString const, wxString const, wxString const, 
 wxString const, long, wxMBConv const) + 1128
 4   libwxlua_bind-wxosx_cocoaud-2.8.12.3.dylib0x00010c08ea03 
 wxLua_wxFileConfig_constructor(lua_State*) + 499 (wxbase_config.cpp:877)
 5   libwxlua-wxosx_cocoaud-2.8.12.3.dylib 0x00010c8f0479 
 wxlua_callOverloadedFunction(lua_State*) + 233 (wxlbind.cpp:434)
 6   libwxlua-wxosx_cocoaud-2.8.12.3.dylib 0x00010c8f1323 
 wxlua_wxLuaBindMethod_table__call(lua_State*) + 35 (wxlbind.cpp:350)
 7   libwxlua_lua51-wxosx_cocoaud-2.8.12.3.dylib   0x00010c9b7ece 
 luaD_precall + 1006 (ldo.c:320)
 8   libwxlua_lua51-wxosx_cocoaud-2.8.12.3.dylib   0x00010c9cad3d 
 luaV_execute + 7613 (lvm.c:591)
 9   libwxlua_lua51-wxosx_cocoaud-2.8.12.3.dylib   0x00010c9b8712 
 luaD_call + 178 (ldo.c:379)
 10  libwxlua_lua51-wxosx_cocoaud-2.8.12.3.dylib   0x00010c9b1a5f 
 f_call + 47 (lapi.c:801)
 11  libwxlua_lua51-wxosx_cocoaud-2.8.12.3.dylib   0x00010c9b7569 
 luaD_rawrunprotected + 105 (ldo.c:119)
 12  libwxlua_lua51-wxosx_cocoaud-2.8.12.3.dylib   0x00010c9b8b7a 
 luaD_pcall + 122 (ldo.c:464)
 13  libwxlua_lua51-wxosx_cocoaud-2.8.12.3.dylib   0x00010c9b19de 
 lua_pcall + 174 (lapi.c:821)
 14  libwxlua-wxosx_cocoaud-2.8.12.3.dylib 

Re: [wxlua-users] Debugger done in wx.lua

2013-11-24 Thread Paul K
Hi Lucas,

 I wonder if there is any debugger done in wx.lua that have function Step In
 Step out.Tenho wxLua on a project at my college (UFOP) in Brazil and need such
 a function to be used in my code.

Yes, there is an example in samples/editor.wx.lua, which implements
step-in and step-out commands.

I have also developed an IDE roughly based on that example, which
implemented that functionality using MobDebug (instead of the debugger
components that come with wxlua); more details here:
http://www.freelists.org/post/zerobrane/Step-In-Step-Out-in-LUA,1

Paul.

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


[wxlua-users] Adding CallAfter and wxSTC:GetLibraryVersionInfo

2013-12-13 Thread Paul K
Hi John,

Would it be possible to add CallAfter
(http://wxwidgets.blogspot.com/2013/01/about-benefits-of-procrastination.html)
and wxSTC:GetLibraryVersionInfo calls? Thank you.

Paul.

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


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

2013-12-24 Thread Paul K
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 be used somehow or do they need to be added to the bindings?

Paul.

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


[wxlua-users] Adding wxRegKey

2013-12-24 Thread Paul K
Hi John,

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

Paul.

--
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 Paul K
Hi John,

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

Sounds good; thank you. I'll be rebuilding all the binaries with
wxwidgets 3.0 and it will be a good time to get all the new
functionality. Happy holidays!

Paul.

On Wed, Dec 25, 2013 at 5:36 PM, John Labenski jlaben...@gmail.com wrote:
 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


[wxlua-users] Build issues using mingw on Windows with trunk

2014-01-03 Thread Paul K
Hi John,

I'm trying to compile wxlua using the trunk version and ran into a
strange issue that I've never seen before. I went back to r170, but it
shows the same issue. Here is the error:

d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:39:77:
error: declaration of C function 'BOOL DllMain(HANDLE, DWORD, LPVOID)'
conflicts with
 BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID );
 ^
In file included from d:\mingw\include\windows.h:62:0,
 from
d:/Lua/ZBS-build/build/deps/include/wx-3.1/wx/msw/wrapwin.h:65,
 from
d:/Lua/ZBS-build/build/deps/include/wx-3.1/wx/msw/init.h:19,
 from d:/Lua/ZBS-build/build/deps/include/wx-3.1/wx/init.h:58,
 from d:/Lua/ZBS-build/build/deps/include/wx-3.1/wx/app.h:23,
 from
d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:21:
d:\mingw\include\winbase.h:1051:13: error: previous declaration 'BOOL
DllMain(HINSTANCE, DWORD, LPVOID)' here
 BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID);
 ^
make[2]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/luamodule.cpp.obj]
Error 1
make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
make: *** [all] Error 2

Is it my local setup or is it something that needs to be fixed in
wxlua? I'm compiling this with wxwidgets 3.1 using mingw 4.8.1.

Paul.

--
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] Build issues using mingw on Windows with trunk

2014-01-05 Thread Paul K
Hi John,

 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:39:77:
 error: declaration of C function 'BOOL DllMain(HANDLE, DWORD, LPVOID)'
 conflicts with
  BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID 
 );

Just a quick update on this. I tried compiling using mingw-tdm using
the same version of gcc (4.8.1) and don't have this issue. Seems to be
mingw-related although I'm not absolutely sure.

Paul

--
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] Deprecated: GetBeginPos(), GetEndPos1(), and GetEndPos2()

2014-01-07 Thread Paul K
Hi John,

I managed to compile wxlua by explicitly adding --enable-compat28 to
wxwidgets configuration, but would be nice to update for 3.0.

Paul.

On Mon, Jan 6, 2014 at 11:00 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I made a copying error: it's GetBeginPos(), GetEndPos1(), and
 GetEndPos2() methods that have been deprecated in the favor of
 GetBeginIter(), GetEndIter1() and GetEndIter2().

 Paul.

 On Sun, Jan 5, 2014 at 7: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

 Could you please update these methods as wxwidgets 3.x dropped 2.6
 compatibility, so wxlua doesn't compile because of these errors:

 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/wxbind/src/wxhtml_bind.cpp:
 In function 'int wxLua_wxHtmlTag_GetBeginPos(lua_State*)':
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/wxbind/src/wxhtml_bind.cpp:1470:26:
 error: 'class wxHtmlTag' has no member named 'GetBeginPos'
  int returns = (self-GetBeginPos());
   ^
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/wxbind/src/wxhtml_bind.cpp:
 In function 'int wxLua_wxHtmlTag_GetEndPos1(lua_State*)':
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/wxbind/src/wxhtml_bind.cpp:1486:26:
 error: 'class wxHtmlTag' has no member named 'GetEndPos1'
  int returns = (self-GetEndPos1());
   ^
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/wxbind/src/wxhtml_bind.cpp:
 In function 'int wxLua_wxHtmlTag_GetEndPos2(lua_State*)':
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/wxbind/src/wxhtml_bind.cpp:1502:26:
 error: 'class wxHtmlTag' has no member named 'GetEndPos2'
  int returns = (self-GetEndPos2());
   ^
 make[2]: *** 
 [modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxbind/src/wxhtml_bind.cpp.obj]
 Error 1
 make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
 make: *** [all] Error 2

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

 #include wx/wxprec.h

 #ifndef WX_PRECOMP
 #include wx/wx.h
 #endif

 These are the errors I was getting:

 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp: In
 member function 'virtual bool wxLuaModuleApp::OnInit()':
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:129:90:
 error: 'wxPrintf' was not declared in this scope
  wxPrintf(wxT(wxLuaModule - Error loading comctl32.dll,
 trying to continue...\n));

^
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp: In
 member function 'void wxLuaModuleApp::OnLuaPrint(wxLuaEvent)':
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:157:52:
 error: 'wxPrintf' was not declared in this scope
  wxPrintf(wxT(%s\n), event.GetString().c_str()); fflush(stdout);
 ^
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp: In
 member function 'void wxLuaModuleApp::OnLuaError(wxLuaEvent)':
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:165:74:
 error: 'wxPrintf' was not declared in this scope
  wxPrintf(wxT(wxLua Runtime Error:\n%s\n),
 event.GetString().c_str()); fflush(stdout);
   ^
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp: In
 function 'int luaopen_wx(lua_State*)':
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:197:116:
 error: 'wxPrintf' was not declared in this scope
  wxPrintf(wxT(wxLuaModule - Error getting HINSTANCE,
 DllMain() wasn't called! trying to continue...\n));

  ^
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:204:94:
 error: 'wxPrintf' was not declared in this scope
  wxPrintf(wxT(wxLuaModule - Error calling
 wxEntryStart(argc, argv), aborting.\n));

^
 d:/Lua/ZBS-build/build/wxlua/wxLua/modules/luamodule/luamodule.cpp:210:92:
 error: 'wxPrintf' was not declared in this scope
  wxPrintf(wxT(wxLuaModule - Error calling
 wxTheApp-CallOnInit(), aborting.\n));

  ^
 make[2]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/luamodule.cpp.obj]
 Error 1
 make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
 make: *** [all] Error 2

 Paul.

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't

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

2014-01-22 Thread Paul K
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?

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.

Paul.

On Tue, Dec 24, 2013 at 9:38 AM, 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 be used somehow or do they need to be added to the bindings?

 Paul.

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/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 Paul K
 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.

Great; thank you.

 Note that wxLua builds ok with compat 28 defined in wx30.

Right; this is exactly how I compiled it and it's working fine for me.

Paul.

--
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 Paul K
Hi John,

 I'm looking for a way to provide MacNewFile, MacOpenFiles, and
 MacReopenApp methods
 They need to be added, it should be doable.

This would be great; thank you!

 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.

Please don't worry about these then.

Paul

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


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

2014-02-07 Thread Paul K
Hi John,

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

[ 17%] Building CXX object
modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxbind/src/wxcore_geometry.cpp.o
/home/paul/zbs/build/wxlua/wxLua/modules/wxbind/src/wxcore_defsutils.cpp:
In function 'int wxLua_wxMouseState_LeftDown(lua_State*)':
/home/paul/zbs/build/wxlua/wxLua/modules/wxbind/src/wxcore_defsutils.cpp:455:27:
error: 'class wxMouseState' has no member named 'LeftDown'
 bool returns = (self-LeftDown());
   ^
/home/paul/zbs/build/wxlua/wxLua/modules/wxbind/src/wxcore_defsutils.cpp:
In function 'int wxLua_wxMouseState_MiddleDown(lua_State*)':
/home/paul/zbs/build/wxlua/wxLua/modules/wxbind/src/wxcore_defsutils.cpp:487:27:
error: 'class wxMouseState' has no member named 'MiddleDown'
 bool returns = (self-MiddleDown());
   ^
/home/paul/zbs/build/wxlua/wxLua/modules/wxbind/src/wxcore_defsutils.cpp:
In function 'int wxLua_wxMouseState_RightDown(lua_State*)':
/home/paul/zbs/build/wxlua/wxLua/modules/wxbind/src/wxcore_defsutils.cpp:503:27:
error: 'class wxMouseState' has no member named 'RightDown'
 bool returns = (self-RightDown());
   ^

This is using the latest trunk of wxlua and wxwidgets (compiling on Linux).

The compilation proceeded successfully when I added --enable-compat28.

Paul.

--
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] Compilation errors without compat28 setting with the trunk version

2014-02-07 Thread Paul K
Hi John,

 Yes, there are far more differences than I realized, you'll have to use 
 --enable-compat28 for the near future.

That's okay; I already added it to some of my build scripts, just
wanted to let you know.

 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 have seen this in my application as well, even with 2.9.5. I'd like
to get to the bottom of it, but so far I've been using os.exit() at
the end of my main script. For some reason, each of the platforms is
guilty in some way:

-- (1) to fix a crash on OSX when closing with debugging in progress.
-- (2) to fix a crash on Linux 32/64bit during GC cleanup in wxlua
-- after an external process has been started from the IDE.
-- (3) to fix exit on Windows when started as bin\lua src\main.lua.

I just tested the last one using 2.9.5; if I don't have os.exit() at
the end, the script just hangs. Not sure why... In cases 1 and 2, I do
call :Detach() on the started process, but it still crashes after
MainLoop is done without os.exit().

Paul.

On Fri, Feb 7, 2014 at 8:44 PM, John Labenski jlaben...@gmail.com wrote:
 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


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


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

2014-02-18 Thread Paul K
Hi John,

I'm looking for a way to handle (possibly) invalid UTF-8 characters
and seem to be missing wxString::From8BitData() and
wxString::To8BitData() methods (according to this page:
http://docs.wxwidgets.org/trunk/overview_unicode.html#overview_unicode_supportout).

What I am trying to do is to load a file into wxSTC (Scintilla
component). I know that Scintilla can deal with invalid UTF-8
characters as SciTE displays them as nice inverted rounded boxes with
hex codes inside, but I can't get the same effect with wxSTC. If I try
to load UTF-8 file with characters in, for example, 1252 encoding, the
content fails to load into wxSTC (it shows as empty).

You can see this effect by running editor.wx.lua example. Just try to
load a file that has \232 or \226 character and the content is going
to be empty.

What's interesting is that the content is loaded from a file just
fine, so it seems like at least that part is handled correctly, but
the text is not loaded into wxSTC until I find and fix invalid UTF-8
characters (I use SetText method, but I've tried others with the same
result). I thought that using From8BitData() may help me to pass all
those characters intact to Scintilla, which will be able to display
them, but I can't test as From8BitData() is not exposed in wxlua.

I'm open to other ideas to make it work...

Paul.

--
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-18 Thread Paul K
Hi John,

 I'm no expert in UTF8, but isn't it possible that a malformed UTF8 sequence 
 makes the rest of the file unusable in the sense that you can't really be 
 sure how many bytes the 'bad' sequence is so you could be off by a few bytes 
 for the rest of the file?

Not really, as you can simply skip all invalied 8-bit characters
(which is what I do to fix invalid sequences). Scintilla does better
as it can display them as well.

 From8BitData() is now in SVN trunk. I'm not sure that it will help as it uses 
 the wxConvISO8859_1 converter, but it is different than the normal wxConvUTF8 
 converted used normally.

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

I'll compile and give it a test some time tomorrow... Thank you!

Paul.

--
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] wxPropertyGrid+wxWebView bindings

2014-02-20 Thread Paul K
I didn't realize we don't have wxWebView binding. I'm very much
interested in that as well.

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.

Paul.

On Thu, Feb 20, 2014 at 6:26 AM, Joshua Jensen
jjen...@workspacewhiz.com wrote:
 Hi.

 I am in need of bindings to wxPropertyGrid and wxWebView.

 Before looking into what it takes to make a proper wxLua binding, is
 anybody currently working on these?

 Thanks.

 Josh

--
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-21 Thread Paul K
Hi John,

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

Thank you for the prompt change! Unfortunately, it didn't have the
desired effect for me; maybe I misread wxwidgets documentation.

Let's say I have three invalid UTF-8 characters: string.char(0x80,
0x81, 0x82). If I assigned them to a variable u, it has proper length
(#u == 3). If I try to add them to wxSTC, nothing happens (the length
of the content doesn't change).

If I use From8BitData(), then I get 6 bytes instead of 3:
#wx.wxString.From8BitData(string.char(0x80, 0x81, 0x82)) == 6, but
this looks like fixed UTF-8 code. When I add the result to wxSTC, I
do get 6 bytes of content there, but that's not what I expected: I
expected three characters displayed with 0x80, 0x81, and 0x82 as their
codes.

What am I doing wrong?

Paul.

On Wed, Feb 19, 2014 at 9:53 PM, John Labenski jlaben...@gmail.com wrote:
 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] How to provide wxApp::MacNewFile, wxApp::MacOpenFiles, and wxApp:MacReopenApp methods?

2014-03-16 Thread Paul K
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.

 They need to be added, it should be doable.

Do you have plans to include these methods? I'm building the current
version of wxwidgets and would like to include these Mac* methods and
WebView support if available. Thank you!

Paul

--
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] Fwd: How to create wxTreeEvent

2014-04-01 Thread Paul K
Hi John,

 I'm wondering why you want to create a wxTreeEvent?

It was to trigger wxEVT_COMMAND_TREE_ITEM_ACTIVATED event manually:
wx.wxTreeEvent(wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED, item_id).

 Try using item_id:GetValue().
 Added in SVN.

Thank you!

Paul.

--
___
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-04-02 Thread Paul K
Hi John,

 I honestly don't know. Did you try to call wxSTC::AddTextRaw(const char*)? 
 This function does not do any UTF8 conversions before passing the string to 
 Scintilla.

It worked! I wasn't aware of *TextRaw methods and they do exactly
what's needed in this case. The only issue is that you don't provide
GetTextRaw, so I can show the file, but can't save proper results (as
they get mangled into a fixed UTF-8 when I use GetText()).

I only see AddTextRaw and InsertTextRaw in wxlua; there seems to be
GetTextRaw, SetTextRaw, AppendTextRaw, and GetSelectedTextRaw missing
from wxlua. Would it be possible to add them? Thank you!

Paul.

--
___
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-04-08 Thread Paul K
Hi John,

 I only see AddTextRaw and InsertTextRaw in wxlua; there seems to be
GetTextRaw, SetTextRaw, AppendTextRaw, and GetSelectedTextRaw missing
from wxlua. Would it be possible to add them? Thank you!

 I remmed them out, but I don't remember why. I added them back in SVN.

Looks good. Thank you for adding them back.

Paul.

--
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test  Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


[wxlua-users] wxAuiTabArt is missing SetColour and SetActiveColour

2014-04-08 Thread Paul K
Hi John,

I just noticed that wxAuiTabArt class is missing SetColour and
SetActiveColour methods for some reason. All the others (according to
the documentation at
http://docs.wxwidgets.org/trunk/classwx_aui_tab_art.html) appear to be
present.

Would it be possible to add these as well as it should allow to change
the color of tabs and the tab background for the notebook? Thank you!

Paul.

--
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test  Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxAuiTabArt is missing SetColour and SetActiveColour

2014-04-12 Thread Paul K
Hi John,

A follow-up question on wxAuiTabArt. The class provides ShowDropDown
method that displays the list of opened tabs, but I'd like to replace
it with something else.

Is there a way to overwrite ShowDropDown method with my own? Thank you.

Paul.

On Tue, Apr 8, 2014 at 4:41 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I just noticed that wxAuiTabArt class is missing SetColour and
 SetActiveColour methods for some reason. All the others (according to
 the documentation at
 http://docs.wxwidgets.org/trunk/classwx_aui_tab_art.html) appear to be
 present.

 Would it be possible to add these as well as it should allow to change
 the color of tabs and the tab background for the notebook? Thank you!

 Paul.

--
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test  Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] wxAuiTabArt is missing SetColour and SetActiveColour

2014-05-02 Thread Paul K
Hi John,

I think implementing ShowDropDown may be problematic and I may have an
alternative, although it requires access to wxAuiTabCtrl through
public methods in wxwidgets
(https://groups.google.com/d/msg/wx-users/KZVldo51mtk/Cz5E5RP7uPAJ).

I'd still like to have SetColour and SetActiveColour methods for
wxAuiTabArt class. Thank you!

Paul.

On Sat, Apr 12, 2014 at 9:12 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 A follow-up question on wxAuiTabArt. The class provides ShowDropDown
 method that displays the list of opened tabs, but I'd like to replace
 it with something else.

 Is there a way to overwrite ShowDropDown method with my own? Thank you.

 Paul.

 On Tue, Apr 8, 2014 at 4:41 PM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I just noticed that wxAuiTabArt class is missing SetColour and
 SetActiveColour methods for some reason. All the others (according to
 the documentation at
 http://docs.wxwidgets.org/trunk/classwx_aui_tab_art.html) appear to be
 present.

 Would it be possible to add these as well as it should allow to change
 the color of tabs and the tab background for the notebook? Thank you!

 Paul.

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
___
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Re: [wxlua-users] Latest wxwidgets doesn't compile with wxlua because of undefined wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING

2014-05-05 Thread Paul K
Hi John,

 The latest wxwidgets (3.1) includes updated Scintilla component
 (3.3.9), which appears to no longer have
 wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING.

This is still happening. It would be good to fix this in wxlua as it
doesn't compile with the latest wxwidgets code. Thank you.

Paul.

On Sat, Apr 12, 2014 at 10:26 AM, Paul K paulclin...@yahoo.com wrote:
 Hi John,

 I tried to compile the latest wxlua with the latest wxwidgets and ran
 into a compilation error:

 ...wxlua/wxLua/modules/wxbind/src/wxstc_bind.cpp: In function
 'wxLuaBindNumber* wxLuaGetDefineList_wxstc(size_t)':
 ...wxlua/wxLua/modules/wxbind/src/wxstc_bind.cpp:13493:50: error:
 'wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING' was not declared in this scope
  { wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING,
 wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING },
   ^
 make[2]: *** 
 [modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxbind/src/wxstc_bind.cpp.obj]
 Error 1
 make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
 make: *** [all] Error 2

 The latest wxwidgets (3.1) includes updated Scintilla component
 (3.3.9), which appears to no longer have
 wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING.

 Could you please remove the reference from the binding? I was able to
 compile successfully after commenting it out. Thank you.

 Paul.

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
#149; 3 signs your SCM is hindering your productivity
#149; Requirements for releasing software faster
#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
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 Paul K
John,

 Fixed now in svn, at least for my version of gcc, Fedora 20, gcc 4.8.2.

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

Paul.

On Mon, Jun 23, 2014 at 7:04 PM, John Labenski jlaben...@gmail.com wrote:
 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


[wxlua-users] wxDir is missing Close method

2014-07-04 Thread Paul K
Hi John,

I just noticed that wxDir is missing Close method for some reason.
This creates a problem with those situations when the directory
content needs to be enumerated with FindFirst and FindNext and aborted
without finishing (as the object seems to keep some of the files in
locked state internally).

Would it be possible to add the missing method? Thank you.

Paul.

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


  1   2   >