Hi Dave,
I need do a iterate process each time I detect a change within Hans-Peter Grid.
At Grid definition I put this line:
SetVar "[Rectangulo1_SelAction]" "Gosub [#34]ver_foto[#34]"
and works fine.
Related function has the following lines
:ver_foto
1: hpwGridGetCell "Rectangulo1" "1" "[Rectangulo1_SelRow]" "[value]"
2: AE_SqLite_BLOB_Get "visitantes.sdb|control|imagen|id=[value]|[tempdir]imagen.jpg|ok"
3: delay "200"
4: RefreshObject "Imagen1"
return
Explanation:
Line 1: get the ID of the row
Line 2: extract an image from a Blob Field
Line 3: wait 200 milliseconds
Line 4: Refresh the object that retrieves the image (extracted on line 2 )
Aparently, everything is ok... and works.
But...
I think the RefreshObject "Imagen1" action is performed before the filewriting action.... because sometimes does not refresh the object
Is for this reason I put the Delay "200" action... in order to pause the refresh action...
How does RefreshObject action work really ?
Thanks in advance,
David de Argentina
RefreshObject: Synchronous ?
Moderator: Neosoft Support
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
David de Argentina:
I am assuming that (Picture) object Imagen1 has file [tempdir]imagen.jpg associated with it ... perhaps you could try ... before the AE_SqLite_BLOB_Get command ... and after this command you can check if the file [tempdir]imagen.jpg exists ... (say) every 50 milliseconds ... and when it does exist ...
I am assuming that (Picture) object Imagen1 has file [tempdir]imagen.jpg associated with it ... perhaps you could try ...
Code: Select all
SetObjectFileName "Imagen1" ""
FileErase "[tempdir]imagen.jpg"
Code: Select all
SetObjectFileName "Imagen1" "[tempdir]imagen.jpg"
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
-
- Posts: 1596
- Joined: Mon Apr 04, 2005 4:13 pm
- Location: Buenos Aires, Argentina
- Contact:
I think NeoBook is confused when the object filename is always the same.
I created this script and work fine:
Where the ObjectFilename of "imagen1" is "[image]" (this is a Image Object)
I created this script and work fine:
Code: Select all
:ver_foto
hpwGridGetCell "Rectangulo1" "1" "[Rectangulo1_SelRow]" "[value]"
if "[value]" "<>" "[oldvalue]"
setvar "[oldvalue]" "[value]"
FileErase "[image]"
Random "1000" "[p2]"
setvar "[image]" "[tempdir]file[p2].jpg"
AE_SqLite_BLOB_Get "visitantes.sdb|control|imagen|id=[value]|[image]|ok"
RefreshObject "Imagen1"
endif
return