[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Sanity check..
- From: Ando Sonenblick <ando@...>
- Date: Fri, 01 Aug 2003 17:46:54 -0700
Hi Luiz,
>> To support rerouting of lua's output into one or more of our app's views, I
>> added a field to lua's global_State: a c function ptr, which I stuff on
>
> What output do you mean?
Output from the print statement, i.e. print("Hello");
> In lua.c, all output comes from just two functions:
> print_usage and l_message, plus of course print to handle "=" lines in
> interactive mode. It seems to me that it's easier to replace two 3 functions.
Hmm... I'm not using lua.c or luac.c
I've embedded lua in my app and I want all textual output from lua routed to
my own windows. For any lua errors (lua_load, lua_pcall, etc) I get the
error message and display it in my window.
And I intercept luaB_print as described in the previous emails to route the
output from the print statement, ala above.
Is there other ways that lua outputs feedback?
> luaB_print is a Lua library, which shouldn't have access to the internals of
> lua_State!
D'oh! :)
So far so good with it...
> plus of course print to handle "=" lines in
> interactive mode. It seems to me that it's easier to replace two 3 functions.
Hmm... I've seen this before; at the prompt, you enter an equal sign
followed by something. Being new to lua, I don't know what that signifies.
Can you explain?
Thanks,
Ando