James JVogt

Greenhorn
+ Follow
since May 21, 2007
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 James JVogt

What happens when you have a string with lots of special chars?

var x = "blah \"blah\" blah...."; and lots of newlines that you want formatted correctly... like, say, 100 lines of text. You don't want to do a bunch of +'s, that is slow. And an array of strings then a join on it is just verbose.
umm.... I'm not accessing a file... I'm assigning a variable to a string... that string being "blah blah blah\nblah blah\n"
var longString = <<<EOF
blah blah blah
blah blah
EOF;

sooo does javascript have something like this? like perl and php do..?>
That actually won't work either since you can't determine what type you got (at runtime) and then put that type the appropriate map. I.e., I can't do



but I found that my request is impossible in Java due to generics being implemented via erasure.

Well I suppose I could have the user pass in two class objects to the constructor... and compare the classes of the passed in objects against those class objects.
11 years ago
I want to do something like:



but with generics:



of course the compiler complains that both puts have the same erasure and thus signature. Is something like this possible in Java? I would rather not make two methods "putT1(...)" "putT2(...)" since that would confuse things. Overloading by return type would also be great (for get() methods)... but I am pretty sure that is impossible in Java.
(I need this "double map" to ensure that the maps vary together in a specific way when one or the other is changed).
11 years ago
First off: I have made a JComboBox that contains JCheckBox components inside of it
when it is expanded.

The ideal situation would be for a user to open the combobox, check off all the options they want, and then click somewhere else on the gui to make the combo box collapse.

The current situation is this:
the user opens the combo box, checks off an option and then the combo box immediately collapses so if they would like to check off another option they must open the combo box again.

I need to force the combo box to stay open until the user clicks another area of the gui.
[ May 21, 2007: Message edited by: Matt Crinklaw ]
13 years ago