View Issue Details

IDProjectCategoryView StatusLast Update
0002434JEDI VCL00 JVCL Componentspublic2005-02-04 05:04
ReporterSalvatore BessoAssigned Toobones 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version3.00 BETA 2 
Target VersionFixed in Version 
Summary0002434: TJvWizard: TJvWizardChangePageEvent is ambiguous
DescriptionTJvWizardChangePageEvent is actually used for both OnEnterPage and OnExitPage events and its declaration is the following:

TJvWizardChangePageEvent = procedure(Sender: TObject;
  const FromPage: TJvWizardCustomPage) of object;

As you can see the second parameter is named "FromPage", but this is ambiguous because in the OnEnterPage event the parameter represents a "FROM page" while in the OnExitPage event it represents a "TO page".

There are two solutions to this problem:

The first is to rename the parameter to a more generic "Page" (not so good).

The second one (best) is to remove actual procedural event and to declare two new procedural events:

TJvWizardEnterPageEvent = procedure(Sender: TObject;
  const FromPage: TJvWizardCustomPage) of object;

TJvWizardExitPageEvent = procedure(Sender: TObject;
  const ToPage: TJvWizardCustomPage) of object;

and assign accordingly the various OnEnterPage and OnExitPage events.

Regards and Merry Christmas
Salvatore
TagsNo tags attached.

Activities

user72

2004-12-26 14:32

  ~0006014

Last edited: 2004-12-26 14:41

I don't really see a reason to change it at all. It's a documentation issue, if anything (see the JEDI Help on "TJvWizardChangePageEvent" for details). The only change I would agree on, is to rename "FromPage" to "Page".

You should be aware that changing the event signature makes existing code invalid with very little reason.

Salvatore Besso

2004-12-27 02:10

reporter   ~0006020

hello Peter,

ok, it's true. Changing the procedural event would eventually break existing code. At this point it's better to rename the parameter to a general "Page", it is less ambiguous, maybe remarking the difference of the parameter meaning between the OnEnterPage and OnExitPage events in the help for the component.

Regards and Happy New Year
Salvatore

user72

2004-12-27 05:46

  ~0006021

> maybe remarking the difference of the parameter
> meaning between the OnEnterPage and OnExitPage events
It is already described in the help

Salvatore Besso

2004-12-28 07:06

reporter   ~0006026

ok Peter, then do you think to rename to "Page"?

Thank you and Happy 2005!

obones

2005-02-04 05:04

administrator   ~0006402

Even changing the name breaks compatibility, so we won't change this.

Issue History

Date Modified Username Field Change
2004-12-25 06:41 Salvatore Besso New Issue
2004-12-26 14:32 user72 Note Added: 0006014
2004-12-26 14:41 user72 Note Edited: 0006014
2004-12-27 02:10 Salvatore Besso Note Added: 0006020
2004-12-27 05:46 user72 Note Added: 0006021
2004-12-28 07:06 Salvatore Besso Note Added: 0006026
2005-02-04 05:04 obones Status new => resolved
2005-02-04 05:04 obones Resolution open => won't fix
2005-02-04 05:04 obones Assigned To => obones
2005-02-04 05:04 obones Note Added: 0006402