LB Booster
Programming >> Compatibility with LB4 >> TextEditor Modified Flag
http://lbb.conforums.com/index.cgi?board=compatibility&action=display&num=1461072406
TextEditor Modified Flag
Post by BrianM on Apr 19th, 2016, 1:26pm
LB and LBB set this flag differently. The current state of the flag is obtained through the !modified? command.
LB behaviour
The flag is set to true if
the user modifies the text
the user or program pastes text into the TextEditor
The flag is reset if !cls command is used
The flag is unaltered if the program adds text or sets the whole text with !contents (different to LBB)
LBB behaviour
The flag is set if the user modifies the text by typing or pastes text
The flag is set if the program adds text of uses !paste
The flag is reset if !cls or !contents is used.
LB and LBB do not have a !modified command to set the flag to a value. Why not?
LBB can send a EM_SETMODIFY message to the TextEditor. LB cannot do this as the LB TextEditor is not a standard control.
If you want to reset the modified flag in LB (say after a save) then use the following commands
!contents? t$ to get the text
!cls to reset the flag (only required in LB)
!contents t$ to re-instate the text.
This also works in LBB.
Brian Matthews