SourceForge logo
SourceForge logo
Menu

wxlua-users — wxLua list for users and developers

You can subscribe to this list here.

2005 Jan
Feb
Mar
Apr
May
Jun
(60)
Jul
(35)
Aug
(32)
Sep
(5)
Oct
(5)
Nov
(58)
Dec
(34)
2006 Jan
(114)
Feb
(184)
Mar
(153)
Apr
(90)
May
(153)
Jun
(59)
Jul
(24)
Aug
(43)
Sep
(17)
Oct
(34)
Nov
(11)
Dec
(204)
2007 Jan
(84)
Feb
(119)
Mar
(38)
Apr
(28)
May
(52)
Jun
(105)
Jul
(64)
Aug
(67)
Sep
(14)
Oct
(3)
Nov
(28)
Dec
(55)
2008 Jan
(228)
Feb
(55)
Mar
(30)
Apr
(30)
May
(15)
Jun
(20)
Jul
(12)
Aug
(3)
Sep
(13)
Oct
(54)
Nov
(35)
Dec
(35)
2009 Jan
(19)
Feb
(20)
Mar
(34)
Apr
(4)
May
(60)
Jun
(25)
Jul
(16)
Aug
(51)
Sep
(19)
Oct
(62)
Nov
(21)
Dec
(12)
2010 Jan
(1)
Feb
Mar
(4)
Apr
(12)
May
(23)
Jun
(13)
Jul
(1)
Aug
(40)
Sep
(18)
Oct
(21)
Nov
(26)
Dec
(34)
2011 Jan
(17)
Feb
(23)
Mar
(1)
Apr
(10)
May
(1)
Jun
(5)
Jul
(1)
Aug
Sep
Oct
(2)
Nov
Dec
(43)
2012 Jan
(5)
Feb
(19)
Mar
(6)
Apr
(24)
May
(39)
Jun
(83)
Jul
(29)
Aug
(36)
Sep
(64)
Oct
(55)
Nov
(12)
Dec
(7)
2013 Jan
(17)
Feb
(10)
Mar
(37)
Apr
(27)
May
(13)
Jun
(9)
Jul
(7)
Aug
(61)
Sep
(23)
Oct
(23)
Nov
(30)
Dec
(16)
2014 Jan
(23)
Feb
(13)
Mar
(9)
Apr
(17)
May
(2)
Jun
(11)
Jul
(2)
Aug
Sep
(9)
Oct
(24)
Nov
(2)
Dec
(14)
2015 Jan
(6)
Feb
(4)
Mar
(17)
Apr
May
(7)
Jun
(3)
Jul
Aug
Sep
(2)
Oct
(21)
Nov
(6)
Dec
(2)
2016 Jan
(4)
Feb
(2)
Mar
(7)
Apr
(3)
May
(11)
Jun
(6)
Jul
Aug
(1)
Sep
Oct
Nov
Dec
2017 Jan
Feb
Mar
Apr
(1)
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2018 Jan
(2)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2019 Jan
Feb
Mar
(6)
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
(1)
Oct
Nov
Dec
2022 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(2)
Nov
(4)
Dec
2023 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(8)
Nov
Dec
2024 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S






1
(1)
2
3
(1)
4
(2)
5
(4)
6
7
(4)
8
(1)
9
10
11
12
13
14
(1)
15
(1)
16
17
18
(1)
19
(1)
20
(2)
21
22
23
(1)
24
(1)
25
26
27
(2)
28
29
30
31





Showing 21 results of 21

From: John L. <jla...@gm...> - 2010年05月27日 21:56:19
2010年5月24日 Glebs <gle...@ma...>:
> Hello, I'm new to wxLua and have spent last days compiling it "just
> right". So, I'm posting this report in hope it will help anyone who
> has problems similar to mine.
Sounds great. I've yet to play with Lua scripting in SciTE, but it
sounds interesting. Thanks for posting the HOWTO as well.
> Restart SciTE and open some *.lua from 'C:\wxLua\samples'
> Hit F5 to start file execution
> note: editor.wx.lua wont run if you disable wxSTC. Also i had problems with 'controls.wx.lua' (some controls and events wont work)
controls.wx.lua is a little nuts in that we bind to every control and
every event for each control. If you do find which control is or event
is causing the problem we can work on it.
> --------------------------------------------------------
> Conclusion.
>
> To allow SciTE run several Lua scripts at once look here:
> http://lua-users.org/wiki/SciteExtMan
>
> It would be nice to also have wxSTC interface to SciTE's Scintilla
> component, but it's highly unlikely for SciTE author to switch into
> using wxWidgets and would require otherwise creating bindings from
> Lua to Scintilla directly, while emulating wxWidgets framework,
> which is way beyond my capabilities.
Have you looked into how much code is involved in the SciTE Lua
module? Could a thin wrapper be written around it so that it would
call wxLua's wxSTC functions instead of the original SciTE functions?
In that case you could use all the SciTE Lua functions, but with a
wxLua wxSTC editor. Just a thought.
Regards,
 John
From: John L. <jla...@gm...> - 2010年05月27日 21:42:39
I think the problem is with
treeCtrl:SetImageList(wx.wxImageList(16, 16))
you need to have something like this
-- DO NOT DELETE this until the treeCtrl is deleted
-- i.e. make it a global var and let wxLua delete it when the program ends
imgList = wx.wxImageList(16, 16)
treeCtrl:SetImageList(imgList)
The issue is that the wxTreeCtrl does not take ownership or copy the
pointer to the wxImageList
so all wxLua can do is pass in it's copy and so you must keep it
around at least as long
as the wxTreeCtrl exists or you call wxTreeCtrl::SetImageList(wx.NULL).
http://docs.wxwidgets.org/stable/wx_wxtreectrl.html#wxtreectrlsetimagelist
Hope this works,
 John
On Sun, May 23, 2010 at 2:13 AM, Henk Boom <he...@he...> wrote:
> Hi, I'm just getting started using wxLua, and have hit a couple of problems.
>
> I tried writing a small file-tree view with Icons in wxLua but had a
> few issues. I've included the code at the end of this email.
>
> If I run it as-is (with 'lua fileview.lua') I get a segmentation fault
> after a few icons have loaded. If I disable garbage collection (with
> collectgarbage('stop')) then the segfault goes away, but I get error
> messages saying that the icons couldn't be loaded (the filenames seem
> to be strings such as "gnome-compressed" and not actual filenames). If
> I hardcode a path to an icon, then it loads properly, though all the
> files obviously have that one icon. Either way, if I turn garbage
> collection back on I get a segmentation fault.
>
> I'm using the GTK port of wxWidgets, compiled from the 2.8.11 source
> tarball with --enable-debug. My version of wxLua was also compiled
> from the source tarball. I'm using a 64-bit installation of Ubuntu
> 10.4, and running in the Gnome desktop environment.
>
> Also, in case it's important, the wxIcon(wxIconLocation) constructor
> seems not to be bound, so I'm using wxIcon(iconLoc:GetFileName(),
> wx.wxBITMAP_TYPE_ANY) instead.
>
> Is there a bug, or am I doing something very wrong? :x
>
>  henk
>
>
> PS. This is the code I'm trying to run. I added a
> collectgarbage('collect') call in a place which seems to cause it to
> consistently crash every time.
> ---
>
> require 'wx'
> require 'lfs'
>
> --collectgarbage('stop')
>
> frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, 'wxLua Minimal Demo',
>          wx.wxDefaultPosition, wx.wxSize(450, 450),
>          wx.wxDEFAULT_FRAME_STYLE)
>
> ---- file tree ----------------------------------------------------------------
>
> treeCtrl = wx.wxTreeCtrl(frame, wx.wxID_ANY)
> treeCtrl:SetImageList(wx.wxImageList(16, 16))
> root = treeCtrl:AddRoot('files')
>
> do
> local icons = {}
> local function getIcon(filename)
>  local ext = string.match(filename, '.+%.([^.]*)$')
>
>  if ext and not icons[ext] then
>   local ft = wx.wxTheMimeTypesManager:GetFileTypeFromExtension(ext)
>   if ft then
>    local iconLoc = wx.wxIconLocation()
>    if ft:GetIcon(iconLoc) then
>     print('found for ' .. ext .. ': "' .. iconLoc:GetFileName() .. '"')
>     local icon = wx.wxIcon(iconLoc:GetFileName(), wx.wxBITMAP_TYPE_ANY)
>     --local icon =
> wx.wxIcon("/usr/share/icons/gnome/16x16/mimetypes/unknown.png",
> wx.wxBITMAP_TYPE_ANY)
>     collectgarbage('collect')
>     if icon:Ok() then
>      icons[ext] = treeCtrl:GetImageList():Add(icon)
>     end
>     print('there are now ' ..
> treeCtrl:GetImageList():GetImageCount() .. ' icons')
>    end
>   end
>  end
>  return icons[ext]
> end
> local function recurse (dir, parentNode)
>  for f in lfs.dir(dir) do
>   if f ~= '.' and f ~= '..' then
>    local node = treeCtrl:AppendItem(parentNode, f)
>
>    local icon = getIcon(f)
>    if icon then
>     treeCtrl:SetItemImage(node, icon)
>    end
>
>    if lfs.attributes(dir .. '/' .. f).mode == 'directory' then
>     recurse(dir .. '/' .. f, node)
>    end
>   end
>  end
>  treeCtrl:SortChildren(parentNode)
> end
> recurse('.', root)
> end
>
> ---- init ---------------------------------------------------------------------
>
> frame:Show(true)
> wx.wxGetApp():MainLoop()
>
> ---
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> wxlua-users mailing list
> wxl...@li...
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>
From: Glebs <gle...@ma...> - 2010年05月24日 10:49:21
Hello, I'm new to wxLua and have spent last days compiling it "just
right". So, I'm posting this report in hope it will help anyone who
has problems similar to mine.
Intro.
SciTE editor (http://www.scintilla.org/SciTE.html) is a Scintilla based
source code editor, it supports all Scintilla features and is highly
configurable. It has built-in Lua interpreter (merged into SciTE.exe)
and provides Lua scripts control over Scintilla component, though not
in the way wxSTC does, its not wxWidgets-compatible.
So, the idea was to provide SciTE with wxLua capabilities using as
few DLL's as possible and utilizing its internal Lua capabilities.
And here goes "how-to" manual, detailed to the limit of being
offensive.
---------------------------------------------------------------------
0. Prerequisites:
Free downloadables (all native default packages):
MS Visual C++ 2008 Express
wxWidgets 2.8.11 source
wxLua 2.8.10.0 source
SciTE editor
unpack wxWidgets to C:\wxWidgets
unpack wxLua to C:\wxLua
create WXWIN environment variable and set it to 'C:\wxWidgets' (no quotes in value)
1. Make BUILD.BAT to compile makefile.vc 
 call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
 nmake /s /f makefile.vc 
2. Go to C:\wxWidgets\build\msw\
config.vc: 
 SHARED = 1
 WXUNIV = 0
 UNICODE = 0
 MSLU = 0
 BUILD = release
 TARGET_CPU = $(CPU)
 DEBUG_INFO = default
 DEBUG_FLAG = default
 DEBUG_RUNTIME_LIBS = default
 MONOLITHIC = 1
 USE_GUI = 1
 USE_HTML = 1
 USE_MEDIA = 1
 USE_XRC = 1
 USE_AUI = 1
 USE_RICHTEXT = 1
 USE_OPENGL = 1
 USE_ODBC = 1
 USE_QA = 1
 USE_EXCEPTIONS = 1
 USE_RTTI = 0
 USE_THREADS = 1
 USE_CAIRO = 0
 USE_GDIPLUS = 0
 OFFICIAL_BUILD = 0
 VENDOR = custom
 WX_FLAVOUR =
 WX_LIB_FLAVOUR =
 CFG = 
 CPPUNIT_CFLAGS = 
 CPPUNIT_LIBS = 
 RUNTIME_LIBS = dynamic
3. Run BUILD.BAT and build it (when I say 'run BUILD.BAT' I mean copy it in this folder and start it from here)
4. Go C:\wxWidgets\contrib\build\ogl and run BUILD.BAT
5. Go C:\wxWidgets\contrib\build\stc and run BUILD.BAT (some warnings may happen - its ok)
6. Go C:\wxWidgets\lib\vc_dll
Rename wxmsw28_ogl.lib to wxmsw28_gl.lib
7. Go C:\wxLua\modules\build\msw
makefile.vc: set config at file beginning as following
 CC = cl
 CXX = cl
 CFLAGS = 
 CXXFLAGS = 
 CPPFLAGS = 
 LDFLAGS = 
 BUILD = release
 UNICODE = 0
 SHARED = 1
 WX_SHARED = 1
 WX_VERSION = 28
 WX_MONOLITHIC = 1
 WX_DIR = $(WXWIN)
 USE_APPS = 0
 USE_SYSTEM_LUA = 0
 LUA_INCLUDE_DIR = ..\..\..\modules\lua\include
 LUA_LIB_DIR = ..\..\..\modules\lua\lib
 RUNTIME_LIBS = dynamic
 THREADING = multi
 USE_WXBINDADV = 1
 USE_WXBINDAUI = 1
 USE_WXBINDBASE = 1
 USE_WXBINDCORE = 1
 USE_WXBINDGL = 1
 USE_WXBINDHTML = 1
 USE_WXBINDMEDIA = 1
 USE_WXBINDNET = 1
 USE_WXBINDRICHTEXT = 1
 USE_WXBINDSTC = 1
 USE_WXBINDXML = 1
 USE_WXBINDXRC = 1
 USE_WXLUADEBUG = 1
 USE_WXLUASOCKET = 0
 USE_LUAMODULE = 1
 MONOLITHIC_LUAMODULE = 1
 USE_WXLUAAPP = 0
 USE_WXLUACANAPP = 0
 WXSTEDIT_DIR = $(WXSTEDIT)
 USE_WXLUAEDITAPP = 0
 USE_WXLUAFREEZEAPP = 0
makefile.vc: scroll to line "..\..\..\lib\vc_$(VAR_205)\lua5.1.dll: make_dir_lua_dll $(LUA_DLL_OBJECTS)" and fix "/OUT" argument on line after this one as following
 /OUT:..\..\..\lib\vc_$(VAR_205)\SciTE.exe
 
this will enable to use SciTE.exe as a host app for wxLUA (instead of lua5.1.dll)
8. (Optional) Disable wxSTC component (cause SciTE is built on Scintilla anyway and you probably wont need one more text editor inside)
Go C:\wxLua\modules\build\msw
makefile.vc: set config at file beginning as in [7], only change
 CPPFLAGS = /DwxLUA_USEBINDING_WXSTC^#0 
scroll to line " vcmsw$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)\mod_luamodule_mono_wxstc_bind.obj \" and put '#' in front of it to comment this line out
9. run BAT and build wxLua
10. Now we done compiling. The result is 3 dll files (or 2 if you disabled wxSTC):
 C:\wxWidgets\lib\vc_dll\wxmsw28_vc_custom.dll (around 6Mb)
 C:\wxWidgets\lib\vc_dll\wxmsw28_stc_vc_custom.dll (optional)
 C:\wxLua\lib\vc_dll\wx.dll (2-3 Mb)
 
11. Install wxLua as a module to SciTE
Put all 3 (or 2) dll's into SciTE installation folder (where SciTE.exe is)
Open 'SciTEGlobal.properties' and make sure startup lua script is set:
 ext.lua.startup.script=$(SciteDefaultHome)\Startup.lua
Create/edit 'Startup.lua', adding following lines:
 package.cpath = package.cpath..";./?.dll;"
 require("wx")
 
Close and restart SciTE.exe - if no error message boxes pops up and no error messages in output window of SciTE, installation is successful
12. Test wxLua from SciTE.
Open 'lua.properties' config file and scroll to the bottom of it.
Make sure SciTE will use internal LUA interpreter to run *.lua files - insert following 2 lines at the end of a file
 command.go.*.lua=dofile $(FileNameExt)
 command.go.subsystem.*.lua=3
Restart SciTE and open some *.lua from 'C:\wxLua\samples'
Hit F5 to start file execution
note: editor.wx.lua wont run if you disable wxSTC. Also i had problems with 'controls.wx.lua' (some controls and events wont work)
--------------------------------------------------------
Conclusion.
To allow SciTE run several Lua scripts at once look here:
http://lua-users.org/wiki/SciteExtMan
It would be nice to also have wxSTC interface to SciTE's Scintilla
component, but it's highly unlikely for SciTE author to switch into
using wxWidgets and would require otherwise creating bindings from
Lua to Scintilla directly, while emulating wxWidgets framework,
which is way beyond my capabilities.
Also I'd like to mention I never worked outside of Windows© so i wont
be able to 'translate' this how-to into $(YOUR_OS_OF_CHOICE).
From: Henk B. <he...@he...> - 2010年05月23日 06:13:47
Hi, I'm just getting started using wxLua, and have hit a couple of problems.
I tried writing a small file-tree view with Icons in wxLua but had a
few issues. I've included the code at the end of this email.
If I run it as-is (with 'lua fileview.lua') I get a segmentation fault
after a few icons have loaded. If I disable garbage collection (with
collectgarbage('stop')) then the segfault goes away, but I get error
messages saying that the icons couldn't be loaded (the filenames seem
to be strings such as "gnome-compressed" and not actual filenames). If
I hardcode a path to an icon, then it loads properly, though all the
files obviously have that one icon. Either way, if I turn garbage
collection back on I get a segmentation fault.
I'm using the GTK port of wxWidgets, compiled from the 2.8.11 source
tarball with --enable-debug. My version of wxLua was also compiled
from the source tarball. I'm using a 64-bit installation of Ubuntu
10.4, and running in the Gnome desktop environment.
Also, in case it's important, the wxIcon(wxIconLocation) constructor
seems not to be bound, so I'm using wxIcon(iconLoc:GetFileName(),
wx.wxBITMAP_TYPE_ANY) instead.
Is there a bug, or am I doing something very wrong? :x
 henk
PS. This is the code I'm trying to run. I added a
collectgarbage('collect') call in a place which seems to cause it to
consistently crash every time.
---
require 'wx'
require 'lfs'
--collectgarbage('stop')
frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, 'wxLua Minimal Demo',
 wx.wxDefaultPosition, wx.wxSize(450, 450),
 wx.wxDEFAULT_FRAME_STYLE)
---- file tree ----------------------------------------------------------------
treeCtrl = wx.wxTreeCtrl(frame, wx.wxID_ANY)
treeCtrl:SetImageList(wx.wxImageList(16, 16))
root = treeCtrl:AddRoot('files')
do
 local icons = {}
 local function getIcon(filename)
 local ext = string.match(filename, '.+%.([^.]*)$')
 if ext and not icons[ext] then
 local ft = wx.wxTheMimeTypesManager:GetFileTypeFromExtension(ext)
 if ft then
 local iconLoc = wx.wxIconLocation()
 if ft:GetIcon(iconLoc) then
 print('found for ' .. ext .. ': "' .. iconLoc:GetFileName() .. '"')
 local icon = wx.wxIcon(iconLoc:GetFileName(), wx.wxBITMAP_TYPE_ANY)
 --local icon =
wx.wxIcon("/usr/share/icons/gnome/16x16/mimetypes/unknown.png",
wx.wxBITMAP_TYPE_ANY)
 collectgarbage('collect')
 if icon:Ok() then
 icons[ext] = treeCtrl:GetImageList():Add(icon)
 end
 print('there are now ' ..
treeCtrl:GetImageList():GetImageCount() .. ' icons')
 end
 end
 end
 return icons[ext]
 end
 local function recurse (dir, parentNode)
 for f in lfs.dir(dir) do
 if f ~= '.' and f ~= '..' then
 local node = treeCtrl:AppendItem(parentNode, f)
 local icon = getIcon(f)
 if icon then
 treeCtrl:SetItemImage(node, icon)
 end
 if lfs.attributes(dir .. '/' .. f).mode == 'directory' then
 recurse(dir .. '/' .. f, node)
 end
 end
 end
 treeCtrl:SortChildren(parentNode)
 end
 recurse('.', root)
end
---- init ---------------------------------------------------------------------
frame:Show(true)
wx.wxGetApp():MainLoop()
---
From: John L. <jla...@gm...> - 2010年05月20日 04:14:44
On Tue, May 18, 2010 at 10:04 AM, marcos <mar...@ya...> wrote:
> Hello list,
>
> A need to transfer data between two wxListBox using dragging.
> wxLua have problem with DnD suport.
>
> How can I do this?
Can you use wxWindow::SetDropTarget() as per this overview?
http://docs.wxwidgets.org/stable/wx_wxdndoverview.html
I'm not sure if you have to override wxDropSource::DoDragDrop(), but I
guess you do. What are your problems?
Regards,
 John
From: John L. <jla...@gm...> - 2010年05月20日 04:07:27
2010年5月19日 Mateusz Czaplinski <cza...@gm...>:
> Hi,
> In a C++ function called from Lua, how can I retrieve the regular
> wxWidgets class wrapped by wxLua?
> Let's say I have a function:
> int foo(lua_State* L);
> and it is called from Lua, with a (wxLua) wxStaticText object on top
The best place to look is in the bindings. For example, the link below
shows the wrappers for the wxWindow type classes.
Search for "wxLua_wxStaticText_Wrap"
http://wxlua.cvs.sourceforge.net/viewvc/wxlua/wxLua/modules/wxbind/src/wxcore_windows.cpp?view=markup
Hope this helps,
 John
From: Mateusz C. <cza...@gm...> - 2010年05月19日 23:07:06
Hi,
In a C++ function called from Lua, how can I retrieve the regular
wxWidgets class wrapped by wxLua?
Let's say I have a function:
 int foo(lua_State* L);
and it is called from Lua, with a (wxLua) wxStaticText object on top
of the Lua stack. How can I access the underlying C++ wxStaticText
class and e.g. call SetLabel(...)?
I have read the "wxLua C++ Programming Guide" section of wxlua.html,
but unfortunately I had trouble understanding it. I'd be very grateful
for an answer, especially for a fragment of code that could be used as
the body of the 'foo' function above.
Greetings
Mateusz Czapliński
From: marcos <mar...@ya...> - 2010年05月18日 14:04:38
Hello list,
A need to transfer data between two wxListBox using dragging.
wxLua have problem with DnD suport.
How can I do this?
-- 
Marcos E. Wurzius
__________________________________________________
Faça ligações para outros computadores com o novo Yahoo! Messenger 
http://br.beta.messenger.yahoo.com/ 
From: Chunlin Z. <zha...@gm...> - 2010年05月15日 02:40:22
On 2010年5月7日 12:19, John Labenski wrote:
>
> Unfortunately the function wxNewEventType() is not currently wrapped.
> However it is simple enough to simulate one by picking some generic
> event, wxEVT_COMMAND_ENTER or whatever you like, and send a
> wxCommandEvent with that type and a unique ID. You will use the unique
> ID to differentiate your event from other events.
Thank you,I will try it.
>
> Regards,
> John
>
> ------------------------------------------------------------------------------
From: Chunlin Z. <zha...@gm...> - 2010年05月14日 13:57:33
On 2010年5月6日 1:39, John Labenski wrote:
> On Tue, May 4, 2010 at 9:43 AM, Chunlin Zhang<zha...@gm...> wrote:
>> If I want to do some mutithread programming,how can I do using wxlua in
>> pure lua?
>
> You can use Lua's coroutines, see the sample coroutine.wx.lua or more
> generally Google for sample code using Lua coroutines. wxThread will
> be added in the 2.9 release of wxLua, which may be in a few months.
Lua's coroutines can not solve my problem I think.
My situation is that I have several thread(I use luatask,because 
coroutine I think it is not suitable here) to communicate with rs232 
port,and when some data was send to wxlua main thread.
At first I did not know how to receive data from other thread in main 
thread,so I thought I can new a wxthread to wait the data from other 
thread and then send event to wxlua main thread.
Now I use the way that main thread handle the "wxEVT_IDLE",in this event 
handle I try to receive data.And it works
>
> You can also see some coroutine usage in the program gpeddler2, it was
> written for a very old version of wxLua so it might not run out of the
> box, but wxLua hasn't changed too much. It at least might give you
> some ideas.
>
> http://www.erix.it/progutil/gpeddler2/help/gpeddler2.html
>
> Regards,
> John
>
> ------------------------------------------------------------------------------
From: Domingo A. D. <min...@gm...> - 2010年05月08日 07:59:08
I don't know why the attachemnts appear this way 'xxxx-xxx.bin' I'm
posting through gmail.
If when clicking on then and selecting to open on notepad it opens
normally as text file.
On 5/7/10, John Labenski <jla...@gm...> wrote:
> On Fri, May 7, 2010 at 2:26 AM, Domingo Alvarez Duarte
> <min...@gm...> wrote:
>> Here is an improved version of it that now uses the information of both
>> cpp/h files to generate a runable wxlua file.
>>
>> Why it's not published on the mailing list ?
>
> I see your posts here and you can download the attachment, but it's
> given a strange name: "2602-001.bin".
> http://news.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user
>
> Regards,
> John
>
>> On Fri, May 7, 2010 at 4:47 AM, John Labenski <jla...@gm...> wrote:
>>>
>>> On Wed, May 5, 2010 at 5:08 PM, Domingo Alvarez Duarte
>>> <min...@gm...> wrote:
>>> > Here is a lua script that convert the cpp file generated from
>>> > wxFormBuilder
>>> > to lua.
>>> >
>>>
>>> Very interesting, I'll try it out when I get a chance.
>>>
>>> Thanks for sharing.
>>>   John
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> wxlua-users mailing list
>>> wxl...@li...
>>> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>>
>>
>> ------------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> wxlua-users mailing list
>> wxl...@li...
>> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>>
>>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> wxlua-users mailing list
> wxl...@li...
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>
From: John L. <jla...@gm...> - 2010年05月07日 14:14:01
On Fri, May 7, 2010 at 2:26 AM, Domingo Alvarez Duarte
<min...@gm...> wrote:
> Here is an improved version of it that now uses the information of both
> cpp/h files to generate a runable wxlua file.
>
> Why it's not published on the mailing list ?
I see your posts here and you can download the attachment, but it's
given a strange name: "2602-001.bin".
http://news.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user
Regards,
 John
> On Fri, May 7, 2010 at 4:47 AM, John Labenski <jla...@gm...> wrote:
>>
>> On Wed, May 5, 2010 at 5:08 PM, Domingo Alvarez Duarte
>> <min...@gm...> wrote:
>> > Here is a lua script that convert the cpp file generated from
>> > wxFormBuilder
>> > to lua.
>> >
>>
>> Very interesting, I'll try it out when I get a chance.
>>
>> Thanks for sharing.
>>   John
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> wxlua-users mailing list
>> wxl...@li...
>> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> wxlua-users mailing list
> wxl...@li...
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>
>
From: John L. <jla...@gm...> - 2010年05月07日 04:19:53
On Tue, May 4, 2010 at 3:50 AM, Chunlin Zhang <zha...@gm...> wrote:
> In wxpython define a new event can use this code:
> '''
> # This creates a new Event class and a EVT binder function
> (UpdateBarEvent, EVT_UPDATE_BARGRAPH) = wx.lib.newevent.NewEvent()
> '''
>
> How can I do same job in lua using wxlua?
> I searched for the example of wxlua(I am using Lua For Windows) and
> wxlua document,and do not find out the solution.
Unfortunately the function wxNewEventType() is not currently wrapped.
However it is simple enough to simulate one by picking some generic
event, wxEVT_COMMAND_ENTER or whatever you like, and send a
wxCommandEvent with that type and a unique ID. You will use the unique
ID to differentiate your event from other events.
Regards,
 John
From: John L. <jla...@gm...> - 2010年05月07日 02:47:22
On Wed, May 5, 2010 at 5:08 PM, Domingo Alvarez Duarte
<min...@gm...> wrote:
> Here is a lua script that convert the cpp file generated from wxFormBuilder
> to lua.
>
Very interesting, I'll try it out when I get a chance.
Thanks for sharing.
 John
From: John L. <jla...@gm...> - 2010年05月05日 17:42:31
This is the link to the download page for gpeddler2.
http://www.erix.it/progutil.html#gpeddler2
Regards,
 John
On Wed, May 5, 2010 at 1:39 PM, John Labenski <jla...@gm...> wrote:
> On Tue, May 4, 2010 at 9:43 AM, Chunlin Zhang <zha...@gm...> wrote:
>> If I want to do some mutithread programming,how can I do using wxlua in
>> pure lua?
>
> You can use Lua's coroutines, see the sample coroutine.wx.lua or more
> generally Google for sample code using Lua coroutines. wxThread will
> be added in the 2.9 release of wxLua, which may be in a few months.
>
> You can also see some coroutine usage in the program gpeddler2, it was
> written for a very old version of wxLua so it might not run out of the
> box, but wxLua hasn't changed too much. It at least might give you
> some ideas.
>
> http://www.erix.it/progutil/gpeddler2/help/gpeddler2.html
>
> Regards,
>   John
>
From: John L. <jla...@gm...> - 2010年05月05日 17:39:36
On Tue, May 4, 2010 at 9:43 AM, Chunlin Zhang <zha...@gm...> wrote:
> If I want to do some mutithread programming,how can I do using wxlua in
> pure lua?
You can use Lua's coroutines, see the sample coroutine.wx.lua or more
generally Google for sample code using Lua coroutines. wxThread will
be added in the 2.9 release of wxLua, which may be in a few months.
You can also see some coroutine usage in the program gpeddler2, it was
written for a very old version of wxLua so it might not run out of the
box, but wxLua hasn't changed too much. It at least might give you
some ideas.
http://www.erix.it/progutil/gpeddler2/help/gpeddler2.html
Regards,
 John
From: Chunlin Z. <zha...@gm...> - 2010年05月05日 02:42:08
I search this maillist and found the mail thread discuss same condition: 
news://news.gmane.org:119/loo...@po...
I would try to using luatask and wxPostEvent to wxlua main thread in 
another thread.
On 2010年5月4日 21:43, Chunlin Zhang wrote:
> If I want to do some mutithread programming,how can I do using wxlua in
> pure lua?
> Thanks!
>
>
> ------------------------------------------------------------------------------
From: Chunlin Z. <zha...@gm...> - 2010年05月04日 13:44:05
If I want to do some mutithread programming,how can I do using wxlua in 
pure lua?
Thanks!
From: Chunlin Z. <zha...@gm...> - 2010年05月04日 07:55:17
In wxpython define a new event can use this code:
'''
# This creates a new Event class and a EVT binder function
(UpdateBarEvent, EVT_UPDATE_BARGRAPH) = wx.lib.newevent.NewEvent()
'''
How can I do same job in lua using wxlua?
I searched for the example of wxlua(I am using Lua For Windows) and 
wxlua document,and do not find out the solution.
Can somebody tell me?
Thanks!
From: John L. <jla...@gm...> - 2010年05月03日 17:18:24
On Sat, May 1, 2010 at 6:23 PM, Ivan Drago <ne...@ya...> wrote:
> Another question - how to integrate wxLua into existing C++ wxWidgets
> application (for ex. Kicad) ? Is there somewhere the examples of such
> integration ?
>
I have some personal projects that use wxLua in a C++ app, but I'm not sure
of any common public app that uses it. However, there's no magic to it.
wxLua code can operate on the C++ app's objects using wxGetApp(),
wxFindWindowByName(), FindId(), etc. You can write a little Lua script that
is run in the wxLuaState to present these windows to the user's script or
hide them as appropriate. You can also provide a set of your own wrappers
for Kicad's libraries (see wxLuaCan sample), that allow wxLua to
access/create your classes. I'm not sure how you will be using wxLua, but
the best way to think about it is that wxLua code is run in the main thread
(GUI code has to be in main thread), just like C++ code, and is
indistinguishable from it. (Use Lua debug hooks to catch runaway scripts)
However, if this is for end users, you may want to provide a set a
simplified Lua functions that hide dangerous things and simplify tasks.
You can mess with the C++ app from Lua in the wxLuaEdit sample program using
wxGetApp etc... In fact, wxLuaEdit/wxStEdit is designed to be used as an
embedded script editor in a C++ program, but since it's a developer's tool
no effort was made to do any sandboxing. See the code below to see how the
scripts are run, search for ID_WXLUAIDE_RUN_LUA which is the "Run" button.
http://wxlua.cvs.sourceforge.net/viewvc/wxlua/wxLua/apps/wxluaedit/src/wxledit.cpp?revision=1.37&view=markup
Regards,
 John
From: Ivan D. <ne...@ya...> - 2010年05月01日 22:23:32
 Another question - how to integrate wxLua into existing C++ wxWidgets application (for ex. Kicad) ? Is there somewhere the examples of such integration ?
 
2 messages has been excluded from this view by a project administrator.

Showing 21 results of 21

Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /