Table'itis

Jan Schenkel janschenkel at yahoo.com
Fri Jul 11 00:58:00 EDT 2003


--- Jan Schenkel <janschenkel at yahoo.com> wrote:
> [snip] 
> 
> Hi Chris,
> 
> When you're dealing with table fields, the actual
> data
> is stored not only in the field text, but also in
> two
> separate custom poperties of the field :
>   the cREVTable["currentview"]
>   the cREVTable["formattedview"]
> 
> And of course the revTable frontScript works with
> these internal data structures rather than the
> actual
> text of the field, and will happily overwrite the
> text
> with its own data when it gets a chance?
> 
> Now how do we use this knowledge ?
>   -- build the (unformatted) data for the table
>   --  column per column, row by row
>   --  note that it wants an extra return at the end
>   put "1" & tab & "foo" & return & \
>       "2" & tab & "bar" & return into tTableData
>   -- update the 'basic' table data :
>   set the cREVTable["currentview"] of field "snafu"
> \
>       to tTableData
>   -- and tell it to format our data and redraw
>   revDisplayFormattedData field "foobar"
> 

Last but not least, the quickest way to empty a table
field is :
  revEmptyTable field "foobar"

This and other tricks can be found by studying the
'revTable' frontScript. To review it :
- open the message box
- click on the 'Front Scripts' button
- check the box 'Show Revolution UI Front Scripts'
- select 'revTable' in the list
- click the 'Edit Script' button.

WARNING :
Be careful not to make changes there, and if
Revolution ever asks you to save changes in its
'revLibrary' stack, DO NOT SAVE THOSE CHANGES (unless
you know what you're doing, of course)

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the use-livecode mailing list