View Single Post
  #8  
Old 05-23-2007, 09:55 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
The problem has to do with the fact that in v6, VBP macros can contain objects (actually a COM Variant), while in v5 they were limited to only holding strings. The vbld_StepStarting script event in the 'cocoon-apps Build' step does this:

Application.Macros(vbldMacroProject).Add "LOGFILE", Application.Macros(vbldMacroTemporary).Item("LOGFI LE")

which assigns the temporary LOGFILE macro *object* to the project LOGFILE macro value (in v5, this stored the temp macro's value to the project macro's value since a v5 macro holds only string values).

The next step assigns an empty string to the temp LOGFILE macro (disabling file logging), and the last step of the project deletes the temp LOGFILE macro, causing the project LOGFILE macro (holding an object reference to the deleted temp macro, not a string value) to be used for the rest of that step, and converting that object to a string results in the literal value <object> used as the log filename, which fails.

The fix is to assign the string value of the temp macro (rather than the macro object itself) to the project macro:

Application.Macros(vbldMacroProject).Add "LOGFILE", Application.Macros(vbldMacroTemporary).Item("LOGFI LE").Value
Reply With Quote