Dear Antonio,
your code before you add OOP works fine and I inserted a view.
I have a question how I can forward an ARRAY to the view modul.
- Code: Select all Expand view
alinks is a static ARRAY
function CheckTables()
if ! File( hb_GetEnv( "PRGPATH" ) + "/links.dbf" )
DbCreate( hb_GetEnv( "PRGPATH" ) + "/links.dbf",;
{ { "LINKDEST", "C", 200, 0 },;
{ "LINKNAME", "C", 200, 0 },;
{ "LONGTEXT", "M", 10, 0 } } )
endif
USE ( hb_GetEnv( "PRGPATH" ) + "/links" ) SHARED NEW
do while .not. eof()
aadd( alinks, { field->linkdest, field->linkname, field->longtext } )
skip
enddo
USE
return nil
In tBody of the view modul I do following:
<tbody>
<?prg local I := 0, cRow := "" //mod harbour code inside HTML TAG starts with <?prg
for I := 1 to len( alinks )
cRow += '<tr>'
cRow += '<th scope="row">' + ALLTRIM( str(I) ) + '</th>'
cRow += "<td><a target='_blank' href=" + alinks[I,1] + ">" + alinks[I,2] + "</a>"
cRow += '<br>'
cRow += alinks[I,3]
cRow += "</td>"
next
return cRow ?>
</tbody>
</table>
But I get following error:
Best regards
Otto