Hello all,
5.0 is amazing. I have been working through the manual learning how do do various things. The double-input-parameters are very useful, but I find that I want a boolean-parameter. Currently I am using 0/1 as the toggle. It is not pretty, but it works. I would like to have a cleaner way to deal with booleans. I cannot find any discussion how to do string-input-parameters. Can you please help.
Bryce
Size:
Color:
Strategy Parameters can only be floats or integers, so 0/1 is the right way to boolean.
A simple string input box -
CODE:
Please log in to see this code.
Size:
Color:
Hello Cone,
First let me apologize in advance because I am very new to C#. I checked the box to add the reference to Microsoft.VisualBasic and added a using Microsoft.VisualBasic to my code, but the only thing recognized is VBcodeProvider. What am I doing wrong?
Size:
Color:
You don't need the "using" because the method already specified Microsoft.VisualBasic.
Did you insert that code in the Execute method and click the "Run the Strategy" button? Remember, when editing code, you need to compile it to run it. The Compile button only compiles (you may just want to check for syntax errors before executing), and "Run the Strategy" compiles and runs.
Size:
Color:
So using appears to be like the pascal with statement, allowing for partial-scoped references. "using" is deleted. I added the statement
altSymbol_1 = Microsoft.VisualBasic.Interaction.InputBox("Prompt", "Title", "Default Text", 500, 500);
to the constructor method. The compiler complains that "interaction" does not exist in the namespace "Microsoft.VisualBasic".
Size:
Color:
QUOTE:
The compiler complains that "interaction" does not exist in the namespace "Microsoft.VisualBasic".
Check Microsoft.VisualBasic, not something else that looks like - it will give exactly this error.
Size:
Color:
Thank you. I know that I checked the Microsoft.VisualBasic box, but when I checked again, it was not. I did it again, compiled, and everything runs.
While it would be perfect if this worked like the strategy parameters, at least this works for now and gets me over this hump.
Thank you for your prompt help.
Size:
Color:
There's a bug in 5.1 with the keeping the References checked. It will be fixed in the next release (5.3).
Size:
Color: