On Thu, 5 Jan 2012 23:38:55 +1000 David Seikel <onef...@gmail.com> said:

> On Thu, 5 Jan 2012 16:43:29 +0900 Carsten Haitzler (The Rasterman)
> <ras...@rasterman.com> wrote:
> 
> > On Mon, 2 Jan 2012 21:09:19 +1000 David Seikel <onef...@gmail.com>
> > said:
> > 
> > how will the lua be able to detect the api call is there safely
> > without totally ceasing functioning.
> 
> That's a problem we will have to solve anyway.  I said -

i know. right now it can be a simple "needs version X of edje". for api that is
transient (may or may not be provided by app loading edje file)... it's a
different matter :)

> > > Raster objected to this idea before, if I remember.  His argument
> > > was, I think,"what if someone loads a Lua script theme that uses
> > > one of these new APIs, but they are not there?".  We are gonna have
> > > that problem now, and with each subsequent release.  Anyone running
> > > a theme that expects images, text, maps, and other stuff that I
> > > added to the last release, but using the edje release before, is
> > > gonna be sorely disappointed.  It only had rectangles and timers.
> > > For the next release I expect to add textblock and sound support at
> > > least.
> 
> (Glad I remembered your objection properly.)
> 
> Since I plan to reuse the same infrastructure we already have, these
> new host app supplied functions will be in a table+metatable created to
> hold them.  Like the existing image table+metatable and evas image
> functions that it holds.  So just like an edje Lua script could now
> call -
> 
> image.filled(true)
> 
> and work fine with the current edje release, but fail on the previous
> release.  In the future it could call -
> 
> daves_funky_app.some_function(foo, "bar")
> 
> or -
> 
> textblock.textblock()
> 
> or even -
> 
> elementary.box()
> 
> If they are using the current edje release, all are trying to use non
> existent API.  So the same thing should happen in all cases.
> 
> I think we can add a metatable to the environment, and use the usual
> mechanism for handling access to non existent data.  That's what I'll
> be experimenting with to solve the problem for all cases.  Once edje
> can safely detect the use of an undefined object, it should bitch,
> ignore any effort to call one of it's methods, and carry on.  Actually,
> if I remember, any unassigned variable has the nil value, so perhaps we
> can add a metatable to that?

well if we can have these calls safely return nils and not have lua barf
entirely... that'll be good ;)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to