Let me correct something. My original code did not have the Open Document line.
I put in in just to match the documentation while I was debugging. I should
have look like this…
ARRAY TEXT($aSelected;0)
$document:=Select document("";"*";"Select the label document that was saved to
disk...";0;$aSelected)
…. a bunch of code…….
C_BLOB($blob)
DOCUMENT TO BLOB($aSelected{1};$blob) //******** $blob = 0 octets *******
If (ok=1)
[_LabelDocument]Document:=$blob
….more code….
> On Mar 22, 2018, at 12:08 AM, John Baughman via 4D_Tech
> <[email protected]> wrote:
>
> I wrote this in 2009 and it has worked for many years. I am not sure exactly
> when it broke, but I think within the last year. The following code loads a
> saved Label Editor document to the database.
>
> ARRAY TEXT($aSelected;0)
> $document:=Select document("";"*";"Select the label document that was saved
> to disk...";0;$aSelected)
> //I am using Select document because Open Document does not have a
> message field.
> $vhDocRef:=Open document($aSelected{1}) // Select the document of your choice
> If (ok=1)
> CLOSE DOCUMENT($vhDocRef) // We don't need to keep it
> …. a bunch of code…….
> C_BLOB($blob)
>
> DOCUMENT TO BLOB(Document;$blob) //$blob = 0 octets
> If (ok=1)
> [_LabelDocument]Document:=$blob
> ….more code….
>
> Document and aSelected{1} properly contain the full path to the Label Editor
> document…
>
> Macintosh HD:Users:johnbdh2:Desktop:My Label.4lb
>
> Is this a bug, or am I missing something.
>
> Thanks,
>
> John
>
>
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> [email protected]
>
>
>
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ: http://lists.4d.com/faqnug.html
> Archive: http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
John Baughman
Kailua, Hawaii
(808) 262-0328
[email protected]
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************