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

protect-system caveat

 [1/4] from: grantwparks::yahoo::com at: 18-Aug-2000 12:01


Setting protect-system seems to incapacitate 'help':
>> help protect-system
USAGE: PROTECT-SYSTEM DESCRIPTION: Protects all system functions and the system object from redefinition. PROTECT-SYSTEM is a function value.
>> protect-system >> help protect-system
** Script Error: Word type-name is protected, cannot modify. ** Where: type-name: func [value] [ value: mold type? :value clear back tail value join either find "aeiou" first value ["an "] ["a ] value ] if
>>
Bummer, huh?

 [2/4] from: larry:ecotope at: 18-Aug-2000 13:36


Hi Grant This looks like a bug in 'help. You should send it to feedback. The problem is caused by doing the
>> help protect-system
before doing protect-system. Done in the other order, everything works OK. ----snip Script: "User Preferences" (31-Oct-1999/18:54:30-8:00)
>> protect-system >> help protect-system
USAGE: PROTECT-SYSTEM DESCRIPTION: Protects all system functions and the system object from redefinition. PROTECT-SYSTEM is a function value.
>> first: 5
** Script Error: Word first is protected, cannot modify. ** Where: first: 5
>>
BTW You can use 'source to look at the code for both 'help and 'protect-system. If you do
>>source protect-system
before doing 'protect-system, it does not cause this problem, which is one reason I think the bug is in 'help. HTH -Larry

 [3/4] from: grantwparks:yaho:o at: 21-Aug-2000 21:30


I agree this is a help issue. I didn't notice before that if I did protect-system before any help, the help would still work, but sure enough, I did protect-system 1st thing, and help worked afterwards... --- [larry--ecotope--com] wrote:

 [4/4] from: brian:hawley:bigfoot at: 22-Aug-2000 0:04


About the bad interaction between help and protect-system, Grant wrote:
>I agree this is a help issue. I didn't notice before >that if I did protect-system before any help, the help >would still work, but sure enough, I did >protect-system 1st thing, and help worked >afterwards...
Help defines a function in it called type-name, when it doesn't declare type-name to be local. Every time help runs it trounces the global word type-name. I've told Feedback. Another bug caught! :) Brian Hawley