Changes

Jump to: navigation, search

OOP344 Assignment Two

1,214 bytes added, 11:28, 3 November 2009
Editing(running) the Form
====Editing(running) the Form====
<big><pre>
int edit(unsigned int * fieldnumber = (unsigned int*)0, bool Clear = true);;
</pre></big>
 
If neither of the IO_Fields is editable, it displays all the IO_Fields, then waits for a key entry and then ends the function by returning the key entered.
 
If the fieldnumber pointer is NULL, it should use a local variable’s addrss with the value of “0” zero instead.
 
if *fieldnumber is (0) zero, then display all the fields before editing the fields and then set *fieldnumber to (1) one.
 
Start editing from field number *fieldnumbe.
 
Call the edit of each field and depending on the value returned, do the following:
 
* For TAB_KEY and DOWN_KEY, go to next editable IO_Field, if this is the last editable IO_Field , restart from the IO_Field number one.
 
* For UP_KEY go to the previous editable IO_Field, if there is no previous editable IO_Field, go to the last editable IO_Field of the IO_Form. (continue the search from the last IO_Field in the IO_Form).
 
* for ENTER_KEY do exactly as TAB_KEY, except that if the current IO_Field is a submitter (is tagged to be a submitter when added), in which case terminate the eidt function returning the ENTER_KEY.
 
* for any other key, terminate the edit function returning the character which caused the termination.
 
--- incomplete ---

Navigation menu