Some weird things about Revolution ;-)

Dom mcdomi at free.fr
Wed Oct 29 16:13:54 EST 2003


I have a template stack to create daily log reports (for internet
connections).

The template stack is really a "template" (in Finder sense)
so, when I double-clik this stack, it creates a copy.

It imports the daily log, then changes its name* according to the day.
But -- it seems that *another* stack is created, leaving the "copy"
behind!

Moreover, one has to explicitly *save* the "new" stack -- otherwise it
vanishes in the limbs ;->

*About changing the name, that works or no, depending from some obscure
parameters, such as the place in the handler...

Below, my handler:
=====
on mouseup
  answer file "Extrait de connexion :" of type "clptMACS" as sheet
  -- with filter "Extrait texte,*.textClipping" -- doesn't function
  if it is empty then exit mouseup
  lock screen
  put it into lelog
  -- naming here, not after the repeat loop, otherwise it doesn't
function...
  set the filename of this stack to char 1 to -14 of lelog & ".rev"
  set the itemdel to "/"
  set the name of this stack to char 1 to -14 of last item of lelog
  --
  put getResource(lelog,TEXT,256) into recop
  open file "recopie" for write
  write recop to file "recopie"
  close file "recopie"
  -- one has to close this temp file, then reopen it
  open file "recopie"
  read from file "recopie" until "Apple Internal Modem"
  repeat forever
    read from file "recopie" until "Apple Internal Modem"
    if it is empty then 
      delete this card
      save this stack -- one has to explicitly save the stack after
renaming
      exit mouseup
    end if
    put it into fld "log"
    send mouseup to btn "ventil" -- this btn contains a parsing handler
    create card
  end repeat
  close file "recopie"
  go first
  visual dissolve slow to inverse
  unlock screen
end mouseup
====
-- 
Digital photos (nature, garden) : http://cooldomi.free.fr/
Scripting : http://domiscript.free.fr/


More information about the use-livecode mailing list