On Oct 25, 2009, at 2:07 PM, Aaron R. Short wrote:

> I have dEditor control on my window and it populates with my file. I  
> can see that you provide some support for creating custom lexers  
> because you have wxSTC_LEX_CONTAINER as a default if it can't find  
> the lexer.
>
> I've set my afterInit of the dEditor to:
>
> def afterInit(self):
>        # self._language = "python"
>        self._language = "gedcom"

        Just a word of advice: it's always better to use the property rather  
than attempting to change the underlying attribute. In this case, the  
call should be self.Language = "gedcom", because other things must  
happen when the lexer is changed, and the property setter will take  
care of them for you.

> which of course isn't found in the LexerDic which means (I believe)  
> the wxSTC_LEX_CONTAINER should be being used. Unfortunately I'm  
> uncertain where to proceed from there. I can tell enough that it  
> seems you've added support for custom lexers but am uncertain where  
> to tie into to create one? Perhaps a short example of a custom lexer  
> that colors the first word of each line? I should be able to take it  
> from there. of course any help would be appreciated.


        I don't know a whole lot about how custom lexers are supposed to work  
with the STC_LEX_CONTAINER. I just learned enough to enable the built- 
in lexers, but if you can get some info on how to do this, I think it  
would be great to add more lexers to the editor.


-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to