[PEAK] Using config.FactoryFor
Phillip J. Eby
pje at telecommunity.com
Thu Dec 18 09:38:18 EST 2003
At 09:18 AM 12/18/03 -0500, Phillip J. Eby wrote:
>Well, that would work, but it seems it would be simpler to just do:
>
> myFactory = binding.Obtain( config.FactoryFor(ISomeInterface) )
>
>But then the factory needs to be specified with importString() in the
>config file.
>
>Hm. Maybe I should rework that so that the [Component Factories] section
>handler does that for you. It doesn't really ever make sense to have a
>string as a factory object, so it'd be reasonable. I'll take a look at that.
This is now fixed in CVS; you can now use Obtain() as described above. I
changed it so that looking up the factory already has the importObject()
done. This simplified CreateViaFactory as well.
More information about the PEAK
mailing list