View Issue Details

IDProjectCategoryView StatusLast Update
0005222JEDI VCL00 JVCL Componentspublic2011-06-10 16:10
ReportermartijntoniesAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.40 
Summary0005222: JvWizard - Wizard.OnHelpButtonClick doesn't work
DescriptionThe Wizard.OnHelpButtonClick event is never triggered.

If you look at it's implementation, you see why:

procedure TJvWizardHelpButton.Click; // Added by Theodore, Modified by Yu Wei
var
  ID: THelpContext;
begin
  ID := 0;
  if not (csDesigning in ComponentState) then
  begin
    if Assigned(FWizard) and Assigned(FWizard.ActivePage) then
    begin
      if Assigned(FWizard.ActivePage.OnHelpButtonClick) then // MF
      begin
        inherited Click;
        Exit;
      end;
      ID := FWizard.ActivePage.HelpContext;
    end
    else
      ID := GetParentForm(Self).HelpContext;
  end;
  if ID <> 0 then
  begin
    Application.HelpContext(ID);
  end;
end;



Additional InformationThis can be changed to:

procedure TJvWizardHelpButton.Click; // Added by Theodore, Modified by Yu Wei
var
  ID: THelpContext;
begin
  ID := 0;
  if not (csDesigning in ComponentState) then
  begin
    if Assigned(FWizard) and Assigned(FWizard.ActivePage) then
    begin
      if Assigned(FWizard.ActivePage.OnHelpButtonClick) then // MF
      begin
        inherited Click;
        Exit;
      end;
      // MT BOM
      { added the following to see if there's a Wizard.OnHelpButtonClick to
        override default behaviour }
      if Assigned(FWizard) and Assigned(FWizard.OnHelpButtonClick)
      then begin
             inherited Click;
             Exit;
           end;
      // MT EOM
      ID := FWizard.ActivePage.HelpContext;
    end
    else
      ID := GetParentForm(Self).HelpContext;
  end;
  if ID <> 0 then
  begin
    Application.HelpContext(ID);
  end;
end;


Now, if there is an event in the wizard (after checking for a page.OnHelpButtonClick), the event is fired. If there's no event handler, the application.helpcontext is called.
TagsNo tags attached.

Activities

AHUser

2010-04-20 00:04

developer   ~0017363

Fixed in SVN.

Issue History

Date Modified Username Field Change
2010-04-19 10:19 martijntonies New Issue
2010-04-20 00:04 AHUser Note Added: 0017363
2010-04-20 00:04 AHUser Status new => resolved
2010-04-20 00:04 AHUser Fixed in Version => Daily / SVN
2010-04-20 00:04 AHUser Resolution open => fixed
2010-04-20 00:04 AHUser Assigned To => AHUser
2011-06-10 16:10 obones Fixed in Version Daily / SVN => 3.40