Posted 18 years ago by Peter T.
Avatar
Hello,

we are currently evaluating your software and from a first view it could fullfill our needs.

All that I could see yet was that Intelliprompts were triggerd by string. or something like that. We don't need reflection or other complicated stuff, but it would be very nice if I could trigger on any key that is pressed and show a list of all my variables that begin for example with an a.

Would I have to add
<KeyPressTrigger Key="MyTrigger" Character="a" ... />
to
<KeyPressTrigger Key="MyTrigger" Character="z" ... />

to make it happen, or is it enough to work like the <KeyPressTrigger.... but activate the functions with editor_KeyTyped?

Regards,
Peter

Comments (3)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Keypress triggers are nice when you want a specific character such as a "." to activate a list but only within a certain lexical state. They make it easy to handle such situations.

However as you came up with, you can also use the KeyTyped event and put code in there to show the member list. If you are going to be popping up a list for every alpha character, then that is probably the better way to go.


Actipro Software Support

Posted 18 years ago by Peter T.
Avatar
Hi and thanks for the reply,

seems that you may have fun in answering my question :-)
For sure I do not want to have a list pop up whenever I press a single alpha character.

I just want an intelliprompt to pop up whenever a word begins.
For sure it may be easier to act on a . because you already know what you are looking for.

But as you know your code in detail, maybe you can tell me what event could be nice to 'sit on' when the user begins a new word. For example, how would I check in the KeyTyped function if the character prior to my typed key was a space, a tab, a ( .. I think that could be an easy solution to have an intelliprompt just at the beginning of a word.

And another question about the pricing, UIStudio and SyntaxEditor include source? I haven't found info about that.

Thanks in advance,
Peter
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Well you can always look at the Token that you are currently on. If you set up identifier tokens like we do in our language defs, you can tell if you are at the beginning of an IdentifierToken and if so, you know you're at the beginning of a word. That's probably the easiest.

Since at KeyTyped time, the character is already inserted, you probably want to do something like editor.Document.Tokens.GetTokenAtOffset(editor.Caret.Offset - 1) and then see if the Token is an IdentifierToken and starts at the previous offset. If so you know you're at a new word.

All the pricing is available here and we don't currently offer source:
http://www.actiprosoftware.com/Purchase/DotNet/Default.aspx


Actipro Software Support

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.