Search the web
Sign In
New User? Sign Up
jsosa · JavaScript OSA-Talk
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
AEDesc to AEPrint string   Message List  
Reply | Forward Message #495 of 529 |
Re: [jsosa] AEDesc to AEPrint string

Hi,

> When the .toString() or .toSource() method is used on an AEDesc value, the
> string data
> returned is truncated with an ellipsis, as in:
>
> Me.the_clipboard( 'ustl' ).toString(); // when styled unicode is on the
> clipboard
> //
> //=>
> "ustl($000000020000008C000000000000001400000020000000010000000100000000\
> xC9$)\x00"
>
> where \xC9 is the MacRoman ellipsis character. The hex codes are cut off after
> the 32nd
> byte. This is problematic, both in that it means the value cannot be reused
> with the .build()
> method of AEDescs, and in that a scripter can't work with the data in any
> other way, ie: I
> tried using the .as() method to get at the data in other ways, but without
> success.
>
> So I was thinking that .toString() should be kept as is for simple debugging
> purposes, but
> that calling .toSource() on an AEDesc should return a complete hex dump.

The problem here is that I'm using the system's AEPrint calls, and somewhere
along the way Apple decided to truncate long hex strings (happens with
aliases as well). I've filed a bug with Apple on this, but its pretty low
on their priority list.

> P.S. Am I the only one who is shocked that JSOSA hasn't caught on more in the
> Mac
> scripting community??? It's such a brilliant language, and Mark's integration
> with OSA is so
> brilliantly done. So why aren't more people using it???

I think its a combination of things:

1) chicken-and-eng: no easy way to distribute scripts that use JSOSA
requires the user to install JSOSA
2) JSOSA isn't enough better than AS to justify the effort - AS works for
most people
3) JavaScript is for the Web in people's minds

Cheers
-Mark

------------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 Script Debugger 4.0 - AppleScript IDE
WEB: http://www.latenightsw.com/ FaceSpan 4.3 - AppleScript RAD
Affrus 1.0 - Perl Debugging





Thu Feb 23, 2006 5:49 pm

malldritt2000
Offline Offline
Send Email Send Email

Forward
Message #495 of 529 |
Expand Messages Author Sort by Date

Hi, Mark. When the .toString() or .toSource() method is used on an AEDesc value, the string data returned is truncated with an ellipsis, as in: ...
Arthur Knapp
admiralnovia
Offline Send Email
Feb 16, 2006
5:16 pm

Hi, ... The problem here is that I'm using the system's AEPrint calls, and somewhere along the way Apple decided to truncate long hex strings (happens with ...
Mark Alldritt
malldritt2000
Offline Send Email
Feb 23, 2006
5:50 pm

... Thanks, Mark. I've been reading into this. It looks like when Apple "took over" the "AEGizmo" code stuff that they never intended for their version to...
Arthur Knapp
admiralnovia
Offline Send Email
Feb 23, 2006
8:15 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help