RE: [gtkmm] Glib::Module API issues
- From: Murray Cumming Comneon com
- To: r burton 180sw com
- Cc: gtkmm-list gnome org
- Subject: RE: [gtkmm] Glib::Module API issues
- Date: Fri, 21 Mar 2003 17:09:06 +0100
> From: Ross Burton [mailto:r burton 180sw com]
> On Fri, 2003-03-21 at 15:30, Murray Cumming Comneon com wrote:
> > > If I use the constructor directly, I can't have a null
> GModule on the
> > > stack. If I use new, then I don't seem to get a null
> pointer even if I
> > > try and load a module which doesn't exist.
> >
> > I suppose we should throw an exception, but constructors
> can't do that (I
> > think) so we could add an operator=() instead. That would
> be like using a
> > std::fstream, I think. In the meantime if(module.gobj()) might be an
> > equivalent to if(module).
>
> As Paul just pointed out, constructors can throw exceptions
> (phew, that
> sucks otherwise).
>
> I think an exception is the best thing, or a static method
> Glib::Module::Open(...) which returns a GModule* or some such
> pointer (a
> la the C API).
We must have something else similar in gtkmm already. I'd like to be
consistent. Maybe we need to find some *_new() or *_open() function that
returns null sometimes and grep for it in gtkmm.
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]