Hello Ventuzians!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
TextNode doesn't update with C#-Script
Moderator: Support
TextNode doesn't update with C#-Script
Hello,
i have a touch keyboard and with a C#-script and i use the unicode to identify the letters etc., works fine. I use string-varibles as output and in the property editor everything looks fine.
But when i connect this outputs to a TextNode, the TextNode doesn't update his output. If you switch, for example the Kernel flag on/off it updates.
You can see in the property editor that the incoming string is correct, but not the output.
The same with the ValueSwitch. You have to switch between the case to update the output.
greetings, joschy
i have a touch keyboard and with a C#-script and i use the unicode to identify the letters etc., works fine. I use string-varibles as output and in the property editor everything looks fine.
But when i connect this outputs to a TextNode, the TextNode doesn't update his output. If you switch, for example the Kernel flag on/off it updates.
You can see in the property editor that the incoming string is correct, but not the output.
The same with the ValueSwitch. You have to switch between the case to update the output.
greetings, joschy
3DJo - [Ventuz] freelancer and trainer
Re: TextNode doesn't update with C#-Script
... and other funny things:
the TextNode:
the TextNode:
3DJo - [Ventuz] freelancer and trainer
Re: TextNode doesn't update with C#-Script
Hi Karol,
yes, i did. The C#-Script-Node seems not the problem, it works fine . I can see it in the property editor, it does what it should be to do. The problem i've got in to is, that the output bindings, which values are correct, are not updated correct in the TextNodes. The TextNodes are in different HierachyContainers, but i have the same if i connect a TextNode directly to the Output of the C#-Node.
The same with a different C#-Script which mange some int's, the output is a single int. The C#-Script forks fine, but when i plug the output to a int-expression, the expression don't work correct. My workaround, i use the output from the C#-Script ( the single int) as a event argument which reset a counter with argument-option on. That's work...
greetings,
joschy
Btw, the switched "@" in the pics was gone after a restart of ventuz.
yes, i did. The C#-Script-Node seems not the problem, it works fine . I can see it in the property editor, it does what it should be to do. The problem i've got in to is, that the output bindings, which values are correct, are not updated correct in the TextNodes. The TextNodes are in different HierachyContainers, but i have the same if i connect a TextNode directly to the Output of the C#-Node.
The same with a different C#-Script which mange some int's, the output is a single int. The C#-Script forks fine, but when i plug the output to a int-expression, the expression don't work correct. My workaround, i use the output from the C#-Script ( the single int) as a event argument which reset a counter with argument-option on. That's work...
greetings,
joschy
Btw, the switched "@" in the pics was gone after a restart of ventuz.
3DJo - [Ventuz] freelancer and trainer
Re: TextNode doesn't update with C#-Script
... that's the expression, where the direct connection off the C#-Script doesn't work:
((A <= 9) && (A >= 1)) ? 1 : 0
But with the trick, the output to use as a Event-Argument, it works...
((A <= 9) && (A >= 1)) ? 1 : 0
But with the trick, the output to use as a Event-Argument, it works...
3DJo - [Ventuz] freelancer and trainer
Re: TextNode doesn't update with C#-Script
So if the 'changed' property in your Script is updated correctly on property changes, I have no other ideas what could be going on.
You would have to post the part of your scene with the Script node and we could take a look inside.
If you don't want to share it with the public, you can send me a PM.
Cheers
Karol
You would have to post the part of your scene with the Script node and we could take a look inside.
If you don't want to share it with the public, you can send me a PM.
Cheers
Karol
Re: TextNode doesn't update with C#-Script
Two problem in your Script:
1. Your Generate() method must look like this: your code never returned true!!!
2. All of your EventHandler Methods (On...()) must set 'changed = true' as they change the outputs:
You should read the Scripting section in the help very carefully as scripting involves some pitfalls
Best Regards
Karol
1. Your Generate() method must look like this: your code never returned true!!!
Code: Select all
public override bool Generate()
{
if (changed)
{
changed = false;
if (UNICODE_IN > 1)
{
result = Convert.ToChar(UNICODE_IN);
SingleSign = Convert.ToString(result);
switch (TabSelect)
{
case 1:
Name = string.Concat(Name, SingleSign);
UpdateName();
break;
case 2:
UpdateFirma();
Firma = string.Concat(Firma, SingleSign);
break;
case 3:
UpdateEMail();
EMail = string.Concat(EMail, SingleSign);
break;
}
}
//O_String = string.Concat(O_String, SingleSign);
return true;
}
return false;
}
Code: Select all
public bool OnDot_COM(int arg)
{
EMail = string.Concat(EMail, ".com");
changed = true;
return false;
}
Best Regards
Karol
Re: TextNode doesn't update with C#-Script
Damned... shame on me
Yea, the "changed = true" thing is a pitfall, after this experience i hope it is burned in my brain...
Sorry for the circumstances,
joschy
Yea, the "changed = true" thing is a pitfall, after this experience i hope it is burned in my brain...
Sorry for the circumstances,
joschy
3DJo - [Ventuz] freelancer and trainer