- Messages
- 132
- Country

Hello,
I have some problem with multiple "if" condition on the "modeldef.xml"
I create a video to explain the bug:
http://www.youtube.com/watch?v=bNnAy0j6JSs
I don't know why the "if else" condition doesn't work. The "If" step is work, but if the "L:GNS_430_1_fqz_com_nav, bool" equal 0 the "Else" doesn't work !
The code below withou "if else" work perfect but I can't switch between COM and NAV to change frequency.
See below, the section of "PartInfo" of the knob: (Some features is private and a remove with a comment)
And here the code to toogle the (L:GNS_430_1_fqz_com_nav, bool) variable:
Thank you for the futur help !
I have some problem with multiple "if" condition on the "modeldef.xml"
I create a video to explain the bug:
http://www.youtube.com/watch?v=bNnAy0j6JSs
I don't know why the "if else" condition doesn't work. The "If" step is work, but if the "L:GNS_430_1_fqz_com_nav, bool" equal 0 the "Else" doesn't work !
The code below withou "if else" work perfect but I can't switch between COM and NAV to change frequency.
Code:
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
||
if{
<!-- Init Position of the mouse for large Knob -->
}
(M:Event) 'LeftDrag' scmp 0 ==
if{
(L:GNS_430_1_large_left_DS,nmber) (M:Y) - 15 >
if{
(>K:COM_RADIO_WHOLE_INC)
(L:GNS_430_1_large_left_Knob, number) ++ (>L:GNS_430_1_large_left_Knob, number)
<!-- Position of the mouse for large Knob -->
} els{
(L:GNS_430_1_large_left_DS, number) (M:Y) - -15 <
if{
(>K:COM_RADIO_WHOLE_DEC)
(L:GNS_430_1_large_left_Knob, number) -- (>L:GNS_430_1_large_left_Knob, number)
<!-- Position of the mouse for large Knob -->
}
}
<!-- Pourcentage calc for position of large Knob -->
}
</CallbackCode>
See below, the section of "PartInfo" of the knob: (Some features is private and a remove with a comment)
Code:
<PartInfo>
<Name>GNS_430_1_large_left_knob</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>(L:GNS_430_1_large_left_Knob, number)</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Large left knob</TooltipText>
<MouseFlags>LeftSingle+LeftDrag</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
||
if{
<!-- Init Position of the mouse for large Knob -->
}
(M:Event) 'LeftDrag' scmp 0 ==
if{
(L:GNS_430_1_large_left_DS,nmber) (M:Y) - 15 >
if{
(L:GNS_430_1_fqz_com_nav, bool) == 1
if{
(>K:COM_RADIO_WHOLE_INC)
}
els{
(>K:NAV1_RADIO_WHOLE_INC)
}
(L:GNS_430_1_large_left_Knob, number) ++ (>L:GNS_430_1_large_left_Knob, number)
<!-- Position of the mouse for large Knob -->
} els{
(L:GNS_430_1_large_left_DS, number) (M:Y) - -15 <
if{
(L:GNS_430_1_fqz_com_nav, bool) == 1
if{
(>K:COM_RADIO_WHOLE_DEC)
}
els{
(>K:NAV1_RADIO_WHOLE_DEC)
}
(L:GNS_430_1_large_left_Knob, number) -- (>L:GNS_430_1_large_left_Knob, number)
<!-- Position of the mouse for large Knob -->
}
}
<!-- Pourcentage calc for position of large Knob -->
}
</CallbackCode>
</MouseRect>
</PartInfo>
And here the code to toogle the (L:GNS_430_1_fqz_com_nav, bool) variable:
Code:
<PartInfo>
<Name>GNS_430_1_small_left_c_v</Name>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>C/V Button</TooltipText>
<MouseFlags>LeftSingle</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
if{
(L:GNS_430_1_fqz_com_nav, bool) ! (>L:GNS_430_1_fqz_com_nav, bool)
}
</CallbackCode>
</MouseRect>
</PartInfo>
Thank you for the futur help !


