[Platemail-developer] Properties
Status: Pre-Alpha
Brought to you by:
batneil
|
From: Neil C. <ba...@th...> - 2005-01-31 11:04:30
|
On Monday 31 January 2005 10:00, you wrote: > > I'm going to start a bit of Platemail hacking now. > > Good, good. =A0I did some poking, and I think I've gotten the basic idea > for how it's going to work. =A0I've implemented a little sample which > lists the Vector for Properties for pop3mailsource. =A0That's quite > straight forward, however I really think we need a more organised/formal > way of adding the classes that are to be saved. > > To whit; > > 1) Modifying the constructors to add a reference to the registry I'd be careful with doing this in the constructor; there may be cases where= =20 you don't want to add them (though none that immediately occur). Perhaps y= ou=20 could just have a register() method to be called after construction, and=20 optionally a static method on the class which creates you a new object and= =20 registers it for you. The other alternative is to pass a boolean flag to t= he=20 constructor, but it seems to me that registration isn't really a constructo= r=20 task. > 2) Adding > =A0 =A0- a Vector of properties Why not just a Properties object? > =A0 =A0- a method called by the constructor (?) to populate that list > =A0 =A0- a method to register the properties vector > =A0 =A0- a method to unregister the properties vector > > Currently, I just call these methods "manually" from the class > corresponding to "addpopaccount", however these should really be > self-contained within each class. =A0Adding an interface to specify these > properties would probably be the best plan. OK. Are you going to specify a common interface (PlatemailObject or=20 RegisteredObject or something) that all filters, mail sources and so on can= =20 implement? Cheers, Neil |