Kpacnaja_Shapotshka
Messages : 8 Date d'inscription : 2017-02-11
| Subject: New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Mon 13 Feb - 1:53 | |
| Hi,
as I played around with the switchcasedemo example, I tried to insert another switchcase node .
The new switchcase node was autosized (number of cases) and autorouted means connected to random object nodes depending on the position I inserted the node. Strange and imo too much auto.
I see, you generate code on the fly and you cant have an unconnected switchcase node, but autoconnecting to random objects should be ommitted.
An alternative to autoconnecting to random object nodes would be to have a "system dummy autoconnect" object which every newly created switchcase node is connected to. After creation the user/programmer can alter the graphs and connect to the nodes, she wants to.
The number of cases should be asked from the user before creation or you create a "standard" switch case with one expression, a true and a false input object (like the if node) and possibility of adding cases (input expressions) with an e.g. plus button at the top of the node. Removing unused (empty) expressions should also be possible.
What is the meaning of the bottom expression? I would have expected an "other" input object there, which is used, when none of the expressions are true.
Kpacnaja_Shapotshka | |
|
Admin Admin
Messages : 59 Date d'inscription : 2017-01-08
| Subject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Mon 13 Feb - 22:27 | |
| if you leave last expression to blank, it's a 'true'.
if(exp1) { } else if (exp2 { } else if(exp3) { } else if(true) { }
AUtoconnect relies on initial position of the node and try to connect nearby inputs of same type.... not really smart and sometime confusing.... the best solution is perhaps to by in 'move' mode after creation of a node, showing 'future' connections.... realize that it's not a very interesting feature....
| |
|
ChrisLT
Messages : 45 Date d'inscription : 2017-01-30 Localisation : Newbury, Berkshire, England
| Subject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Mon 13 Feb - 23:39 | |
| But, if you leave the last expression blank, you cannot enter an object for the 'else' case. You must edit it, then the yellow input object connector appears. By the way, it would be a lot clearer if, instead of labelling the inputs 'expression1', 'expression2',... 'expression3' you labelled them 'if', 'else if' ,... 'else'. | |
|
Admin Admin
Messages : 59 Date d'inscription : 2017-01-08
| Subject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Tue 14 Feb - 20:00 | |
| | |
|
Admin Admin
Messages : 59 Date d'inscription : 2017-01-08
| Subject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression? Thu 16 Feb - 1:54 | |
| fixed. will be cool in next version
| |
|
Sponsored content
| Subject: Re: New switchcase node autosized and autorouted, not changable; meaning of bottom expression? | |
| |
|