Xojo Conferences
MBSOct2019CologneDE

HandleAppleEvents (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: iPod MP3 Files
Next thread: Auto-insert "X" in "Next X"


RE: Timezone Difference Question   -   Michael Raycraft
  HandleAppleEvents   -   chris
   Re: HandleAppleEvents   -   Frank Bitterlich
    Re: HandleAppleEvents   -   George Clark
    Re: HandleAppleEvents   -   chris
    Re: HandleAppleEvents   -   chris
    Re: HandleAppleEvents   -   chris

HandleAppleEvents
Date: 28.08.02 18:52 (Wed, 28 Aug 2002 13:52:13 -0400)
From: chris
I am seeing something odd while trying to get AppleScript to work for
talking to my app.

It looks like the EventClass and EventID are being reversed. I setup my
AETE using Resourcer, and it placed the codes in for Class and ID by
itself. And that matches the orders that Matt's book mentions, and
matches what <http://www.nd.edu/~jvanderk/rbm/5-99/coverstory.html> says.
(Class is the code for the script group, and ID is the code for the
specific script step).

However, my app would never see the events right, so I stuck a msgbox in
there that simply showed what it was seeing. And it is showing the ID
code as the Class and the Class code as the ID.

This is with RB 4.5 Classic running under OS 9.0.4

Can someone else confirm if this is happening for them?

-chris
<http://www.mythtech.net>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: HandleAppleEvents
Date: 28.08.02 19:23 (Wed, 28 Aug 2002 20:23:53 +0200)
From: Frank Bitterlich
Hmmmph.

I tried to build a 'aete' resource earlier today, and saw exactly the
same thing. But I blamed it on the aete template for ResEdit I used. I
vaguely remember someone writing about that. I don't think it's RB that
reverses the class and ID; other events (for example class "WWW*", ID
"sdoc" [this is what WebStar sends to a CGI]) is in the right order.
Maybe Resorcerer has the same problem like my template? I know, sounds
strange... but maybe...

Cheers,
Frank+++

chris wrote:
>
> I am seeing something odd while trying to get AppleScript to work for
> talking to my app.
>
> It looks like the EventClass and EventID are being reversed. I setup my
> AETE using Resourcer, and it placed the codes in for Class and ID by
> itself. And that matches the orders that Matt's book mentions, and
> matches what <http://www.nd.edu/~jvanderk/rbm/5-99/coverstory.html> says.
> (Class is the code for the script group, and ID is the code for the
> specific script step).
>
> However, my app would never see the events right, so I stuck a msgbox in
> there that simply showed what it was seeing. And it is showing the ID
> code as the Class and the Class code as the ID.
>
> This is with RB 4.5 Classic running under OS 9.0.4
>

Re: HandleAppleEvents
Date: 28.08.02 19:58 (Wed, 28 Aug 2002 14:58:33 -0400)
From: George Clark
Have either of you tried opening your app's AS dictionary with Script
Editor? What does it show for classes/ID's, etc?

George

On 8/28/02 14:23, Frank Bitterlich wrote:

> Hmmmph.
>
> I tried to build a 'aete' resource earlier today, and saw exactly the
> same thing. But I blamed it on the aete template for ResEdit I used. I
> vaguely remember someone writing about that. I don't think it's RB that
> reverses the class and ID; other events (for example class "WWW*", ID
> "sdoc" [this is what WebStar sends to a CGI]) is in the right order.
> Maybe Resorcerer has the same problem like my template? I know, sounds
> strange... but maybe...
>
> Cheers,
> Frank+++
>
> chris wrote:
>>
>> I am seeing something odd while trying to get AppleScript to work for
>> talking to my app.
>>
>> It looks like the EventClass and EventID are being reversed. I setup my
>> AETE using Resourcer, and it placed the codes in for Class and ID by
>> itself. And that matches the orders that Matt's book mentions, and
>> matches what <http://www.nd.edu/~jvanderk/rbm/5-99/coverstory.html> says.
>> (Class is the code for the script group, and ID is the code for the
>> specific script step).
>>
>> However, my app would never see the events right, so I stuck a msgbox in
>> there that simply showed what it was seeing. And it is showing the ID
>> code as the Class and the Class code as the ID.
>>
>> This is with RB 4.5 Classic running under OS 9.0.4
>>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: HandleAppleEvents
Date: 28.08.02 19:49 (Wed, 28 Aug 2002 14:49:05 -0400)
From: chris
>I tried to build a 'aete' resource earlier today, and saw exactly the
>same thing. But I blamed it on the aete template for ResEdit I used. I
>vaguely remember someone writing about that. I don't think it's RB that
>reverses the class and ID; other events (for example class "WWW*", ID
>"sdoc" [this is what WebStar sends to a CGI]) is in the right order.
>Maybe Resorcerer has the same problem like my template? I know, sounds
>strange... but maybe...

Interesting... did you try the CGI's compiled with 4.5? I think it might
be a bug in 4.5.

I just started up 3.2.1 and made a new app that does nothing but msgbox
the class, ID, and stringParam. And using the same resources from my 4.5
app, the 3.2.1 app shows the correct Class and ID.

So it looks like it is 4.5 reversing them. So then the question is, is it
something with MY system causing 4.5 to reverse them, or is it a uniform
problem to 4.5 (in which case it should be realbugged).

-chris
<http://www.mythtech.net>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: HandleAppleEvents
Date: 28.08.02 20:34 (Wed, 28 Aug 2002 15:34:41 -0400)
From: chris
>Have either of you tried opening your app's AS dictionary with Script
>Editor? What does it show for classes/ID's, etc?

I can open my app's dictionary with script editor, but all it shows is
the dictionary listings. How do I find the underlying class and ID codes?

The only way I knew to do that was to open in a Resource Editor, but that
doesn't do much good since the question right now is which is wrong, the
resource editor, or RB 4.5?

-chris
<http://www.mythtech.net>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: HandleAppleEvents
Date: 28.08.02 23:26 (Wed, 28 Aug 2002 18:26:45 -0400)
From: chris
>I just started up 3.2.1 and made a new app that does nothing but msgbox
>the class, ID, and stringParam. And using the same resources from my 4.5
>app, the 3.2.1 app shows the correct Class and ID.
>
>So it looks like it is 4.5 reversing them. So then the question is, is it
>something with MY system causing 4.5 to reverse them, or is it a uniform
>problem to 4.5 (in which case it should be realbugged).

Ok, this is beyond screwy now.

3.2.1 worked correctly, but 4.5 reversed the Class and ID. So I changed
my code, to refer to them the way RB was reporting them.

Then ScriptEditor refused to allow me to use the exact same script step I
have been using this whole time for testing.

So I decided to take a breather, and reboot so I could rebuild my desktop
(Resourcer wasn't taking drag and drops since I installed it).

After rebooting and rebuilding, I ran the AppleScript, it took the step,
but now my 4.5 app reports the class and ID correctly (wouldn't you know
it, after changing my code too).

So it looks like it was just something spooky going on on my computer,
and a reboot seems to have cured it.

-chris
<http://www.mythtech.net>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>