PDA

View Full Version : OS X dictionary integration.


mischivo
2006-04-30, 03:08 PM
Ohoy,

I'm wondering if there are any plans for OmniWeb to adopt the very useful dictionary feature of 10.4? It works in most every Cocoa application, even in your other Omni products, but not in OmniWeb. So why can't I highlight a word, right click it, and ask for a definition? Please implement such a thing, or maybe just a keyboard command that does it. Thanks for reading :-)

Forrest
2006-04-30, 03:35 PM
There was some discussion about that here:
http://forums.omnigroup.com/showpost.php?p=778&postcount=30

It also includes a helpful tip from the OG.

troyb
2006-04-30, 06:49 PM
Select a word and hit Command-Control-D to get the definition pop-up. No context menu item quite yet.

afb
2006-05-02, 03:51 PM
For some reason, it doesn't work for me. I tested it in a clean user account, and it works there. Anyone know why it might not work? say, installed things that might disable it in OW.

Forrest
2006-05-02, 04:41 PM
any haxies installed?

JKT
2006-05-02, 10:39 PM
Check your keyboard shortcut for the Dictionary in System Preferences>Keyboard & Mouse. If it looks normal, do you have something else installed that conflicts with it such as a Service? Try changing the shortcut to see if it works thereafter.

afb
2006-05-02, 10:52 PM
any haxies installed?
Many. I was hoping for a suggestion for where to start. It'd take all day to disable each thing individually. The only one I can think of that might interfere with this is ICeCoffEE, but that's disabled in OW.

Check your keyboard shortcut for the Dictionary in System Preferences>Keyboard & Mouse. If it looks normal, do you have something else installed that conflicts with it such as a Service? Try changing the shortcut to see if it works thereafter.
The shortcut is set in the System Prefs.

I realize I failed to say it works in my account in other apps like Safari, just not in OW, which leads me to believe I've done something to OW.

Looking at it now more carefully, it actually does work in OW, but only in text entries (like the one I'm typing in now). First time I notice it. Clicking on words outside of this text entry block, it doesn't work. I click on them and hit the shortcut, nothing; highlight them, nothing. In my test account, the shortcut worked everywhere.

afb
2006-05-02, 10:58 PM
Testing a little further, it works on the text in the quick reply box before you hit reply but nowhere else on the page.

Also, I looked at the services, and this feature doesn't appear to rely on it. I've used Service Scrubber to shut off the Dictionary.app service, and it works anyway.

troyb
2006-05-04, 11:44 PM
silly question but could you be doing this in 5.1.3? What you describe is just how 5.1.3 worked, the dictionary shortcut would work in text areas but not anywhere else.

afb
2006-05-05, 12:29 AM
Hmm. Nope definitely sp7. I did confirm though that 5.1.3 does do this too.

Might there be some weird pref that is keeping me from OSX Dictionary happiness?

Edit: I was able to check how 5.1.3 because I was and am writing from my laptop, which up until a minute ago did not have sp7 installed. Much to my amazement, the dictionary thing works here. Being that both computers have more or less the same setup, the realm of possible conflicts is vastly narrowed. I'll test this tomorrow and report back.

Now if only there were non-English dictionaries for it available ...

daiyi666@yahoo.com
2006-05-05, 06:18 AM
Now if only there were non-English dictionaries for it available ...

This is what I need for sure. LiveDictionary is a nice third-party application that works with many cocoa applications. I hacked the bundle loader so that it works with TextEdit, NetNewsWire, iChat, Adium, and DevonThink Pro and DevonAgent.

It will load fine in OW (and Mellel) but the definition windows don't pop up, making it virtually worthlesss.

Tant pis.

mischivo
2006-05-05, 06:21 AM
Select a word and hit Command-Control-D to get the definition pop-up. No context menu item quite yet.

I don't think the fingers on my left hand can hit all those keys at once without fumbling :(

Also, if there is a problem with implementing this feature, please tell us. In most browsers the contextual menu is item specific. Here, I clearly select a word, and it still presents me with options of getting rid of animation :|.

P.S. I just noticed that it DOES give the Dictionary option, but only in THIS area where I am typing my text now.

Thanks

Gregory
2006-05-05, 06:49 AM
Select a word and hit Command-Control-D to get the definition pop-up. No context menu item quite yet.
on my system, control-command-D is Add to Bookmarks without a dialog.

JKT
2006-05-05, 12:47 PM
Now if only there were non-English dictionaries for it available ...
Hell, I'd be happy if there was an English dictionary available... but no, just American.

Forrest
2006-05-05, 01:00 PM
Hell, I'd be happy if there was an English dictionary available... but no, just American.

I see no French or Spanish...? ;)

In the dictionaries in the US, "English" when referring to a language not defined strictly as a the language spoken only in England.

The Oxford online dictionary appears to grant access via subscription only.
http://dictionary.reference.com/search?q=English

afb
2006-05-05, 09:48 PM
Well, sp9 shows no change for me with this unfortunate minor glitch (otherwise, it seems really fantastic; definitely see a speed boost, particularly on loading workspaces; particularly happy that command+. actually stops the loading).

Despite that it really isn't all that important to me to have this working (though I'm playing with the idea of trying to convert freedict dictionaries to this), the fact that it's working in 5.5 like it actually did in 5.1, though I never realized it, is a tad upsetting. So I went and disabled everything I could think of that might be causing this problem: InputManagers, APE and haxies, contextual menu items. Unfortunately, I couldn't find the source of the problem. The very strange thing is that it works fine on my laptop, which has the same software (as far as I can remember—so hard to keep them synced) and the same preferences (literally copied over and only modified for things like download directories and window locations). Still, there is clearly something that's doing this hidden in my account on the g5 that isn't in its system and that isn't in the laptop account.

This is what I need for sure. LiveDictionary is a nice third-party application that works with many cocoa applications.
[...]
It will load fine in OW (and Mellel) but the definition windows don't pop up, making it virtually worthlesss.

Thanks for the link anyway. I hadn't seen this, but I have used Ultralingua, and I keep going back to lamenting the fact that the system dictionary app doesn't have other languages. I really think Apple got it right with the interface. As a (free) replacement, I've written a number of applescripts to use in LaunchBar and OnMyCommand to define words from copy/paste and selections, respectively. (If anyone's interested, I've got ones for English, Spanish, German and Japanese ones.)

P.S. I just noticed that it DOES give the Dictionary option, but only in THIS area where I am typing my text now.
I'd be very appreciative if you could help in troubleshooting this problem, if it is that you are indeed seeing this in the sneaky peeks.

The Oxford online dictionary appears to grant access via subscription only.
Now, the OED in Dictionary.app would really be amazing!

daiyi666@yahoo.com
2006-05-06, 09:47 AM
Thanks for the link anyway. I hadn't seen this, but I have used Ultralingua, and I keep going back to lamenting the fact that the system dictionary app doesn't have other languages. I really think Apple got it right with the interface. As a (free) replacement, I've written a number of applescripts to use in LaunchBar and OnMyCommand to define words from copy/paste and selections, respectively. (If anyone's interested, I've got ones for English, Spanish, German and Japanese ones.)

Now, the OED in Dictionary.app would really be amazing!

You're more than welcome. Yes, it would be best if Apple included other dictionaries. That being said, I still find LiveDictionary much faster than Apple's Dictionary (even when the Dictionary.app is already open). And I'm happy that LD works with so many other applications. If any OG developers see this thread, could they at least comment on the possibility/impossibility of LD working with OW in the near future?

afb
2006-05-06, 11:46 AM
Still, there is clearly something that's doing this hidden in my account on the g5 that isn't in its system and that isn't in the laptop account.


Keeping at it, I found that it's not just OW's problem. In my account on the g5 in other apps, it only works in text fields, never in displayed text.

afb
2006-05-08, 01:55 PM
I seem to have found the cause of my frustration with the dictionary popup. It seems the fact that I have my user account on a partition separate from the boot partition inhibits it from working in normal text fields.

Creating an account on my desktop on a non-root partition produced the same behavior as in my account. However, doing the same thing on my laptop (but using a flash drive instead of a hard disk partition), did not produce the same results. So I still have more testing to do.

Cortig
2006-05-08, 03:59 PM
I seem to have found the cause of my frustration with the dictionary popup. It seems the fact that I have my user account on a partition separate from the boot partition inhibits it from working in normal text fields.

So do-I, but I still see the proper command in the Services (and I can use it).How did you setup your account? NetInfo Database, a symlink in /Users or both??

afb
2006-05-08, 04:09 PM
The Dictionary.app service doesn't appear to have anything to do with the little popup.

My home folder is set properly in NetInfo and there's also a symlink in /Users (just to make certain scripts more portable).

Cortig
2006-05-08, 04:33 PM
The Dictionary.app service doesn't appear to have anything to do with the little popup.

My home folder is set properly in NetInfo and there's also a symlink in /Users (just to make certain scripts more portable).


Sorry, I thought you were referring to the previous post mentioning the keyboard shortcut to look-up in the Dictionary, not the contextual menu itself.
For what's it's worth, I also see the command in the contextual menu in editable (and editable only) text areas in OW and I also host my user account on a separate Volume.

http://cortig.free.fr/images/capture.png

Since your setup and mine seem extremely similar, I wonder why you don;t have it :-\ Is OW itself on the main Volume ??

afb
2006-05-08, 07:30 PM
Cortig, in case you didn't get notified about the PM, I asked if you'd like to discuss this by IM.

I'm not talking about the contextual item but the ⌃⌘D popup; in my user account, it only shows up in editable text fields.

Cortig
2006-05-09, 07:49 AM
Cortig, in case you didn't get notified about the PM, I asked if you'd like to discuss this by IM.

I'm not talking about the contextual item but the ⌃⌘D popup; in my user account, it only shows up in editable text fields.



I made more tests:
Through the Service menu:
- I can look up selected words in editable and non-editable fields

Through the shortcut (that I had to reassign since ⌃⌘D was already in use):
- I can look up selected words in editable and non-editable fields (and I can do the same using the Dictioanry embedded in SpellCatcher)

Through the contextual menu (control-click)
- I can only lookup selected words in editable fields. Selected woirds in the middle of a page cannot be looked-up since the command doesn't show up in the contextual menu,

What puzzles me is what you call "⌃⌘D popup". On my Mac, the shortcut (not ⌃⌘D in my specific case) launches Dictionary which immediately starts looking for the selected word, but there is no "popup" per se... Same thing in Safari for instance. Am-I missing something?? It could be that I don't understand the bug because I've never actually seen the normal behaviour... I'll try to find a Mac with a different (more "classic") setup around here to test that.

JKT
2006-05-09, 11:19 AM
If you open Dictionary preferences, there is an option to Open Dictionary panel. When you use your shortcut, rather than opening the application, a little definition window will appear next to the word you are performing the search on. I believe this is what afb is referring to.

http://homepage.mac.com/jtyzack/.Pictures/screenshots/OSXDictprefs.jpg

afb - what happens if you change the shortcut to something else? Mine is Command-F8 to avoid a conflict with something else that is using control-command-D. Does it still not work or does it start working properly?

Cortig
2006-05-09, 11:37 AM
If you open Dictionary preferences, there is an option to Open Dictionary panel. When you use your shortcut, rather than opening the application, a little definition window will appear next to the word you are performing the search on. I believe this is what afb is referring to.


Cool!!! I never played with the prefs in Dictionary and wasn't aware of this option.
I tried it and it just works on my Mac. Even on non-editable sections of web pages, whenever I press the shortcut, I see the Dictionary pane coming up for whatever word is under my cursor.

Corentin

afb
2006-05-09, 09:18 PM
I can look up selected words in editable and non-editable fields (and I can do the same using the Dictioanry embedded in SpellCatcher).
Well, it seems like you're not having the problem I am. Oh well.

When you use your shortcut, rather than opening the application, a little definition window will appear next to the word you are performing the search on. I believe this is what afb is referring to.
[…]
If you open Dictionary preferences, there is an option to Open Dictionary panel. When you use your shortcut, rather than opening the application, a little definition window will appear next to the word you are performing the search on. I believe this is what afb is referring to.
I didn't know about this pref; it's set to open in the panel. On my desktop (where the problem is) and on my laptop (which doesn't have the problem), ⌃⌘D brings up the "panel" regardless of the setting. (Incidentally, I realized that you can't take a screenshot of it with the system shortcut.)

I hadn't thought about trying out the contextual menu item, since it doesn't appear in OW. It does in Safari, though, and while the shortcut doesn't bring up the panel, the menu item does. I then tried out Mail, where the menu item does appear, and though it is an editable text field, the shortcut doesn't work but the menu does.

afb - what happens if you change the shortcut to something else? Mine is Command-F8 to avoid a conflict with something else that is using control-command-D. Does it still not work or does it start working properly?
Changing the shortcut does nothing to change the behavior. I realized this shortcut is stored in the universal access prefs; tried trashing them, and still the same thing.

Any other ideas?

(I'm Alex, by the way; thanks for trying to help. I've been on the OW mailing list for some time; I recognize Jonathan's mac.com account from the pic; hi.)

Oh, I forgot to add that I went through the prefs folder and removed segments of prefs files, hoping to find the offending one, but I kept getting the same problem. For some reason this little problem is really starting to bug me.

JKT
2006-05-09, 10:36 PM
The only thing I can think of to try next would be disabling your haxies and any SIMBL or InputManager items to see if they are the cause. Anything that might interfere with text input (or maybe windowing if you have WindowShade X installed), basically. If it is working properly in other accounts on the same machine, then it has to be related to a user specific conflict or preference.

afb
2006-05-10, 02:09 PM
Now I really think I've solved this. Yay!

After spending two hours going through various things installed in /Library and ~/Library, particularly prefs, as I was fairly sure no third-party software was causing this, I narrowed it down to the lack of a preference.

In ~/Library/Preferences/ByHost/com.apple.HIToolbox.[hex string from ip?].plist, I found that the dictionary was not enabled entirely (?). If you take a look in this plist, you'll find other prefs set to enable the dictionary. For some reason, I was missing this one (in bold), that the system automatically added when creating the plist from scratch.


<key>AppleEnabledInputMethodsOfClass</key>
<dict>
<key>cplt</key>
<array>
[…]
</array>
<key>dict</key>
<array>
<string>Dictionary Service</string>
</array>
<key>inpm</key>
<array>
[…]
</array>
</dict>


I have no idea why I was able to recreate the problem on the same computer but in a different account, but I found that removing this from the prefs causes it. The fact that this is in a "ByHost" pref file explains why my laptop didn't have the problem even though prefs were copied directly to it; this file simply didn't load on it.

This appears to be a hidden pref that can't be set in the GUI, so I wonder if the fact that running Dictionary.app doesn't set it might be worth reporting to Apple.

Well, I'm glad I got this little thing sorted out; now I can get back to do real, important work.

Cortig
2006-05-11, 03:55 PM
I'm glad you found the solution :-)

Corentin