Log In    |    Knowledge Base    |    4D Home
Tech Tip: Copying methods between database structures using 4D Insider
PRODUCT: 4D Insider | VERSION: | PLATFORM: Mac & Win
Published On: January 5, 2001

Using 4D Insider to simply copy a method which contains a reference to a table in Database A over to Database B, which has table with the same name that is not otherwise identical, does not work. The method is copied over, but the table reference will be missing (using the default Moving Preferences settings).

When copying objects with Insider, you will have more options if you simultaneously hold down the Control key (Macintosh), or move the objects using the right mouse button (Windows). In this example, a dialog will open, warning you that, "A similar table does not exist." A pop-up menu in the dialog gives you three choices:

"Ignore." This will cause the table reference to be missing in the copied method. You'll then need to edit that code manually in 4D.

"Copy the object." This will copy the table from Database A to Database B. In this example, a new table with the same name as the other one will be added to Database B.

"Use another object." This presents a choice dialog where you can choose another table to replace the table reference with. This will let you choose the table that has the same name, for the copied method to include references to.

Being able to make these choices is particularly helpful when you want to use 4D Insider to recreate a database structure with reorganized tables.

For more details on this topic, see the chapter "Moving Objects" in the 4D Insider documentation.