Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Cloning a table to another fcx control (Read 3221 times)
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Cloning a table to another fcx control
Mar 29th, 2010 at 5:10pm
Print Post  
Hi,

I understand that table.clone creates a clone of a table (btw, Table.Clone() method is not in the help file). Roll Eyes

How can I place a cloned object in another fcx control? I could only find CreateTable(...) to create a new table, but no way to insert an already created table. I'm sure I'm missing something but can't figure out what ???

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Cloning a table to another fcx control
Reply #1 - Mar 29th, 2010 at 6:31pm
Print Post  
Hi,

The only way to do that I can think of is to call fc1.SaveToStream(stream) followed by fc2.LoadFromStream(stream) while the table is selected. You will need a pointer to OLE stream as argument. If the language you are using does not have direct support for OLE streams, you can create one through the CreateStreamOnHGlobal API function.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Carlos_Rocha
Junior Member
**
Offline


I love Jazz

Posts: 70
Joined: Mar 26th, 2010
Re: Cloning a table to another fcx control
Reply #2 - Mar 29th, 2010 at 9:42pm
Print Post  
Ok. One final question Just to make things a lil more clear to me:
So, CreateTable() is the only way to add elements to Tables collection. And when we get an Item from Tables collection what we actually get is a copy of that item, right?
What about CopyToClipboard and PasteFromClipborad?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Cloning a table to another fcx control
Reply #3 - Mar 30th, 2010 at 8:25am
Print Post  
You get a reference to the actual table from the collection, and not a copy. You can also use the CopyToClipboard and PasteFromClipboard methods to copy a table to another flowchart, but that will delete whatever users have stored in the clipboard. And internally the clipboard methods use SaveToStream and LoadFromStream anyway.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint