[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] vlad 1.3.0 Released

Ryan Davis

3/5/2009 1:28:00 AM


vlad version 1.3.0 has been released!

* <http://rubyhitsqua...
* <http://rubyforge.org/projects/hit...

Vlad the Deployer is pragmatic application deployment automation,
without mercy. Much like Capistrano, but with 1/10th the
complexity. Vlad integrates seamlessly with Rake, and uses familiar
and standard tools like ssh and rsync.

Impale your application on the heartless spike of the Deployer.

Changes:

### 1.3.0 / 2009-03-04

* 9 major enhancements:

* Added darcs support. (Brian Palmer)
* Added git support. (Garry Dolley)
* Added lighttpd support.
* Added merb support. (Jamie Macey)
* Added passenger support. (Alan Harper)
* Added/merged god, nginx, thin, and maintenance tasks. (github
clusterfuck)
* Allow set to specify that a proc value is :per_thread.
* Apply Mercurial SCM support patch. Closes ticket 13475
* remote_task now supports args and supplies task (by Daniel P.
Kionka).

* 19 minor enhancements:

* Add role toplevel method similar to namespace.
* Added #put method that wraps up Tempfile/rsync pattern.
* Added #role toplevel method, similar to #namespace.
* Added FAQ for using vlad through a gateway.
* Added Phil Hagelburg's one-line multi-stage deployment patch
* Added rake tracing for rsync command.
* Added umask variable.
* Adds specific order to loading. Should fix a number of bugs.
* Extended vladdemo.sh to allow for N simulated hosts (mostly for
testing)
* Fixed tempfile dependency in #put if you don't load lighttpd or
perforce (yipstar)
* Mercurial now automatically initializes the repository. (Jamie
Macey)
* Moved everything over to put.
* Now requires rake 0.8.1+.
* Parameterized 'head' into 'revision' variable (with head as
default).
* Split shared symlink creation to a separate task. (Steve Purcell)
* Support rake 0.8.
* Switched to ThreadGroup for Action#execute
* Updated rakefile for new hoe abilities
* remote_task :role now allows an empty list of hosts.

* 11 bug fixes:

* Fixed vladdemo.rb, now uses my checkout for further stress testing.
* Moved core recipe to front. Was breaking mongrel setup.
* Added automatic client setup for perforce.
* Fix mercurial support.
* Fixed 'too many files' error.
* Fixed a lame warning in the tests.
* Fixed cleanup to actually properly clean up.
* Fixed rake var doco
* Moved generic app setup to core from mongrel.
* SSH flags are now an Array for proper inclusion in the command.
(Guillaume Pierronnet)
* git archive now specifically specifies tar format.
(knaveofdiamonds)

* <http://rubyhitsqua...
* <http://rubyforge.org/projects/hit...


3 Answers

Brian

2/3/2010 2:20:00 AM

0

What about when I have code like this? Do I need to put the UserForm1 in
place of "Me"?

This code is suposed to get data from a workbook and load the UserForm1.

Sub Load_Job_Data_Spec()

With Workbooks("Master Engineering Spec.xlsm").Sheets("Job Data")

'Site Information:
Me("CLLI_Code_1").Value = .Range("D02").Value
Me("Office_1").Value = .Range("D03").Value
Me("Address_11").Value = .Range("D04").Value
Me("Address_12").Value = .Range("D05").Value

End With
End Sub


What about this code?
This code is suposed to get data from the UserForm1 and load the Workbook.

Sub Load_Job_Data_Spec()

With Workbooks("Master Engineering Spec.xlsm").Sheets("Job Data")

'Site Information:
.Range("B06").Value = Me("Office_1").Value
.Range("B08").Value = Me("TEO_No_1").Value
.Range("B10").Value = Me("Location_2").Value
End With
End Sub




"OssieMac" wrote:

> Hi Brian,
>
> When the code is in the Userform module, the system knows that the controls
> belong to the userform by default. when you move it out of the userform
> module, you have to tell the syetem where the controls are.
>
> Looking at your code the following appear to be references to controls on
> the userform.
> CLLI_Code_1.Value
> TEO_No_1.Value
> CES_No_1.Value
> TEO_Appx_No_2.Value
>
> You need to prefix them with the userform name and a dot like the following.
>
> Userform1.CLLI_Code_1.Value
>
> --
> Regards,
>
> OssieMac
>
>
> "Brian" wrote:
>
> > This code worked perfect when it was in the User Form Code Window, but I
> > moved it to a module and I get a Run Time Error "424' Object Required
> >
> > Code in the User Form Window
> > --------------------------------------------------
> > '*******************************************************
> > 'Save Installer Forms 11 Control Button
> > 'Located in M3_Save_Workbook
> > '*******************************************************
> >
> > Private Sub Save_Installer_Forms_11_Click()
> >
> > Call Save_Installer_Forms
> >
> > End Sub
> >
> >
> > Code Located in the module:
> >
> > Declarations
> > ----------------------------------------
> > Dim strFile As String
> > Dim fileSaveName As Variant
> > Dim myMsg As String
> >
> >
> > 'Save Installer Forms 11 Control Button
> > Sub Save_Installer_Forms()
> >
> > ' Dim strFile As String
> > ' Dim fileSaveName As Variant
> > ' Dim myMsg As String
> >
> > strFile = "FORMS " & CLLI_Code_1.Value _ "This Block Turns Yellow"
> > & Space(1) & TEO_No_1.Value _
> > & Space(1) & CES_No_1.Value _
> > & Space(1) & TEO_Appx_No_2.Value
> >
> > fileSaveName = Application.GetSaveAsFilename _
> > (InitialFileName:=strFile, _
> > fileFilter:="Excel Macro-Enabled Workbook(*.xlsm),(*.xlsm")
> >
> > If fileSaveName <> False Then
> > ActiveWorkbook.SaveAs Filename:= _
> > fileSaveName, _
> > FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
> > CreateBackup:=False
> > Else
> > MsgBox prompt:=Engineer_2.Value & vbLf & "You canceled saving the
> > Installer Form." & vbCrLf & _
> > "Installer Form was not Saved.", _
> > Title:="C.E.S."
> >
> > End If
> >
> > End Sub

OssieMac

2/3/2010 2:55:00 AM

0

Hi Brian,

What about when I have code like this? Do I need to put the UserForm1 in
place of "Me"?
Yes. Use the Userform name when referring to the userform's controls except
when the code is within the userforms' module.

You can only use Me if the code is within the userform's module. Assume you
have 2 userforms. Each has its own code module. Code within each module can
use Me in lieu of the Userform name because by default it refers to the
userform to which the code module belongs. With code outside the userform
module the system would not know which userform is being referred to.

Note also that each worksheet has it own module and code within that module
can use Me to refer to the worksheet to which the module belongs but outside
of the worksheet module you have to use the worksheet name.

While you can use the parenthesis and enclose the control name in double
quotes you should be able to just place a dot between them like this.

Userform1.CLLI_Code_1.Value


--
Regards,

OssieMac


"Brian" wrote:

> What about when I have code like this? Do I need to put the UserForm1 in
> place of "Me"?
>
> This code is suposed to get data from a workbook and load the UserForm1.
>
> Sub Load_Job_Data_Spec()
>
> With Workbooks("Master Engineering Spec.xlsm").Sheets("Job Data")
>
> 'Site Information:
> Me("CLLI_Code_1").Value = .Range("D02").Value
> Me("Office_1").Value = .Range("D03").Value
> Me("Address_11").Value = .Range("D04").Value
> Me("Address_12").Value = .Range("D05").Value
>
> End With
> End Sub
>
>
> What about this code?
> This code is suposed to get data from the UserForm1 and load the Workbook.
>
> Sub Load_Job_Data_Spec()
>
> With Workbooks("Master Engineering Spec.xlsm").Sheets("Job Data")
>
> 'Site Information:
> .Range("B06").Value = Me("Office_1").Value
> .Range("B08").Value = Me("TEO_No_1").Value
> .Range("B10").Value = Me("Location_2").Value
> End With
> End Sub
>
>
>
>
> "OssieMac" wrote:
>
> > Hi Brian,
> >
> > When the code is in the Userform module, the system knows that the controls
> > belong to the userform by default. when you move it out of the userform
> > module, you have to tell the syetem where the controls are.
> >
> > Looking at your code the following appear to be references to controls on
> > the userform.
> > CLLI_Code_1.Value
> > TEO_No_1.Value
> > CES_No_1.Value
> > TEO_Appx_No_2.Value
> >
> > You need to prefix them with the userform name and a dot like the following.
> >
> > Userform1.CLLI_Code_1.Value
> >
> > --
> > Regards,
> >
> > OssieMac
> >
> >
> > "Brian" wrote:
> >
> > > This code worked perfect when it was in the User Form Code Window, but I
> > > moved it to a module and I get a Run Time Error "424' Object Required
> > >
> > > Code in the User Form Window
> > > --------------------------------------------------
> > > '*******************************************************
> > > 'Save Installer Forms 11 Control Button
> > > 'Located in M3_Save_Workbook
> > > '*******************************************************
> > >
> > > Private Sub Save_Installer_Forms_11_Click()
> > >
> > > Call Save_Installer_Forms
> > >
> > > End Sub
> > >
> > >
> > > Code Located in the module:
> > >
> > > Declarations
> > > ----------------------------------------
> > > Dim strFile As String
> > > Dim fileSaveName As Variant
> > > Dim myMsg As String
> > >
> > >
> > > 'Save Installer Forms 11 Control Button
> > > Sub Save_Installer_Forms()
> > >
> > > ' Dim strFile As String
> > > ' Dim fileSaveName As Variant
> > > ' Dim myMsg As String
> > >
> > > strFile = "FORMS " & CLLI_Code_1.Value _ "This Block Turns Yellow"
> > > & Space(1) & TEO_No_1.Value _
> > > & Space(1) & CES_No_1.Value _
> > > & Space(1) & TEO_Appx_No_2.Value
> > >
> > > fileSaveName = Application.GetSaveAsFilename _
> > > (InitialFileName:=strFile, _
> > > fileFilter:="Excel Macro-Enabled Workbook(*.xlsm),(*.xlsm")
> > >
> > > If fileSaveName <> False Then
> > > ActiveWorkbook.SaveAs Filename:= _
> > > fileSaveName, _
> > > FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
> > > CreateBackup:=False
> > > Else
> > > MsgBox prompt:=Engineer_2.Value & vbLf & "You canceled saving the
> > > Installer Form." & vbCrLf & _
> > > "Installer Form was not Saved.", _
> > > Title:="C.E.S."
> > >
> > > End If
> > >
> > > End Sub

OssieMac

2/3/2010 3:06:00 AM

0

Hi Brian,

Variables simply declared at the top of the module before any other subs but
still declared as Dim can all be used in any sub within that same module.

If you want to use the variables in other modules then declare them at the
top of a standard module but use Public.

Examples
Dim myVariable 'Can use in any sub in same module
Public myPublicVariable 'Can be used in any module


--
Regards,

OssieMac


"Brian" wrote:

> Did I do it correctly by moving all my declaration up to the top, instead of
> having them in each sub?
>
> "OssieMac" wrote:
>
> > Hi Brian,
> >
> > When the code is in the Userform module, the system knows that the controls
> > belong to the userform by default. when you move it out of the userform
> > module, you have to tell the syetem where the controls are.
> >
> > Looking at your code the following appear to be references to controls on
> > the userform.
> > CLLI_Code_1.Value
> > TEO_No_1.Value
> > CES_No_1.Value
> > TEO_Appx_No_2.Value
> >
> > You need to prefix them with the userform name and a dot like the following.
> >
> > Userform1.CLLI_Code_1.Value
> >
> > --
> > Regards,
> >
> > OssieMac
> >
> >
> > "Brian" wrote:
> >
> > > This code worked perfect when it was in the User Form Code Window, but I
> > > moved it to a module and I get a Run Time Error "424' Object Required
> > >
> > > Code in the User Form Window
> > > --------------------------------------------------
> > > '*******************************************************
> > > 'Save Installer Forms 11 Control Button
> > > 'Located in M3_Save_Workbook
> > > '*******************************************************
> > >
> > > Private Sub Save_Installer_Forms_11_Click()
> > >
> > > Call Save_Installer_Forms
> > >
> > > End Sub
> > >
> > >
> > > Code Located in the module:
> > >
> > > Declarations
> > > ----------------------------------------
> > > Dim strFile As String
> > > Dim fileSaveName As Variant
> > > Dim myMsg As String
> > >
> > >
> > > 'Save Installer Forms 11 Control Button
> > > Sub Save_Installer_Forms()
> > >
> > > ' Dim strFile As String
> > > ' Dim fileSaveName As Variant
> > > ' Dim myMsg As String
> > >
> > > strFile = "FORMS " & CLLI_Code_1.Value _ "This Block Turns Yellow"
> > > & Space(1) & TEO_No_1.Value _
> > > & Space(1) & CES_No_1.Value _
> > > & Space(1) & TEO_Appx_No_2.Value
> > >
> > > fileSaveName = Application.GetSaveAsFilename _
> > > (InitialFileName:=strFile, _
> > > fileFilter:="Excel Macro-Enabled Workbook(*.xlsm),(*.xlsm")
> > >
> > > If fileSaveName <> False Then
> > > ActiveWorkbook.SaveAs Filename:= _
> > > fileSaveName, _
> > > FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
> > > CreateBackup:=False
> > > Else
> > > MsgBox prompt:=Engineer_2.Value & vbLf & "You canceled saving the
> > > Installer Form." & vbCrLf & _
> > > "Installer Form was not Saved.", _
> > > Title:="C.E.S."
> > >
> > > End If
> > >
> > > End Sub