Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Kristian Jones

Greenhorn
+ Follow
since Jun 26, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kristian Jones

Hi
I am trying to execute a command from within a groovy script. For instance

md5sum /home/user/some file name with a space

but any filename with a space is giving an error. I've tried the following without success.

def md5cmd = "md5sum $fileName"
Process proc = md5cmd.execute()

and

def md5cmd = "md5sum \"$fileName\""


Does anyone have any suggestions on how I can pass build up an argument list that will prevent the No such file or directory.

Note:
OS is ubuntu linux

I would be greatful for any suggestions

12 years ago
Hello again.
I'm slowly getting there with groovy and working through the example listings in GinA but this time I think I really have found an example that doesn't work with the latest version.

Listing : 7.23


I'm guessing this doesn't work because GinA assumes 1.0 and I'm on 1.6.5.

I found this bug http://jira.codehaus.org/browse/GROOVY-2387 which recommends replacing the last line with


An obvious question is where did sum() come from?

Can anyone explain how I should be using spread (*.) operator in the later version of groovy as it seems like a really powerful feature

My final question is, are there many of these gotchas in the groovy GDK which newbies should be aware of ?

Kris
12 years ago
Doh, school boy error. Can't believe I didn't check the pattern first.


Thanks again.
Kris
12 years ago
Hi Guys,
The following code is a modified example from Groovy in Action but I don't understand what it does.




I never seem to be able to get the 'matched candidate with regex' (which is what I think the code is supposed/!supposed to do) regardless of how I change the 1st / 3rd argument. Has anyone got any suggestions on what needs to be changed in order to make it work and print out this line.

The code is from page 165 of the book and I'm using groovy 1.6.5

Thanks
Kris
12 years ago
Hi all
I would appreciate any suggesstions on the following scenario. I have the following.

Page 1:
Command Button

Page 2:
OutputText
OutputText2
PrePopulateFields()

When a user presses the command button on page 1 I wish to execute PrePopulateFields() and then direct the user to that page or redirect the user then call PrePopulateFields(); I'm not fussy so long as the fields displayed are updated.

Can anyone tell me whether this is possible and how to do it.

Thanks in advance
Kris.
[ June 26, 2008: Message edited by: Bear Bibeault ]
13 years ago
JSF