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

Useless Needs (was: request-font)

 [1/2] from: rebol-list2::seznam::cz at: 18-Jan-2003 12:21


Hello Carl, Just one think.... using the Needs in the header is bad idea because it's simply stupid! I think that RT are lost in their own product version conventions. Rebol/Link (IOS version of Rebol which should be better then Rebol/View) should be good enough to run your script (get-fonts-windows.r) but with the Needs: [Rebol/View 1.2.1] is result: ** Script Error: This script needs 1.2.1 or better to function correctly ** Where: do-boot ** Near: do/args dir args return true
>> system/version
== 1.0.6.3.1
>> system/product
== Link
>>
If it would be possible to use: Needs: [REBOL/View 1.2.1 Rebol/Link 1.0.6] It would be ok, but it's not possible! So... if you want to make sure that the script will be running on some Rebol/Product, you should write own testing as for example: ------- can-run?: does [ switch/default system/product [ View [system/version >= 1.2.1] Link [system/version >= 1.0.5] ][ false ] ] if not can-run? [ print "*** You have unsupported Rebol/Product!" print "*** The script may not be running properly!" ] ------- With such a way you may also fix some version dependent changes (for example to set/modify some functions to be able run the script under that version. .....and when I'm talking about the Rebol header and it's Needs value... I started to use Require to enter files which the script will use (this cannot be added to Needs value, just because the Needs testing is strange:) Cheers Oldes =( Oliva David )=======================( [oliva--david--seznam--cz] )== =( Earth/Europe/Czech_Republic/Brno )============================= =( coords: [lat: 49.22 long: 16.67] )=============================

 [2/2] from: carl:cybercraft at: 20-Jan-2003 8:50


On 19-Jan-03, RebOldes wrote:
> Hello Carl, > Just one think.... using the Needs in the header is bad idea because
<<quoted lines omitted: 27>>
> ] > -------
I don't see that as a solution, as I've no way to test it on Link, since I don't have it. The solution is for RT to get their version numbering (or Needs' testing) right. Incidentily, Gregg couldn't upload the scripts to the library when they just had needs: [View] in the header. Changing it to Needs: [REBOL/View] did the trick.
> With such a way you may also fix some version dependent changes (for > example to set/modify some functions to be able run the script under
<<quoted lines omitted: 5>>
> Cheers Oldes > =( Oliva David )=======================( [oliva--david--seznam--cz] )> =( Earth/Europe/Czech_Republic/Brno )> =( coords: [lat: 49.22 long: 16.67] )=============================
-- Carl Read

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted