Potential Bug

    Oct 20 2008 | 1:47 pm
    Unless I am doing something really stupid or this is intended behaviour, I have a bug. In the patch below, if there is text entered in the text field then the patch is closed by pressing cancel (using wclose), the text is still triggered - though if you look at the patch there is no reason why this should be.
    This only works if you change the text in the text field.
    I tried all sorts of workarounds using gates, text objects etc and I always get the same behaviour.
    Mac OS X 10.5.5 / Intel iMac Max 5.0.5

    • Oct 20 2008 | 3:16 pm
      Try storing the output in [zl reg] and using the "OK" message to trigger it.
    • Oct 20 2008 | 3:51 pm
      Thanks. That works great. Can anyone explain why it behaves the way it does though? It doesn't seem to make sense to me.
    • Oct 20 2008 | 3:56 pm
      It seems that [textedit] sends out it's contents when it is deselected but the [zl reg] workaround is simple enough.
    • Oct 20 2008 | 7:44 pm
      I think that it would be nice to have this "ouput-on-lost-focus" as an option ;)
      Here is another workaround that will keep the old text if you click on cancel (as [dialog] object does ;)
    • Oct 21 2008 | 9:51 am
      So, I looked at all your methods, including what Stefan did in the other thread. On their own these work well, but weirdly I still get it outputting text in this patch which is essentially the same only with a bit of eye candy and some customisability (real word?).
      When the dialogbox/patch opens with a bang the gate is closed. If the text box is defocused then nothing should get through because the gate is closed. Clicking cancel sends a 0 to the left inlet of gate anyway so even if it was open it should still be closed when the wclose message is sent to this patcher.
      In fact, the only time the gate is open is if the OK button is clicked and then after the text is sent it's closed again.
      Yet if I still type some different text in and press cancel the text is output, seemingly through a closed gate.
      Am I going mad?
      Here's a test patch and I have attached the abstraction.
      P.s. If you can get it working then feel free to use it. I also have matching warning and confirm boxes if you want - these actually work. ;)