Changes

Jump to: navigation, search

The CIO Framework - OOP344 20131

365 bytes added, 16:41, 19 February 2013
Methods
int add(CField* field, bool dynamic = true);
</syntaxhighlight></big>
Adds First, this function will check the value of _fnum. If '''_fnum''' has reached '''_fldSize''', ('''_fld''' and '''_dyn''' arrays are full) it will expand '''_fld''' and '''_dyn''' by '''C_DIALOG_EXPANSION_SIZE''' (defined in '''cuigh.h''') to make room for more '''CField''' .<br />Then, it adds the CField pointed by '''field''' to the Fields of the Dialog; by appending the value of the field pointer after the last added '''field'' in the _fld array , setting the corresponding _dyn element to the value of dynamic argument and then increasing _fnum by one and returning <del>it</del> the index of added Field in the CDialog object.<br />'''important note:'''<br />Make sure that add() sets the container of the added CField to this CDialog object, using the container() method of CField'''<br />Also make sure, if size of _fld and _dyn are expanded, then _fldSize is also increased.
<big><syntaxhighlight lang="cpp">
int add(CField& field, bool dynamic = false);

Navigation menu