sqwarqDev wrote:

> it's a hobby.

"The Aristocrats!"


> Wasting my time on this is no worse than watching re-runs of "Kung Fu" and sure beats suffering on the sofa watching Leeds United getting hammered again... :(

(Bradford City FTW)


>> Or you use OSAScript, which has a very stupid method that returns both a display string and an AEDesc at the same time.
>
> Huh? Which method are you talking about? I can't see anything in OSAScript that returns much anything than various ints, none of which seem obviously useful for getting human readable text out of.

-[OSAScript executeAndReturnDisplayValue:error:]


>> As to dictionary viewers in general: OSAKit contains the dictionary viewer classes used by SE, though needless to say it doesn't work right,
>
> I was thinking I'd just build my own besoke XML viewer. Aside from the fact I won't be able to load any old dictionary files that aren't sdefs (I'm happy to forsake them)

`sdef` and OSACopyScriptingDefinition...() automatically translate older formats to XML SDEF. This isn't to say they translate 100% correctly, but it's probably good enough for documentation purposes.


> that seems the easiest part of the job.

You wish. Getting inheritance and containment graphs right in particular is a pig, since dictionaries are not validated and frequently contain errors and omissions. You may wish to install a copy of Python appscript alongside ASDictionary, and play about with its built-in help() method, which manages fairly decent graphs generated from AETE data. That alone was several hundred hours' work.

The only info that's reasonably accurate is keyword names and codes, and what they represent (command, property, etc), since that's what AppleScript relies on to compile scripts, and even that can be glitchy at times, particularly in the big Carbon-based productivity apps. Plus there's stupid stuff like SDEF not being able to distinguish `text` strings from `text` application objects, and then there's the <documentation> element and XInclude messes, and I don't know how SDEF even deals with dynamically loaded dictionaries for scriptable plugins.


>> Bear in mind too that OSA and the AS component are twenty year-old tech, and hopelessly obsolete by modern standards. There's no support for incremental parsing, for example, which you need to support stuff like dynamic code coloring and auto-complete which modern scripters expect. There's no hooks for debuggers or profilers,
>
> This is what first got me interested in writing a decent editor to start with...

As I say, you'd be easier writing your own interpreter, then writing an editor around that. (Although the AppleScript language is such a pig to interpret correctly, I wouldn't recommend attempting that as a first choice.)


> well, that and I refuse to pay $199 for the only alternative.

Meh, a couple hundred bucks is nothing for a product that works for a living. (Adobe'll happily gouge you ten times that, and let's not even mention the hole that the likes of AutoDesk like to make.)

Heck, you could pay for SD in a few hours just by calling yourself automation consultant and hitting up the local graphic design outfits for some freelance scripting work.

Or, if you're really cheap, go give Satimage's Smile editor a go. The standard version is free, and you can have hours of brain-melting fun just by exploring its own insanely deep use of OSA. <http://www.satimage.fr/software/en/index.html>


> I'll keep plugging away till TV re-runs get the better of me or Leeds go on a winning streak. Thanks for the tips, has. Amongst the discouragement, there was some useful leads. :)

Just words from the wise. I know how many hours I've sunk into this crap myself, for great pain and little reward. Honestly, take up Flamenco or Taekwondo or something like that. Or get yourself a copy of Seymour Papert's Mindstorms and figure out how to make a modern Logo environment that properly rocks. Building languages is way more fun [1], and Lispy interpreters are ridiculously easy to make, yet will seriously expand your mind as you realize how deep and powerful they are.

Regards,

has

[1] It's what I do myself now. <http://www.mantasystems.co.uk/docs.html>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to