Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-10-2006, 11:52 AM
pjaiswal pjaiswal is online now
Registered User
 
Join Date: 01-26-2006
Posts: 30
Parsing error

My problem is very similar to the one mentioned in this link.

http://www.kinook.com/Forum/showthre...rsing+the+file

That is I have square brackets in my output and so have problems mailing the output as I get parse error. The olny difference in my script is that I am using a custom action written in C# to record the step errors, that is to create a temporary macro with the %LASTSTEP_OUTPUT%

This is what I am doing:

string strLastStepOutput = Builder.App.ExpandMacrosAndScript( "%LASTSTEP_OUTPUT%");


Builder.App.get_Macros( VisBuildSvr.MacroTypeEnum.vbldMacroTemporary ).Add( "LAST_FAILURE_OUTPUT", strLastStepOutput, "", "Output of the last failed step", false);


How can I use [vbld_EscapeString(vbld_AllMacros()("LASTSTEP_OUTPU T").Value)]

in the code above so that I dont have the square bracket problem?

Thanks,
Pragya
Reply With Quote
  #2  
Old 05-10-2006, 04:30 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
You can't use vbld_EscapeString from a C# custom action (that is a system script function, which is only available to other script code or user actions written in a scripting language). Simply don't expand macros and script; instead use the raw value of the LASTSTEP_OUTPUT macro:

string strLastStepOutput = Builder.App.get_Macros(MacroTypeEnum.vbldMacroSyst em)["LASTSTEP_OUTPUT"].Value.ToString();
Reply With Quote
  #3  
Old 05-11-2006, 03:21 PM
pjaiswal pjaiswal is online now
Registered User
 
Join Date: 01-26-2006
Posts: 30
Thanks!! That worked
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:16 PM.


Copyright © 1999-2023 Kinook Software, Inc.