Adium

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#10118 closed defect (fixed)

Applescript Set Status Message Broken

Reported by: Mikooster Owned by: applmak
Milestone: Component: AppleScript
Version: Severity: regression
Keywords: applescript status message Cc:
Patch Status: Accepted

Description

The applescript

tell application "Adium"
           set the status message of every account to "Something"
end tell

fails with error "Can't set the status of a contact."

Attachments (1)

adium-fix.diff (849 bytes) - added by Jorj Bauer 12 years ago.
simple patch

Download all attachments as: .zip

Change History (11)

comment:1 Changed 12 years ago by Matt Handley

Resolution: fixed
Status: newclosed

(In [23991]) In what may be the most amount of time spent on debugging a problem with an obvious solution, I have changed the various status properties to be rw, rather than just r. 10.4 completely ignores this flag, but 10.5 respects it. Fixes #8809. Fixes #10118.

comment:2 Changed 12 years ago by Robert

Milestone: Adium X 1.3
Resolution: fixed
Severity: normalregression
Status: closedreopened

According to #10261 this is not fixed.

comment:3 Changed 12 years ago by Jorj Bauer

This is because AIAccount.m has this:

  • (void)setScriptingStatusMessageWithAttributedString:(NSString *)message

where its superclass (AIContact) has this:

  • (void)setScriptingStatusMessage:(NSString *)message

AppleScript appears unable to create rich text, thus calls the latter, which falls through to the wrong class.

I'll attach a simple patch - just implement setScriptingStatusMessage:. Someone with more knowledge of the guts should vet this for correctness; all that I can attest to is that it functions.

Changed 12 years ago by Jorj Bauer

Attachment: adium-fix.diff added

simple patch

comment:4 Changed 12 years ago by Matt Handley

Resolution: fixed
Status: reopenedclosed

(In [24387]) Fixed a bug in setting the message of an existing status. Closes #10118.

This is a patch from jorj. Thank you!

comment:5 Changed 12 years ago by Robert

Patch Status: NoneAccepted

comment:6 Changed 12 years ago by Robert

Milestone: Adium X 1.3SVN issues

comment:7 Changed 12 years ago by Evan Schoenberg

What's up with that method have a name ending in WithAttributedString but taking an NSString as its argument?

comment:8 Changed 12 years ago by Matt Handley

Because of the way that AS works, I can't be sure if the object passed in is an NSString (plain text) or some NSAttributedString subclass (like NSTextStorage). So, I statically type based on the superclass, and a short if-then tells me which subclass I need to worry about in setScriptingStatusMessageWithAttributedString.

comment:9 Changed 12 years ago by Evan Schoenberg

(In [24396]) Fixed -[AIAccount setScriptingStatusMessageWithAttributedString:]'s method signature to match the expected paramters. Refs #10118

comment:10 Changed 11 years ago by (none)

Milestone: SVN issues

Milestone SVN issues deleted

Note: See TracTickets for help on using tickets.