• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reading Lists and Records from Disk Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading Lists and Records from Disk Files


  • Subject: Re: Reading Lists and Records from Disk Files
  • From: Richard 23 <email@hidden>
  • Date: Tue, 9 Jan 2001 14:40:00 -0800

>Property parent : load script alias "Hard drive:foo"
>
>foohandler() -- executes foohandler defined in foo
>
>fooproperty of parent -- gets fooproperty defined in foo

Well, shut my mouth! That may be very close to what I've been
looking for. Where did the idea to set the parent property to
a loaded script? Fantastic! I've done that with scripts
generated with run script:

-- ---------------------------------------------------------
-- Preprocessed by Convert Script 1.0d2
-- ---------------------------------------------------------
property fungus : "don't eat that!"

on bleep()
beep
end bleep


tell (run script "me
on f(theObj)
script
property parent: theObj
bleep()
return its fungus
--...etc...
end script
end f") to f(me)
set myObj to result
run myObj
-- ---------------------------------------------------------

result:

<beep>
-->"don't eat that!"

but it's a pain and requires "its" which doesn't seem like
it's inheriting, at least not in a useful and convenient
way. I shall have to see if this or something derivative
of this makes my library files more viable.

by the way, "fooproperty of parent" (similar to the "its"
in my example) is not necessary. "fooproperty" works just
fine.

Chaining a number of these together would more than likely
result in all handlers and properties accessible to the last
script object in the chain. Potentially very useful indeed.

Thanks, Jason!

R23


  • Prev by Date: Re: Aplescript for changing case
  • Next by Date: Highlights of AppleScript 1.5.5 in Mac OS 9.1
  • Previous by thread: Re: Reading Lists and Records from Disk Files
  • Next by thread: Re: Reading Lists and Records from Disk Files
  • Index(es):
    • Date
    • Thread