LB Booster
« TextEditor Modified Flag »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:32am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: TextEditor Modified Flag  (Read 213 times)
BrianM
New Member
Image


member is offline

Avatar




PM


Posts: 15
xx TextEditor Modified Flag
« Thread started 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
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls