Mr. Reinaldo,
It should normally work. Example is xbradt.prg in the samples folder. Incidentally ADT has another fieldtype "Image". When the field type is "Image", xbrowse sets the columns cDataType as "P" and treats the column's value as image buffer.
In any case, even without the programmer mentioning anything, any character value, if it is binary and if it is a valid image buffer, xbrowse is expected to display the contents as Image.
For example, if a memo field contains valid text in one row and image buffer in another row, xbrowse should display the first row as memo text and second row as image.
In the above sample, the code is breaking at line no. 8363. The code at this line is :
- Code: Select all Expand view
if ValType( tmp := ::Value ) == 'C' .and. IsBinaryData( tmp )
if FITypeFromMemory( tmp ) >= 0
::cDataType := 'P'
endif
endif
It seems FiTypeFromMemory( <fieldvalue> ) is returning NIL for whatever reason.
Can you please modify the code as :
- Code: Select all Expand view
if IfNil( FITypeFromMemory( tmp ), -1 ) >= 0
and advise if you are still getting runtime error?
Please also set adequate column width and row height to accommodate the display of the picture.