Archive of UserLand's first discussion group, started October 5, 1998.

Copying a table

Author:Dave Polaschek
Posted:5/31/1999; 8:01:49 AM
Topic:Copying a table
Msg #:6896
Prev/Next:6895 / 6897

Here's what I'm trying to do:

I want to build a table in local storage within a script, and then copy it to the clipboard as a table, so I can later paste it into another table. The reason I'm doing this is that I can't be sure which of a dozen tables I'll be pasting it into (otherwise I'd just build it right in the destination).

I do this with the following snippet:

local(tempTable)
new(tableType, @tempTable)
new(stringType, @tempTable.text)
new(dateType, @tempTable.date)
tempTable.text = "test"
tempTable.date = clock.now()
clipboard.putvalue(tempTable)

The problem is that when I paste, I get an item named "pasted binary" that's a binary object (of kind binary[tabl]). I can manually convert this to a table, but it seems as if there ought to be a way for this to happen automagically.

I'm using Frontier 5.0.2b19. Anyone have any suggestions? Ideally I would be able to set the name of the item as well as making making it paste as a table.

-DaveP




This page was archived on 6/13/2001; 4:50:32 PM.

© Copyright 1998-2001 UserLand Software, Inc.