[keeping the list cc-ed]

On Mon, 2008-08-11 at 14:48 -0700, Noah Gibbs wrote:
> We're looking at a situation where we might get data that is more free-form.

I hope you do realize the potential security issues that this would
entail.

> We could require that the person writing the ClutterScript file add all of
> their objects to a named top-level container and ignore everything that isn't
> in the container, but we'd prefer not to.

I still have doubts on the usefulness of this.

the UI definition is integral part of an application; ClutterScript
doesn't also provide any sort of logic inside the UI definition itself -
it's just a definition.

> If we could get a list of IDs, that would let us get all the objects when/if
> we wanted them, so that would work.  So yes, I mean get a list of all the 
> object
> IDs currently loaded into a given ClutterScript.  Basically, all the object
> IDs currently in priv->objects.

I can add a method like:

  gchar **clutter_script_get_ids (ClutterScript *script,
                                  gsize         *n_ids);

which returns a newly allocated, NULL-terminated array of strings.

but the ids alone will not give you any detail whatsoever on the object
they are assigned to; you'll have to fetch the object and then check
what it is. and even in that case you'll not know for sure unless you
have some sort of introspection - or any way you can trust what you get
out of a UI definition string or file.

I'd suggest you open a bug on bugzilla.openedhand.com with the API
request and a link to this email, so that we can get some discussion and
keep track of this.

ciao,
 Emmanuele.

> --- On Mon, 8/11/08, Emmanuele Bassi <[EMAIL PROTECTED]> wrote:
> 
> > From: Emmanuele Bassi <[EMAIL PROTECTED]>
> > Subject: Re: [clutter] ClutterScript item list
> > To: [email protected]
> > Date: Monday, August 11, 2008, 2:42 PM
> > On Mon, 2008-08-11 at 14:34 -0700, Noah Gibbs wrote:
> > > Looking at clutter-script.c, it looks like there's
> > a nice little internal hash table (priv->objects) with a
> > list of the objects that were parsed from the file, but you
> > have to know the name of all the objects to get at them.
> > 
> > it's expected, since you must have written the UI
> > definition or have
> > control on what you're defining. you're surely not
> > loading random data.
> > 
> > or maybe I haven't understood your question.
> > 
> > >   It would be easy enough to write one or more
> > functions to grab these items from a ClutterScript object. 
> > Anybody know a reason why the interface shouldn't have
> > such functions?  Would a patch be accepted into clutter main
> > if I wrote some simple functions along these lines?
> > 
> > you mean you want all the ids? or all the objects?
> > 
> > ciao,
> >  Emmanuele.
> > 
> > -- 
> > Emmanuele Bassi, OpenedHand Ltd.
> > Unit R, Homesdale Business Centre
> > 216-218 Homesdale Rd., Bromley - BR12QZ
> > http://www.o-hand.com
> > 
> > -- 
> > To unsubscribe send a mail to
> > [EMAIL PROTECTED]
> 
> 
>       
> 
-- 
Emmanuele Bassi, OpenedHand Ltd.
Unit R, Homesdale Business Centre
216-218 Homesdale Rd., Bromley - BR12QZ
http://www.o-hand.com

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to