[ScintillaNET] Re: A small patch for scintilla

  • From: "Garrett Serack" <Garrett_Serack@xxxxxx>
  • To: <scintillanet@xxxxxxxxxxxxx>
  • Date: Mon, 21 Jun 2004 13:03:36 -0600

I'll probably extend this a bit and integrate it this week.

There are also other issues around the loading of the dll I want to address. 

Thanks,

Garrett

-----Original Message-----
From: scintillanet-bounce@xxxxxxxxxxxxx
[mailto:scintillanet-bounce@xxxxxxxxxxxxx]On Behalf Of Greg Dietsche
Sent: Monday, June 21, 2004 12:13 PM
To: scintillanet@xxxxxxxxxxxxx
Subject: [ScintillaNET] A small patch for scintilla


I thought I'd drop in an say hi  :)
ScintillaNET is great :)

I thought I'd mention a small problem that i've had with ScintillaNET. 
I'm working on an IDE that features plugins and one of the plugins is a 
code editor based on scintilla. The problems arise when the plugin is 
loading and trying to find the dlls... Since the plugin is located in 
WorkingDir/Plugins/PluginName, LoadDll isn't always able to find 
SciLexer.dll. To fix the problem (this was just a quick fix) I added 
another constructor to scintillanet that takes a string which is the 
path and file name of the scilexer dll. I've attached a patch which 
shows the changes i made to my copy of the source.

The other problem I've had (which I haven't looked very far into either) 
is that at startup, the scintilla control doesn't seem to want to get 
the input focus.

-- 

Regards,
Greg Dietsche    http://www.gregd.org/
GForce Programming:   http://calc.gregd.org
Detached Solutions:      http://www.detachedsolutions.com

**

------------------------------------------------------------------------

Index: D:/Visual Studio Projects/ScintillaNET/ScintillaNET/ScintillaControl.cs
===================================================================
--- D:/Visual Studio Projects/ScintillaNET/ScintillaNET/ScintillaControl.cs     
(revision 13)
+++ D:/Visual Studio Projects/ScintillaNET/ScintillaNET/ScintillaControl.cs     
(working copy)
@@ -11,11 +11,21 @@
        {
 
                #region "custom code"
+               public ScintillaControl(string lexerpath_and_name)
+               {
+                       ScintillaConstructor(lexerpath_and_name);
+               }
+
                public ScintillaControl()
                {
+                       ScintillaConstructor("SciLexer.dll");
+               }
+
+               protected void ScintillaConstructor(string lexerdll)
+               {
                        try
                        {
-                               IntPtr lib = WinAPI.LoadLibrary("SciLexer.dll");
+                               IntPtr lib = WinAPI.LoadLibrary(lexerdll);
                                hwndScintilla = WinAPI.CreateWindowEx(0, 
"Scintilla","", WS_CHILD_VISIBLE_TABSTOP, 
0,0,this.Width,this.Height,this.Handle ,0, new IntPtr(0) ,null);
                                _directPointer = (int)SlowPerform(2185, 0, 0);
                                Resize+=( new EventHandler( doResize ) );
@@ -25,12 +35,11 @@
                        }
                        catch( Exception x )
                        {
-                        throw x;
+                               throw x;
                        }
 
                        _indexMarginType = new Indexed.MarginType(this);
                        _indexIndicatorStyle = new Indexed.IndicatorStyle(this);
-
                }
 
                public void doResize(object sender, EventArgs e)


--------------------------------------------------------------------------
ScintillaNET Mailing List: ScintillaNET@xxxxxxxxxxxxx

    To unsubscribe: Send an email to scintillanet-request@xxxxxxxxxxxxx
    and put "unsubscribe" (without the quotes) in the Subject line. 

    Web Page: http://tinyurl.com/yvoh2
--------------------------------------------------------------------------
ScintillaNET Mailing List: ScintillaNET@xxxxxxxxxxxxx

    To unsubscribe: Send an email to scintillanet-request@xxxxxxxxxxxxx
    and put "unsubscribe" (without the quotes) in the Subject line.

    Web Page: http://tinyurl.com/yvoh2

Other related posts: