Miyako's Zip plugin for 4D v16 - ZIP_Without_enclosing_folder option

2018-01-17 Thread Pat Bensky via 4D_Tech
using 4D v16, Mac:
I can successfully Zip a folder using the Zip plugin.
However ...

I'm building docx files, which consist of a zipped folder of xml files. I
need to create the Zip archive by adding just the actual files without
their enclosing folder. I believe the ZIP_Without_enclosing_folder option
in the Zip function should do the trick, but it doesn't seem to work.

Sample code:

$folder:=*Select folder*("Folder to zip:")

$dst2:=*GetDataExportsFolder* +Folder separator+"wordtest.docx"

*ZIP_CALLBACK_INIT*

$dst:=*GetDataExportsFolder* +Folder separator+"wordtest.zip"

$success:=*Zip* ($folder;$dst;"";ZIP_Without_enclosing_folder"ZIP_CALLBACK")
// contents must be added individually to the zip archive

*ZIP_CALLBACK_DEINIT*

*If* (*Test path name*($dst2)=Is a document)

*DELETE DOCUMENT*($dst2)

*End if*

*COPY DOCUMENT*($dst;$dst2)

​This appears to work, but if I unzip wordtest.zip, ​it creates a folder
named the same as the original folder ($folder), indicating that it HAS
included the enclosing folder.

What am I doing wrong?

Thanks!
Pat

-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
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:4d_tech-unsubscr...@lists.4d.com
**

RE: Miyako's Zip plugin for 4D v16 - ZIP_Without_enclosing_folder option

2018-01-17 Thread Dennis, Neil via 4D_Tech
I have created docx documents using the the zip plugin, but my arguments to the 
plugin are different than yours. Unless the plugin signature has changed or it 
is a different plugin, try this:

$lOK:=Zip 
($tSource;$tDestination;$tPassword;ZIP_Compression_level_5;ZIP_Without_enclosing_folder)

Neil











Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
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:4d_tech-unsubscr...@lists.4d.com
**

Miyako's ZIP plugin - without_enclosing_folder - creating Word DOCX docs - solved

2018-01-17 Thread Pat Bensky via 4D_Tech
I realised after posting my previous message that there is an error in my
code - a missing semicolon:

$success:=Zip ($folder;$dst;"";ZIP_Without_enclosing_folder"ZIP_CALLBACK")

​should be:

$success:=Zip ($folder;$dst;"";ZIP_Without_enclosing_folder;"ZIP_CALLBACK")
​
​Anyway, now it's working :)
Here is my test code in case it's useful to anybody:

$src:=*Select folder*("Folder to zip:") // select a folder that contains
the required XML files for the DOCX

$dst2:=*GetDataExportsFolder* +Folder separator+"wordtest.docx"

  *ZIP_CALLBACK_INIT*

$dst:=*GetDataExportsFolder* +Folder separator+"wordtest.zip"

$success:=*Zip* ($src;$dst;"";ZIP_Compression_level_1;
ZIP_Without_enclosing_folder;"ZIP_CALLBACK")

  *ZIP_CALLBACK_DEINIT*

*If* (*Test path name*($dst2)=Is a document)

*DELETE DOCUMENT*($dst2)

*End if*

*COPY DOCUMENT*($dst;$dst2)

Pat
​
-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Parsing output from EXPORT STRUCTURE

2018-01-17 Thread Jeffrey Kain via 4D_Tech
How do I parse the XML returned from Export Structure?  

When I try using DOM Parse XML variable I get the error message 'The XML file 
is not valid or is not well-formed. (no declaration found for element 
'index_ref' : Line #1, Column # 478.)
**
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:4d_tech-unsubscr...@lists.4d.com
**

Best way to fill a variabe with styled text?

2018-01-17 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I need some commands to fill a variable with styled text.
Some parts must be in bold, some parts in bigger font size, etc

I know there is a command ST SET ATTRIBUTES, but then you first have to append 
the text to the variable with ST SET PLAIN TEXT
Then you have to remind the selection of the appended text and use ST SET 
ATTRIBUTES

I could also set the attributes just by text like :
""
But with this I have a problem that the fontsize (for example 12) must be 
converted to 9pt (I don't know how to do that)

So, is there another, better, easier way?

Thanks,

Piotr

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Parsing output from EXPORT STRUCTURE

2018-01-17 Thread John DeSoi via 4D_Tech
The code below works for me (16.3) without errors. Are you passing the 
validation parameter?


C_TEXT($struct;$xml)

EXPORT STRUCTURE($struct)
$xml:=DOM Parse XML variable($struct)

John DeSoi, Ph.D.


> On Jan 17, 2018, at 10:07 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> How do I parse the XML returned from Export Structure?  
> 
> When I try using DOM Parse XML variable I get the error message 'The XML file 
> is not valid or is not well-formed. (no declaration found for element 
> 'index_ref' : Line #1, Column # 478.)

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Parsing output from EXPORT STRUCTURE

2018-01-17 Thread Keisuke Miyako via 4D_Tech
perhaps the xml contains RTF comments that fails the parser...

> 2018/01/18 1:07、Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> のメール:
> When I try using DOM Parse XML variable I get the error message 'The XML file 
> is not valid or is not well-formed. (no declaration found for element 
> 'index_ref' : Line #1, Column # 478.)




**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Parsing output from EXPORT STRUCTURE

2018-01-17 Thread Jeffrey Kain via 4D_Tech
Thanks John  -

We actually figured it out by running the exported data through a different XML 
validator, and there were several Char(0x0001) characters in the exported 
document.

We cleaned it up before running it through 4D's parser:

// Strip out the Start of Header characters

$lPostion:=0
Repeat 
   $bMatch:=Match regex("\\x01";$tStructure;1;$lPostion;$lLength)
   $tStructure:=Delete string($tStructure;$lPostion;$lLength)
Until ($lPostion<=0)

I haven't figured out the cause of those characters yet.

--
Jeffrey Kain
jeffrey.k...@gmail.com


> On Jan 17, 2018, at 2:35 PM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> The code below works for me (16.3) without errors. Are you passing the 
> validation parameter?
> 
> 
> C_TEXT($struct;$xml)
> 
> EXPORT STRUCTURE($struct)
> $xml:=DOM Parse XML variable($struct)

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Best way to fill a variabe with styled text?

2018-01-17 Thread Keisuke Miyako via 4D_Tech
windows=96DPI, mac=72DPI so the ratio is always 4:3.

c.f.

DPI used for internal pixels <->points conversion (integer). Always 96 
(read-only)
http://doc.4d.com/4Dv16R4/4D/16-R4/4D-Write-Pro-Attributes.300-3332062.en.html

2018/01/18 1:27、Piotr Chabot Stadhouders via 4D_Tech 
<4d_tech@lists.4d.com> のメール:
fontsize (for example 12) must be converted to 9pt (I don't know how to do that)



**
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:4d_tech-unsubscr...@lists.4d.com
**

How to fix Design windows closing after quiting 4D

2018-01-17 Thread truegold via 4D_Tech
Hi All,

OSX Mac 4D 16 R4

I seems to recall this issue popped up previously but I couldn’t find it in the 
NUG.

So I’m working and I have various method and form windows open in Design. Then 
I quit and restart later …

And when I get back into Design all my windows are closed.

So something is not getting set or saved or???

However, if I close the database while in Design and reopen it then the windows 
are still there.

So???

Anyone know how to fix so that my windows remain open after I quite 4D?

Appreciate,
John…


**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: How to fix Design windows closing after quiting 4D

2018-01-17 Thread Keisuke Miyako via 4D_Tech
ACI0096985,ACI0097118

Opened windows are not saved after 4D is closed (test application mode).

use 16.214179 or later...

> 2018/01/18 8:03、truegold via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> OSX Mac 4D 16 R4
>
> I seems to recall this issue popped up previously but I couldn’t find it in 
> the NUG.
>
> So I’m working and I have various method and form windows open in Design. 
> Then I quit and restart later …
>
> And when I get back into Design all my windows are closed.
>
> So something is not getting set or saved or???
>
> However, if I close the database while in Design and reopen it then the 
> windows are still there.
>
> So???
>
> Anyone know how to fix so that my windows remain open after I quite 4D?




**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: How to fix Design windows closing after quiting 4D

2018-01-17 Thread Pat Bensky via 4D_Tech
> use 16.214179 or later...
I'm using 16R5.219028 and I have the same problem ...


On 17 January 2018 at 23:42, Keisuke Miyako via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> ACI0096985,ACI0097118
>
> Opened windows are not saved after 4D is closed (test application mode).
>
> use 16.214179 or later...
>
> > 2018/01/18 8:03、truegold via 4D_Tech <4d_tech@lists.4d.com> のメール:
> >
> > OSX Mac 4D 16 R4
> >
> > I seems to recall this issue popped up previously but I couldn’t find it
> in the NUG.
> >
> > So I’m working and I have various method and form windows open in
> Design. Then I quit and restart later …
> >
> > And when I get back into Design all my windows are closed.
> >
> > So something is not getting set or saved or???
> >
> > However, if I close the database while in Design and reopen it then the
> windows are still there.
> >
> > So???
> >
> > Anyone know how to fix so that my windows remain open after I quite 4D?
>
>
>
>
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **
>



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: How to fix Design windows closing after quiting 4D

2018-01-17 Thread Keisuke Miyako via 4D_Tech
Hello,

R releases are not always patched at the exact same time as dot-releases.

in particular they need to be tested in production for several weeks prior to 
official release.

> When we are getting closer to a public minor release shipment, the branch is 
> frozen – usually for a 3- to 5-week period.


http://www.4d.com/products/r-release/faq.html




**
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:4d_tech-unsubscr...@lists.4d.com
**

4D 15.4 crashes on start

2018-01-17 Thread Peter-Christian Miest via 4D_Tech
Some of our customers who upgraded from 13.4 to 15.4 report extremely long
loading times on cold start of 4D (about 40 seconds), sometimes followed by
a crash. After restarting (warm start) everything seems to work properly.
This seems NOT related to slow computers as this symptom is also seen on a
very fast machine, Win 10 Prof. It seems to be specific to a machine /
windows combination. If a customer sees this problem he sees it on nearly
each start. Mac users not affected so far, most windows users not affected
either. Structure file is the same for all users. We use interpreted mode,
and a 4DLink file for linking structure and data file.

Does anyone see this behavior too? Did anyone find a solution? Thanks for
your help.
Peter 



--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
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:4d_tech-unsubscr...@lists.4d.com
**