View Issue Details

IDProjectCategoryView StatusLast Update
0013949LazarusLCLpublic2016-02-19 16:20
ReporterAntônio Galvão Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version0.9.26.2 
Target Version0.9.28 
Summary0013949: XMLPropStorage does not restore stored values on application start.
DescriptionSee example attached. While you don't close the program it's OK, once you close it, the value is not restored.
TagsNo tags attached.
Fixed in Revision
LazTarget0.9.28
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0029674 resolvedJonas Maebe FPC A correction to note 0028856 of bug report 0013949 

Activities

2009-06-10 14:47

 

example.zip (484,607 bytes)

Michael Van Canneyt

2009-06-29 19:42

administrator   ~0028856

The StoredValues[] array can only be used during the OnRestoreProperties or OnSaveProperties events. Outside these events, the values will not be stored.

To do what you want, set the form's 'SessionProperties' to Edit1.Text, (it has a nice property editor for it) and the text will be saved across program runs.

If you want to save/load values that are not published properties of a component or control, you should save them in a OnSaveProperties event, and
load them dusing the OnRestoreProperties event.

Jonas Maebe

2016-02-19 16:19

manager   ~0090138

Follow-up by Damianos Dimitriadis in 0029674 :

***
To save custom application properties using a TXMLPropStorage component, instead of using the OnSaveProperties event as the note suggested, I have noticed that the OnSavingProperties event should be using instead. The former event seems to be fired too late and no changes are saved.
***

Issue History

Date Modified Username Field Change
2009-06-10 14:47 Antônio Galvão New Issue
2009-06-10 14:47 Antônio Galvão File Added: example.zip
2009-06-10 14:47 Antônio Galvão Widgetset => Win32
2009-06-10 15:22 Vincent Snijders LazTarget => 1.0
2009-06-10 15:22 Vincent Snijders Assigned To => Michael Van Canneyt
2009-06-10 15:22 Vincent Snijders Status new => assigned
2009-06-10 15:22 Vincent Snijders Target Version => 1.0.0
2009-06-29 19:42 Michael Van Canneyt LazTarget 1.0 => 0.9.28
2009-06-29 19:42 Michael Van Canneyt Status assigned => resolved
2009-06-29 19:42 Michael Van Canneyt Resolution open => no change required
2009-06-29 19:42 Michael Van Canneyt Note Added: 0028856
2009-06-29 19:42 Michael Van Canneyt Target Version 1.0.0 => 0.9.28
2009-10-23 00:40 Marc Weustink Status resolved => closed
2016-02-19 16:19 Jonas Maebe Note Added: 0090138
2016-02-19 16:20 Jonas Maebe Relationship added related to 0029674