Skip to content

Commit

Permalink
Use DECLARE in methods and change declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
e-marchand committed Sep 25, 2024
1 parent b191639 commit 700f956
Show file tree
Hide file tree
Showing 30 changed files with 156 additions and 370 deletions.
4 changes: 2 additions & 2 deletions Project/Sources/Forms/D_MultiProgress_Mac/method.4dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
C_POINTER:C301($NilPtr)
C_LONGINT:C283($SubformWidth; $SubformHeight)
// var $NilPtr : Pointer
var $SubformWidth; $SubformHeight : Integer

Case of
: (Form event code:C388=On Load:K2:1)
Expand Down
4 changes: 2 additions & 2 deletions Project/Sources/Forms/D_MultiProgress_Win/method.4dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
C_POINTER:C301($NilPtr)
C_LONGINT:C283($SubformWidth; $SubformHeight)
// var $NilPtr: Pointer
var $SubformWidth; $SubformHeight : Integer

Case of
: (Form event code:C388=On Load:K2:1)
Expand Down
20 changes: 5 additions & 15 deletions Project/Sources/Methods/Progress Get Button Enabled.4dm
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) //Reference of Progress
C_BOOLEAN:C305($0)
#DECLARE($ProgressID : Integer) : Boolean

C_TEXT:C284($Message)

C_LONGINT:C283($p)

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($ProgressID) // progress code

C_BOOLEAN:C305($CancelAllow)

C_TEXT:C284($Error)
var $p : Integer
var $ErrorID : Integer
var $CancelAllow : Boolean

If (Count parameters:C259>=1)

$ProgressID:=$1

Progress__Semaphore_ON //*************

$p:=Find in array:C230(<>_ProgressID; $ProgressID)
Expand All @@ -34,7 +24,7 @@ End if

Progress__ManageMethodsError($ErrorID; $ProgressID)

$0:=$CancelAllow
return $CancelAllow



Expand Down
15 changes: 5 additions & 10 deletions Project/Sources/Methods/Progress Get Button Title.4dm
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) //Reference of Progress
C_TEXT:C284($0)
#DECLARE($ProgressID : Integer) : Text

C_TEXT:C284($Title)
C_LONGINT:C283($p)

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($ProgressID) // progress code
var $Title : Text
var $p : Integer
var $ErrorID : Integer

If (Count parameters:C259>=1)

$ProgressID:=$1

Progress__Semaphore_ON //*************

$p:=Find in array:C230(<>_ProgressID; $ProgressID)
Expand All @@ -29,7 +24,7 @@ End if

Progress__ManageMethodsError($ErrorID; $ProgressID)

$0:=$Title
return $Title



Expand Down
15 changes: 5 additions & 10 deletions Project/Sources/Methods/Progress Get Icon.4dm
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) //Reference of Progress
C_PICTURE:C286($0)
#DECLARE($ProgressID : Integer) : Picture

C_PICTURE:C286($Icon)
C_LONGINT:C283($p)

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($ProgressID) // progress code
var $Icon : Picture
var $p : Integer
var $ErrorID : Integer

If (Count parameters:C259>=1)

$ProgressID:=$1

Progress__Semaphore_ON //*************

$p:=Find in array:C230(<>_ProgressID; $ProgressID)
Expand All @@ -28,7 +23,7 @@ End if

Progress__ManageMethodsError($ErrorID; $ProgressID)

$0:=$Icon
return $Icon



Expand Down
18 changes: 7 additions & 11 deletions Project/Sources/Methods/Progress Get Message.4dm
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) //Reference of Progress
C_TEXT:C284($0)
#DECLARE($ProgressID : Integer) : Text

C_TEXT:C284($Message)
C_LONGINT:C283($p)
C_TEXT:C284($Error)

C_LONGINT:C283($ErrorID) //Error code
C_TEXT:C284($ErrorText) // error text
C_LONGINT:C283($ProgressID)
var $Message : Text
var $p : Integer
var $Error : Text

var $ErrorID : Integer

If (Count parameters:C259>=1)

$ProgressID:=$1

Progress__Semaphore_ON //*************

$p:=Find in array:C230(<>_ProgressID; $ProgressID)
Expand All @@ -31,7 +27,7 @@ End if

Progress__ManageMethodsError($ErrorID; $ProgressID)

$0:=$Message
return $Message



Expand Down
4 changes: 2 additions & 2 deletions Project/Sources/Methods/Progress Get On Error Method.4dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//%attributes = {"invisible":true,"shared":true}
#DECLARE() : Text

C_TEXT:C284($0) //callback method name
$0:=<>OnErrorMethod
return <>OnErrorMethod
16 changes: 5 additions & 11 deletions Project/Sources/Methods/Progress Get On Stop Method.4dm
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) //Reference of Progress
C_TEXT:C284($0)
#DECLARE($ProgressID : Integer) : Text

C_TEXT:C284($OnStopMethod)

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($ProgressID)

C_LONGINT:C283($p)
var $OnStopMethod : Text
var $ErrorID : Integer
var $p : Integer

If (Count parameters:C259>=1)

$ProgressID:=$1

Progress__Semaphore_ON //*************

$p:=Find in array:C230(<>_ProgressID; $ProgressID)
Expand All @@ -30,7 +24,7 @@ End if

Progress__ManageMethodsError($ErrorID; $ProgressID)

$0:=$OnStopMethod
return $OnStopMethod



Expand Down
20 changes: 5 additions & 15 deletions Project/Sources/Methods/Progress Get Progress.4dm
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) //Reference of Progress
C_REAL:C285($0)
#DECLARE($ProgressID : Integer) : Real

C_TEXT:C284($Message)

C_LONGINT:C283($p)

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($ProgressID) // progress code

C_REAL:C285($Value)

C_TEXT:C284($Error)
var $p : Integer
var $ErrorID : Integer
var $Value : Real

If (Count parameters:C259>=1)

$ProgressID:=$1

Progress__Semaphore_ON //*************

$p:=Find in array:C230(<>_ProgressID; $ProgressID)
Expand All @@ -34,7 +24,7 @@ End if

Progress__ManageMethodsError($ErrorID; $ProgressID)

$0:=$Value
return $Value



Expand Down
15 changes: 5 additions & 10 deletions Project/Sources/Methods/Progress Get Title.4dm
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) //Reference of Progress
C_TEXT:C284($0)
#DECLARE($ProgressID : Integer) : Text

C_TEXT:C284($Title)
C_LONGINT:C283($p)

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($ProgressID) // progress code
var $Title : Text
var $p : Integer
var $ErrorID : Integer

If (Count parameters:C259>=1)

$ProgressID:=$1

Progress__Semaphore_ON //*************

$p:=Find in array:C230(<>_ProgressID; $ProgressID)
Expand All @@ -29,7 +24,7 @@ End if

Progress__ManageMethodsError($ErrorID; $ProgressID)

$0:=$Title
return $Title



Expand Down
11 changes: 5 additions & 6 deletions Project/Sources/Methods/Progress New.4dm
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//%attributes = {"invisible":true,"shared":true}
C_BOOLEAN:C305($1) //set to front (or not if not passed)
#DECLARE() : Integer

C_LONGINT:C283($0)
C_LONGINT:C283($N; $NextID)
var $N; $NextID : Integer

Progress__Compiler

C_PICTURE:C286($Image)
C_TEXT:C284($Path; $Sep)
var $Image : Picture
var $Path; $Sep : Text

Progress__Semaphore_ON //*************

Expand Down Expand Up @@ -57,6 +56,6 @@ If (Count parameters:C259>=1)
BRING TO FRONT:C326(<>PS_Progress)
End if

$0:=$NextID
return $NextID


12 changes: 4 additions & 8 deletions Project/Sources/Methods/Progress QUIT.4dm
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
//%attributes = {"invisible":true,"shared":true}
#DECLARE($ProgressID : Integer)
// should be called by host before leaving

C_LONGINT:C283($1) //Reference of Progress to stop
var $ErrorID : Integer

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($ProgressID) // progress code

C_LONGINT:C283($i; $p; $n)
C_TEXT:C284($Error)
var $i; $p; $n : Integer
var $Error : Text

$Error:=""

If (Count parameters:C259>=1)

Progress__Semaphore_ON //*************

$ProgressID:=$1

If ($ProgressID=0)

<>ProgressInited:=False:C215
Expand Down
25 changes: 7 additions & 18 deletions Project/Sources/Methods/Progress SET BUTTON ENABLED.4dm
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) // Reference of Progress
C_BOOLEAN:C305($2) // Mandatory (allow or nor)
C_BOOLEAN:C305($3) // If passed then the progress window becomes the foreground window
#DECLARE($ProgressID : Integer; $CancelAllow : Boolean; $FrontMost : Boolean)

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($ProgressID) // progress code
var $ErrorID : Integer

C_LONGINT:C283($p; $CountParam)
var $p : Integer

C_TEXT:C284($Title)
C_REAL:C285($Progress)
C_BOOLEAN:C305($CancelAllow)
C_PICTURE:C286($Icon)
C_BOOLEAN:C305($FrontMost)
var $Title : Text
var $Progress : Real
var $Icon : Picture

$CountParam:=Count parameters:C259
If ($CountParam>=2)
$ProgressID:=$1
$CancelAllow:=$2
If ($CountParam>=3)
$FrontMost:=$3
End if
If (Count parameters:C259>=2)

Progress__Semaphore_ON //*************

Expand Down
21 changes: 4 additions & 17 deletions Project/Sources/Methods/Progress SET BUTTON TITLE.4dm
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
//%attributes = {"invisible":true,"shared":true}
C_LONGINT:C283($1) //Reference of Progress
C_TEXT:C284($2) // mandatory (title)
C_BOOLEAN:C305($3) //If passed then the progress window becomes the foreground window
#DECLARE($ProgressID : Integer; $CancelButtonText : Text; $FrontMost : Boolean)

C_LONGINT:C283($ProgressID) // progress code
C_TEXT:C284($CancelButtonText)
C_BOOLEAN:C305($FrontMost)
var $ErrorID : Integer
var $p : Integer

C_LONGINT:C283($ErrorID) //Error code
C_LONGINT:C283($p; $CountParam)

$CountParam:=Count parameters:C259
If ($CountParam>=2)

$ProgressID:=$1
$CancelButtonText:=$2
If ($CountParam>=3)
$FrontMost:=$3
End if
If (Count parameters:C259>=2)

Progress__Semaphore_ON //*************

Expand Down
Loading

0 comments on commit 700f956

Please sign in to comment.