Hopbot log for 2007-08-29 - Helma IRC channel: #helma on irc.freenode.net

2007-08-29:

[11:23] <rjb> hmmm
[11:24] <rjb> http://helma.zumbrunn.net/reference/core/HopObject.html#getOrderedView
[11:24] <rjb> the example of dealing with getOrderedView() is not very helpful
[11:25] <zumbrunn> true
[11:26] <rjb> var ov = root.getOrderedView('cdate desc');
[11:26] <rjb> var n = 0;
[11:26] <rjb> for (var k in ov) n++;
[11:26] <rjb> n;
[11:26] <rjb> (in the helma shell for my app)
[11:26] <rjb> guess what is returned?
[11:27] <zumbrunn> getOrderedView returns a collection...
[11:27] <rjb> i mean, what is n equal to?
[11:27] <zumbrunn> so you probably want var ov = root.getOrderedView('cdate desc').list(); ?
[11:28] <rjb> hardly follows from the example
[11:28] <zumbrunn> I know
[11:28] <zumbrunn> collections aren't really documented anywhere right now
[11:29] <rjb> yeah that's the problem here
[11:29] <zumbrunn> they basically have a subset of the HopObject methods
[11:31] <zumbrunn> actually, the current docs are simply plain wrong (since getOrderedView *doesn't* return an array of the sorted subnodes)
[11:32] <rjb> yep
[11:36] <rjb> actually my goal atm is to return a json representation of all subnodes of my app's root
[11:40] <rjb> i'm almost there..
[11:42] <zumbrunn> I see I have already fixed the docs in cvs
[11:42] <zumbrunn> I just never rebuilt the docs that are online since then
[11:42] <zumbrunn> will try to do that shortly
[11:43] <rjb> toJSON() seems to omit the _id property though
[11:45] <zumbrunn> is _id enumerable?
[11:45] <rjb> and it represents a Date object as {}
[11:45] <zumbrunn> maybe toJSON just picks up what is enumerable
[11:45] <zumbrunn> yes, Date isn't supported in JSON, I believe
[11:46] <rjb> _id = id in type.properties, id being the p.k. of my sql table
[11:47] <rjb> and _children.accessname = id
[11:48] * zumbrunn goes walking the docs before it starts raining again
[11:50] <rjb> hmm is there any standard for treating Dates in JSON?
[12:00] <rjb> http://developer.mozilla.org/es4/proposals/json_encoding_and_decoding.html
[12:03] <rjb> that is currently just a proposal though, i think
[20:57] <rkerr> Any chance of running Helma on websphere or iplanet?
[23:07] <midnightmonster> better ask the mailing list
[23:36] <rkerr> mhmmm

 

 

In the channel now:

Logs by date: