-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathwrapmodule.wx.lua
More file actions
23 lines (17 loc) · 811 Bytes
/
wrapmodule.wx.lua
File metadata and controls
23 lines (17 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-----------------------------------------------------------------------------
-- Name: wrapmodule.wx.lua
-- Purpose: Allow running wxLua programs using require by "appending" wx.wxGetApp():MainLoop()
-- Author: John Labenski
-- Modified by:
-- Created: 05/13/2006
-- RCS-ID:
-- Copyright: (c) 2001 John Labenski. All rights reserved.
-- Licence: wxWidgets licence
-----------------------------------------------------------------------------
-- Usage: $lua wrapmodule.wx.lua wxluaprogram.wx.lua
require("wx")
assert(arg and arg[1] and (type(arg[1]) == "string"), "Usage: $lua wrapmodule.wx.lua wxluaprogram.wx.lua")
dofile(arg[1])
-- ALWAYS call wx.wxGetApp():MainLoop() last to keep the program active
-- otherwise the lua program will exit immediately
wx.wxGetApp():MainLoop()