Vista SP2+
5.0r29

Crashing in Active4D debug library, not sure why, have not made any changes
to it?

I think line 27 is: $value := $inIterator{$key}.

Please help!
Thanks!
David

Oct 12 16:19:59 Active4D: [error] Reference to an undefined variable or
value: <anonymous text>, line 1
Oct 12 16:19:59 Active4D: [error] Reference to an undefined variable or
value: <anonymous text>, Method "a4d.debug._writeCollectionItems", line 27

method "_writeCollectionItems"($inIterator; $inShowHeader = true;
$inShowType = false; $inFilter = ""; $inInlineArrays = true)
        
        if ($inShowHeader)
                write("<tr>\n")
                write("<th>Key</th>\n")
                
                if ($inShowType)
                        write("<th>Type</th>\n")
                end if
                
                write("<th>Value</th>\n")
                write("</tr>\n")
        end if
        
        c_longint($type; $count)
        c_text($typeStr; $valueStr)
        c_text($key)
        $count := 0
        
        while (more items($inIterator))
                ++$count
                $continue := true
                $key := get item key($inIterator)
                
                if ($inFilter)
                        if ($key =~ $inFilter)
                                next item($inIterator)
                                $continue := false
                        end if
                end if
                
                if ($continue)
                        $type := get item type($inIterator)
                
                        if (not(is array($type)))
                                $value := $inIterator{$key}
                        end if
                
                        $valueStr := ""
                        $typeStr := ""
                        $valueIsCollection := false
                        $valueIsArray := false
                
                        write("<tr>\n")
                        write('<td class="label">$key</td>\n')
                
                        case of
                                :(is array($type))
                                        if ($inInlineArrays)
                                                $valueStr :=
'[$inIterator{$key}] {`join array($inIterator{$key}; ", "; 0; false;
true)`}'        `no element number, quote text
                                        else
                                                $valueIsArray := true
                                        end if

                                
                                :($type = Is Text)
                                        $valueStr := enclose($value)
                                
                                :($type = Is Date)
                                        $valueStr := string($value; Abbr
Month Day)
                                
                                :($type = Is Picture)
                                        $valueStr :=
a4d.utils.getPictureDescriptor($value)
                                
                                :($type = Is BLOB)
                                        $valueStr := string(blob
size($value)) + " bytes"
                                
                                :($type = Is Pointer)
                                        $valueStr := string($value)
                                
                                :($type = Is Real) | ($type = Is LongInt)
                                        $valueIsCollection := is a
collection($value)
                        end case
                
                        if ($inShowType)
                                case of
                                        :(is array($type))
                                                $typeStr := type
descriptor($inIterator{$key})
                                        
                                        :($valueIsCollection)
                                                $typeStr := "Collection"
                                else
                                        $typeStr := type descriptor($value)
                                end case
                        
                                write("<td class=\"no-wrap\">" + $typeStr +
"</td>\n")
                        end if
                
                        write("<td>")
                
                        case of
                                :($valueIsCollection)
                                        a4d.debug.dump collection($value;
$key; $inShowType; $inInlineArrays)
                                
                                :($valueIsArray)
                                        a4d.debug.dump
array($inIterator{$key}; false; $key; true)
                        else
                                if (not(is array($type)) &
(length($valueStr) = 0))
                                        $valueStr := string($value)
                                end if
                        
                                write(cell(mac to html($valueStr; *)))
                        end case
                
                        write("</td>\n</tr>\n")
                        next item($inIterator)
                end if
        end while
        
        if ($count = 0)
                writeln('''
<tr>
<td colspan="`choose($inShowType; "3"; "2")`">[Empty collection]</td>
</tr>''')
        end if
        
end method


_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/

Reply via email to