When you realize a table widget whose elements have not yet been assigned a value, retrieved element values would be expected to be empty strings, as inferred by the following note in the IDL Help description for the VALUE keyword to WIDGET_TABLE:
"Note: If the VALUE keyword is not specified, the data in the created table will be of type STRING."
(See:
http://www.exelisvis.com/docs/WIDGET_...)
For example:
IDL> wb = widget_base(/col)
IDL> wt = widget_table(wb, xsize=3, ysize=3)
IDL> widget_control, wb, /realize
IDL> widget_control, wt, get_value=vals
IDL> help, vals
VALS STRING = Array[3, 3]
IDL> help, vals[0, 0]
STRING = ''
Assuming then that an array of empty strings is an indication that the table has not yet been initialized, below is subsequent code that might indicate the status of the table widget "wt" from the example above:
if isa(vals, 'string') then begin
test = strjoin(vals, /single)
if test eq '' then $
print, 'Table has not been initialized.' $
else $
print, 'Table has been initialized'
endif else $
print, 'Table has been initialized'
I hope this can be helpful.
-Jim