Roger Waters

Greenhorn
+ Follow
since May 10, 2006
Merit badge: grant badges
For More
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 Roger Waters

Tcl
I have just been moved from a J2EE development role to work on the companys flagship product. This product was built using the Tcl scripting language. I would like to hear some pointers on this technology as i am new to it and until last week didn't even know that it existed. Is it a good career move to invest my time and effort into learning this from the ground up. I have dabbled in bash and php before, not into any great depth though.
Are there many companies that use this technology? is it a good skill to have? should i consider persuing my java career, as i was only getting to grips with it?

Any help is appreciated.
17 years ago
Joanne Thank you. your suggestion fixed my problem.

Bear, Thanks also. In haste i had not read joannes post. I thought it was mine.
17 years ago
ok

Would someone be kind enough to show me how they would implement it, in both the class and the calling page.

I feel like i have started an issue on localisation, when all i wanted to do was get a boolean method to work.
17 years ago
CORRECTION TO LAST POST

the code should read


17 years ago
Ok

I am still getting a compiler error.

the JSP page is giving out about the localiser calling the method, isUSA();

its called like this :

The actual method in the Localiser class is :



Trying to simplify here, just to get the boolean working, will make it proper for international users then.
17 years ago
Does that mean that i am returning a String?

I tried to implement it the way you suggested but i got a complier error.

I am passing in the string in the mehod header, as in boolean isUSA(String lang)

My original question was what am i actually sending back to the calling method
17 years ago
Like this, Maybe?



This should do the trick (i think)
17 years ago
paul

The check is as i wrote in the previous post.
It is classified as USA if the language is english, thats it.
17 years ago
Ok thanks

i figured it was a boolean, but i dont know how to implement or how to use it. I have looked at the API and for it to work i obviously have to check something.

would the method go something like this?

public boolean isUSA(){
if(lang.equals("en"))
return true;
}
17 years ago
Hi,

I have to work on code that someone else has written, but not finished.

In the code ( a .JSP page) the following method is called

if (localiser.isUSA()))
do this;
else
do that;

The class localiser, does not have a method for isUSA(), so i have to write it. My question is what is being returned, or how does this check work as nothing is being passed in, so i dont know what to pass out.

I am at a muddle.

Thanks
Roger
17 years ago
Marc

This code worked a treat.

if (locale.getLanguage().equals(thisone.getLanguage())

It did what i wanted it to do, and that was display a greeting message to visitors from foreign soil in their native language.

Thanks for the help, guess i will be spending time on the ranch as i have a lot more to learn
17 years ago
hi

I had another look at the code and :

Locale locale = req.getLocale(); is returning only 'en'.

But to create locale 'thisone' ,i have to call it this way
Locale thisone = new Locale("en", "gb", "");

So the following if statement,
if(locale.equals(thisone))
Will never be the same !

The problem now is how do i compare the two locales ?

I think i could do this !



This seems an awful convulouted way of doing things ?
Am I on the right track?
17 years ago
Marc

Thanks for the welcome.

I did use print statements to see if i was getting the right language and country and variant.

getCountry()and getLanguage() return the 2 digit strings en, gb
but the getVariant() returns an empty string.

Rgs
Roger
17 years ago
Hi

I am trying to compare 2 objects to see if they are the same.
I am using java SDK 1.3.1

here is a snippet of whats going on (or going wrong)



i have to call it using the code for english and also great britain as i am on SDK 1.3.1

Any help is appreciated. i took me a while to get to this stage, what with using == and other such things to perform the comparison.

If someone can fix this (its probably really easy ) would they explain what i am doing wrong please.
Thanks
Roger
17 years ago