lua-users home
lua-l archive

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


Fine
+++++++++++++++++++++++++++++++++
>I don't use pcall(), whatever that is.
>
>All Lua code in my Game Engine is executed with lua_dostring.
>
>Brian.
>
>-----Original Message-----
>From: lua-bounces@bazar2.conectiva.com.br
>[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of D Burgess
>Sent: Thursday, September 18, 2003 12:00 AM
>To: Lua list
>Subject: Re: RE: Lua 5 vs Lua 4
>
>
>I dont think so. _ALERT correct me if I am wrong
>is only called in Lua5 for lua_dostring, lua_do_buffer
>and lua_dofile. Which means that your _ALERT function
>wont get called when you use pcall().
>
>DB
>+++++++++++++++++++++++++++++++++
>>Turns out that the correct answer to my question was:
>>
>>use "_ALERT" instead of "_ERRORMESSAGE"
>>
>>Brian.
>>
>>-----Original Message-----
>>From: lua-bounces@bazar2.conectiva.com.br
>>[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of D Burgess
>>Sent: Monday, September 15, 2003 6:30 PM
>>To: Lua list
>>Subject: Re: Lua 5 vs Lua 4
>>
>>
>>WHen you start everything off with pcall(), you can add
>>your own error handler to the pcall() call.
>>
>>This means that you can  vector to your own error handler.
>>
>>lua.c is an example.
>>
>>
>>
>>+++++++++++++++++++++++++++++++++
>>>Ok, so I have alternatives for all except LUA_ERRORMESSAGE.
>>>
>>>In Lua v4.x  I overloaded the Lua "_ERRORMESSAGE" global error handler
>>>function so that any errors detected by Lua would call my error handler
>>>instead of it's own.  But now that function is gone, and I am wondering
>how
>>>I can do this in v5.
>>>
>>>Brian.
>>>
>>>-----Original Message-----
>>>From: lua-bounces@bazar2.conectiva.com.br
>>>[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Asko Kauppi
>>>Sent: Friday, September 12, 2003 3:23 PM
>>>To: Lua list
>>>Subject: Re: Lua 5 vs Lua 4
>>>
>>>
>>>
>>>userdata: isn't it there?  I did make a 4/5 compatibility layer above
>>>this anyways, you might want to take a look at 'gluax_50.c' (part of
>>>'gluax-devel', http://sourceforge.net/projects/luacheia).
>>>
>>>getglobals: something like 'getfenv' or so now.. (function environment)
>>>I was actually one of the people for the name change but ..now later..
>>>would actually like the old terminology back. ;)
>>>
>>>Lua on OS X: I use it all the time, but via gluax (no OS X specific
>>>stuff, graphics go via SDL etc.) What's your concern?
>>>
>>>-ak
>>>
>>>
>>>Brian Weed kirjoittaa perjantaina, 12. syyskuuta 2003, kello 20:06:
>>>
>>>> Can someone point me to information about what happened to the
>>>> following :
>>>>
>>>> LUA_ERRORMESSAGE
>>>> lua_pushuserdata
>>>> lua_getglobals
>>>> lua_rawcall
>>>>
>>>> and alternatives that I should use instead.
>>>>
>>>> Also, has anyone successfully used Lua 5 on the Mac (specifically
>>>> Carbon) or
>>>> know of any caveats?
>>>>
>>>> Brian Weed
>>>> Senior Software Architect
>>>> ImaginEngine Corp.
>>>>