View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001312 | JEDI VCL | 00 JVCL Components | public | 2004-01-29 04:51 | 2004-03-09 02:47 |
| Reporter | anonymous | Assigned To | user72 | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0001312: Changed TJvFormPlacement behavior | ||||
| Description | RestoreFormPlacement / SaveFormPlacement now only works if Active is set to True. In previous versions they have worked independent of the Active-State. This makes it easy possible to manually load settings in a certain order before the Forms are shown. With the new behaviour we must set Active to True - RestoreFormPlacement and set Active to False (to avoid double loading!) before the OnShow event occur. In my opinion the IsActive check should be replaced with AppStorage<>nil -only inside RestoreFormPlacement / SaveFormPlacement. I think I'm not the only one who uses TJvFormPlacement this way, and so other people will probably have the same problems... If I have only simple Forms, I set Active to True and let the component do the work automatically. But with complex Forms -where the load/show order matters- I set Active to False and use RestorePlacement/SaveFormPlacement manually. Here is the typically order with previcious version: OnCreate FormPlacement.Active:= False RestoreFormPlacement ..... OnDestroy SaveFormPlacement End typically order with actual version: OnCreate FormPlacement.Active:= True (only works when active) RestoreFormPlacement FormPlacement.Active:= False ->to avoid double loading/saving ..... OnDestroy FormPlacement.Active:= True (only works when active) SaveFormPlacement End The actual behaviour has disadvantages 1. additional Active-State changes 2. breaks existing code -but I can't see any advantages, so why not change back to the old behaviour? Maybe it's possible to let the programmer decide when RestoreFormPlacement / SaveFormPlacement events should occur, for example: RestoreEvents:TStorageEvents -OnCreate:boolean -OnShow:boolean (default) SaveEvents:TStorageEvents -OnClose:boolean (default) -OnDestroy:boolean With the default setting the behavior is still the same as in previous versions. (Se also my post in jedi.vcl Newsgroup from 06.01.2004 Subject:Changed TJvFormPlacement behavior) Greetings Ingo | ||||
| Tags | No tags attached. | ||||
|
|
Agree, this should be changed back to the old behavior if possible |
|
|
This is being discussed in the newsgroup as well. Should we take it there for the time being and post a summary here once we have a solution? |
|
|
>>This is being discussed in the newsgroup as well Yes, I have startet the thread. >>Should we take it there for the time being and post a summary here once we have a solution? Why? Maybe someone who only reads the news have another idea. Greetings Ingo |
|
|
I've updated JvFormStorage so you should now be able to call SaveFormPlacement and RestoreFormPlacement regardless of Active. This update also affects 0001304 |
|
|
There are still problems, please see my feedback at: TJvFormStorage/TJvAppIniFileStorage delete Sections/Bug ID:0001304 There is also the OldIni test project. What do you think about the feature mentioned in the first message: >>Maybe it's possible to let the programmer decide when >>RestoreFormPlacement / SaveFormPlacement events should occur Setting the events to OnCreate/OnDestroy has the advantage the events occur only once (without manual calls to RestoreFormPlacement/SaveFormPlacement) and not every time the corrersponding form is shown or hidden. Greetings Ingo |
|
|
>What do you think about the feature mentioned in the first message: That might be possible but at the moment we have a code freeze which means we cannot add features. I'll keep it for later. |
|
|
Seems to be working now, so closing |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2004-01-29 04:51 | anonymous | New Issue | |
| 2004-01-29 10:11 |
|
Note Added: 0002868 | |
| 2004-01-29 15:57 |
|
Note Added: 0002881 | |
| 2004-01-29 15:57 |
|
Assigned To | => user72 |
| 2004-01-29 15:57 |
|
Status | new => confirmed |
| 2004-01-29 16:42 | Ingo | Note Added: 0002883 | |
| 2004-01-30 00:58 |
|
Note Added: 0002892 | |
| 2004-02-01 14:39 |
|
Status | confirmed => feedback |
| 2004-02-01 15:41 | Ingo | Note Added: 0002922 | |
| 2004-02-02 11:02 |
|
Note Added: 0002923 | |
| 2004-02-13 14:08 |
|
Status | feedback => resolved |
| 2004-02-13 14:08 |
|
Resolution | open => fixed |
| 2004-02-13 14:08 |
|
Note Added: 0002936 | |
| 2004-03-09 02:47 |
|
Status | resolved => closed |