lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>namespaces.  enough said :).

I don't see how this would help in the first method unless you are saying that each newthread state does have it's own namespace, but just saying namespaces doesn't really elaborate on an answer for that particular method. or if you meant namespaces in the second method the first method would be redundant anyway :)

as for the second method.. yes, I guess I asked a very long winded way using namespaces ;) and this would probably be the best way to go.


>  secondly I could have functions defined in tables then creating an 
> object
>  and using self everywhere this would make sure I don't have repeated 
> chunks
>  of script code and make it more c++ class orientated, but the problem 
> is
>  creating the actual object from C/C++, I mean would I just purge all 
> scripts
>  I needed into one script file then do lua_loadbuffer to the main lua 
> state,
>  and then for each entity do something like lua_dostring("entity1 =
>  createentity:new("blah")); and get the function from the table of 
> entity1
>  and call that etc.

once again, just use namespaces to differentiate between your different 
objects.



-----

Michael Bernstein

"Until they become conscious they will never rebel, and until after 
they have rebelled they cannot become conscious"
--George Orwell, 1984




-----

Michael Bernstein

"Until they become conscious they will never rebel, and until after 
they have rebelled they cannot become conscious"
--George Orwell, 1984