[Adium-devl] AppleScript status bug (Trac #8687)
David Symonds
dsymonds at gmail.com
Mon Dec 31 15:07:39 UTC 2007
On Jan 1, 2008 1:59 AM, Evan Schoenberg <evan.s at dreskin.net> wrote:
>
>
> On Dec 31, 2007, at 12:11 AM, David Symonds wrote:
> However, applying that to statuses doesn't: [#2]
> tell application "Adium"
> set stat to first status whose title is "Home" and type is away
> get message of stat
> end tell
> This fails with an error saying: "Adium got an error:
> NSReceiverEvaluationScriptError: 4"
>
> Oddly enough, rephrasing it slightly works just fine: [#3]
> tell application "Adium"
> get message of first status whose title is "Home" and type is away
> end tell
>
>
> I can't run either of these, before or after r22078, because Applescript
> complains:
> "Adium got an error: Can't make type into type specifier."
>
> What are you doing to get around that / do you have any idea what's wrong?
I would suspect _your_ error message is coming from the "and type is
away" bit at the end of the lines, which is unrelated to my problem.
You can quite happily remote that bit to reproduce the error I'm
tripping over, with:
tell application "Adium"
set stat to first status whose title is "Home"
get message of stat
end tell
> It could be completely unrelated, but the 'id' property of the status
> class is declared as 'text', whereas the 'id' properties of other
> classes (window, account) are declared as 'integer'. Could that be the
> reason? The chat class is a notable exception: its 'id' property is
> also 'text'.
> It could be completely related - that's a good catch. Try changing it to
> "integer" and let us know if it fixes the problem :)
As Matt said, it probably shouldn't make a difference, but I can try
that if no-one else has any better ideas. I'm still fairly weak in my
AppleScript internals understanding, so I'm just wildly guessing here,
but would it be worth comparing the definitions of the status class
(which is failing) with the account class (which is working) to narrow
down the problem?
Dave.
More information about the devel
mailing list