#35 Calltips Patch

development
closed-accepted
Nathan Gray
Program (79)
5
2002-08-13
2001-12-20
Nathan Gray
No

Here's an updated version of the Calltips patch for
NEdit 5.2. A couple of bugs have been squashed and
some new conveniences added. Many of the dialogs
have been improved.

Discussion

<< < 1 2 (Page 2 of 2)
  • Thorsten Haude
    Thorsten Haude
    2002-07-13

    Logged In: YES
    user_id=119143

    There's a malloc() in tags.c which should be replaced by an
    XtMalloc. Or just use XtNewString.

     
  • TK Soh
    TK Soh
    2002-07-21

    Logged In: YES
    user_id=411637

    tried out the patch a bit just now, quite a fun patch :-)
    Here's some of my feedback:

    1) kill_calltip() should probably be made a menu item like
    show_calltip(). Right now there are two ways to kill the
    yellow box - activate other windows (focus out), or
    pulldown/popup a menu/dialog. I know I can create the macro
    to call kill_calltip(), but ...

    2) Also I am wondering if the yellow box should just go way
    automatically, when the cursor pos changes. something like
    in the ddd. hmm..... not sure.

    3) a small bug where the tab characters are rendered as
    small boxes inside the yellow box. An XmString issue abviously.

    4) set WM focus mode to &quot;follow-mouse&quot;. Bring up a yellow
    box, move mouse to other window (this close the yellow box),
    move mouse (don't click) back to the window, press Ctrl+' to
    bring up a yellow box, now click somewhere in the text area.
    The yellow box disappears.

    HTH.

     
  • Nathan Gray
    Nathan Gray
    2002-07-22

    Logged In: YES
    user_id=121553

    So here's the new (hopefully last) version of the patch. I
    was going to commit this but I made so many changes I
    thought I'd give it another few days of testing.

    The biggest news is that I've broken all of your calltip
    macros by renaming the macro subroutines. Sorry. If it's
    any consolation, I've broken all of mine too. ;^)

    Here's the latest from the changelog:

    Version 2.3
    Barring any last-minute bugs, this will be the version
    that gets merged in.

    Fixed tabs-display-as-squares problem.

    Added fixes to get_word and version strings to .tips
    files as suggested by T. Haude.

    Fixed the long standing buglet where include blocks in
    tips files caused first line(s) of calltips to get cut off!

    Added alias blocks so that tips can have multiple keys.

    Calltips now have unique IDs so that you can distinguish
    between a calltip you put up and one that something else
    did.

    Changed names of macro subroutines to reflect changes
    and to better fit in with other NEdit macro subroutine
    names. To create a dialog in a macro you use &quot;dialog&quot;, not
    &quot;show_dialog&quot;, so &quot;show_calltip&quot; has been changed to just
    &quot;calltip&quot;. Also, since the $calltip_displayed variable now
    tells you the calltip ID of the currently displayed calltip
    its name has been changed to $calltip_ID. I'm sorry if
    these broke your macros, but that's the way things go in
    development code. :-(

    Added quite a few comments to functions I've added and
    changed some function and variable names to be more
    descriptive.

    Added documentation for calltip subroutines to
    doc/help.etx.

     
  • Nathan Gray
    Nathan Gray
    2002-07-22

    Version 2.3 of the calltips patch against CVS

     
  • Nathan Gray
    Nathan Gray
    2002-07-22

    Logged In: YES
    user_id=121553

    In response to TK's comments:

    1. Hitting escape kills calltips. Adding a menu entry
    seems silly since activating the menu kills the calltip
    anyway. I guess it would be one way of telling the user to
    use escape, but it seems like overkill for that purpose.

    2. This might be useful as a per-calltip option, but I
    often use calltips to remind me of function prototypes as I
    write calls to them, and if the tip disappeared as I was
    typing it would be pretty annoying. Once you get used to
    hitting escape to kill them it's really quite natural.

    3. This is fixed now.

    4. I can reproduce this, but it's tough to understand.
    Calltips are only killed in response to two events--Esc and
    focus leaving the text area. I guess focus must be leaving
    the text area somewhere along the line. It's only a minor
    bug so I'm not going to worry about it until after the
    merge.

    Cheers,
    -n8

     
  • Nathan Gray
    Nathan Gray
    2002-07-22

    Logged In: YES
    user_id=121553

    I just fixed a bug in complete_word_calltips.nm that prevented
    words with certain regex characters from being completed. I'm
    just going to send the file instead of making a new version of the
    patch. (It's also $calltip_ID aware now.)

     
  • Nathan Gray
    Nathan Gray
    2002-07-22

    Version 1.7

     
  • TK Soh
    TK Soh
    2002-07-22

    Logged In: YES
    user_id=411637

    just tried the new patch. the escape key seems to work quite
    well, I guess that'll do it.

    I traced the program on item #4 a bit. somehow focusOutAP()
    &amp; focusInAP() were called again when I clicked on the text
    area, even thought the text area already has the focus. hmmm...

    one more request, is it possible to let user drag the yellow
    box around? sometime it really stand in the way when it has
    a little to much to show :-(

    about the # of lines (of the tag def), I guess there's no
    simple way to make it smarter, is it? Personally, I would
    want to see only the tag def. and not the extra lines.

     
  • TK Soh
    TK Soh
    2002-07-22

    Logged In: YES
    user_id=411637

    also, I tried to add show_tip() to the BG menu, which
    managed to bring up the yellow box. but when I click on the
    text area after that, the box went away. I am guessing it's
    the same as item #4, but just a guess.

    another thing that came off my mind. might be useful if I
    can right-click in the yellow box to kill. I use the mouse a
    lot.

     
  • Nathan Gray
    Nathan Gray
    2002-07-22

    Logged In: YES
    user_id=121553

    Oopsie! There was a bug in 2.3 that made version blocks
    cause error messages. Version 2.4 just fixes that bug. If you
    just want to patch your source, change tags.c line 1857 from:

    code = TF_LANGUAGE;

    to:

    code = TF_VERSION;

     
  • Nathan Gray
    Nathan Gray
    2002-07-22

    Version 2.4 of the calltips patch against CVS

     
  • Nathan Gray
    Nathan Gray
    2002-07-26

    Logged In: YES
    user_id=121553

    I just committed the calltips patch to CVS. Version 3.0 is the
    version 3.0 of the patch is the version that was committed. I think
    the only difference between this and 2.4 is extra documentation.

    Any volunteers to backport this puppy to NEdit 5.3? :^)

     
  • Nathan Gray
    Nathan Gray
    2002-07-26

    The version of the calltips patch that went into CVS.

     
  • Scott Tringali
    Scott Tringali
    2002-08-13

    • assigned_to: nobody --> n8gray
    • status: open --> closed-accepted
     
  • Scott Tringali
    Scott Tringali
    2002-08-13

    Logged In: YES
    user_id=11321

    Closing patch... Nate has it on the mainline.

     
<< < 1 2 (Page 2 of 2)