Concept : Understanding the Code Toolbar

Page Status: Beta

Back to Concepts and HOW TOs

Contents

[edit] Description 

When you have a function (Model code) open in the Design Editor, a Code toolbar is available in the toolbar area. The Code toolbar provides four actions that you can perform on selected code statements:

  • Move up one line
  • Move down one line
  • Wrap statements in a If Condition statement
  • Comment out statements

Use Move up one line and Move down one line to move the selected code statements above (or below) the code statement immediately above (or below) the selected statements.

Use Wrap statements in a If Condition statement to wrap a selected set of code statements in a If Condition statement. The case statement itself is <not set>; set it as appropriate.

Use Comment out statements to comment out a selected group of statements. You can also comment out one code statement by selecting the code statement and selecting Comment Out in the Property Editor. Individual commented lines are green and  have // prepended to the line; commented blocks of statements, such as a case statement, are green and encased by /* */, similar to C/C++ comments.

[edit] Notes

  • When you comment out a code statement that contains nested code statements, such as a Case statement or collection iteration, all of the statements within the block are recursively disabled.
  • Nested statements are supported. For example, if you comment out an If Condition statement that is contained within a Collection Iteration, and then comment out the Collection Iteration, the nested block comment is preserved. If you remove the commenting from the Collection Iteration, the nested block comment on the If Condition statement remains intact.
  • When a block of code (such as a Case statement, Collection Iteration, etc.) is commented out, you cannot drag code statements into the block.
  • Var statements cannot be explicitly commented out, however, they turn green if they are contained within a commented block of code.
  • OnError statements cannot be commented out, however, they are never executed when the associated statement is commented out.

[edit] See Also

Bungee Logic

[edit] Tags

    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.