Focus and jit.cellblock: newbie question


    Dec 08 2006 | 5:39 pm
    Hi,
    I'm trying to send a jit.cellblock object a message (such as select 1 2) so that it will send the value it holds at 1,2 (such as C:/DataForMax/sand.mov) to a jit.qt.movie object.
    I can do this, but I can only get cellblock to send the value for whichever item has focus. I can change the value within any specified cellblock cell using set. But I can't seem to use select to cause a specified cell to send its value...unless it is already clicked by hand (mouse click) and so focused.
    I don't want to have to use the mouse to give focus to the cell that holds the value I want to send. Is there a way to send cellblock a message that will change the focus from cell to cell?
    Thanks for any help.
    Robert

    • Dec 08 2006 | 6:13 pm
    • Dec 08 2006 | 9:25 pm
      I tried what you're talking about. If jit.cellblock is set to Single Cell Select, you just send it select $1 $2 messages and the contents are sent out the left outlet, regardless of which cell is highlighted, or whether the cellblock has focus. If jit.cellblock is set to No Selection this doesn't work (I had thought it would but apparently not).
      Even though select $1 $2 highlights that cell it doesn't need to be set beforehand with the mouse or anything.
      Not sure if that helps...
      --CJ
    • Dec 09 2006 | 7:49 am
      Hello,
      Thanks for your replies. As I noted, I'm a beginner with Max. I'm hoping I'm providing the patch correctly.
      Here is a text of my patch. I've created a number of toggles, each to either set a value in a cellblock cell, or to select the value and send it to a qt file and window.
      My goal is to send messsages to the cellblock to change the file that is loaded into the qt window.
      The patch follows. Thanks again R Edgar
    • Dec 09 2006 | 9:40 am
      hi,
      not sure if I got your problem, but this might help you a bit anyway cheers Falk
      Am 09.12.2006 um 08:49 schrieb Robert Edgar:
      > > Hello, > > Thanks for your replies. > As I noted, I'm a beginner with Max. I'm hoping I'm providing the > patch correctly. > > Here is a text of my patch. I've created a number of toggles, each > to either set a value in a cellblock cell, or to select the value > and send it to a qt file and window. > > My goal is to send messsages to the cellblock to change the file > that is loaded into the qt window. > > The patch follows. > Thanks again > R Edgar > > max v2; > #N vpatcher 15 55 1062 648; > #P toggle 283 99 15 0; > #P window setfont "Sans Serif" 9.; > #P newex 165 414 110 9109513 jit.window Smog 320 240; > #P newex 168 368 91 9109513 jit.qt.movie 320 240; > #P newex 98 290 32 9109513 metro; > #P newex 261 285 26 9109513 print; > #P newex 136 207 74 9109513 receive myVals; > #P toggle 67 246 15 0; > #P toggle 293 147 15 0; > #P toggle 599 62 15 0; > #P toggle 629 57 15 0; > #P toggle 377 68 15 0; > #P toggle 266 33 15 0; > #P number 601 496 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; > #P number 523 494 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; > #P newex 674 514 63 9109513 send myVals; > #P newex 668 456 62 9109513 prepend read; > #P newex 540 452 54 9109513 unpack 0 0; > #P newex 550 403 44 9109513 zl slice 2; > #P user jit.cellblock 494 178 1041 384 139 9 3 3 176 17 0 1 1 1 1 1 > 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 > 1 1 0 4 0 0 0; > #X set 1 1 C:/DataForMax/sand2RE.mov; > #X set 1 2 C:/DataForMax/sand2RE.mov; > #P message 658 128 167 9109513 set 1 1 C:/DataForMax/sand2RE.mov; > #P message 658 88 209 9109513 set 1 1 C:/DataForMax/sand_room/sand. > 390.jpg; > #P message 412 81 167 9109513 set 1 2 C:/DataForMax/sand2RE.mov; > #P message 309 42 209 9109513 set 1 2 C:/DataForMax/sand_room/sand. > 390.jpg; > #P newex 316 191 49 9109513 select 1 2; > #P newex 324 148 49 9109513 select 1 1; > #P connect 18 0 21 0; > #P connect 22 0 23 0; > #P connect 21 0 22 0; > #P connect 19 0 22 0; > #P connect 19 0 20 0; > #P connect 13 0 2 0; > #P connect 17 0 1 0; > #P connect 24 0 0 0; > #P connect 14 0 3 0; > #P connect 2 0 6 0; > #P connect 1 0 6 0; > #P connect 0 0 6 0; > #P connect 3 0 6 0; > #P connect 4 0 6 0; > #P connect 5 0 6 0; > #P connect 8 0 11 0; > #P connect 7 0 8 0; > #P connect 6 0 7 0; > #P connect 8 1 12 0; > #P connect 15 0 4 0; > #P connect 16 0 5 0; > #P connect 7 1 9 0; > #P connect 9 0 10 0; > #P pop; > >
    • Dec 09 2006 | 9:29 pm
      Thanks, Falk. I was making three mistakes: 1. I misunderstood the "select" function. 2. I misunderstood the "toggle" function. 3. I didn't realize that you could set the focus of the cellblock simply by sending it two numbers.
      We have it working now. Our intention is to replace the inputs with signals from MIDI sources...but we wanted to understand how the output and selection worked first, before we got into MIDI details.
      Thanks very much for your help.
      Robert