|
-
Dec 24th, 2001, 04:41 PM
#1
Thread Starter
Member
With keyword [can't be resolved]
VB got at least one thing right with the With keyword. You could use it like this:
VB Code:
' Before
Combo1.AddItem "stuff"
Combo1.AddItem "things"
Combo1.AddItem "fun thingies"
' After
With Combo1
.AddItem "stuff"
.AddItem "things"
.AddItem "fun thingies"
End With
Is there a similar keyword in Java? I'm adding stuff to a vector repeatedly but seeing "slogans.addElement" millions of times looks better like ".addElement."
Last edited by filburt1; Dec 26th, 2001 at 07:56 PM.
-
Dec 25th, 2001, 08:35 PM
#2
I haven't found anything like that.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 25th, 2001, 09:04 PM
#3
Thread Starter
Member
Me neither and my mentor at work told me that such a thing doesn't exist.
-
Dec 26th, 2001, 07:33 PM
#4
Member
what's the name of that book DoaK, and is it worth buying?
-
Dec 26th, 2001, 08:19 PM
#5
"How to program in Java" by Deitel and Deitel
It's a hug book. I use it as a reference but it have a lots of example. Personnaly I have some difficulties to read line by line so I just check fast code and try to learn from them.
I have the french version of that book ( I know that it have about 150 pages more that the english version ) and it have a lots of detail... a little to much but it's a great book
-
Dec 26th, 2001, 10:21 PM
#6
Dazed Member
Filbert. I used to use the "with" keyword a lot when i programmed in VB but it's been a while. I know it's a short hand notation for being able to set a controls properties without having to refrence the control everytime. But can it be used with "non-gui" objects such as collections? I forget. Thanks
Last edited by Dilenger4; Jan 6th, 2004 at 01:56 AM.
-
Dec 26th, 2001, 10:23 PM
#7
Originally posted by Dilenger4
But can it be used with "non-gui" objects such as collections? I forget. Thanks
Yup, recordsets, collections, etc., all can use With.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 26th, 2001, 10:31 PM
#8
Dazed Member
O yeah recordsets! Right. I forgot. I haven't used Visual Basic in awhile. I have to get back into VBA programming for Access. Java is so time consuming
-
Dec 28th, 2001, 05:56 AM
#9
Hyperactive Member
yeah, i really do wish they would awith keyword, and a mathematical operator for "to the power of", that would make math things a lot nicer<sigh>.....
"There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein
If you are programming in Java use www.NetBeans.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|