HOWTO - Sashipa development
You wish to store images and to display them in your Sashipa application.
The development of this feature is still in process. Storage in BLOB column of the database is not available yet. Nevertheless, a Sashipa software can display image files, and store URIs in the database (in a text format).
In the database, a text column will be used. Probably a varchar of 255 characters.
Information can be given in the environment part of the Sashipa source file. The URI format can be specified, and eventually a default size for image fields that will work on the column. An example:
<schemaColumn name='tblTest_UriImage1' type='text' notNull='no' maxCharacters='255'>
... physicalName ...
... singularName ...
<guiConfigSchemaColumn>
<imageFieldConfig w='100' h='100' />
</guiConfigSchemaColumn>
<valueFormatRef valueFormat='predefinedFormat_textUri' />
</schemaColumn>
|
Now the schemaColumn is ready to be used in the GUI:
<cardForm db='dbTest'>
...
<fieldContainer>
...
<imageField>
<schemaColumnRef schemaColumn='tblTest_UriImage1' />
</imageField>
...
</fieldContainer>
</cardForm>
|
Because the size of the field is not specified here, the field will take the one of the element imageFieldConfig. Or as a last resort, the element defaultParameterSet will provide a value.
Remarks:
Loading and displaying image can take more time. But theses tasks are done in a background task (in another thread). So the software is not stuck.
In case of a URI storage, there is no problem to record an image that has not been completly loaded.
When the software is running, selecting a new image can be done from the the popup menu of the field.
© Copyright 2005 Sashipa-Melba Team. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License as much as this note clearly appears.