This project is read-only.


Topics: Developer Forum, User Forum
Sep 10, 2008 at 6:29 PM
Edited Sep 10, 2008 at 6:35 PM

Many thanks for this great component, saved me a zillion hours.

And there's no better way to show appreciation than giving back a few bugfixes :)

1) I refactored the spelling of "delimeter" (a tool that measures how many pickles are left in your deli) to "delimiter" (a character used to separate lists).
No big deal in the code, but looks ugly when users have to mispell it on purpose in their config files.  Hit a number of files.

2) Fixed a bug with specifying scrollbars. Changed the case "scrollbar" inConfiguration.cs:561:
case "scrollbars":
  _scrolling_ScrollBars = (ScrollBars)Enum.Parse(typeof(ScrollBars), reader.Value, true);

The |= operator wasn't doing as expected, it was instead always negating all values, effectively breaking the flag.
There is no reason to be able to specify multiple space-separated values anyway since "both" is the same thing as "vertical horizontal", so I simplified the whole thing.

I made similar fixes on lines 770, 1063, 1468, 1587,  and 1681 of the same file (just search for "|=")

3)  Removed a throw statement from ConfigurationManager.cs:

  throw new FileNotFoundException("Could not find the custom configuration file.", _customLocation);

I think it's no big deal if the custom config is not found, it allows users to customize some languages but not others by putting a <language>.xml file in the pre-specified directory.

4) I re-wrote the getCustomConfigPath(string language) method in ConfigurationManager.cs:525 to be:

private string getCustomConfigPath(string language) {
    return language;
  if(File.Exists(Path.Combine(_customLocation, language + ".xml")))
    return Path.Combine(_customLocation, language + ".xml");
  return null;

The old method was overly-complicated and didn't work right because it was checking !string.IsNullOrEmpty(_language) instead of !string.IsNullOrEmpty(language).

5)  Hotspot click and zoom events were firing twice and throwing an exception:

Scintilla.INativeScintilla.cs:3061, 3069, 3077, 3085, 3094:

Removed the code
  if(Events[_dwellStartEventKeyNative] != null)
    ((EventHandler<NNativeScintillaEventArgs)Events[_dwellStartEventKeyNative])(this, ea);

from each of those methods.  Not only was the cast failing and throwing an exception, but the call right after to

OnDwellStart(new ScintillaMouseEventArgs(ea.SCNotification.x, ea.SCNotification.y, ea.SCNotification.position));

does exactly the same thing - fires the event (without the cast exception).

I think that's about it.  Thanks again, this thing makes my project look so pro it hurts!  Keep up the good work -

P.S. Sorry I couldn't find the code-formatting feature in this posting text box, maybe there isn't one ?_?

Sep 10, 2008 at 6:36 PM
Woah also FYI, do NOT try to post here with Chrome, it completely mangles your post T_T