On 3/4/07, SPE Stani's Python Editor <[EMAIL PROTECTED]> wrote:

Hi All,

I have written a prototype of the 'fold explorer'. It is quite
wonderful as there is no python specific code in it: everything is
generic. Even to keep to lexing coloring scheme unbiased, I throw in a
picasso lexer which colours the code by inspiration of the moment. So
everytime you start the prototype you will get another color scheme.
It is not useful, but this saves me of writing down colour schemes for
all the 78 languages Scintilla supports.



Very Nifty.

On Windows (though it should also work on *nix), you need to replace...
   self.CollapseAndReset(self.root)
with:
   self.DeleteChildren(self.root)

Also, on Windows, until the last bit of the file has actually been seen, it
doesn't actually know the fold levels all the way there.  Even waiting a few
seconds doesn't actually get the latter portion of the file lexed.  I've
found that by replacing the two wx.CallAfter methods in .open and .setText
with a pair of wx.FutureCalls seems to work ok.  A single wx.FutureCall that
forces the explorer.update, then scrolls back to the first line would
probably be better.

Then again, it would be much better if we could get a message from the
underlying control when it finished lexing, and/or had the ability to ask it
to lex the whole file (and tell us when it was done).

- Josiah

Reply via email to