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-18-2009, 03:50 PM
dalevine dalevine is online now
Registered User
 
Join Date: 04-23-2009
Posts: 14
Single Stepping is broken

I use some VB script commands to parse a file and perform an action on each line in the file. In v6 this worked both when it was run and when I single stepped through it.

In version 7.2, when I run the VBP it appears ok, but when I single step it misbehaves.

It appears that is skips every other line in the file, and it errors out when it passes the end of the file.

The code looks like this:

Set Macro: defines FILELIST

Script step - opens File:
Application.Macros(vbldMacroTemporary).Add "FILE", vbld_FSO().OpenTextFile("%FILELIST%")

Group:
while vbld_TempMacroObj("FILE").AtEndOfStream] is false

Set Macro:
[vbld_TempMacroObj("FILE").ReadLine()]
LogMessage:
File : %FILENAME%


Am I doing something wrong? If not, is there a workaround to this?
Reply With Quote
  #2  
Old 12-18-2009, 06:35 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
In v7, you can use the Loop action for that.
http://www.kinook.com/VisBuildPro/Manual/loopaction.htm

What is probably happening is that the script expression is also getting evaluated by the Watches pane, so another option might be to clear out that pane or remove [Step] and [LastStep] from it.
http://www.kinook.com/VisBuildPro/Ma...atchespane.htm
Reply With Quote
  #3  
Old 12-19-2009, 11:02 AM
dalevine dalevine is online now
Registered User
 
Join Date: 04-23-2009
Posts: 14
The loop action works, and it's a whole lot cleaner than the way I was doing it. Thanks.

I don't know if the problem was caused by the watch window because I did not have it open when the problem occurred.

I will have to convert all the VBPs that use this style of loop control over to the new format. Be nice if this bug was fixed so that the conversion was not necessary.
Reply With Quote
  #4  
Old 12-19-2009, 01:10 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The watch window still gets updated even if it's not open/visible. And script expressions can also get evaluated in other situations (mouse hovering over a field with an expression, etc.). Another way to do that more reliably would be to use Run Script steps instead of script expressions.
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:44 AM.


Copyright © 1999-2023 Kinook Software, Inc.