Editing Binding properties pattern
Appearance
Content that violates any copyrights will be deleted. Encyclopedic content must be verifiable through citations to reliable sources.
Latest revision | Your text | ||
Line 38: | Line 38: | ||
bind_multiple_one_way(src_obj, src_prop, dst_objs[], dst_props[]) |
bind_multiple_one_way(src_obj, src_prop, dst_objs[], dst_props[]) |
||
{ |
{ |
||
for (i, j) in (dst_objs, dst_props) |
|||
{ |
|||
bind_properties_one_way(src_obj, src_prop, i, j); |
|||
} |
|||
} |
} |
||
</syntaxhighlight><ref name=":ec_btpoo"/> |
</syntaxhighlight><ref name=":ec_btpoo"/> |
||
Line 50: | Line 50: | ||
bind_two_way(prop1, prop2) |
bind_two_way(prop1, prop2) |
||
{ |
{ |
||
bind(prop1, prop2); |
|||
bind(prop2, prop1); |
|||
} |
} |
||
</syntaxhighlight><ref name=":accm_aautbom"/> |
</syntaxhighlight><ref name=":accm_aautbom"/> |
||
Line 59: | Line 59: | ||
on_property_change(src_prop, dst_prop) |
on_property_change(src_prop, dst_prop) |
||
{ |
{ |
||
block_signal(src_obj, on_property_change); |
|||
dst_prop := src_prop; |
|||
unblock_signal(src_obj, on_property_change); |
|||
} |
} |
||
</syntaxhighlight><ref name=":accm_aautbom"/> |
</syntaxhighlight><ref name=":accm_aautbom"/> |