New UserDefinedLanguage module

Loreia2
2011-07-30
2015-04-30
<< < 1 .. 19 20 21 22 23 .. 27 > >> (Page 21 of 27)
  • Loreia2
    Loreia2
    2013-02-11

    Hi stealth789,

    please find your answer at the end of thread (page 22).

    BR,
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2012-12-19

    Hi Loreia,

    The new UDL2 GUI look superb, very neat and sleek, it really is Christmas, thank you so much, really looking forward to using it :)))

    Glad you are able to easily reproduce the XP NPP-UDL2 crash :)

    UDL2 is the only beta piece of software that I use daily. I just happen to be the author of it :-P Many times I am writing new code in NPP UDL that is running in debugger. So, after I finish coding I first stop debugging, than hit F5 and hope for the best. I really like this UDL2 thing. :-)

    LOL :)) You really like and it is a showcase of http://en.wikipedia.org/wiki/Eating_your_own_dog_food :))

    Definitely it is possible. But that is a lot of work. And one needs to know compiler very well in order to use through text editor. I am going to be happy to have Npp support Visual Studio projects, search within a)current project b)entire solution, and has an easy way to invoke compiler through command line.

    Sounds very exciting :) To make it a fully-fledge C++ IDE you would probably also have to hook NPP to the C++ debugger. IMHO the functionalities that would probably tip over an application from a lightweight text editor to a heavy-duty C++ IDE would be things like a GUI editor/builder, UML (reverse-)engineering, etc... but these are just optional stuff that are not essential.

    BR,
    WB

     
  • Wetware Bot
    Wetware Bot
    2012-12-19

    Just a very small suggestion :

    In terms of abbreviations to make it even clearer I would suggest :
    "Dlm" instead of "Del"
    "Kw" instead of "Key"

    Just my 2 cents!

    BR,
    WB

     
  • Loreia2
    Loreia2
    2012-12-19

    Hi WWB,

    ~~~~~~~~~~~~~~~
    "Dlm" instead of "Del"
    "Kw" instead of "Key"
    ~~~~~~~~~~~~~~~~~~
    Thanks, I will add it.

    ~~~~~~~~~~~~~~
    it is a showcase of http://en.wikipedia.org/wiki/Eating_your_own_dog_food :))
    ~~~~~~~~~~~~~~1
    Never heard of this expression before, but it is perfect explanation of what I am doing.

    BR,
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2012-12-19

    Thanks, I will add it.

    Thank you :))

    Most important for me currently is obviously the crash under XP coz I can't easily test/use your beta versions :/

    TTYL,
    WB

     
  • Loreia2
    Loreia2
    2012-12-19

    Hi WWB,

    found the problem with XP.
    This linker options was turned on by default when converting VS2005 project to VS2010 projectx: http://msdn.microsoft.com/en-us/library/bb384887.aspx

    And this damn feature is available only on Vista and newer systems, and makes application crush on XP. I really wonder why was this turned on by default !?!!?

    Anyway, I will update my project and release new RC soon. Thanks for reporting the problem.

    BR,
    Loreia

     
  • Loreia2
    Loreia2
    2012-12-20

    Ok, after some serious frustration, I found the offending line. It was not about randomization. It is about accessing a control, but I just don't understand why it happens.

    ~~~~~~~~~~~~~~
    case WM_INITDIALOG :
    {
    ::SendDlgItemMessage(_hSelf, ........
    ~~~~~~~~~~~~~~~~~~~
    If I try to send message to dialog item during initialization, whole applications crushes on XP (and XP only!!). Further, this kind of code works normally in other projects, it seems to be NPP specific thing. This guy had a similar bug when developing a plugin:
    http://stackoverflow.com/questions/9173828/crash-on-showwindow

    Looking forward to joy of debugging further :-)

    BR,
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2012-12-21

    Ouch!
    IMHO I would also keep in mind that what you observe might just be a symptom of a memory corruption which has a root cause unrelated to that code.
    Do you use any tool(s) to detect memory corruptions? If yes, which one(s)?

     
  • Loreia2
    Loreia2
    2012-12-21

    No, I am still not going in that direction.
    My next step (as soon as I find some time to do it) is to check creation of Dialog. It must be that UDL dialog is missing some option, which causes this kind of problems latter on.

    BR,
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2012-12-21

    OK it makes sense to go from the simplest hypothesis to the wackiest ;)
    Hopefully it's as simple as some missing dialog option :)
    If not, then the consolation prize is that it makes it an even more challenging / interesting bug to solve ;)

    Also if you haven't already done so yourself, maybe that could be interesting to ask one of the other NPP developers to compile your code under XP-VS2008 to check if the error is more execution environment-related or more compilation/linking environment-related.

     
    Last edit: Wetware Bot 2012-12-21
  • cchris
    cchris
    2012-12-30

    I can't wait for a compact UDL dialog!!

    Now the bad news. I had eported to DonHo a crash on WinXP 32/SP3 where you perform the following simple steps:
    1. Open the UDL dialog
    2. Click Styler for default style
    3. Open the font dropdown and close it, without selecting anything. Same with Size.
    4. Close dialog using the X button or hitting Esc.
    Access violation error (0xC0000005). N++ generated a dump file which I sent to Don.

    In the meantime my old computer crashed to death. Bought a new one, on Win8/64. Installed Notepad++ 6.2.3 from installer - it ccouldn't be a fresher install, could it? And just tried again.

    The dialog no longer has an X button. Ok, perhaps a feature. But hitting Esc still crashes N++. And now I no longer have a dump file - have no idea whether this works at all in 64-bit systems.

    Keep on the good work. When I come back to replying to my emails, I'll do so for yours.

    CChris

     
  • cchris
    cchris
    2012-12-30

    Feature request: capitalisation in displayed keywords on a per-group basis.

    Scintilla has a SCI_STYLESETCASE message which lets you tell it, for a given style, whetehr display is forced to uppercase, lowercase or not at all. I think providing this option (probably as 3 radio buttons for each group?) could be a nice readability enhancer.

    Thanks in advance,
    CChris

     
  • cchris
    cchris
    2012-12-30

    Feature request: add option to style fold closers like fold openers.

    This is specially useful when the fold start/end are braces, because Scintilla won't decide whether braces match unless they are styled the same. This has been a long standing request on IdeaTorrent. Brace matching does really help when there are many blocks.

    Thanks in advance,
    CChris

     
  • cchris
    cchris
    2012-12-31

    Ok, yet another feature request... : non nesting blocks.

    Some languages, or perhaps rather file structures, define sections as starting at some header and ending at the next, or the end of the file. These block openers wouldn't be handled right in UDLs, since there are no closing keywords for such groups.

    There is an apparently simple way to handle this situation: a "Don't nest" option on the fold tab. When active, the option would cause a fold opener to close the previous fold if any and start a new one. Order of the starters would define a hierarchy: each starter would close blocks at same or deeper level, and start a new one. Sections fold like any block; folds never overlap.

    Perhaps there is no need for the option, and the behaviour would be automatic if the fold closers list is empty.

    Or even add a new "Section starters" list. Fold openers/closers would work as usual. Section starters would close all blocks and current section, creating another new block.

    It is an IdeaTorrent request, like the other requests I recently wrote.

    TIA
    CChris

     
  • Loreia2
    Loreia2
    2013-01-01

    Hi Wetware Bot,

    and Sourceforge forum strikes again. I just wrote forum post, and damn thing rejected it. Hitting back button in Chrome is of no help. Post is simply lost and I need to write it again. And I hate re-typing more than anything !!!!!!!!!!!!!! Damn SF !!

    Anyway, here is UDL RC 2.1.0.6, this one works on XP.

    https://docs.google.com/folder/d/0B0lMdiEG3L5CT1RHS0FkdDRLUXc/edit?pli=1

    I will use Google drive for distribution of binaries from ow on, since Github decided to stop supporting distribution of binaries directly from github.com/project/Downloads folder.
    Maybe there is a better solution for it, but right now Google drive is good enough.

    Anyway, I wrote this version on Christmas eve, but haven't had enough free time to publish it, so think of it as belated Christmas present :-). And if no bugs are reported by the end of week, I will send the code to Don, for inclusion in official release.

    Merry Christmas and happy New Year,
    Loreia

     
  • Loreia2
    Loreia2
    2013-01-01

    Hi CChris,

    I can't wait for a compact UDL dialog!!
    

    This is only a small test to determine how to do the new Dialog when the time comes to change the GUI. It might take a while though.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1. Open the UDL dialog
    2. Click Styler for default style
    3. Open the font dropdown and close it, without selecting anything. Same with Size.
    4. Close dialog using the X button or hitting Esc.
    Access violation error (0xC0000005).
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    This was reported by a user, and I was able to reproduce it on 32-bit system only. Error is really weird because it happened in default processing of WM_CLOSE message. I spent quite some time trying to resolve this, but I was not able to figure it out. So, temporary solution was to remove dialog’s close button (interestingly, Cancel button with the same code, did not show same functionality) because GUI was soon to be replaced with a new version, which hopefully would eliminate this bug as well.

    ~~~~~~~~~~~~~~~~~~~~~~
    Feature request: capitalisation in displayed keywords on a per-group basis
    ~~~~~~~~~~~~~~~~~~~~~

    This was already requested by a user, and it will be added to some future version. LexUser will be updated to support it rather soon, but feature will be available to users only when new GUI is introduced.
    EDIT: Just re-read your message, I was under impression that you were talking about “Ignore case” option. Are you suggesting to let editor force change the case of a given keyword group?

    ~~~~~~~~~~~~~~~~~~~~~~~
    Feature request: add option to style fold closers like fold openers.
    This is specially useful when the fold start/end are braces, because Scintilla won't decide whether braces match unless they are styled the same. This has been a long standing request on IdeaTorrent. Brace matching does really help when there are many blocks.
    ~~~~~~~~~~~~~~~~~~~~

    Isn't this already implemented?

    ~~~~~~~~~~~~~~~
    Or even add a new "Section starters" list. Fold openers/closers would work as usual. Section starters would close all blocks and current section, creating another new block
    ~~~~~~~~~~~~~~~~~

    I like this one a lot. It would be perfect for log or data files.
    I am just not sure how to handle nesting in this case. The only way is to track position of "section keyword", but that is out of UDL scope right now.
    Still, adding "Section keywords" to Folding tab is definitely a good idea.

    BR,
    Loreia

     
  • Loreia2
    Loreia2
    2013-01-01

    Phew, Firefox can handle this shitty SF forum much better. It successfully recovered messages that were rejected by SF forum, and in the second try it successfully posted the message. Will have to remember to use Firefox on SF.

    BR,
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2013-01-03

    Hi Loreia,

    Happy new year to you too :)

    I've just downloaded UDL RC 2.1.0.6 and I can confirm that the XP crash has disappeared, very nice Christmas present indeed thank you so much :) Even Christmas Eve is not enough to stop you steamrolling over this kind of bugs, you are unstoppable :)
    Now am dying to know what was the cause of the problem and how you solved it?!

    Wrt Google, I must say except for their search engine I prefer to avoid using any Google software coz I've always had a pretty bad experience with everything I tried from them. Just right now, going on https://docs.google.com, Google complained about my browser not being the right one for their website and their website is so bad that simply trying to download the .zip file was a headache!

    Ok anyway, I will now be using UDL RC 2.1.0.6 and although I am not a super-advanced/sophisticated UDL user, I will let you know if I encounter anything worthy of your attention :)

    Thank you a million times again and talk to you soon :)
    WB

    PS: let me know how you solve that bug please :)

     
  • Loreia2
    Loreia2
    2013-01-03

    Hi WWB,

    so you like Opera too :-))
    I was given the same warning when I tested in Opera. It works just fine after upgrade to latest version though. And yes, it is annoying to find File/download option, but it is even more annoying for me to look for alternative distribution method. Any suggestions for a simple and reliable way to distribute binaries are welcome.

    ~~~~~~~~~~~~~~~1
    PS: let me know how you solve that bug please :)

    It turned out to be the most trivial of things. Just like older programmers were telling me years ago "the most simple explanation is usually the correct one".
    
    I had this code to set some check boxes in Comments tab:
    
        case WM_INITDIALOG :
        case WM_ACTIVATE :
        case WM_SHOWWINDOW :
        {
            ::SendDlgItemMessage(_hSelf, IDC_ALLOW_ANYWHERE,    BM_SETCHECK, _pUserLang->_forcePureLC == PURE_LC_NONE, 0);
    

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Code was failing for WM_INITDIALOG. And I was so focused on dialog options I forgot to notice that "_pUserLang" pointer was NULL. Once I realized that I had a void pointer, it was a matter of minutes to find this code in initialization of UDL dialog:

    ~~~~~~~~~~~~~~~~11
    case WM_INITDIALOG :
    {
    _ctrlTab.init(_hInst, _hSelf, false);
    _ctrlTab.setFont(TEXT("Tahoma"), 13);

            _folderStyleDlg.init(_hInst, _hSelf);
            _folderStyleDlg.create(IDD_FOLDER_STYLE_DLG);
            _folderStyleDlg.display();
    
            _keyWordsStyleDlg.init(_hInst, _hSelf);
            _keyWordsStyleDlg.create(IDD_KEYWORD_STYLE_DLG);
            _keyWordsStyleDlg.display(false);
    
            _commentStyleDlg.init(_hInst, _hSelf);
            _commentStyleDlg.create(IDD_COMMENT_STYLE_DLG);
            _commentStyleDlg.display(false);
    
            _symbolsStyleDlg.init(_hInst, _hSelf);
            _symbolsStyleDlg.create(IDD_SYMBOL_STYLE_DLG);
            _symbolsStyleDlg.display(false);
    
            _pUserLang = _pCurrentUserLang;
    

    ~~~~~~~~~~~~~~~~~

    Notice how "_pUserLang " gets its value after creation of each dialog tab. Obviously that makes "_pUserLang " void during the creation and initialization of each tab.

    The solution?
    It is so short and simple I will just copy/paste entire git commit:

    ~~~~~~~~~~~~~~~~~~~~~~~~~11
    Author: Loreia udlv20@gmail.com 2012-12-26 23:10:22
    Committer: Loreia udlv20@gmail.com 2012-12-26 23:10:22
    Parent: 320cee190186419b9a40534e7effec223a76630a (Updated project files to avoid constant rebuilding of the Notepad++ project in Visual studio 2010 even if code was not changed)
    Child: 29658b7106520b6a2c7250f161c69760bfc50434 (Fixed solution file to build SciLexer project)
    Branch: release-2.1
    Follows:
    Precedes:

    Fixed crash on Windows XP systems
    

    ------------ PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp ------------
    index afc89f6..d41a0c0 100644
    @@ -395,7 +395,6 @@ BOOL CALLBACK CommentStyleDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARA
    {
    switch (Message)
    {
    - case WM_INITDIALOG :
    case WM_ACTIVATE :
    case WM_SHOWWINDOW :
    {
    @@ -1045,6 +1044,8 @@ BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM
    {
    case WM_INITDIALOG :
    {
    + _pUserLang = _pCurrentUserLang;
    +
    _ctrlTab.init(_hInst, _hSelf, false);
    _ctrlTab.setFont(TEXT("Tahoma"), 13);

    @@ -1096,8 +1097,6 @@ BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM

             enableLangAndControlsBy(0);
    

    - _pUserLang = _pCurrentUserLang;

             if (pNppParam->isTransparentAvailable())
             {
                 ::ShowWindow(::GetDlgItem(_hSelf, IDC_UD_TRANSPARENT_CHECK), SW_SHOW);
    

    --------------------------------- changes.txt ---------------------------------
    index c1c4716..0e806bb 100644
    @@ -1,11 +1,9 @@
    Changes in this commit.

    -Updated project files to avoid constant rebuilding of the Notepad++ project in Visual studio 2010 even if code was not changed.
    -Revision bumped to 2.1.0.4
    +Fixed crash on Windows XP systems.
    +Revision bumped to 2.1.0.5

    Files changed:
    -PowerEditor/visual.net/SciLexer.vcxproj
    -PowerEditor/visual.net/notepadPlus.sln
    -PowerEditor/visual.net/notepadPlus.vcxproj
    +PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp
    scintilla/include/SciLexer.h
    -
    +changes.txt

    ------------------------- scintilla/include/SciLexer.h -------------------------
    index 27ec869..2686a56 100644
    @@ -203,7 +203,7 @@
    #define SCE_UDL_VERSION_MAJOR 2
    #define SCE_UDL_VERSION_MINOR 1
    #define SCE_UDL_VERSION_BUILD 0
    -#define SCE_UDL_VERSION_REVISION 4
    +#define SCE_UDL_VERSION_REVISION 5

    #define SCE_USER_KWLIST_COMMENTS 0
    #define SCE_USER_KWLIST_NUMBER_PREFIX1 1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    As you can see, I removed case WM_INITDIALOG : in Comments dialog (as it wasn't really necessary), and I put _pUserLang = _pCurrentUserLang; at the beginning of case WM_INITDIALOG : of UDL dialog. I guess just one of these would be enough, but why not fix both while I was at it.

    It was a simple thing after all :-)
    The only interesting thing is that XP throws an exception for that empty pointer and Vista/7 don't.

    BR,
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2013-01-04

    Hi Loreia :)

    so you like Opera too :-))

    I use Ff 3.6.28. I like Ff a lot but I stopped updating when they started using their crazy versioning scheme. I have just checked which version they have reached now : wow 17.0.1 : this is so stupid! I guess in one year they will be at version 40.0.1 so I might as well stay put with a good "old" stable version rather than permanently trying to catch on! Only Google complains about Ff 3.6.28, well too bad, I don't like websites patronizing me about my browser specially as Ff 3.6.28 was released March 13th, 2012 i.e only 9 months ago, a website which does not support a browser version released 9 months ago is not a "web" site, it's a piece of crap.

    It is even more annoying for me to look for alternative distribution method. Any suggestions for a simple and reliable way to distribute binaries are welcome.

    Now that I've figured out how to download the zip file it's fine as it's all I need.

    Thank you for your very detailed explanation about the bug resolution, you couldn't have made it more comprehensive and precise :)

    As to why XP crashed and Vista does not, as you know this is the problem with memory corruption bugs : the consequences are a bit unpredictable and can depend on lot of different things. Imho, using a memory corruption detection tool would help facilitate uncovering and steamrolling most of these hidden potential (and maybe existing) memory corruption related bugs.

    Anyway thanks a lot again for everything and TTYS :)
    WB

     
  • Loreia2
    Loreia2
    2013-01-04

    Hi WB,

    all Google products work just file with older FF versions, they are simply trying to scare users into upgrading their browser. Regardless of that you should upgrade FF to whichever version is the last, upgrading is automatic these days, so you wont even know or care which version you are using.

    And you are being a bit unfair to Mozilla. You are using version 28 while complaining about version 17 :-))))
    The only thing they did was to change old versioning (MAJOR.MINOR.REVISION) by removing MAJOR.MINOR part. New version is simply "next number" and it is released every six months. Who cares about numbers anyway, FF these days is just as fast as Chrome, and just as memory efficient. I just love using it.

    BR,
    Loreia

     
  • cchris
    cchris
    2013-01-04

    EDIT: Just re-read your message, I was under impression that you were talking about
    “Ignore case” option. Are you suggesting to let editor force change the case of a
    given keyword group?

    I'm talking about forcing the /displayed/ case of keywords in a group. No change in the underlying text file was meant.

    CChris

     
  • Wetware Bot
    Wetware Bot
    2013-01-05

    Hi Loreia,

    Thank you for your interesting answer, but :

    all Google products work just fine with older FF versions, they are simply trying to scare users into upgrading their browser.

    I don't want / like to be "scared". If a website doesn't like / doesn't know how to handle my browser they should simply switch gracefully to HTML 4.01 (which is the current HTML standard) and simply shut the f*** up!
    "Scaring" the user about his browser version is IMHO a very bad idea because it puts the user on the defensive psychologically and creates a bad perception and experience from the start. For example Google docs website is so bad that I don't know it's because it's simply really crappy or because it doesn't know how to handle my browser and I will never update my browser just because one or two websites want me to. If these web site providers don't like gracefully switching to HTML 4.01 and shut up (or at least don't act in a totally arrogant/patronizing way) then they shouldn't do web sites.

    Regardless of that you should upgrade FF to whichever version is the last, upgrading is automatic these days, so you wont even know or care which version you are using.

    I don't like automatic upgrades because when I fire up my software I want to be able to use it immediately i.e. not being forced into going through the process of an upgrade which can be lengthy or fail (partially or completely) or require me to change my habits and hence hit my productivity or turn the software I used to like into something I don't like, etc..., etc..., etc...
    And I absolutely want to know which version of a software I am using because it's very helpful to me to know which functionality / GUI design / bug fixes etc... are provided in the version I am using.

    And you are being a bit unfair to Mozilla. You are using version 28 while complaining about version 17 :-))))
    The only thing they did was to change old versioning (MAJOR.MINOR.REVISION) by removing MAJOR.MINOR part. New version is simply "next number" and it is released every six months. Who cares about numbers anyway, FF these days is just as fast as Chrome, and just as memory efficient. I just love using it.

    Well I care a lot about proper use of MAJOR.MINOR.REVISION.
    As you know, I don't like spending time/money having to update my software often especially if these are major updates except if I consciously and wilfully choose to do so (like in NPP-UDL case for example).
    Meaning that if a software changes its major version number very often it totally puts me off because I don't know if that version change represents :
    1) A significant jump in functionality (as it should) and is going to require me to change my habits and/or require me to be a guinea pig.
    2) Is just a minor change and simply used as a marketing tool and/or because the software provider was bored of using his previous major version number.

    Meaning basically that when a software provider updates its major version number very often it creates a huge uncertainty for me at a very high frequency rate : this immediately creates a bad experience even before I've started using the software.

    Who cares about numbers anyway

    I might be in a tiny geeky minority but as you can see I indeed care a lot about numbers :)

    And just a word to gracefully finish with my rant :
    I like a lot the versioning scheme you are using :)

    BR
    WB

     
  • CaiHK
    CaiHK
    2013-01-13

    Dear Loreia
    I meet a big trouble about folding in code. Please give me some help.

    My language syntax is like this:
    begin
    if(...) then
    end if
    do ...
    end do
    end

    (begin & end), (if & "end if"), (do & "end do") would be folding couples. And I put them in Folding in Code 2 Style like this:
    Open
    begin if do
    Close
    end "end if" "end do"

    But it does not work properly. These keywords have been detected and highlighted, while the corresponding group does not match, especially begin and end.
    What can I do to solve the folding?
    Best Wishes
    Your Sincerely
    CaiHK

     
<< < 1 .. 19 20 21 22 23 .. 27 > >> (Page 21 of 27)