[V4RB] VPicture challenges
Pedro fp
lists at pedro.Net.au
Mon Sep 13 12:32:06 CDT 2004
G'day Folks
Project I'm working on is an ID photo database using Valentina & I'm
having trouble with the picture field.
In a variety of ways, including drawing it to a canvas, I've tried
testing that the picture object returned from theFile.openAsPicture is
not nil, always yielding a positive result. However the picture never
seems to go into my database.
I have a class importItem which has properties for the picture (a RB
picture object) & the person's name. As I loop through a folder
selected I create an array of importItem objects from any JPEG files
found in that folder. That array is then passed to a method of the
Valentina base object that creates the new records.
Setting a breakpoint immediately before passing the array shows that
the picture property for all items is not nil. However the blob file of
my database remains the same size (100 KB) both before and after the
import. Then when I try to retrieve the pictures nil is always
returned.
The constructor for my picture field is ...
fPhoto = new VPicture( "photo", 20 * 1024 )
(I have also used 1024, the default value, as the 2nd parameter)
The picture is set to the new record using ...
me.fPhoto.setPicture( batch( i ).photo, 80 )
(batch is the array of importItem objects)
The data is retrieved using ...
dRow( i ).icon = data.PictureField( "photo" ).getPicture
Any clues to what I'm doing wrong? Or where I should look for the
problem?
Also, can anyone offer a guide to selecting an appropriate value for
the segment size in the constructor of my VPicture field?
Cheers, Pedro :-)
Web: <http://www.pedro.net.au> PGP Key ID: 387CD96F
Instant messaging... AIM: bandidoOfOz ICQ: 27671678 Jabber: pedrofp
MSN: mail at pedro.net.au Yahoo: pedro_fp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"There's no place like 127.0.0.1."
origin unknown
More information about the Valentina
mailing list