I'm in the process of upgrading from FinalBuilder 5 to FinalBuilder 7 and hitting some problems with my BeforeAction scripts.
The following worked in FinalBuilder 5:
Dim DelphiOptions
DelphiOptions = GetOptionsObject("Borland Delphi")
If Action.CompilerVersion = 4 Then
Action.LibraryPath = Replace(DelphiOptions.D7LibraryPath, "..\..\Newlook\", "..\Newlook\", 1, -1, 1)
ElseIf Action.CompilerVersion = 11 Then
Action.LibraryPath = Replace(DelphiOptions.D2006LibraryPath, "..\..\Newlook\", "..\Newlook\", 1, -1, 1)
End If
In FinalBuilder 7, that fails with the following error:
Object required: 'DelphiOptions'
I eventually figured out that the GetOptionsObject probably needs to be changed to:
DelphiOptions = GetOptionsObject("Embarcadero Delphi")
But when I try to refer to the D7LibraryPath property, it now fails with the following error:
Object doesn't support this property or method
Have the various LibraryPath properties changed name as well? If so, are the new ones documented anywhere? Is there some technique to enumerate the properties of a VBScript object from inside a script?
The documentation in the FinalBuilder help still refers to FinalBuilder 6 and uses GetOptionsObject("Borland Delphi") and D6LibraryPath as above in it's examples so that's doesn't really help much.
I did try using the Microsoft Script Debugger to debug the BeforeAction scripts and set breakpoints per the Final Builder script debugging help in the hope that I could inspect the DelphiOptions object and try to see it's properties from there but this doesn't seem to work. The Microsoft Script Debugger which I downloaded and installed does actually launch when it hits the breakpoint but with an empty window and no apparent context so I was stumped.
Has anyone ever got that to work or do you actually have to use Visual Studio .NET to debug FinalBuilder action scripts, contrary to the help?
The help says that you can use the Active Script Debugger but perhaps that is a different beast from the Microsoft Script Debugger. If it is different, I couldn't find anywhere on MSDN to download it. Everything seems to point to the Microsoft Script Debugger.
Cheers,
Paul.