How to detect empty responses in [dialog]

    Nov 15 2015 | 11:20 pm
    simple problem but I can't seem to find the answer: With the dialog object, how can I detect if a user doesn't input text but just clicks 'OK'? Something like 'if $s1 == " " then else $s1' but that obviously doesn't work... I tried counting character output but it seems like there is no output at all if the dialog box is left blank, so there is nothing to check.

    • Nov 16 2015 | 7:18 am
    • Nov 16 2015 | 10:22 am
    • Nov 16 2015 | 12:30 pm
      sooo odd.... "print" connected to sprintf shows the symbol beeing output when the button is clicked and dialog window appearing, but a right inlet of message box shows "symbol" only once the dialog box is closed
    • Nov 16 2015 | 10:56 pm
      probably to do with threading...(thread being blocked). I never use dialog object because it interrupts real-time output
    • Nov 17 2015 | 4:38 am
      it is a general issue to report if nothing is there.
      not sure how to do that best with your dialog box, but to report "nothing" you could compare if somethign is in a buffer by an extra trigger.
      i.e. you´d take the trigger of the message (or the nothing^^) which is coming from the dialog box.
      what that is? well, if it is the mouse then we have a problem. but if it is the return key, you can catch this using [key], add some 250 ms delay (which is not 100% safe but should work in most situations, and then bang a zl reg or messagebox, where you store either the last output of the dialog - or, alternatively, when there is no output, some placeholder like 12345.
    • Nov 17 2015 | 6:31 am
      Very interesting: [dialog] outputs "symbol" then nothing. With [coll], you get really nothing if there's no entry; here is a possible trick:
    • Nov 17 2015 | 5:28 pm
      i cant test now, but wont [sel bubu] be able to report "symbol" at its second outlet?
      not that it would help much, because it would report "list user entry" or "symbol "user entry"" too ...