On 23/03/2017 at 13:16, xxxxxxxx wrote:
I'm not sure yet if this is a noob question or not but I have a plugin dialogue with an edit text input and every time I type a letter it seems to be evaluating the code in the Command function. Is this normal? Shouldn't it be waiting for a button press to evaluate?
On 24/03/2017 at 06:05, xxxxxxxx wrote:
I know, we are in Python sub-forum, but in C++ docs, we have a code snippet, that fits your question quite well. Please take a look at the GeDialog manual (the code snippet under GeDialog::KillEvents()). Let me know, if you have problems with the C++ in there.
On your last two questions, well, it of course depends highly on the use-case. A widget should be as flexible as possible to suit as many use-cases as possible. Think for example about the Commander (Shift-C) in Cinema 4D. It reacts to every key press (refining the search) and then executes when pressing enter. So my answers on your last two questions are yes and no.
On 27/03/2017 at 09:44, xxxxxxxx wrote:
Thanks Andreas! Rather then messing with the GeDialog I used a less experienced coders workaround and just put one condition at the start of the command function: "if id != 11050:" which is the id of the edit text field. Works like a charm!