Open main menu

CDOT Wiki β

Changes

BIOF 20101 (AS1) - OOP344

67 bytes added, 18:35, 26 January 2010
m
IsTextEditor:
==== IsTextEditor: ====
If IsTextEditor is true, then it means that the function is being used to edit a text by editing one line of the text at a time. In this case, shifting a line to the left or right should not only cause the editing line to be shifted, but also the rest of the lines in the text. To do this, bio_edit should let the calling function take care of shifting instead of doing it by itselfknow that a shift has happened. Since shifting essentially means modifying '''“*offset”''' when '''“IsTextEditor”''' is true, and that there are times when you find that '''“*offset”''' needs to be modified, you should terminate the function insteadafterwards. With termination, the function should return the terminating key.
The only exception is when upon Note that at the beginning of the execution of bio_edit, when validating'''*offset''', may require the value of '''*offset''' to change. If so make sure to correct the offset and then terminate the function before any editing happens returning the default value of key.
''when '''IsTextEditor''' is true, and Escape is hit do not abort the editing but simply terminate the function returning the Escape key.''