AutoSwitchBase¶
-
MacroModule
¶ genre FlowControl
author Volker Dicken
package FMEstable/ReleaseMeVis
definition AutoSwitchBase.def see also BaseSwitch
,BaseSwitch2
,AutoSwitch
,Switch2
keywords switch
,optional
,base
,automatic
,object
Purpose¶
Automatically switches to the valid one of the two input objects. If both are valid, the second one (inOverrideObject
) is preferred.
Usage¶
Connect your default image to inDefaultObject
, and an optional “override” image to inOverrideObject
.
Tips¶
WARNING: If both input base objects have a common source field somewhere down the graph, a notification on that object will reach one of the inputs first without the other one knowing about it. Due to the way MeVisLab works, there is no way of telling which one will get the notification first, or to ‘wait’ until the other input field was also notified. Thus, if the notification reaches inOverrideObject
first and results in inOverrideObject
becoming NULL, the switch will switch to inDefaultObject
- which will still point to the object that was previously there, although it will most likely now also be NULL, the notification is just not there yet. This may result in an undefined intermediate state, or even in crashes if said object was already destroyed!
Input Fields¶
inDefaultObject¶
-
name:
inDefaultObject
, type:
MLBase
, deprecated name:
in1
¶ Object to be used if there is no valid override object at
inOverrideObject
.