PDA

View Full Version : Grid.GetCellState, non documented function.



Imagine Programming
03-06-2010, 10:28 PM
Hey all, this is mainly to the IR team, but I was wondering if anyone knew
where this function came from.

I have for you, the non-documented function 'Grid.GetCellState',
to see if it exists, use


Dialog.Message("Does 'Grid.GetCellState' exist?", type(Grid.GetCellState));


you'll see that it shows a dialog with the content "function".

But, why isn't it documented and how do you use it?

RizlaUK
03-07-2010, 07:58 AM
probably a test function that never got removed

it returns the following table for the indicated cell

Focused = true
Modified = false
ReadOnly = false
FixedRow = false
Fixed = false
Selected = true
DropHighlighted = false
FixedCol = false

Test

Debug.ShowWindow()
t=Grid.GetCellState("Grid1",e_Row,e_Column)
if t then
for key,value in pairs(t) do
Debug.Print(key.." = "..tostring(value).."\r\n\r\n")
end
end

Imagine Programming
03-07-2010, 08:08 AM
Wierd, when I tried that very same thing, it returned nil lol. But thanks Dean, I'm implementing this into the Object Action plugin ^^

RizlaUK
03-07-2010, 01:11 PM
it seems to return nil if the cell is not selected, select the cell you passed to the function and it returns the table, its a very buggy function, and the reasons its not documented become apparent while testing :D

Imagine Programming
03-07-2010, 04:10 PM
it seems to return nil if the cell is not selected, select the cell you passed to the function and it returns the table, its a very buggy function, and the reasons its not documented become apparent while testing :D

Perhaps that's why it isn't documented :p