"Dynamic binding" of applications/class-names
"Dynamic binding" of applications/class-names
- Subject: "Dynamic binding" of applications/class-names
- From: Jim Witte <email@hidden>
- Date: Mon, 19 Jan 2004 00:58:27 -0500
I know, maybe a bad description of what I want an answer to, but the
only thing I can come up with. Here's my (small) problem: I want to
write the following script:
--set tapp to (choose application)
set tapp to "Internet Connect"
tell application tapp --"Internet Connect"
set tconfig to every PPP configuration
-- connect tconfig
end tell
If I leave the identifier after 'tell application' as "Internet
Connect" (not the variable tapp), it will compile fine. But if I
intstead change the tell command's identifier to the variable tapp, it
says that PPP configuration is an unknown identifier. This gets worse
(perhaps) because I eventually want to direct the tell at an Internet
Connect on another machine over a network.
I suspect this is a problem where AS is trying to bind all the class
types at compile time, and in the case of the variable tapp, the
"superclass" (application tapp) isn't explicitly defined (even though a
in this example since tapp is defined above, a simple type inference
would come up with "Internet Connect") Is this a correct
interpretation of what's happening? I know that you can send AEvent
codes directly to "unknown" applications, but first you have to find
them, which isn't particularly hard, but is a bit of a pain (yes, I
know, I should get Script Debugger..) Is this the only workaround?
Jim Witte
email@hidden
Indiana University CS
_______________________________________________
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.