Re: subviews and python interface
"Eric S. Johansson" <[email protected]> Sat, 07 May 2005 10:37:03 -0400
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
Brian Kelley wrote:
> I'm not quite sure what you mean here. I'm assuming a sub-view is a
> row that has a view as a column. When you say "contains storage
> objects" is where you lose me.
I'm sorry. My lack of familiarity with some of the terminology is
probably getting in the way.
> A view cannot contain a storage objects, a storage object contains
> views. A view can contain other views though. For example
>
> st = metakit.storage("file.mk", 1)
>
> vw = st.getas("user[name:S,history[commands:S]]")
>
> so now each user has a name and a "list" of strings that were the past
> commands. The subview can have many different columns of course.
>
> vw.append(("Brian",))
> vw[0].commands.append(("ls -ls",))
> vw[1].commands.append(("rm -r *",))
>
>
>
> Hopefully this helps.
yes. It does.
I am curious however why you use tuples to enter the data in the
subview? Most of the examples have seen use named arguments either
explicitly or as I have been doing as a dictionary.
I'm curious about indirect reference to subviews. what if I wanted to
access multiple subviews without explicitly naming them. I don't really
have a reason to do so at this time, I'm just asking for when I get
really confused. :-)
Also, should vw[0].commands.append(("ls -ls",)) really be
vw[0].history.append(("ls -ls",))?
thanks
---eric
--
http://www.wired.com/wired/archive/13.03/view.html?pg=5
The result of the duopoly that currently defines "competition" is that
prices and service suck. We're the world's leader in Internet
technology - except that we're not.
_____________________________________________
Metakit mailing list - [email protected]
http://www.equi4.com/mailman/listinfo/metakit