BLS
SQL Syntax coloring-project download ...PING Firetox February 14, 2009 03:44PM |
KenKnight
Re: SQL Syntax coloring-project download ...PING Firetox February 16, 2009 03:33PM |
Firetox
Re: SQL Syntax coloring-project download ...PING Firetox February 16, 2009 04:14PM |
FireTox
Re: SQL Syntax coloring-project download ...PING Firetox February 16, 2009 04:35PM |
Alexandre Leclerc
Re: SQL Syntax coloring-project download ...PING Firetox February 16, 2009 05:23PM |
gnDestroy = Event("OnDestroy", MySelf..Name, WM_DESTROY)
BLS
Re: SQL Syntax coloring-project download ...PING Firetox February 16, 2009 06:25PM |
BLS
Re: SQL Syntax coloring-project download ...PING Firetox February 16, 2009 10:09PM |
PROCEDURE StartStyling(pos is int, mask is int) SendMessage(gnHwndScintilla,SCI_STARTSTYLING, pos, mask)
Alexandre Leclerc
Re: SQL Syntax coloring-project download ...PING Firetox February 17, 2009 02:54PM |
BLS
Re: SQL Syntax coloring-project download ...PING Firetox February 17, 2009 06:07PM |
// Implementation of the Publisher Subscriber pattern (also known as Observer pattern) // by Bjoern Lietz-Spendig // Abstract Base-class cPublisher is class PRIVATE // use dynamic array (list) implementation for collection of subscribers Subscribers is array dynamic END PROCEDURE Constructor() ubscribers = new array dynamic of 0 object dynamic PROCEDURE Destructor() delete ubscribers PROCEDURE RegisterSubscriber( oSubscriber is object dynamic ) // if list does not contain this subscriber, add FOR i = 1 TO Dimension( ubscribers ) IF ubscribers = oSubscriber THEN RETURN END ArrayAdd( ubscribers, oSubscriber ) PROCEDURE UnregisterSubscriber(oSubscriber is object dynamic) // if observer is in the list, remove FOR i = 1 TO Dimension( ubscribers ) IF ubscribers = oSubscriber THEN ArrayDelete( ubscribers, i) BREAK END END PROCEDURE NotifySubscriber( _message ) // call update method for every subscriber. Note, here we use the push model ob is object dynamic FOR EACH ELEMENT ob OF ubscribers ob:Update( _message ) END
// Abstract Base-class cSubscriber is class END PROCEDURE VIRTUELLE Update( _message )
Alexandre Leclerc
Re: SQL Syntax coloring-project download ...PING Firetox February 17, 2009 09:14PM |
MySQLHighlighter is a cSyntaxHighlighter ("sql",MySelf) // first argument, the filter to use, second the container for the final object - for a supported filter MyCustomHighlighter is a cSyntaxHighlighter // for a custom filter MyCustomHighlighter::AddWords("bla bla bla") MyCustomHighlighter::Theme(blabla)Or another approach:
MyHighlighterPattern is a cSyntaxPatternSQL // do it yourself - inherit from cSyntaxBasePattern MyHighlighterTheme is a cSyntaxThemeDefault // do it yourself - inherit from cSyntaxBaseTheme MyHighlighter is a cSyntaxHighlighter (MyHighlighterPattern, MyHighlighterTheme)Ok, enought bla bla. As I said, I'm not getting the whole picture, I'm quite sure. But I'll go the way you want to structure the thing. Keeping it simple wherever possible and loaded with "plug-and-play"ness when it's time to use it are almost must-have objectives. - But I think you have the same objectives, as you mentionned it yourself.