RE: lingo-l re deleting from a text file with fileIO -is this a bug ?

2003-08-29 Thread Kerry Thompson
 on mouseUp
 set gresult=
   set gresult = baGetFilename(select0,Please select a
 file,false,-1,-1)
  go(1)
 end
 
 then if a file below the movies directory is selected with 
 baGetFilename then fileIO returns 'file already exists' this 
 is what i can not understand. why should buddy api or mui 
 xtra (as the same thing happens)cause fileIO to think the 
 deleted file still exists, if you try it out and select files 
 from other folders or cancel then the file is created and 
 edeleted as expected but NOT if i select below the movie folder.

I think I understand your problem now. You should use FileXtra4 to
select a file name.

I believe that the Buddy baGetFileName actually selects a file, either
to save or to open. I don't remember a select option--I think the
options for the first parameter are open or save.

The format for the Buddy call is:
baGetFilename( Operation, StartDir, Filename, Filter, Flags,
Instruction, NoFolders, X, Y )

and it returns the file you have selected. The key thing is that you
have selected that file, with the intent (from Buddy's point of view) of
either opening it, or saving it. That's why you're getting the file
already exists error, I think.

Use the fileXtra4 method. It just returns the file name, and doesn't
select the file.

Cordially,

Kerry Thompson

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]


RE: lingo-l re deleting from a text file with fileIO -is this a bug ?

2003-08-28 Thread Kerry Thompson
 kerry -  these scripts are there to show my problem, as you 
 say a file should be created and then deleted so when the 
 playhead returns to frame 2 after running the button script 
 it should then do this again BUT if i have selected a file 
 from a directory below the movies directory by either buddy 
 api or Mui xtra ie gresult=the moviepath/somefolder/somefile 
 , then fileIO returns 'file already exists'

Ok, that's clear. Charles was on the right track--you just need to close
the file you just deleted. Try this:

on exitFrame me
  schedulefile=new(xtra fileio)
  openFile(schedulefile, tempschedule.txt, 0)
  delete(schedulefile)
  closeFile(schedulefile) -- you need to close it
  createFile(schedulefile, tempschedule.txt)
  filestatus=status(schedulefile)
  alert schedulefile.error(filestatus)
  delete(schedulefile)
  closeFile(schedulefile)
  set schedulefile=0
end

You might also want to use the global gresult you set in frame 10. E.g.,


  openFile(schedulefile, gresult, 0)

 I cant see either fileXtra4 or PropSave Xtra 
 on macromedias xtra listing - where are they available ?

I haven't used the PropSave Xtra, but the fileXtra 4 is available from
Kent Kersten at http://kblab.net/xtras/FileXtra4/. Remarkably,
especially considering what a great Xtra it is, it's still free.

Cordially,

Kerry Thompson

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]


Re: lingo-l re deleting from a text file with fileIO -is this a bug ?

2003-08-28 Thread Charlie Fiskeaux II
I think the PropSave Xtra is one of the least known yet most useful secrets
in all Xtra-dom.  Because it saves and reads your Director data straight to
disk, there's almost no chance of data loss, plus it's quick and easy.

It's located at http://pimz.com/?id=xtrassection=propsave

Charlie Fiskeaux II
Media Designer
The Creative Group
www.cre8tivegroup.com
859/858-9054x29
cell: 859/608-9194



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]


Re: lingo-l re deleting from a text file with fileIO -is this a bug ?

2003-08-28 Thread Howdy-Tzi
On Thursday, Aug 28, 2003, at 12:11 America/Chicago, Charlie Fiskeaux 
II wrote:

I think the PropSave Xtra is one of the least known yet most useful 
secrets
in all Xtra-dom.
Yes, it's quite a useful tool... And at a great price! ;)

It's located at http://pimz.com/?id=xtrassection=propsave


Warren Ockrassa | President,  nightwares LLC  [EMAIL PROTECTED]
 nightwares LLC | Consulting  Programming http://www.nightwares.com/
 Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Chapter samples | http://www.nightwares.com/director_beginners_guide/
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]