On Nov 14, 2007 4:43 PM, Don Dwiggins <[EMAIL PROTECTED]> wrote:
> Glad I could help on this.

Turns out IDLE's PyParse is hardcoded to unix line endings!  Before
investing a bunch of time converting PyParse to be line-ending
agnostic, I took the simple way out and just convert the temporary
text to unix line endings before passing it to the parser.  Fixed in
svn and a new patchlevel release 0.7.1.1

> Later, create an MVC-style model object that knows about the current
> state of the buffer (and whatever else it needs to) and exposes Boolean
> methods like "can save", "can delete selection", etc.; then treat the
> menu/toolbar items as "views" on the object.

Essentially that's what I've already done.  State is stored
extrinsically to the action; when each action's isEnabled method is
called to update the UI, the action goes to the stc buffer's CanSave,
CanEdit, etc. method to check for whatever conditions it needs to be
satisfied.

The same actions that populate the menubar/toolbar are also used for
keybinding processing; I just forgot to have the keyboard processor
check the enable state before firing off the action. :)  That's also
now fixed in svn.

Rob

Reply via email to