From: Robert M. <rob...@us...> - 2008-01-27 14:20:33
|
On 11/01/2008, Jeremy White <jez...@ho...> wrote: > The doc's say it it should return a hash, but it actually returns an array. Bug or doco shortfall? > > ########################################################################### > # (@)METHOD:GetItem(NODE) > # (@)METHOD:ItemInfo(NODE) > # Returns an associative array of information about the given NODE: > # -children > # -image > # -parent > # -selectedimage > # -state > # -text [snip] > XSRETURN(12); > } else { > XSRETURN_UNDEF; > } It does what is says. It returns an associative array (actually a list, I guess). I assume this is down so that you can write: my %info = $node->ItemInfo(); However, on failure the code above will warn about an uneven number of elements in the hash assignment, as the returned list will contain a single 'undef'. I'll fix that last XSRETURN_UNDEF to XSRETURN_EMPTY. Can you suggest a better wording for the docs? Rob. |