Actually, more to the point, what I tried to do originally was detect
an empty Hash and not go through each() at all in that case. But
attr.edges.size() comes back as 32, not zero. alert(attr.edges.size)
shows the source for the iterating function, as I said before, so
apparently size() gives t
Using an array works when it's empty, but unfortunately normally
attr.edges is filled with rather complex objects.
(I wanted to print one of the objects out for you but can't get
Object.inspect(attr.edges) to show anything but "[object Object]" .
Seems like javascript never wants to do what I ex
attr.edges is an array... keep it simple :)
http://jsbin.com/unohi
I just added to the last example, so view the source
Rick
On Sat, Jul 11, 2009 at 10:54 AM, ronman wrote:
>
> It works! Thank you muchly. Valuable for learning, too.
>
> Now the code executes far enough to uncover another
It works! Thank you muchly. Valuable for learning, too.
Now the code executes far enough to uncover another similar problem
which I think will go to my basic understanding of Javascript. I'm
expecting it to act like PHP but I keep getting functions where I
expect values:
given:
attr: {
ed
The result your getting is completely correct, you're just missing one
aspect...
Take a look:
http://jsbin.com/anefa
(view source... )
On Fri, Jul 10, 2009 at 4:57 PM, ronman wrote:
>
> Hi,
> I've been puzzling over this for a couple of days and finally admit I
> need help. I have a Hash of