Article View: borland.public.jbuilder.java.language
Article #16718Re: Help: static data member got reset...
From: John Yu
Date: Mon, 25 Jan 1999 00:00
Date: Mon, 25 Jan 1999 00:00
26 lines
1533 bytes
1533 bytes
"Mark X. Yang" wrote: > I compiled this using plain jdk1.1.6. > This program runs as expected (it prints out "test" on the console when the > button > is pressed). Maybe I > misunderstand your problem. Can you give me a more concrete example? No, I don't think you misunderstood the problem. What you've tried should demonstrate the problem I experienced. But, as I said, it was a *random* problem. It's pretty hard for me to give a more concrete example as the actual problems occurred inside a fairly large project. What I can tell is, in one instance, I implemented a Singleton (as per GOF's patterns) using a static variable. However, when the singleton was used by a GUI object, it became null... Then, I added a couple of print statements (to debug) and it suddenly worked again! Then, I added some extra lines of code for the business logic, it didn't work again... It was frustrating. -- John Yu
Technical Details
Message-ID:
<36ABA638.44E43B29@objectmastery.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36A8031C.CC5DDA7@objectmastery.com> <789bss$ilj1@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,ad7c1cb07f7c3e7f X-Google-Attributes: gidf74b3,public From: John Yu <jyu@objectmastery.com> Subject: Re: Help: static data member got reset... Date: 1999/01/25 Message-ID: <36ABA638.44E43B29@objectmastery.com> X-Deja-AN: 436462795 Content-Transfer-Encoding: 7bit References: <36A8031C.CC5DDA7@objectmastery.com> <789bss$ilj1@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: ObjectMastery Pty. Ltd. Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language