Re: summary of the previous thread on oaf IIDs (as I remember it)



Maciej Stachowiak <mjs eazel com> writes:

> I can think of a real easy way to implement this, which is to add a
> starts_with operator to OAF. Then you can do a query like:
> 
> "iid.starts_with('OAFIID:gnome_eog_image:')"
> 
> I'd like to keep `activate_from_id()' requiring the full IID though,
> since it really needs to be passed a true unique identifier, since it
> has no way to resolve conflicts. `oaf_query()' and `oaf_activate()'
> both have explicit sorting order passed to them; and `oaf_query()'
> returns info on all the matching objects (sorted according to the
> specified criteria) while `oaf_activate()' activates the object that
> sorts the highest.
> 
> So using _query or _activate instead of _activate_from_id will
> maintain the clarity that you are not using a truly unique ID, but
> only a shortcut name.
> 
> Does this sound reasonable?

Yes, sounds good.

> The one problem I have with this proposal is that people may be
> encouraged to use the starts_with form, which is kind of bad style. I
> would still prefer that people use the full IID, or, better yet, as
> Mathieu so eloquently argued, not hardcode IIDs at all, but rather do
> a query for a component that has the capabilities you need (this does
> not have to be only interfaces but can also be things like supported
> mime types, URI schemes handled, etc).

Well, we should see this _starts_with thing just as a convenient shortcut
for instance we could have a moniker which lets you do this so that you
can have

  x = bonobo_object_get ("query:gnome_eog_image", "IDL:GNOME/EOG/Image:1.0);

> As Mathieu pointed out, you can replace any of the Nautilus views you
> want, including the icon and list views. In current Evolution, you can
> also add or replace Evolution shell components, which also makes for a
> very powerful, extensible groupware platform (Mathieu got this wrong,
> I hear someone has corrected him, but I wanted to underscore this
> point). I also applaud the Evolution hackers for using the gnome-vfs
> mechanism for mime mappings, which lets users customize the view
> components they use for attachments. By having these query mechanisms,
> we're able to make Nautilus and Evolution a lot more powerful and
> extensible than the Microsoft equivalents, and I hope this paves the
> way for the next generation of GNOME apps.
> 
> I do recognize that there are times you do want to hardcode IIDs - for
> instance, it would be silly for the EOG program to query for an
> arbitrary component to handle EOG images.
> 
> So I agree to make this case easier, but I still think it's better to
> use the full IID when you need it.

I agree.

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]