Faking OS X text field behaviour (was: Good books on Cocoa dev?)

Ian Wood revlist at azurevision.co.uk
Wed Mar 3 06:51:11 EST 2010


Thanks for the suggestions, everyone. It would certainly save me a lot  
of time if this could be done in Rev, so maybe it's time to look from  
a different direction - how do we make a Rev field as OS X-like as  
possible.

On 3 Mar 2010, at 04:00, Scott McDonald wrote:

> The look of the spell check dialogue in the RunRevPlanet SpellCheck  
> Stack is
> completely "skinnable" so it may be simpler (and much quicker) to  
> make it
> look the way you need for your Mac application without learning Cocoa.

Your stack (and Sarah's AppleScript driven one) are the first places I  
looked.

> If the RunRevPlanet SpellCheck Stack doesn't currently meet your  
> needs, any
> specific feedback is most welcome, as I work hard to make stacks from
> RunRevPlanet do what Revolution users need.

Background - this is an app for metadata text entry for  
photojournalists. They are a fairly impatient bunch and tend to be  
working under a lot of pressure, and tend to have configured their  
Macs 'just so', with things like custom additions to the spell check  
dictionary.

Plus a surprising amount of Mac UI knowledge/fanaticism at the higher  
levels...


So replicating the native text box behaviour as closely as possible is  
a high priority. Here's a little list I've made up of differences  
between Rev fields and OS X fields, some apply to Scott's SpellCheck  
stack, others are general observations.


1. Navigational/selection shortcuts. Things like Rev using Command- 
left/right arrow to skip by word instead of the standard Mac shortcut  
of Option/Alt etc. I've not tried it yet but presumably this could all  
be handled with custom rawkeydown handlers - has anyone worked on this  
in the past?

2. The floating dictionary via Command-Control-D-hover. I'm not too  
bothered about this as it's rarely known let alone used, and there are  
still a few Carbon apps around that don't support it anyway.

3. Spell checking. This breaks down into a number of separate issues.

3a. Including spell checking in the first place. Scott's stack does a  
good job of providing the service, with Sarah's being a good proof-of- 
concept as well.

3b. Dictionaries. The RRP stack uses it's own dictionary, which makes  
it less useful to me as there's a good chance that the target audience  
have been adding words (place names, people's names) to the OS-level  
dictionary. If they are in a rush they won't want to add words again.  
Although this may not be as big an issue as I'm making it out to be.

3c. Visual representation of incorrect words. For this audience,  
anything but dashed red underlining is going to leap out as being a  
non-native app. Presumably I'd have to have a non-scrolling text field  
plus graphics built into a scrolling group to be able to 'fake'  
putting the red underlining. Again, has anyone attempted this before?

Cheers,

Ian



More information about the use-livecode mailing list