BARfly Help - Node editing - Copying and pasting data

  Copying and pasting data

This page describes content of the BARfly Silver and BARfly Gold builds.

BARfly lets you copy and paste like no other application!  There are two types of data you can copy and paste:

  • Text:  Any text displayed in an edit control
  • Nodes:  Any data structure or block displayed in the node browser or subnode browser

To perform copying and pasting tasks, you use the Edit menu.  The following editing operations are described on this page:

  • Edit.Cut:  Copy text or node to clipboard, then delete the text or node.  Keyboard shortcuts:  Ctrl+X, Shift+Delete.
  • Edit.Copy:  Copy text or node to clipboard.  Keyboard shortcuts:  Ctrl+C, Ctrl+Insert.
  • Edit.Paste:  Paste text or node on clipboard.  Keyboard shortcuts:  Ctrl+V, Shift+Insert.
  • Edit.Paste to End:  Paste node as last child.  Keyboard shortcut:  Ctrl+Shift+V.


 Copying and Pasting:  Text

Copying and pasting text is straightforward.  Simply select text using the mouse or keyboard, and use either the Edit menu items or their keyboard shortcuts.  To select text with the keyboard, hold down the Shift key and move the cursor to increase the size of the selection.

You can copy text out of any edit control.  This includes the log, the I.F. text editing view, the data file text view, the data file dump view, and all of the various informational views.  If you see it, you can have it.

You can paste text to any edit control that has a white background.  This includes the I.F. text editing view, the data file text view, and the data file dump view.

The copying and pasting keyboard shortcuts also work on the single-line edit controls in various pop-up dialog boxes.

One should pay special attention to dump view when it comes to copying and pasting text.  The ability to copy and paste dumped text means a person can replicate complex portions of binary data in a short amount of time, much shorter than what it would take to manually enter a large amount of data.


 Copying and Pasting:  Nodes

The ability to copy and paste nodes in the node browser is one of BARfly's smartest features.  Simply select the node in the node browser (or subnode browser), copy or cut, and then paste at any other location in the node browser.  It's that easy.  Really, it is.

You can copy any node from the node browser, even the top-level node.  You do not need to keep the node in its original location in the tree before you paste it.  The nodes remain on the clipboard until you paste them, so you can delete the source nodes if you want.

You can't copy every type of line in the subnode browser.  The only node types you can copy are those that can appear in the node browser, which include only one type of node found in both node and subnode browsers:  data structures.  If you try to copy an array or a scalar variable, BARfly reports an error message.

In this example, the first "RGBQUAD" structure was copied, and pasted four times in a row under the "bmiColors" block.

Of course, the above example is a fairly simple application of copying and pasting.  It is also possible to copy organized blocks with many sub-levels of children and paste them at a completely different location in the hierarchy.  Any place where you can insert a node, you can paste one.

There are two menu commands for pasting nodes, the reason being that sometimes you must distinguish the location where you are trying to paste the node.  The Edit.Paste operation inserts the clipboard contents before the selected node.  The Edit.Paste to End operation inserts the clipboard contents as the last child of the selected node.  Basically, Edit.Paste is synonymous with Insert.Insert Node, while Edit.Paste to End is synonymous with Insert.Add Node to End.


 Copying and Pasting:  Leaping across the file format boundary

Some people might have figured out that copied-node clipboard contents must be composed of a record of node data, including details about the I.F.  So you might assume that the clipboard contents, once copied from one file format, cannot be pasted into another file of a different format, with a different I.F.

Different implementation files, different unique identifiers.  You can't paste to a different file format, can you?

You can.

Whenever BARfly is requested to paste node data to a location outside of the original data file, it compares the two implementation files and establishes parallels between the two.  If two constructs bear the same name in both files, BARfly examines them further to determine if the constructs are identical enough to allow a cross-format paste of that construct.

What this means to the user is this:  if a construct is declared the same way, and its children are declared the same way, in both implementation files, you can copy from one and paste to another.  BARfly has to do a lot of work.  You don't.

If any part of the clipboard contents includes nodes that do not have parallels between constructs in the two files, BARfly generates the following error:

"Clipboard format inconsistent with destination!"

File formats that are totally disparate (for example, BMP and MIDI) understandably will not have any parallels, meaning copying and pasting nodes across formats cannot occur.  But similarly formatted files, especially those designed to support particular protocols that dictate consistent data formatting, are ideal candidates for cross-format pasting.


  See also: [Inserting and deleting nodes] [Editing data in the data display view] [Undo/Redo capability]


BARfly Help Copyright © 2009 Christopher Allen