Aprecio mucho su ayuda / Delphi for PHP
Hola a todos.
Soy completamente novato en Delphi y algo entiendo de PHP.
Un amigo me pasó una version de Delphi for PHP (2.1.0.1083) y estoy haciendo algunas pruebas que me están gustando mucho.
Sin embargo, tengo un problema con un Listview.
Creé una funcion para agregar itemes de un array a un listview, y va asi:
function AddToLista($arr,$lista) {
$LV=new Listview;
$LV=$lista;
if (!($cnt=($LV->Items->Count))) {
$LV->Items->Add;
$cnt=0;
}
$LV->Items[$cnt]->Subitems->Add($arr);
return $lista;
}
$arr es el (array) que traigo con datos
$lista es el listview.
El problema es que me da el error siguiente: Fatal error: Call to a member function Add() on a non-object...
A lo mejor lo estoy abordando mal.
Aprecio mucho de antemano su ayuda y espero no quitarles su tiempo.
Atte.,
KM
|