Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-31-2008, 06:08 AM
DuncanL DuncanL is offline
Registered User
 
Join Date: 07-26-2007
Posts: 29
StepDone fires early on subroutine calls

I have a StepStarting and StepDone handler that I use to time a source control action.

Recently I moved the source control action into a subroutine so I could do several things and call it from multiple places. However this breaks my timing scripts, as the StepDone fires immediately that the subroutine starts

This seems counter intuitive to me - the step hasn't finished - it's waiting on all the subroutine steps. I've attached a simple sample. which outputs:
Code:
vbld_StepStarting
vbld_StepDone
Wibble subroutine
what I want to see is:
Code:
vbld_StepStarting
Wibble subroutine
vbld_StepDone
Is there any way I can work around this? (Other than moving all the timing out as separate steps before and after the subroutine call - but that's not as neat and means any other users need to know to copy three steps, rather than just one.)
Reply With Quote
  #2  
Old 10-31-2008, 11:12 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
You could use project-level script events:

Code:
Sub vbld_StepStartingProject()

	If Step.Action = "SourceSafe" Then  ' replace with source control action being used
		' record step starting time
	End If

End Sub

Sub vbld_StepDoneProject()

	If Step.Action = "SourceSafe" Then
		' log elapsed time, etc.
	End If

End Sub
http://www.kinook.com/VisBuildPro/Ma...riptevents.htm
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 05:50 PM.


Copyright © 1999-2023 Kinook Software, Inc.