- ago
I am in the process of building a new building block.
I use:
CODE:
public override void GenerateVarCode() { VarCode.Add("MyFancyVariableCode()"); base.GenerateVarCode();[ }

This seems to produce no text in generated code.
0
450
Solved
3 Replies

Reply

Bookmark

Sort
Cone8
 ( 5.88% )
- ago
#1
Always works for me.
Call the base method first. The first thing it does is clear the VarCode list.
0
Best Answer
- ago
#2
Perhaps you need to call RegisterVariable() in Initialize with the variable name you're trying with VarCode.Add()?
0
- ago
#3
QUOTE:
The first thing it does is clear the VarCode list.

Ok, this is a good explanation.
It is inconsistent with the other Generate*Code() routines however. These allow me to add some code *before* the "base" code appears - sometimes useful...
0

Reply

Bookmark

Sort