Hello World
In your browser, go to:
You should see the following screen:
Entry Point
There will be an Application Start Event
node for every Hongtu application.
INFO
This node cannot be deleted
Print Node
Next to Start
node, there is a Print
node. When this node is executed, the text in the node will be printed on top right corner of the screen. It will disappear after 2 seconds.
Connect Nodes
Notice that there are white circles, or Handle
in most visual programming terms, on the side of the two nodes, respectively. You can connect these two nodes by dragging your mouse, from the right side of the Start
node to the left side of the Print
node. The line, which is actually a bezier curve, is called an Edge
.
TIP
The handles were hollow before connecting the nodes, and become solid after connected
Run
By default, we are in Auto Run Mode
, which means any changes applied to the nodes, edges, data of the nodes, will immediately trigger Hongtu to run (if it's already running, then stop the previous execution and run again). So right after you connect the two nodes, you should see the following screen:
Multiple Nodes
Let's add another Print
node by right clicking on the canvas, and select Development/Print
.
Connect two Print
nodes, and run again. You will see two messages printed on the screen. As we can see, Hongtu flows from left to right.
Handle Color
The color of the handles has visual meanings, White
means Statement
, which indicates that when flow arrives through this handle, the corresponding node shall be Executed
. Other colors are Data types
, e.g. for Print
node's lower handle, it is Purple
, which means the data type is String
. Handles with different colors are not connectable, unless the source can be converted to the target type implicitly. So for example, you cannot connect Start
node's right handle (which is white) to Print
node's lower handle (which is purple).
Copy Paste
Instead of manually selecting nodes from the right-click popup, you can also use CTRL+C and CTRL+V to copy paste any existing node, or group of nodes. To select multiple nodes (edges included), you can left click and drag your mouse.
Print Options
Click the arrow at the bottom of the Print
node:
This will show more options:
Duration
controls how long will message stay on the screen, in seconds.Level
controls the color of the message. It will also add a filter inOutput
message.