Skip to content

Commit 9f6dbc9

Browse files
committed
Fixed bugs in test method
4D v21 (beta) did not allow compiling of the test method due to 2 different classes being assigned to the same variable name. Split into 2 separate variables.
1 parent 6078795 commit 9f6dbc9

2 files changed

Lines changed: 554 additions & 553 deletions

File tree

Project/Sources/Methods/test.4dm

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
//%attributes = {}
2-
var $ftp : cs:C1710.FileTransfer_curl
2+
var $ftp_c : cs:C1710.FileTransfer_curl
3+
var $ftp_r : cs:C1710.FileTransfer_rclone
34
var $progressid; $source; $target; $answer; $text; $path : Text
45
var $checkstop; $result : Object
56
var $list : Collection
67

7-
$ftp:=cs:C1710.FileTransfer_curl.new("download.4d.com"; ""; ""; "https")
8+
$ftp_c:=cs:C1710.FileTransfer_curl.new("download.4d.com"; ""; ""; "https")
89

910
$progressid:="Download 4D.dmg"
1011
$checkstop:=New shared object:C1526("stop"; False:C215)
11-
$ftp.enableStopButton($checkstop)
12-
$ftp.useCallback(Formula:C1597(ProgressCallback); $progressid)
12+
$ftp_c.enableStopButton($checkstop)
13+
$ftp_c.useCallback(Formula:C1597(ProgressCallback); $progressid)
1314

1415
$source:="/Products/4D_v19R5/Installers/4D_v19_R5_Mac.dmg"
1516
$target:=System folder:C487(Desktop:K41:16)+"4d.dmg"
1617
$target:=Convert path system to POSIX:C1106($target)
17-
$ftp.setCurlPrefix("--location") // follow 301 or 302
18-
$result:=$ftp.download($source; $target)
18+
$ftp_c.setCurlPrefix("--location") // follow 301 or 302
19+
$result:=$ftp_c.download($source; $target)
1920

2021
// did user canceled?
2122
If ($checkstop.stop=True:C214)
@@ -28,10 +29,10 @@ Else
2829
End if
2930

3031

31-
$ftp:=cs:C1710.FileTransfer_rclone.new("gdrive")
32+
$ftp_r:=cs:C1710.FileTransfer_rclone.new("gdrive")
3233
$path:="/users/thomas/Desktop/rclone-v1.59.1-osx-arm64/rclone"
33-
$ftp.setPath($path)
34-
$result:=$ftp.getDirectoryListing("/")
34+
$ftp_r.setPath($path)
35+
$result:=$ftp_r.getDirectoryListing("/")
3536
If ($result.success)
3637
$list:=$result.list
3738
$text:=JSON Stringify:C1217($list)
@@ -42,18 +43,18 @@ Else
4243
End if
4344

4445

45-
$ftp:=cs:C1710.FileTransfer_rclone.new("gdrive")
46+
$ftp_r:=cs:C1710.FileTransfer_rclone.new("gdrive")
4647
$path:="/users/thomas/Desktop/rclone-v1.59.1-osx-arm64/rclone"
47-
$ftp.setPath($path)
48+
$ftp_r.setPath($path)
4849
$progressid:="Download zipg"
4950
$checkstop:=New shared object:C1526("stop"; False:C215)
50-
$ftp.enableStopButton($checkstop)
51-
$ftp.useCallback(Formula:C1597(ProgressCallback); $progressid)
51+
$ftp_r.enableStopButton($checkstop)
52+
$ftp_r.useCallback(Formula:C1597(ProgressCallback); $progressid)
5253

5354
$source:="/16-10_CookieBaseWebAuth.zip"
5455
$target:=System folder:C487(Desktop:K41:16)+"test.zip"
5556
$target:=Convert path system to POSIX:C1106($target)
56-
$result:=$ftp.download($source; $target)
57+
$result:=$ftp_r.download($source; $target)
5758

5859
// did user canceled?
5960
If ($checkstop.stop=True:C214)

0 commit comments

Comments
 (0)