Likewise
$foo := $attributes{"cid"}{1} // not on array or collection
works according to collection documentation on accessing an item
with {1} even if not an array
but
$foo := $row{"cid"}{1} // not on array or collection
errors out with
$foo := $row{"cid"}{1}
Expected an array or collection handle.
Hmmm...I can't reproduce that with a valid RowSet and $row. $row is a
collection like $attributes. This code worked correctly in the demo
database:
global($ids; $names; $phones)
all records([vendors])
selection to array([vendors]name; $names; [vendors]phone; $phones)
$map := """
name: $names;
phone:$phones"""
$rs := RowSet.newFromArrays("name:$names;phone:$phones")
$row := $rs->getRow
$rs->last
writebr($row{"name"})
writebr($row{"name"}{1})
Are you sure you are not clobbering $row between the call to getRow
and a4d.web.embedCollectionItems?
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/