Chris,

You may want to look at the Scintilla code editing control:

www.scintilla.org

It does not (currently) run on OS/X...I wish it did.  Its a VERY flexible
widget. It will give you some ideas for what a powerful syntax aware widget
can do.  We are using it on the FreeRIDE (pure-ruby IDE) project.

Regards,

Rich

> -----Original Message-----
> From: Chris Gehlker [mailto:gehlker / fastq.com]
> Sent: Sunday, March 03, 2002 10:30 PM
> To: ruby-talk ML
> Subject: RubyStudio UI Question
>
>
> I've been noodling all day about how the editing window in
> RubyStudio should
> interact with the keyboard. I want to have a 'syntax aware' mode where the
> user just types and window formats the text automagically. I believe that
> nobody dislikes this kind of editor. They either like it or they hate it
> passionately. So there has to be an option to turn it off.
>
> The hard part is what to do when syntax aware editing is off. My current
> thinking is there should be two other options.
>
> 1) There is a tab level that is incremented whenever the user
> types a tab at
> the beginning of a line and decremented when she backspaces over a tab at
> the beginning of a line. Merely hitting return inserts the
> current number of
> tabs at the start of the line. Hitting alt-return zeros the tab level and
> types a newline.
>
> 2) Do nothing but respect ~/Library/KeyBindings/DefaultKeyBinding.dict. On
> the assumption that users who want something like emacs or vi
> keybinding are
> smart enough to have figured out how to set this as a user
> preference on the
> Mac.
>
> Does this sound right? Don't hesitate to say if I'm all wet here.
> --
> I have discovered that all human evil comes from this, man's being unable
> to sit still in a room. -Blaise Pascal, philosopher and mathematician
> (1623-1662)
>