Building wxStyledTextCtrl

Building wxStyledTextCtrl

Post by chris elliot » Thu, 17 Jan 2002 00:24:53



I have updated wx to 2.3.2 and rebuilt STC and stctest.cpp
Borland compiler (5.4, 5.5) still  gives light grey font on a white
background, building same sources with mingw works fine (and the color
changes as the text is typed)

The Borland de* shows:
ScintillaBase::Colourise is called from
ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) repeatedly when
the text is changed, sot he request to color the text appears to be
handled

in Colourise the line lexCurrent->Lex(start, len, styleStart,
keyWordLists, styler); leads to
static void ColouriseNullDoc(unsigned int startPos, int length, int,
WordList *[],
                            Accessor &styler)
which just fills the style bytes with 0.

Editor::LayoutLine recovers zero for all the style bytes

On the other hand, running the program on Linux with gcc and gdb,
Colourise calls CoulouriseCppDoc (...) (which makes more sense)

Any suggestions to cure the Borland compilation gratefully welcomed
chris

----- Original Message -----


Sent: Tuesday, October 02, 2001 3:04 PM
Subject: Re: [msw]Building wxStyledTextCtrl

| > yes;
| > the de* suggests that
| >
| > void ScintillaBase::Colourise(int start, int end) {
| > is called for every change to the text displayed
| > and that
| > void MyFrame::OnStyleNeeded(wxStyledTextEvent& event)
| > is never called, but I don't know if this is really relevant.
|
| Look where the calls to ScintillaBase::Colourise are coming from.
| MyFrame::OnStyleNeeded isn't needed anymore as the lexer is doing all
that
| internally now.  When the sample was first written the lexers were
not as
| capable.
|
| >
| > Any ideas for other breakpoints?
| >
|
| What exactly is the problem?  Are you not seeing any styles or colors
at
| all?
|
| --
| Robin Dunn
| Software Craftsman

| http://www.veryComputer.com/      Relax with wxPython!
|
|
|
|
|
| _______________________________________________
| wx-users mailing list

| http://www.veryComputer.com/
|

 
 
 

Building wxStyledTextCtrl

Post by Robin Dun » Thu, 17 Jan 2002 02:44:24


Quote:> I have updated wx to 2.3.2 and rebuilt STC and stctest.cpp
> Borland compiler (5.4, 5.5) still  gives light grey font on a white
> background, building same sources with mingw works fine (and the color
> changes as the text is typed)

> in Colourise the line lexCurrent->Lex(start, len, styleStart,
> keyWordLists, styler); leads to
> static void ColouriseNullDoc(unsigned int startPos, int length, int,
> WordList *[],
>                             Accessor &styler)
> which just fills the style bytes with 0.

> Editor::LayoutLine recovers zero for all the style bytes

> On the other hand, running the program on Linux with gcc and gdb,
> Colourise calls CoulouriseCppDoc (...) (which makes more sense)

> Any suggestions to cure the Borland compilation gratefully welcomed

At the begining of stc.cpp there is some code that attempts to force the
lexer modules to be linked in.  Perhaps Borland is optimizing them away, and
so no matching lexers are found at runtime...

--
Robin Dunn
Software Craftsman

http://wxPython.org      Relax with wxPython!

 
 
 

Building wxStyledTextCtrl

Post by chris elliot » Thu, 17 Jan 2002 22:57:39


Thanks Robin: I forced a call to wxForceScintillaLexers in the
constructor of the wxStyledtextCtrl and i works fine. I have put a
patch on sourceforge. I also altered the makefile.b32 for the stc/src
directory, so that the stc.cfg file is made without needing to do
make -f makefile.b32 stc.cfg ; make -f makefile.b32 is now enough

chris

----- Original Message -----


Sent: Tuesday, January 15, 2002 5:44 PM
Subject: Re: [msw]Building wxStyledTextCtrl

| > I have updated wx to 2.3.2 and rebuilt STC and stctest.cpp
| > Borland compiler (5.4, 5.5) still  gives light grey font on a white
| > background, building same sources with mingw works fine (and the
color
| > changes as the text is typed)
| >
|
| > in Colourise the line lexCurrent->Lex(start, len, styleStart,
| > keyWordLists, styler); leads to
| > static void ColouriseNullDoc(unsigned int startPos, int length,
int,
| > WordList *[],
| >                             Accessor &styler)
| > which just fills the style bytes with 0.
| >
| > Editor::LayoutLine recovers zero for all the style bytes
| >
| > On the other hand, running the program on Linux with gcc and gdb,
| > Colourise calls CoulouriseCppDoc (...) (which makes more sense)
| >
| > Any suggestions to cure the Borland compilation gratefully welcomed
|
| At the begining of stc.cpp there is some code that attempts to force
the
| lexer modules to be linked in.  Perhaps Borland is optimizing them
away, and
| so no matching lexers are found at runtime...
|
| --
| Robin Dunn
| Software Craftsman

| http://wxPython.org      Relax with wxPython!
|
|
|
|
|
| _______________________________________________
| wx-users mailing list

| http://lists.wxwindows.org/mailman/listinfo/wx-users
|

 
 
 

Building wxStyledTextCtrl

Post by Robin Dun » Fri, 18 Jan 2002 02:51:03


Quote:> Thanks Robin: I forced a call to wxForceScintillaLexers in the
> constructor of the wxStyledtextCtrl and i works fine. I have put a
> patch on sourceforge. I also altered the makefile.b32 for the stc/src
> directory, so that the stc.cfg file is made without needing to do
> make -f makefile.b32 stc.cfg ; make -f makefile.b32 is now enough

Thanks, I've checked it in.

--
Robin Dunn
Software Craftsman

http://wxPython.org      Relax with wxPython!

 
 
 

1. Building wxStyledTextCtrl

I'm trying to build the sample for the wxStyledTextCtrl using BCC55, but am
running into a bit of trouble. I unzipped the files into the CONTRIB
directory, went to \wx2\contrib\src and typed:

    make -f makefile.b32 stc.cfg

 and it make the file stc.cfg:

    MAKE Version 5.2  Copyright (c) 1987, 2000 Borland

            1 file(s) copied

 I then typed:

    make -f makefile.b32

 and got:

    MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
    Fatal: 'Accessor.obj' does not exist - don't know how to make it

 Any clues what I'm doing wrong?

 Thanks!

 -- David Cuny

2. logon picture

3. Building STC (wxStyledTextCtrl) for wxUniv

4. Windows Media Player- please help

5. wxStyledTextCtrl: Arbitrary selection when scrolling

6. kernel32DLL

7. wxStyledTextCtrl and language settings

8. internet home page

9. wxStyledTextCtrl with german keyboard under Windows

10. Howto handle properties for wxStyledTextCtrl

11. wxStyledTextCtrl: TAB for Menu and Scintilla

12. wxStyledTextCtrl & wordwrap

13. wxStyledTextCtrl Drop as target