Re: Table'itis
--- Jan Schenkel <[EMAIL PROTECTED]> 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 ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Table'itis
--- [EMAIL PROTECTED] wrote: > Try this ... > 1. Create a new blank mainstack. > 2. Draw a descent sized Field on it > 3. Go into the Inspector and check the Table > settings (Table Object and Cell > Edit) > 4. Put some numbers in the first four cells of > column one (how about 1, 2 ,3 > and 4) > 5. Open the message box and execute ... put empty > into fld 1 > 6. The field should go blank > 7. Click on the cells into which you previously > input data. > 8. Like magic your numbers reappear in the cell > while it is being edited. > > Second round ... > 1. Open the message and execute put "TEST" into > line 3 of fld 1 > 2. "Test" appears in row 3 column 1 > 3. Click on it and you will see the number you > entered and then wiped out > earlier and not "TEST" > > Third round ... > 1. Open the message box and execute ... put empty > into fld 1 > 2. Click on row 2 column 1 > 3. One of the earlier numbers should appear. Type > over it with another number. > 4. All the earlier numbers appear. > > Fourth round ... > 1. Use the "Popup Menu" button and draw a quick > button off to the side. > 2. Go into the Inspector and give it some Menu Items > (how about A, B, C, and > D each on a sep. line) > 3. Select line 2 of column 1 but don't change > anything. > 4. Click on your pop up button and watch it party > again. > > I'm very open to suggestions! Feel free to point out > something simple like ... > set tableNotBuggy to true > ... I'm not too proud for anything at this point. > 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" 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 ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Table'itis
Try this ... 1. Create a new blank mainstack. 2. Draw a descent sized Field on it 3. Go into the Inspector and check the Table settings (Table Object and Cell Edit) 4. Put some numbers in the first four cells of column one (how about 1, 2 ,3 and 4) 5. Open the message box and execute ... put empty into fld 1 6. The field should go blank 7. Click on the cells into which you previously input data. 8. Like magic your numbers reappear in the cell while it is being edited. Second round ... 1. Open the message and execute put "TEST" into line 3 of fld 1 2. "Test" appears in row 3 column 1 3. Click on it and you will see the number you entered and then wiped out earlier and not "TEST" Third round ... 1. Open the message box and execute ... put empty into fld 1 2. Click on row 2 column 1 3. One of the earlier numbers should appear. Type over it with another number. 4. All the earlier numbers appear. Fourth round ... 1. Use the "Popup Menu" button and draw a quick button off to the side. 2. Go into the Inspector and give it some Menu Items (how about A, B, C, and D each on a sep. line) 3. Select line 2 of column 1 but don't change anything. 4. Click on your pop up button and watch it party again. I'm very open to suggestions! Feel free to point out something simple like ... set tableNotBuggy to true ... I'm not too proud for anything at this point. ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution