home *** CD-ROM | disk | FTP | other *** search
/ Digital Photography Techniques 2003 October / DPTi04.iso / pc / shared.cst / 00035_gettext2.ls < prev    next >
Encoding:
Text File  |  2003-08-26  |  1.1 KB  |  57 lines

  1. property pFilename
  2. property pMemnum
  3. global gfilepath
  4. on getpropertydescriptionlist me
  5.   list = [:]
  6.   
  7.   addprop list, #pFilename, [#comment: "filename:", #format: #string, default: ":temp.text"] 
  8.   addprop list, #pMemnum, [#comment: "member number",  #format: #member, default: #void] 
  9.   
  10.   
  11.   return list
  12.   
  13.   
  14. end
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. on exitframe 
  26.   
  27.   -- set existing_filename = baGetFilename( "Open", the moviepath&"textfiles",pFilename , "Text files|*.txt", 0, "Open Existing file", false, 100, 100 )
  28.   if the machinetype = 256 then
  29.     gFilePath = the moviepath&"textfiles\"&pFilename
  30.      set myFile = new(xtra "fileio")   
  31.     openFile(myFile, gFilePath, 1)         
  32.     set jayp_intext = readFile(myFile)
  33.     
  34.     member(pmemnum).text = jayp_intext
  35.     
  36.     closeFile(myFile)                     
  37.     set myFile = 0
  38.     
  39.     
  40.   else
  41.     gFilePath = the moviepath&"textfiles:"&pFilename
  42.     put gFilePath
  43.     
  44.     set myFile = new(xtra "fileio")   
  45.     openFile(myFile, gFilePath, 1)         
  46.     set jayp_intext = readFile(myFile)
  47.     
  48.     member(pmemnum).text = jayp_intext
  49.     
  50.     closeFile(myFile)                     
  51.     set myFile = 0 
  52.     
  53.   end if
  54. end
  55.  
  56.  
  57.