Re: On screen text display high level method proposal
Status: Alpha
Brought to you by:
cwalther
From: Andrea V. <and...@gm...> - 2008-08-05 07:59:48
|
Aidan Gauland <wgsilkie <at> ihug.co.nz> writes: > > Or how about making Pipmak even more modular by seperating higher level > functionality into plugins? (Written in C or C++.) There could be an > "authoring GUI" plugin. Some > plugins could be official (supported and maintained by Pipmak developers), and > plugins by other people could just be hosted wherever. > This is already possible using lua loadlib function. For example using a compressed package pipmaklib (or piplib) like which one I have described before in this thread, it would it be possible also include into the local lib "default.lua" of the package, a loadlib which load some extra function writed in "C" and packaged into a .DLL or .so There only a missing function: pipmak.getos() or pipmak.getplatform() which return a string describing the host operating system {"osx","linux","win"}, so I can load the correct library DLL for windows or .so for OSX or Linux; This would avoid having to rewrite the 3 different versions of piplib. For example, I'm trying to write a small authoring system (you can see a screenshot in this forum) that uses only a dll to add to Pipmak all those functions that are missed, such as reading and writing of text files, parsering lua files, opening of dialog boxes for uploading image files, writing and reading GIF image file and so on. But it isn't sufficient, because I have to add some extra nodes, to display Authoring panels and menus, and glue together all the functions that I put inside the dll, which, for the moment, I have included as internal nodes, into the "Pipmak Resources". At last I've also to little modify "default.lua" in "Pipmak Resources" to load dll without the need to load it explicitly in my project (and that it would not be a good place to put it!) With a system like which i have described, I only have to put "author.piplib" and "author.dll" into the folder lib, and immediately I could have all the new features available. To resolve the issue about library nodes which can have the same number, I believe that we should introduce the concept of "nodespace" there are a nodespace of the project (which own nodes) and other nodespaces for each pipmaklib lua file of the project or into "Pipmak Resources" have as default nodespace that of the project ("../" "/" or something) , lua file inside pipmaklib have as default nodespace of the library ("nameofthelib"). If I don't want use the default I could change it with pipmak.setnodespace(ns) (like an unix cd) or retrive the current nodespace with pipmak.getnodespace() (like unix pwd), in this way I could have project and pipmaklib package with nodes numbered with the same number... Off course all of this ar only ideas... Think about it! Bye Andrea |