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

[REBOL] Re: RFC: require-files block in the Rebol header

From: al:bri:xtra at: 5-Aug-2002 18:07

pekr wrote:
> IIRC, RT tried to do something in that way already. The field is called
'Needs - maybe you will find some hilights about it in former docs or in ml archive? I remember the same. And I implemented it. Here's my %Values.r script which loads all scripts in my %Values/ directory, and observes the 'Needs field's requirements. Values: make object! [ Problem: none Files: make block! 100 use [Do-File Patches] [ Do-File: function [File [file!]] [Loaded Needs] [ File: clean-path File if not found? find Files File [ Loaded: load/header File Needs: Loaded/1/Needs if all [ found? Needs block? Needs ] [ foreach Need Needs [ if file? Need [ Do-File Need ] ] ] Problem: File do File ; Deliberately done to get Rebol to print Script: etc from 'do. append Files File Problem: none ] ] append Files clean-path Rebol/Script/Header/File Patches: %Patches.r if exists? Patches [ Do-File Patches ] foreach File read %. [ if find/last File %.r [ Do-File File ] ] ] ] protect-system Andrew Martin ICQ: 26227169 http://valley.150m.com/