[Zope3-dev] Re: registering nameless utilities
Garrett Smith
garrett at mojave-corp.com
Mon May 10 09:40:27 EDT 2004
Jim Fulton wrote:
> Garrett Smith wrote:
>
>> I want to lookup a utility using:
>>
>> zapi.getUtility(iface)
>>
>> When I try to register a local utility with a site manager, the UI
>> insists I provide a name. (The 'name' attribute of
>> IUtilityRegistration is required.)
>
>
> This is undoubtably due to the fact that the schema system, unfotunately,
> can't tell the differene between an empty string and one that hasn't been
> provided, even when the minimum string length is 0.
Ah yes, this debate :-)
If this truly is a three-state value (!= '', '', and None), we'll need a
different widget as a text field can only convey two states.
When it comes to registering utilities, is there a practical difference
between '' and None? I would think we could use one or the other to
indicate a 'nameless' utility.
-- Garrett
More information about the Zope3-dev
mailing list