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.
Logged In: YES
There's a malloc() in tags.c which should be replaced by an
XtMalloc. Or just use XtNewString.
Logged In: YES
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 "follow-mouse". 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.
Logged In: YES
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:
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
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 "dialog", not
"show_dialog", so "show_calltip" has been changed to just
"calltip". 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
Added documentation for calltip subroutines to
Version 2.3 of the calltips patch against CVS
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
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.)
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()
& 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.
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
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;
code = TF_VERSION;
Version 2.4 of the calltips patch against CVS
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? :^)
The version of the calltips patch that went into CVS.
Logged In: YES
Closing patch... Nate has it on the mainline.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.