Article View: borland.public.jbuilder.java.language
Article #16395Why won't this line compile ?
From: Eric Carmody
Date: Fri, 26 Feb 1999 00:00
Date: Fri, 26 Feb 1999 00:00
24 lines
1431 bytes
1431 bytes
Hello,
Using a hashtable to hold copies of ImageControl, I seem to be having a
problem getting a copy out.
buttonTable is a Hashtable. buttonName is a string to represent the key.
Here a snippet....
ImageControl buttonImage;
if (buttonTable.containsKey(buttonName)) {
buttonImage = buttonTable.get(buttonName); error on this line.
see below
}
the GET line gives compile error...
Error: (98) incompatible type; found :java.lang.Object, required:
borland.jbcl.control.ImageControl.
First time using HashTables. When I add the imagecontrol into the table
(put(buttonName, buttonImage), it copies the object, right? ... not just
storing a reference to it?
Cheers,
Eric
Technical Details
Message-ID:
<HGqB2.1313$Fc.2601@news.rdc1.ab.wave.home.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,46ad80ea8607f123,start X-Google-Attributes: gidf74b3,public From: "Eric Carmody" <ecarmody@home.com> Subject: Why won't this line compile ? Date: 1999/02/26 Message-ID: <HGqB2.1313$Fc.2601@news.rdc1.ab.wave.home.com> X-Deja-AN: 448609759 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 X-Complaints-To: abuse@home.net X-Trace: news.rdc1.ab.wave.home.com 920008487 24.65.251.68 (Thu, 25 Feb 1999 21:54:47 PDT) Organization: @Home Network Canada X-MSMail-Priority: Normal Reply-To: "Eric Carmody" <ecarmody@home.com> NNTP-Posting-Date: Thu, 25 Feb 1999 21:54:47 PDT Newsgroups: borland.public.jbuilder.java.language