home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / 00046_Script_46 < prev    next >
Text File  |  1997-03-05  |  987b  |  32 lines

  1. on outOfObjects
  2.   global LastMarker,Choice,RecipeNum,forClear
  3.   put FALSE into forClear
  4.   set x=the number of lines of field "backField"
  5.   put lastMarker into item 1 of  line x+1 of field "backField"
  6.   put "objects" into item 2 of line x+1 of field "backField"
  7.   put choice into item 3 of line x+1 of field "backField"
  8.   put recipeNum into item 4 of  line x+1 of field "backField"
  9.   if line x+1 of field "backField"=line x of field "backField" then
  10.     set the text of field "backField"=line 1 to x of field "backField"
  11.   end if
  12.   clearPuppets 
  13.   put TRUE into forClear
  14. end
  15.  
  16. on ABCSort
  17.   global Current
  18.   
  19.   set sorted=[:]
  20.   repeat with i=1 to count(current)
  21.     set x=line (getat(current,i)) of field "names"
  22.     --setaProp sorted, getat(current,i), x
  23.     setaProp sorted, x , getat(current,i)
  24.   end repeat
  25.   sort sorted
  26.   repeat with i=1 to count(current)
  27.     set x=getat(sorted, i)
  28.     --set x=getPos(sorted, i)
  29.     setAt current, i, x
  30.   end repeat
  31. end
  32.