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 12-14-2009, 04:34 PM
krosty krosty is online now
Registered User
 
Join Date: 10-20-2009
Location: Princeton, NJ
Posts: 13
Multiple condition evaluation doesn't work

I have VBP 6.7a. I'm trying to evaluate multiple condition in one line by selecting 'build only if macro or expression' option and putting following expression

[Application.FindMacro("NEED_TO_BUILD").Value = "yes" AND Application.FindMacro("IsItCIBuild").Value = "yes"]

in the condition field

These are obviously mcro values that I've set.

From the drop-down, 'is true' is selected. I've also attached the test .bld file I created for this

The build seems to completely ignore the condition.

I've spend couple of hours on this and I'm getting frustrated

BTW, I got the above expression in one post in this forum that was made 3/4 years ago
Reply With Quote
  #2  
Old 12-14-2009, 06:41 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
I don't see an attachment.

http://www.kinook.com/Forum/showthread.php?threadid=927

http://www.kinook.com/Forum/showthre...?threadid=3044

http://www.kinook.com/VisBuildPro/Ma...ipfeatures.htm
Reply With Quote
  #3  
Old 12-15-2009, 09:47 AM
krosty krosty is online now
Registered User
 
Join Date: 10-20-2009
Location: Princeton, NJ
Posts: 13
Here's the attachement
Attached Files
File Type: bld test4.bld (1,016 Bytes, 1917 views)
Reply With Quote
  #4  
Old 12-15-2009, 11:12 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
In the project you attached, the NEED_TO_BUILD and IsItCIBuild macros both have a value of no, so the rule evaluates false and the Condition and Log Message steps are skipped. If I change both macro values to yes and rebuild, the rule evaluates true and those steps are built.

If you hold down the Shift key when hovering the mouse cursor over the Build Rule column checkbox in the Project Steps pane, the tooltip will indicate whether the rule evaluates true or false; or hovering over the rule expression in the Step Properties dialog with Shift down will show the evaluated expression (0 = False, non-zero = True).
Reply With Quote
  #5  
Old 12-15-2009, 11:56 AM
krosty krosty is online now
Registered User
 
Join Date: 10-20-2009
Location: Princeton, NJ
Posts: 13
The step is building even with those two macros set at no (the expression should evaluate to 'false and false =false' and the step should be skipped. But the 'log message' step is building and that's what the problem is
Reply With Quote
  #6  
Old 12-15-2009, 11:59 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Make sure that 'Tools | Application Options | General | Implement nesting of conditional build rules' is checked.
http://www.kinook.com/VisBuildPro/Manual/miscopt.htm
Reply With Quote
  #7  
Old 12-15-2009, 12:50 PM
krosty krosty is online now
Registered User
 
Join Date: 10-20-2009
Location: Princeton, NJ
Posts: 13
It is checked. For all combinations of boolean values (false+true,true+false,false+false, true+true), the coditional step is executing. It should execute only for true+true, since its AND the first three should evaluate to false forcing a skip of the step
Reply With Quote
  #8  
Old 12-15-2009, 12:58 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
You're definitely doing a Rebuild and not Rebuild Selected? And you're getting build output of

Step 'Condition' build rule evaluates true: [Application.FindMacro("NEED_TO_BUILD").Value = "yes" AND Application.FindMacro("IsItCIBuild").Value = "yes"] is true

when the macro values are not both yes?

The rule has the expected result here -- the Condition and Log Message steps are skipped for all combinations except yes+yes.
Reply With Quote
  #9  
Old 12-16-2009, 09:55 AM
krosty krosty is online now
Registered User
 
Join Date: 10-20-2009
Location: Princeton, NJ
Posts: 13
You are right. Instead of highlighting steps and selecting to rebuild, I just kicked of build from command-line and it worked. Thx for the help
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 09:05 AM.


Copyright © 1999-2023 Kinook Software, Inc.