Reloading script member functions

Philip Degarmo <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
I would like to support reloading of lua script member functions. Right now,
I just call luaL_dostring([state], [massive string ripped from a .lua
file]). I am iterating over all files I have previously loaded in my
application. I'm not sure if that's the best way to do it so if there is a
better way, I'd love to hear it. (I do know there is a lua macro for loading
a file but I want to support reading script from other sources beside
files.)
This method works for plain lua code. For example, if I add a print("test")
to the end of the file, my app starts printing "test." If I call a function
doSomething() from a luabind member function and add a print("something") to
that loose function, my app starts printing "something." However, modifying
luabind member functions seems to have no effect. If I call the loose
function from the luabind member function, I do get change of behavior if I
change the loose function and reload.

My question is if there is an elegant way to support reloading luabind
classes. While I can certainly use a workaround of creating a loose function
and calling it from the luabind member function passing self, this seems
silly.

Thanks
Philip

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.