// Fired when user pressed key in editor area. Key can be changed or set to empty string to disable the keypress.
function OnKeypress(key) {
if (key == chr(13)) {
Script.Message("Instead of linebreak you should see an 'L'");
key = "L";
}
else if (key == "z") {
Script.Message("Instead of a 'z' you should see an 'X'");
key = "X";
}
}
Script.ConnectSignal("keypress", "OnKeypress");
function OnKeypress(key) {
if (key == chr(13)) {
key = "L";
}
}
function OnKeydown(key, shift) {
if (key == chr(13)) {
key = "L";
}
}
Script.ConnectSignal("keypress", "OnKeypress");
Script.ConnectSignal("keydown", "OnKeydown");
for (var i=0;i<triggerList.Count;i++) {
var key = triggerList[i];
AutoComplete.AddItem(Strings, key, key);
}
Aivars wrote:Maybe you could PM me your work-in-progress plugin and I could try to fix it? I have a privilege of looking at the source code of the auto-complete functionality so if anything doesn't work or needs some specific parameters or calling order, it would be easier for me to work on an actual script and then explain what and why the various functions and parameters do; and then I could try to document them.
Aivars wrote:Sure, one way to do it is to swap images (TImage) from timer. This will work unless the plugin does some work that blocks UI. In that case it's better to offload the work to Webkit and display the spinner in the browser, because it will work in a different thread, thus not blocking UI.
Return to Plugins for HTMLPad / Rapid CSS / Rapid PHP / WeBuilder
Users browsing this forum: No registered users and 0 guests