Article View: borland.public.jbuilder.java.language
Article #18414Global Singleton Classes?
From: Rob Williams
Date: Fri, 26 Jun 1998 00:00
Date: Fri, 26 Jun 1998 00:00
16 lines
1180 bytes
1180 bytes
I'm writing an app that needs to make some basic information available to a number of frames in the application, like the date that the current week began on, what location is using the program, etc. Since we all know, obviously, that we aren't supposed to be doing public variables, I wonder if the right thing would be to create an instance of a class called AppSettings in the Application class and then get references to it in any of the frames where I need some of the information. I tried to look at the Calendar class as an example of how to do this but didn't really learn anything; it seems to new a Gregorian Calendar in the constructor. Thanks, Rob Williams RobCo Incorporated
Technical Details
Message-ID:
<3593F482.6CAEEFBA@robco-inc.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,b8537ec38763bb48,start X-Google-Attributes: gidf74b3,public From: Rob Williams <rob@robco-inc.com> Subject: Global Singleton Classes? Date: 1998/06/26 Message-ID: <3593F482.6CAEEFBA@robco-inc.com> X-Deja-AN: 366390983 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: RobCo Incorporated Newsgroups: borland.public.jbuilder.java.language