[sharing is fun] multi-textedit


    Mar 13 2008 | 6:13 am
    This patch uses tab and shift+tab to navigate between a set of textedit objects. It's designed to be pattr friendly. The pattr object won't "commit" changes until you hit enter or tab (or click somewhere). Before you commit changes you can hit esc to undo.
    Weird detail: I store " " in the pattr when the textedit is empty because of this issue: https://cycling74.com/forums/index.php?t=msg&th=31908 Otherwise, when recalling a preset with a blank value it won't overwrite whatever's in the textedit. That might be desirable in some situations...
    Limitation: You can't enter numbers outside the range −2147483648 to 2147483647 (32-bit int range). It will wrap around. I tried to defeat this with "output as symbol" mode but that causes other problems. You can enter things like "10000000000000000" if you use quotes.
    Hopefully this makes up for all my complaints about textedit lately ;)

    • Mar 13 2008 | 6:18 am
      Heads up: when I copy the patch from the forum and do "New from clipboard", the patcher window isn't big enough. If you scroll right it will screw up the patch (I move objects around with thispatcher and absolute coordinates).
      Resize the window before doing anything. Don't scroll the patch window.
    • Mar 13 2008 | 10:20 am
      On 13 Mar 2008, at 06:13, Adam Murray wrote:
      > Hopefully this makes up for all my complaints about textedit lately ;)
      Nice patch - very swan-like. (Serene on top, paddling like mad underneath.)
      -- N.
      Nick Rothwell - nick@cassiel.com - www.cassiel.com --- open-source goodies for MaxMSP: Python, Groovy, Nixie Tubes, --- rotatable text bricks, databases: all at www.loadbang.net
    • Jan 28 2009 | 10:36 am
      Hi, very nice patch!
      I have a question about a possible add-on, related to the ubutton. The right outlet of the ubutton claims to send a '0' if I click outside the button...but it doesn't...
      If that would work, you could also deselect a button if you click 'somewhere else'. Who can solve this?
      Kind regards, Bas
    • Jan 28 2009 | 11:05 am
      Quote: Adam Murray wrote on Thu, 13 March 2008 00:18 ---------------------------------------------------- > Heads up: .....(I move objects around with thispatcher and absolute coordinates).....
      Cool patch!. I thought it'd be a lot more useful to not depend on absolute coordinates because any layout change will involve changing the code. Here's a version that moves based on the position of the textedit boxes, and hence does not suffer the problem you mention - you can also position the editors wherever you wish. Resizing is also possible without necessarily needing to recode, as long as you resize all the boxes to the same size, other thsn the highlighter which needs to be 6 pixels bigger than your textedit size in each dimension....
    • Jan 28 2009 | 10:50 pm
    • Jan 29 2009 | 6:27 am
      Quote: AlexHarker wrote on Wed, 28 January 2009 03:05 ---------------------------------------------------- > Cool patch!. I thought it'd be a lot more useful to not depend on absolute coordinates because any layout change will involve changing the code. Here's a version that moves based on the position of the textedit boxes, and hence does not suffer the problem you mention - you can also position the editors wherever you wish. Resizing is also possible without necessarily needing to recode, as long as you resize all the boxes to the same size, other thsn the highlighter which needs to be 6 pixels bigger than your textedit size in each dimension.... >
      Very nice improvement. Thanks for sharing.
    • Jan 30 2009 | 8:16 am
      Thanks Stefan!