• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Selection (was Re: Better Open Dictionary)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selection (was Re: Better Open Dictionary)


  • Subject: Re: Selection (was Re: Better Open Dictionary)
  • From: has <email@hidden>
  • Date: Thu, 6 Mar 2003 19:13:41 +0000

John Delacour wrote:

>>However this is the first application I've ever seen that can do
selection but not do 'selection as string', [...]

Hmmm. The dictionary lists 'selection' as an object (which I don't
have a problem with)

Good, because it comes from the standard suite and has always been an object.

Yeah well, me being clear as mud; what happens when I try to do anything at 3am that isn't sleeping.:p


Some apps don't do a selection-object at all, returning a reference or list of references, or evaluating the selection as a plain AS value. That's what I was thinking of in semi-comatose state, and didn't think to go check TE+ at the time. And even if I had, I probably would've been to cross-eyed to spot the difference in implementation at the time.

TE+ does a class called selection-object, which subclasses the text class to get character, word, paragraph elements, etc. That's why you can do what you want to do there. SE's selection-object class subclasses its item class; you only get about four properties to play with, and no text-related elements at all. That's why it doesn't do what you want it to do. Its dictionary is quite clear on this though. So aside from the bugs I listed last time, 'selection' seems to be working exactly as advertised. It's not a Standard Suite class, so aside from the choice of name there's no reason to expect it to behave as if it was. All I did was RTFM and I had no trouble getting text from it at all. (But then I rarely make assumptions about an app in advance; less disappointment that way...:p)


All the same, if it SE's behaviour confounds common user expectations (it does) and is less useful than that of TE+ and the like (it is), then it's a good thing to file an enhancement request on. Standard behaviours across apps is always a good thing and what the MacOS is (was?) all about.

Still, I think there's a need to distinguish the real, fatal bugs from the things that aren't genuine bugs but are inconsistent with established practice. Hopefully, annoying lumps and bumps can eventually be ironed out until life is peachy smooth once again, but right now I'd be more concerned about nailing stuff that's just downright broken. (Mind, you never actually did call it a bug, though at the time I implied that from your code and general comments.)


Which I think is what I was getting at at the time... although I can't really remember now anyway. ;p

Later,

has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Selection (was Re: Better Open Dictionary)
      • From: John Delacour <email@hidden>
  • Prev by Date: Re: Command to exit script immediately?
  • Next by Date: Re: Save as application screws up?
  • Previous by thread: Re: applescript-users digest, Vol 3 #1420 - 15 msgs
  • Next by thread: Re: Selection (was Re: Better Open Dictionary)
  • Index(es):
    • Date
    • Thread