[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: newbie: how to modify lua code while the program is running like visual basic
- From: "Kevin T. Ryan" <kevin.t.ryan@...>
- Date: Thu, 21 Jun 2012 12:03:35 -0400
You may want to try ZeroBrane Studio:
http://notebook.kulchenko.com/zerobrane/live-coding-in-lua-bret-victor-style
I haven't tried it (Vim user :)), but the video looks impressive and
sounds like it might be what you want.
---------------------
Kevin T. Ryan
(215) 764-6915
On Thu, Jun 21, 2012 at 11:36 AM, yoyomeltz yoyomeltz
<yoyomeltz@hotmail.com> wrote:
> hi, my name is david and this is my first post, so i do aplogize if i am
> doing something lame....
> and yeah, i know to use 'Lua' and not 'lua' and not 'LUA', lol i already
> made that mistake
>
>
>
> there is a feature called Edit and Continue.
> if i am running a program in the debugger, i am able to modify the code of a
> function while in the debugger.
> both Visual Basic for Visual Studio and Visual Basic for Applications can do
> that. in fact, VBA can modify a function while the debugger is debugging
> that specific function.
>
> as you can imagine this approach enables me to build program 'on-the'fly', i
> can learn iup without having to stop the program, change the code, debug,
> fix the issue, run the program again, debug it again, and over and over.
>
> so with Lua, i need that same functionality.
> i am trying to learn Lua and IUP.
> for example, lets say i have used the following code:
> ------------------------------------------
> require("iuplua")
>
> ml = iup.multiline{expand="YES", value="I ignore the 'g' key!",
> border="YES"}
>
> ml.action = function(self, c, after)
> if c == iup.K_g then
> return iup.IGNORE
> else
> return iup.DEFAULT;
> end
> end
>
> dlg = iup.dialog{ml; title="IupMultiline", size="QUARTERxQUARTER"}
> dlg:show()
>
> if (iup.MainLoopLevel()==0) then
> iup.MainLoop()
> end
> ------------------------------------
>
> i would like to be able to change that ml.action while the program is being
> debugged.
> i was not able to get that to work.
> so i tried to place that ml.action in another lua file name second.lua.
> to the main program i added a require('second') to that other .lua file.
> if i change the code in the code in second.lua, while the debugger is
> active, i have the same problem.
>
> i would like to switch from VB to Lua, i am loving Lua!
> this is the only real issue i need to resolve.
> thanks in advance,
> david
>