Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Library Binding was: [RE: Re: global error handling?]

From: maximo::meteorstudios::com at: 25-Jul-2003 14:48

Hi Gabrielle that's exactly the test I did AND IT WORKS :-) Its now official. steel will include the following functionality (either exactly or in similar form): bind-library: function [ "bind library functions to block (gbl context) or object. Binds only unset! values. Caches stuff in RAM." data [block! object!] "data you wish to have bound" /copy "deep copy the block before binding to it" /reset "reload funcs even if they where loaded in RAM cache" /net-reset "as reset plus reload from net even if they are in your net-lib cache directory." /flush "flush RAM cache after loading" /overload ovrldblk [block!] "Bind these words even if they are currently set." /words wordblk [block!] "Bind only these words." ][] [...MAGIC HAPPENS HERE...] return data ] it will also have this function: auto-load-libs: does [ bind-library query system/words ] ------------------------------------------ so you can use library code as easily as: ------------------------------------------ do bind-library load %subscript.r OR bind-library make object! [ default-metal-bg: unset! ] Note that the library becomes a repository for ANY rebol piece of code, function, value or data. Also note that the open-library function is still present. It is more intended as a means of loading a package which holds more than one value (usually an object filled with stuff). there is also some other cool stuff that I'm keeping as a surprise for the release... (this mail is long enough, as it is.) :-) -max PS: thanks for everyone who contributed, you're all responsible for this system... ----------- meteor Studios, T.D. ----------- Never Argue with an idiot. They will bring you down to their level and beat you with experience