wwHelpEvents::BeforeImportClassMethod

This event fires prior to a class method getting imported into Help Builder when running the Class Import Wizard.

This code is called after the topic has been created, but before any of the values are set with the exception of the Topic name, HelpId and basic SeeAlso value that references back to the class. The PK and ParentPk are also set prior to this event firing.

All properties may be overridden except the PK and ParentPK properties, unless you set the ParentPK to a valid existing value.

Your method receives the entire code snippet as input, so you can parse the various Help properties from your snippet code or comment blocks on your own. Your code hould then set the properties of the oTopic object passed in as a parameter.

Once set you can return from the method call by returning a numeric value to either stop processing this method, continue on and fill any non-empty values from the Class properties or force everything to be overwritten.

o.BeforeImportClassMethod(cSnippet, oTopic)

Return Value

numeric 0 - don't process this method any further 1 - update any empty properties from the class properties 2 - update all properties from the class properties


Parameters

cSnippet Full method snippet of the methodbeing processed. If the method contains a comment block of your own formatting you can parse this comment block and set the oTopic properties to populate the relevant fields.

oTopic This object contains the various help topic properties for the help topic. Set these properties from the parsed values you retrieved.

Note: you can mix parsed parameters and class description/values by returning 1 from this method call.

Example

* MyHelpEvents::BeforeImportClassMethod
LPARAMETER lcSnippet, loTopic


lcHelpBlock = Extract(lcSnippet,"*:STARTCOMMENT","*:ENDCOMMENT")
IF EMPTY(lcHelpBlock)
   *** Have Help Builder parse the VCX method properties
   RETURN 2
ENDIF

*** Parse your own comments here
loParseBlock = CREATE("MyCommentParser")
loParseBlock.Parse(lcHelpBlock)

*** And then assign the values to the loTopic Object
loTopic.Topic = loParseBlock.Function
loTopic.Body = loParseBlock.Description
loTopic.Parameter = loParseBlock.Parameters
... etc.


*** Processing of this method is complete
RETURN 0

*** OR  let Help Builder pull any fields that you didn't fill
* RETURN 1

See also:

Class wwHelpEvents | Topic data field layout

© West Wind Techologies, 2018 • Updated: 08/11/15
Comment or report problem with topic