Info(“matrixclickedobject”)

Unless I’m misunderstanding it, info(“matrixclickedobject”) is not working. I have an array that has three items in each element separated by Tabs. They’re being displayed in a matrix via three Text Display items on the Matrix Frame. That’s all working fine but trying to identify what is being clicked within the matrix is proving to be elusive.

I have named each Text Display, but clicking on the matrix with info(“matrixclickedobject”) yields a blank. If it’s any clue, info(“matrixseparator”) is responding with 0. It should be char(10) although I’ve also tried the whole thing with ¶.

I can pin down the element being clicked on by using info(“matrixrow”) or info(“matrixcelldata”), but I can’t identify which of the three items within the element was actually clicked.

I am not able to verify this. In a simple test matrix with 3 named text display objects in the frame I found info(“clickedmatrixobject”) in the matrix code accurately returned the name of the clicked TDO. [PanX 10.2.0.b25; MacOS 12.1]

I’m thinking the function name is a typo in your response? The name of the function is info(“matrixclickedobject”), not info(“clickedmatrixobject”).

However, the info(“matrixclickedobject”) function does work. If it didn’t, a bunch of standard Panorama features would not work. So something about your form must not be set up correctly, but I don’t know what without more information.

Maybe the info(“matrixclickedobjectid”) could help you debug this. Make sure that this function returns an ID value. You can use the objectinfo( function with this to verify that you are getting the correct object.

I don’t think it is a clue, but how did you come up with zero? The matrix separator is a text value, it cannot be numeric. I’m guessing it is really empty text, which is treated the same as a carriage return.

Maybe you used?

asc(info(“matrixseparator”))

That would return zero if the separator is empty.

Still stuck on getting a simple matrix process to work. Part of the problem may be that every change requires clicking on the Refresh Matrix button. But aside from that I can’t seem to get consistent behavior if I build a few in succession.

The solution to my original issue, with a matrix consisting of an array, is to use info(“MatrixClickedObject”) plus info(“MatrixCell”) in order to determine what Text Display was clicked on.

Here I have a display showing the new of the Text Editor and the Matrix Cell, so I know it’s the first item of the array’s third element, Jill, and can run processes accordingly.

In my earlier failure, I had the Matrix nicely displaying 12 rows with the Fixed # of Rows set. In the screen shot above, they’re set at a fixed height of 19px each and there’ easily room for 12 rows. If I switch it to Fixed # of Rows, they get crunched into a tiny mass at the top, even if I reduce the number to 10. Refresh doesn’t fix it.

Ah, just discovered that by turning Off the Scroll Bar for the Matrix object, then turning it on again, the height is corrected. Changes of Elasticity had no effect.

So I can make it work, but again, it doesn’t seem like I can reliably get the same results from one build to another. Of course, there’s enough to it that it could be me, but I’m not finding differences from one matrix to another besides how they function.

That option should only be used for non-scrollable applications like a Calendar. The Fixed # of Rows option will definitely not work if you have the scroll bar enabled. If the matrix is linked to an array or to the database, where scrolling is usually needed, you should only use the Fixed Height option.

That may be, but that’s what it took to get the Matrix to display properly per my description.

I was thrashing around, so to speak, trying to get the Matrix working. Ultimately I don’t want it to scroll and had therefore chosen the number of rows I wanted. That gave me the squashed display. I wasn’t concerned about a scroll bar showing or not at that point. All I knew was that the display was not what I expected so turning off the scroll bar wasn’t yet on my radar.