Re: VP IMPORT DOCUMENT in v17R6

2019-10-31 Thread Jeremy Roussak via 4D_Tech
I’m slightly surprised to have had no response to this, but maybe nobody is 
using VP IMPORT DOCUMENT, at least on Macs.

I have submitted a bug report: the command is broken in R16.

Jeremy

> On 30 Oct 2019, at 13:49, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Here’s a minuscule database and a version of the xlsx file, with useful data 
> removed.
> 
>   https://www.dropbox.com/s/ls7e695n046y63f/vp%20test.zip?dl=1 
> 
> 
> Open “Form1” and run it. Choose “test.xlsx”.
> 
> Under R5, it loads. Under R6, it doesn’t. 
> 
> Am I missing something? How do I report a bug?
> 
> Jeremy
> 
>> On 30 Oct 2019, at 11:34, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Forgot to mention: the document is a simple xlsx Excel document, with four 
>> sheets, 23k in size.
>> 
>> Jeremy
>> 
>>> On 30 Oct 2019, at 11:30, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>>> wrote:
>>> 
>>> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form event. 
>>> Form.path contains a path in Mac system format, colon-delimited.
>>> 
>>> In v17R5, it works fine. In R6, on the same document, I get an empty 
>>> spreadsheet. No error; just an empty sheet.
>>> 
>>> Mac, Mojave.
>>> 
>>> Any suggestions gratefully received.
>>> 
>>> Jeremy
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Jeremy Roussak via 4D_Tech
Chip,

Thanks, but using a POSIX path produces an error.

Jeremy

> On 30 Oct 2019, at 14:44, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> Try using Posix - I know you should not have to
> follows a posix converter - 4D's (at least as of v15 is 
> incomplete/incorrect)
> 
> 
>  //fileutl_Path_Convert_to_Posix
>  // $1 - Text - Path to convert
>  //$2 - Pointer (Optional) - to Error Return Text
> 
>  //Original from JorgeChB via iNug
> 
>  //Converts a Mac file path to a Posix form
> 
>  //RETURNS - Text - converted path, or empty string if path is empty
>  // • Created 3/24/15 by Chip - 
>  //• Updated 05-17-18 by Chip - added test for empty path
> C_TEXT($Path;$Path;$0;$msg)
> C_POINTER($2;$Error_ptr)
> 
> errutl_Start 
> 
> If (Count parameters>=1)
> $Path:=$1
> 
> If (Count parameters>=2)
> $Error_ptr:=$2
> End if 
> 
> Case of 
> : ($Path="")
> $msg:="Source Path is empty"
> errutl_Add ($msg)
> 
> : (Position(Colon_Char;$Path)>0)
> 
> If ($Path#"")
> $Path:=Replace string($Path;Slash_Char;"__-sLaSh-__")  //'a/b' -> 
> 'a__-sLaSh-__b'
> $Path:=Replace string($Path;Colon_Char;Slash_Char)  //'a:b' -> 'a/b'
> $Path:=Replace string($Path;"__-sLaSh-__";Colon_Char)  
> //'a__-sLaSh-__b' -> 'a:b'
> $Path:=Replace 
> string($Path;BackSlash_Char;BackSlash_Char+BackSlash_Char)  //'a\\b' -> 
> 'a\\b'"
> $Path:=Replace string($Path;Space_Char;BackSlash_Char+Space_Char)  //'a 
> b' -> 'a\ b'
> $Path:=Replace string($Path;"*";BackSlash_Char+"*")  //'a*b' -> 'a\*b'
> $Path:=Replace string($Path;"'";BackSlash_Char+"'")  //'a'b' -> 'a\'b'
> $Path:=Replace string($Path;"&";BackSlash_Char+"&")  //'a' -> 'a\'
> $Path:=Replace string($Path;Quote_Char;BackSlash_Char+Quote_Char)  
> //'a"b' -> 'a\"b'
> $Path:=Replace string($Path;"(";BackSlash_Char+"(")  //'a(b' -> 'a\(b'
> $Path:=Replace string($Path;")";BackSlash_Char+")")  //'a)b' -> 'a\)b'
> $Path:=Replace string($Path;"|";BackSlash_Char+"|")  //'a|b' -> 'a\|b'
> 
>  //make sure we do not prepend 'Volumes' if it already there
> If (Position("/Volumes/";$Path)=0)
> $0:="/Volumes/"+$Path
> Else 
> $0:=$Path
> End if 
> Else 
> errutl_Add ("Source is empty.")
> End if 
> Else 
> $msg:="Posix conversion is only applicable "
> $msg:=$msg+"to paths formatted for use on a Macintosh."
> errutl_Add ($msg)
> End case 
> Else 
> $msg:="Required parameters (1) not passed."+Cr_Char
> $msg:=$msg+"Parameters passed "+String(Count parameters)
> errutl_Add ($msg)
> End if 
> 
> errutl_End (Current method name;$Error_ptr;Nil($Error_ptr))
>  //End fileutl_Path_Convert_to_Posix
> 
> 
> 
> NOTE: 
> - errutl_start initializes an error reporting system
> - calls to errutl_add builds a text message to return an error to 
> calling method
> - BOTH of the above can be removed or ignore or replaced with your own 
> error reporter
> 
> Chip
> 
> On Wed, 30 Oct 2019 11:30:29 +, Jeremy Roussak via 4D_Tech wrote:
>> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form 
>> event. Form.path contains a path in Mac system format, 
>> colon-delimited.
>> 
>> In v17R5, it works fine. In R6, on the same document, I get an empty 
>> spreadsheet. No error; just an empty sheet.
>> 
>> Mac, Mojave.
>> 
>> Any suggestions gratefully received.
>> 
>> Jeremy
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> We have done so much, with so little, for so long;
> We are now qualified to anything with nothing 
>  - unknown

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Chip Scheide via 4D_Tech
Try using Posix - I know you should not have to
follows a posix converter - 4D's (at least as of v15 is 
incomplete/incorrect)


  //fileutl_Path_Convert_to_Posix
  // $1 - Text - Path to convert
  //$2 - Pointer (Optional) - to Error Return Text

  //Original from JorgeChB via iNug

  //Converts a Mac file path to a Posix form

  //RETURNS - Text - converted path, or empty string if path is empty
  // • Created 3/24/15 by Chip - 
  //• Updated 05-17-18 by Chip - added test for empty path
C_TEXT($Path;$Path;$0;$msg)
C_POINTER($2;$Error_ptr)

errutl_Start 

If (Count parameters>=1)
$Path:=$1

If (Count parameters>=2)
$Error_ptr:=$2
End if 

Case of 
: ($Path="")
$msg:="Source Path is empty"
errutl_Add ($msg)

: (Position(Colon_Char;$Path)>0)

If ($Path#"")
$Path:=Replace string($Path;Slash_Char;"__-sLaSh-__")  //'a/b' -> 
'a__-sLaSh-__b'
$Path:=Replace string($Path;Colon_Char;Slash_Char)  //'a:b' -> 'a/b'
$Path:=Replace string($Path;"__-sLaSh-__";Colon_Char)  
//'a__-sLaSh-__b' -> 'a:b'
$Path:=Replace 
string($Path;BackSlash_Char;BackSlash_Char+BackSlash_Char)  //'a\\b' -> 
'a\\b'"
$Path:=Replace string($Path;Space_Char;BackSlash_Char+Space_Char)  //'a 
b' -> 'a\ b'
$Path:=Replace string($Path;"*";BackSlash_Char+"*")  //'a*b' -> 'a\*b'
$Path:=Replace string($Path;"'";BackSlash_Char+"'")  //'a'b' -> 'a\'b'
$Path:=Replace string($Path;"&";BackSlash_Char+"&")  //'a' -> 'a\'
$Path:=Replace string($Path;Quote_Char;BackSlash_Char+Quote_Char)  
//'a"b' -> 'a\"b'
$Path:=Replace string($Path;"(";BackSlash_Char+"(")  //'a(b' -> 'a\(b'
$Path:=Replace string($Path;")";BackSlash_Char+")")  //'a)b' -> 'a\)b'
$Path:=Replace string($Path;"|";BackSlash_Char+"|")  //'a|b' -> 'a\|b'

  //make sure we do not prepend 'Volumes' if it already there
If (Position("/Volumes/";$Path)=0)
$0:="/Volumes/"+$Path
Else 
$0:=$Path
End if 
Else 
errutl_Add ("Source is empty.")
End if 
Else 
$msg:="Posix conversion is only applicable "
$msg:=$msg+"to paths formatted for use on a Macintosh."
errutl_Add ($msg)
End case 
Else 
$msg:="Required parameters (1) not passed."+Cr_Char
$msg:=$msg+"Parameters passed "+String(Count parameters)
errutl_Add ($msg)
End if 

errutl_End (Current method name;$Error_ptr;Nil($Error_ptr))
  //End fileutl_Path_Convert_to_Posix



NOTE: 
- errutl_start initializes an error reporting system
- calls to errutl_add builds a text message to return an error to 
calling method
- BOTH of the above can be removed or ignore or replaced with your own 
error reporter

Chip

On Wed, 30 Oct 2019 11:30:29 +, Jeremy Roussak via 4D_Tech wrote:
> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form 
> event. Form.path contains a path in Mac system format, 
> colon-delimited.
> 
> In v17R5, it works fine. In R6, on the same document, I get an empty 
> spreadsheet. No error; just an empty sheet.
> 
> Mac, Mojave.
> 
> Any suggestions gratefully received.
> 
> Jeremy
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
We have done so much, with so little, for so long;
We are now qualified to anything with nothing 
  - unknown
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Jeremy Roussak via 4D_Tech
Here’s a minuscule database and a version of the xlsx file, with useful data 
removed.

https://www.dropbox.com/s/ls7e695n046y63f/vp%20test.zip?dl=1 


Open “Form1” and run it. Choose “test.xlsx”.

Under R5, it loads. Under R6, it doesn’t. 

Am I missing something? How do I report a bug?

Jeremy

> On 30 Oct 2019, at 11:34, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Forgot to mention: the document is a simple xlsx Excel document, with four 
> sheets, 23k in size.
> 
> Jeremy
> 
>> On 30 Oct 2019, at 11:30, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form event. 
>> Form.path contains a path in Mac system format, colon-delimited.
>> 
>> In v17R5, it works fine. In R6, on the same document, I get an empty 
>> spreadsheet. No error; just an empty sheet.
>> 
>> Mac, Mojave.
>> 
>> Any suggestions gratefully received.
>> 
>> Jeremy
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Jeremy Roussak via 4D_Tech
Forgot to mention: the document is a simple xlsx Excel document, with four 
sheets, 23k in size.

Jeremy

> On 30 Oct 2019, at 11:30, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form event. 
> Form.path contains a path in Mac system format, colon-delimited.
> 
> In v17R5, it works fine. In R6, on the same document, I get an empty 
> spreadsheet. No error; just an empty sheet.
> 
> Mac, Mojave.
> 
> Any suggestions gratefully received.
> 
> Jeremy
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Jeremy Roussak via 4D_Tech
I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form event. 
Form.path contains a path in Mac system format, colon-delimited.

In v17R5, it works fine. In R6, on the same document, I get an empty 
spreadsheet. No error; just an empty sheet.

Mac, Mojave.

Any suggestions gratefully received.

Jeremy
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**