checking that a wxFileSystem handler is registered
Francesco Montorsi
f18m_cpp217828 at yahoo.it
Mon Jul 3 05:08:39 PDT 2006
Hi,
Vadim Zeitlin ha scritto:
> There is a patch by Francesco
>
> http://sf.net/tracker/index.php?func=detail&aid=1514524&group_id=9863&atid=309863
>
> adding a wxFileSystem::IsHandlerRegistered() method. While I agree that
> we need something like this, I'm not sure if we really need (just) this
> function or something like AddHandlerIfNotRegistered(CLASSINFO) which would
> create a handler and add it if it's not already registered. Or some other
> way to ensure that a handler is registered without adding it twice. Does
> anyone have any better ideas?
AddHandlerIfNotRegistered(wxClassInfo *) can be a good thing IMO -
surely it won't harm anyone, I think.
BTW, also on this subject, I think that, since wxFileSystem uses the
list of handlers sequentially, it may be very useful to:
1) add an InsertHandler() function which just calls m_Handlers.Insert()
function
2) rename AddHandler to AppendHandler().
3) document that the handlers registered first have more priority over
the handlers registered later.
Thanks,
Francesco
More information about the wx-dev
mailing list