BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Observer pattern article on Joanna Carter's website

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design
View previous topic :: View next topic  
Author Message
Rob Decker
Guest





PostPosted: Mon Nov 08, 2004 7:24 pm    Post subject: Observer pattern article on Joanna Carter's website Reply with quote



I read through the article on Joanna Carter's website
([url]http://blogs.teamb.com/joannacarter/articles/690.aspx)[/url], and decided to
'try out' her version using composition. (Joanna- thanks for the
articles)

If I attach a TDigitalClock, then detach, then reattach it, I get an
access violation.

I'll post the project in b.p.attachments. I'm using D7.

--
Rob Decker
news AT rdcomp DOT net

Back to top
Rob Decker
Guest





PostPosted: Mon Nov 08, 2004 9:44 pm    Post subject: Re: Observer pattern article on Joanna Carter's website Reply with quote



Joanna Carter (TeamB) wrote:

Quote:
Sorry, I forgot to pass False to the TObjectList.Create; thus the
Observer was being freed when it was being detached.

That did it. Much appreciated.

--
Rob Decker
news AT rdcomp DOT net


Back to top
Joanna Carter (TeamB)
Guest





PostPosted: Mon Nov 08, 2004 10:28 pm    Post subject: Re: Observer pattern article on Joanna Carter's website Reply with quote



"Rob Decker" <nospam (AT) nospam (DOT) com> a écrit dans le message de news:
[email]xn0dpis1x12sdgy000 (AT) newsgroups (DOT) borland.com[/email]...

Quote:
If I attach a TDigitalClock, then detach, then reattach it, I get an
access violation.

Sorry, I forgot to pass False to the TObjectList.Create; thus the Observer
was being freed when it was being detached.

This is what comes of using interfaces and other languages in other projects
at the same as writing articles Smile)

Joanna

--
Joanna Carter (TeamB)

Consultant Software Engineer
TeamBUG support for UK-BUG
TeamMM support for ModelMaker



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.