home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / hypercar / 4948 < prev    next >
Encoding:
Text File  |  1993-01-27  |  2.0 KB  |  58 lines

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!jchoi@magnus.acs.ohio-state.edu
  3. From: Jinwon Choi <jchoi@magnus.acs.ohio-state.edu>
  4. Subject: How to deprotect a stack?
  5. Message-ID: <9301270239.AA14241@bottom.magnus.acs.ohio-state.edu>
  6. Sender: daemon@magnus.acs.ohio-state.edu
  7. Organization: The Ohio State University
  8. Date: Wed, 27 Jan 1993 02:39:37 GMT
  9. X-Mailer: ELM [version 2.3 PL11]
  10. Lines: 46
  11.  
  12.  
  13. Hi.
  14.  
  15. I got a message from the hypercard usergroup regarding deprotecting
  16. a stack. The following is the code the guy sent.
  17.  
  18.          -----------------
  19.  
  20. Try this. Create a stack containing a button and the following script:
  21. on mouseUp
  22.   put filename("STAK") into fname
  23.   if fname is empty then exit mouseUp
  24.   deprotect fname
  25.   if the result is empty
  26.   then answer "Deprotect Successful" with "OK"
  27.   else if the result is -49
  28.   then answer "Sorry, that file is busy."
  29.   else if the result is -44
  30.   then answer "Sorry, the disk is locked."
  31.   else answer "Failed: unexpected file system error: " & the result with
  32. "OK"
  33. end mouseUp
  34.  This is a script I found someplace, and I've usually been successful with it.
  35.  
  36.                 ------------
  37.  
  38. I tried this. But it did not work properly. My debugger did not understand
  39. the word "deprotect". Is there anybody who knows about the deprotecting 
  40. stuff?  It will be very helpful to me, if anybody lets me know.
  41.  
  42. Thanks in advance.
  43.  
  44. Jin.
  45.  
  46. -- 
  47.  
  48. ------------------------------------------------------------------------------
  49. Jinwon Choi                               (614) 293-9086(Home)
  50. CAAD Software Development Lab.                         (614) 292-2148(Work)
  51.                                  *****
  52. Ph.D. Student,    ACCAD (Advanced Computing Center for the Arts and Design)
  53. GRA (Programmer), ACS   (Academic Computing Services) 
  54. The Ohio State University, Columbus, Ohio.  
  55. e-mail: jchoi@magnus.acs.ohio-state.edu
  56. ------------------------------------------------------------------------------
  57.  
  58.