Article View: borland.public.cppbuilder.oodesign
Article #111object create order
From: Sten Larsson
Date: Sat, 06 Nov 2004 20:41
Date: Sat, 06 Nov 2004 20:41
31 lines
1755 bytes
1755 bytes
I have two classes: Event Manager Event Receiver I want event receivers to register themselves at the event manager when created. However, that requires the Event Manager to be crated before the event receivers are created. I anticipate ONE global Event Manager object, though it would be preferrable if it is possible to use multiple event managers. But for now, I anticipate Event Receivers to access one global Event Manager. The solution that I'm thinking of is to access the Event Manager instance through a function call - i.e. EventManager()->Register(this); Where the EventManager() function will dynamically create the instance when needed. (I will probably use this model for TForms too - speed up start time by creating them when needed, and potentially delete them when closed.) Any thoughts? Thanks! -sten
Technical Details
Message-ID:
<kcdqo0t2f0vkit49u0l9goji42stukiq17@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10db1e,7fd39362bd6d0fe2,start X-Google-Attributes: gid10db1e,public X-Google-Language: ENGLISH,ASCII-7-bit From: Sten Larsson <stenX@Xstenl.com> Newsgroups: borland.public.cppbuilder.oodesign Subject: object create order Date: Sat, 06 Nov 2004 12:41:42 -0800 Message-ID: <kcdqo0t2f0vkit49u0l9goji42stukiq17@4ax.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.110.17.203 X-Trace: newsgroups.borland.com 1099773680 69.110.17.203 (6 Nov 2004 12:41:20 -0700) Lines: 31 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!194.72.7.126.MISMATCH!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail