Re: File-open wierdness in OS X 10.2
Re: File-open wierdness in OS X 10.2
- Subject: Re: File-open wierdness in OS X 10.2
- From: Paul Skinner <email@hidden>
- Date: Mon, 16 Sep 2002 23:56:45 -0400
Let me guess, the demofolder variable is not of the class text. No? Yes?
Finder references or aliases for the demofolder fail but not with the
same error you posted. I get 'Can't make +class cfol; "buddhism" of
+class cfol; "Books" of +class cfol; "Text" of +class cfol; "Documents"
of +class cfol; "paulskin" of +class cfol; "Users" of +class sdsk; of
application "Finder" into a list, record or text.' with finder
references and 'Could not make some data into the desired type' with
the alias when the script tries to concatenate demofolder & filename.
It works here (OS X 10.2 / AS 1.9 / PB Ti ) if I feed it strings.
set demofolder to (choose folder) as text
-->"titan:Users:paulskin:Documents:Text:Books:buddhism:"
set filename to (choose from list (list folder demofolder) as list) as
text
-->"Buddha Is You.txt"
on openthething(thething)
tell application "BBEdit 6.5"
open file thething
end tell
end openthething
set athing to demofolder & filename
openthething(athing)
-->file opens. Script Debugger freezes until the document is closed,
then proceeds. Strange.
tell application "Finder"
set demofiles to (list folder demofolder)
end tell
set filename2 to item 2 of demofiles
set athing to demofolder & filename2
openthething(athing)
-->file opens.
On Saturday, September 14, 2002, at 11:52 AM, John Fowler wrote:
I have a problem with applescripting bbedit to open files.
This formulation
on openthething(thething)
tell application "BBEdit 6.5"
open file thething
end tell
end openthething
works when called by
set athing to demofolder & filename
openthething(athing)
but not when called by
tell application "Finder"
set demofiles to (list folder demofolder)
end tell
set filename2 to item 10 of demofiles
set athing to demofolder & filename2
openthething(athing)
I get "file 'so and so' doesn't understand the _open_ message" with
the latter
I had this working but after upgrading to OS X 10.2 it quit working.
I am running BBedit 6.5.3.
I have verified that identical strings are submitted to the handler
(by looking at them with a "display dialog")
I also verified this by getting "true" from the proposition (filename
is equal to filename2)
What is going on here? There must be something I'm missing. Any help
would be appreciated.
John Fowler
--
Paul Skinner
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.