On Wednesday 12 October 2016 14:12:53 mohamed hamza wrote: > Hi martin, > > I think it's better to have an onStateRead and onStateWrite events > like this onStateRw(....;const lrw:boolean) > > and then we can write if lrw then var := reader.readboolean(...) else > writer.writeboolean( ....;var) > > I would not order you something. I just want to know your point of > view. > There is TStatFile.OnStatUpdate and TStatFiler.IsWriter. I didn't want to recommend OnStatUpdate because TWidget.Enabled is a property and can not be used in TStatFiler.UdateValue(). And OnStatRead and OnStatWrite have different parameters: " statreadeventty = procedure(const sender: tobject; const reader: tstatreader) of object; statwriteeventty = procedure(const sender: tobject; const writer: tstatwriter) of object; " OnStatUpdate is: " statupdateeventty = procedure(const sender: tobject; const filer: tstatfiler) of object; " In your example OnStatUpdate can be used as: " filer.updatevalue('thename',thevariable); " > nb: Sometimes we have several instructions before readboolean or > writeboolean. > I don't understand.
Martin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk