Multiline_textfield hardcrash example

Granted, the following snippet produces some feedback looping, it can also make Renoise hardcrash after entering a couple of characters.

I wanted to mention it since it might have to do with multiline_textfield:clear() behaving a bit weird? It looks like it doesn’t quite know if the textfield is selected or not, after invoking :clear(). Maybe GUI engine gets confused about rendering the selection border, what do I know…

    local vb = renoise.ViewBuilder()
    local ml_textfield = nil
    local gate = false
    
    local proxy_func = function()
      if not gate then
        gate = true
        -- ml_textfield.edit_mode = false -- uncomment this line, and it doesn't seem to crash
        ml_textfield:clear()
      end  
      gate = false
    end
    
    ml_textfield = vb:multiline_textfield {
      width = 100,
      notifier = proxy_func
    }
    
    local test_view = vb:column {
      ml_textfield
    }

    
    renoise.app():show_custom_dialog( "",  test_view )

It might have to do with the fact that the multiline_textfield notifier is banged even if you just select the field.