Bug #625
Code items in codedesigner are lost once the user opens the priorities of the code
History
#1 Updated by Txinto Vaz about 7 years ago
- Status changed from New to In Progress
It seems that codedesigner needs to include the identifier in the condition or action:
This does not work:
<object type="udConditionLinkItem">
<property name="id" type="long">-1</property>
<property name="name" type="string">downButtonPressed</property>
<property name="description" type="string">Down Button is being pressed</property>
<property name="original_code" type="string"><global>::downButtonPressed</property>
<property name="scope" type="string"><global></property>
</object>
This works:
<object type="udConditionLinkItem">
<property name="id" type="long">-1</property>
<property name="name" type="string">downButtonPressed</property>
<property name="description" type="string">Down Button is being pressed</property>
<property name="original_code" type="string"><global>::downButtonPressed#50006</property>
<property name="scope" type="string"><global></property>
</object>
#2 Updated by Txinto Vaz about 7 years ago
This is the definition that does not work:
<object type="udConditionItem">
<property name="id" type="long">50006</property>
<property name="name" type="string">downButtonPressed</property>
<property name="description" type="string">Down Button is being pressed</property>
<property name="code" type="string">((downReqDI==TRUE) || (hmibuttons & CFG_FM1_BUTACQ_HMI_DOWN_MASK))</property>
<property name="scope" type="string"><global></property>
<property name="signature" type="string"><global>::downButtonPressed</property>
<property name="inline" type="bool">1</property>
<property name="retval_data_type" type="int">1</property>
<property name="retval_value_type" type="int">0</property>
<property name="retval_data_modifier" type="int">0</property>
<property name="user_retval_decl_place" type="int">0</property>
<property name="function_modifier" type="int">0</property>
</object>
And this works:
<object type="udConditionItem">
<property name="id" type="long">50006</property>
<property name="name" type="string">downButtonPressed</property>
<property name="description" type="string">Down Button is being pressed</property>
<property name="code" type="string">((downReqDI==TRUE) || (hmibuttons & CFG_FM1_BUTACQ_HMI_DOWN_MASK))</property>
<property name="scope" type="string"><global></property>
<property name="signature" type="string"><global>::downButtonPressed#50006</property>
<property name="inline" type="bool">1</property>
<property name="retval_data_type" type="int">1</property>
<property name="retval_value_type" type="int">0</property>
<property name="retval_data_modifier" type="int">0</property>
<property name="user_retval_decl_place" type="int">0</property>
<property name="function_modifier" type="int">0</property>
</object>
#3 Updated by Txinto Vaz about 7 years ago
The code implied in conditions is source:app/views/projects/gen_code.cdp.dryml#L282
and
#4 Updated by Txinto Vaz about 7 years ago
- Status changed from In Progress to Resolved
Solved in 73fea6a8
#5 Updated by Txinto Vaz about 7 years ago
- Status changed from Resolved to Closed