Thanks John.

So the dictionary would contain the fulll API function call and parameters ('BooleanToStringTrueFalse(theBool as boolean) As string') with the key being an integer 'indexof' into the array, and the array would an an ordered list of just the small sub/function name strings("BooleanToStringTrueFalse")?

Does this mean that I would search the array for the fragment I am looking for, then use that found indexof as the key for the dictionary and pull out the longer string?


Yes that makes sense.
Thanks.


At 3:53 PM -0500 25/9/06, Jonathan Johnson wrote:
On Sep 25, 2006, at 3:50 PM, Dr Gerard Hammond wrote:

Hi,

I am writing a RBscript text editor for one of my apps. I have added syntax highlighting, such that is now looks like the RB IDE. Now I want to add a tooltips feature that displays the API for my exposed context classes.

My first thought was to add my api call as a dictionary.

  RBapi = new dictionary
RBapi.Value("BooleanToStringTrueFalse") = "BooleanToStringTrueFalse(theBool as boolean) As string"

This works great. Now my editor has api help info when the user clicks inside any (RBapi key value) word in the editor (eg BooleanToStringTrueFalse)

But to improve this, as I type, I want the editor to show me the best guess, for eg: when I type "BooleanToSt" At this point I want the tooltip to show the help for this BooleanToStringTrueFalse?

My approach would be to use a dictionary and array together. You can make the array an ordered list, and make the dictionary contain indices into the array. Wrap it all up in a class to keep it transparent and simple :)

HTH,
Jon


--
Jonathan Johnson
[EMAIL PROTECTED]
REAL Software, Inc.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


--

Cheers,

Dr Gerard Hammond
MacSOS Solutions
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to