When I first posted this, I got a pointer to:
http://doc.4d.com/4Dv15/4D-Pack/15.1/AP-Is-Picture-Deprecated.301-2787490.en.html
<http://doc.4d.com/4Dv15/4D-Pack/15.1/AP-Is-Picture-Deprecated.301-2787490.en.html>
I’m trying to upgrade a Foundation Picture Library in v16. The tech note uses
an obsolete 4d pack command, so I re-wrote it as so:
C_LONGINT($vlPict;$vPictCount;$vPictRef;$vTotal)
C_TEXT($vPictName)
C_POINTER($vPointer)
C_PICTURE($vpPict)
C_BOOLEAN($isObs)
ARRAY TEXT($arrPictNames;0)
ARRAY LONGINT($arrPictRefs;0)
$vTotal:=0
PICTURE LIBRARY LIST($arrPictRefs;$arrPictNames)
$vPictCount:=Size of array($arrPictRefs)
ARRAY TEXT($aTPictureFormats;0)
If ($vPictCount>0)
For ($vlPict;1;$vPictCount) // for each picture
$vPictRef:=$arrPictRefs{$vlPict}
$vPictName:=$arrPictNames{$vlPict}
GET PICTURE FROM LIBRARY($arrPictRefs{$vlPict};$vpPict)
$vPointer:=->$vpPict // pass a pointer
//$isObs:=AP Is Picture Deprecated($vPointer)
GET PICTURE FORMATS($vpPict;$aTPictureFormats)
If (Size of array($aTPictureFormats)>0)
$isObs:=($aTPictureFormats{1}=".pict")
If ($isObs) // if format is obsolete
CONVERT PICTURE(vpPict;".PNG") // conversion
to png
// and saving in library
SET PICTURE TO
LIBRARY(vpPict;$vPictRef;$vPictName)
$vTotal:=$vTotal+1
End if
End if
End for
ALERT(String($vTotal)+" picture(s) out of "+String($vPictCount)+" were
converted to png.")
Else
ALERT("The picture library is empty.")
End if
The routine runs without errors, but OK is 0 after CONVERT PICTURE and nothing
gets updated.
I’m wondering if anyone has a suggestion.
On Thu, Aug 4, 2016 at 4:55 PM, Lee Hinde <[email protected]
<mailto:[email protected]>> wrote:
I have a database for which I've taken over maintenance.
There's a form that is working fine for me locally, but that is not working on
the test server.
The form includes an image variable which is loaded from a record and passed to
the form.
When I install it on the client's server (new Mac), I get the following image
where the var should be.
Both I and the server are running Mac OS 10.11.x
The database is running compiled, so it's not a missing variable - I would
assume if the variable wasn't getting assigned the image would be blank and not
show this.
Any tips?
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************