-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
code cleaning folder PATH PICKER replace _o_C_xxxxx with var
- Loading branch information
1 parent
a35f5e3
commit 170f15b
Showing
35 changed files
with
1,790 additions
and
1,402 deletions.
There are no files selected for viewing
19 changes: 10 additions & 9 deletions
19
Project/Sources/Forms/HDI_PATH_PICKER/ObjectMethods/Button.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
C_TEXT:C284($Txt_fileName) | ||
var $file_name : Text | ||
|
||
$Txt_fileName:=Select document:C905("";"";"";0) | ||
|
||
$file_name:=Select document:C905(""; ""; ""; 0) | ||
|
||
If (OK=1) | ||
|
||
//set the path | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"widget_path"))->:=DOCUMENT | ||
//set the path | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "widget_path"))->:=DOCUMENT | ||
|
||
//set the type, message & placeholder | ||
PathPicker SET TYPE ("widget_path";Is a document:K24:1) | ||
pathPicker SET MESSAGE ("widget_path";"Select file:") | ||
PathPicker SET PLACEHOLDER ("widget_path";"Please select a file") | ||
//set the type, message & placeholder | ||
PathPicker SET TYPE("widget_path"; Is a document:K24:1) | ||
pathPicker SET MESSAGE("widget_path"; "Select file:") | ||
PathPicker SET PLACEHOLDER("widget_path"; "Please select a file") | ||
|
||
//update UI | ||
//update UI | ||
SET TIMER:C645(-1) | ||
|
||
End if |
18 changes: 9 additions & 9 deletions
18
Project/Sources/Forms/HDI_PATH_PICKER/ObjectMethods/Button1.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
C_TEXT:C284($Txt_path) | ||
var $path : Text | ||
|
||
$Txt_path:=Select folder:C670("";"";0) | ||
$path:=Select folder:C670(""; ""; 0) | ||
|
||
If (OK=1) | ||
|
||
//set the path | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"widget_path"))->:=$Txt_path | ||
//set the path | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "widget_path"))->:=$path | ||
|
||
//set the type, message & placeholder | ||
PathPicker SET TYPE ("widget_path";Is a folder:K24:2) | ||
pathPicker SET MESSAGE ("widget_path";"Select folder:") | ||
PathPicker SET PLACEHOLDER ("widget_path";"Please select a folder") | ||
//set the type, message & placeholder | ||
PathPicker SET TYPE("widget_path"; Is a folder:K24:2) | ||
pathPicker SET MESSAGE("widget_path"; "Select folder:") | ||
PathPicker SET PLACEHOLDER("widget_path"; "Please select a folder") | ||
|
||
//update UI | ||
//update UI | ||
SET TIMER:C645(-1) | ||
|
||
End if |
13 changes: 7 additions & 6 deletions
13
Project/Sources/Forms/HDI_PATH_PICKER/ObjectMethods/type.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
C_LONGINT:C283($Lon_type) | ||
var $type : Integer | ||
|
||
$Lon_type:=Self:C308->-1 | ||
|
||
PathPicker SET TYPE ("widget_path";$Lon_type) | ||
pathPicker SET MESSAGE ("widget_path";Choose:C955($Lon_type=Is a document:K24:1;"Select file:";"Select folder:")) | ||
PathPicker SET PLACEHOLDER ("widget_path";Choose:C955($Lon_type=Is a document:K24:1;"Please select a file";"Please select a folder")) | ||
$type:=Self:C308->-1 | ||
|
||
//update UI | ||
PathPicker SET TYPE("widget_path"; $type) | ||
pathPicker SET MESSAGE("widget_path"; Choose:C955($type=Is a document:K24:1; "Select file:"; "Select folder:")) | ||
PathPicker SET PLACEHOLDER("widget_path"; Choose:C955($type=Is a document:K24:1; "Please select a file"; "Please select a folder")) | ||
|
||
//update UI | ||
SET TIMER:C645(-1) |
73 changes: 39 additions & 34 deletions
73
Project/Sources/Forms/HDI_PATH_PICKER/ObjectMethods/widget_path.4dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,52 @@ | ||
// ---------------------------------------------------- | ||
// Object method : HDI_PATH_PICKER.widget_path | ||
// ID[5AC07F61D04D4C29A136AA0B224F1384] | ||
// Created #9-9-2014 by Vincent de Lachaux | ||
// ---------------------------------------------------- | ||
// Declarations | ||
C_LONGINT:C283($Lon_bottom;$Lon_formEvent;$Lon_left;$Lon_right;$Lon_top) | ||
C_POINTER:C301($Ptr_me) | ||
C_TEXT:C284($Txt_me) | ||
|
||
// ---------------------------------------------------- | ||
// Initialisations | ||
$Lon_formEvent:=Form event code:C388 | ||
$Txt_me:=OBJECT Get name:C1087(Object current:K67:2) | ||
$Ptr_me:=OBJECT Get pointer:C1124(Object current:K67:2) | ||
|
||
$Lon_formEvent:=Form event code:C388 | ||
|
||
// ---------------------------------------------------- | ||
// ---------------------------------------------------- | ||
// Object method : HDI_PATH_PICKER.widget_path | ||
// ID[5AC07F61D04D4C29A136AA0B224F1384] | ||
// Created #9-9-2014 by Vincent de Lachaux | ||
// ---------------------------------------------------- | ||
// Declarations | ||
|
||
var $e : Object | ||
var $my_name : Text | ||
var $self : Pointer | ||
|
||
var $left; $top; $right; $bottom : Integer | ||
|
||
|
||
|
||
// ---------------------------------------------------- | ||
// Initialisations | ||
|
||
$e:=FORM Event:C1606 | ||
$my_name:=OBJECT Get name:C1087(Object current:K67:2) | ||
$self:=OBJECT Get pointer:C1124(Object current:K67:2) | ||
|
||
|
||
// ---------------------------------------------------- | ||
Case of | ||
|
||
//______________________________________________________ | ||
: ($Lon_formEvent<0) | ||
//______________________________________________________ | ||
: ($e.code<0) | ||
|
||
//______________________________________________________ | ||
: ($Lon_formEvent=On Data Change:K2:15) | ||
//______________________________________________________ | ||
: ($e.code=On Data Change:K2:15) | ||
|
||
//update UI | ||
//update UI | ||
SET TIMER:C645(-1) | ||
|
||
//______________________________________________________ | ||
: ($Lon_formEvent=On Load:K2:1) | ||
//______________________________________________________ | ||
: ($e.code=On Load:K2:1) | ||
|
||
//Resize the widget | ||
OBJECT GET COORDINATES:C663(*;$Txt_me+".template";$Lon_left;$Lon_top;$Lon_right;$Lon_bottom) | ||
OBJECT SET COORDINATES:C1248(*;$Txt_me;$Lon_left;$Lon_top;$Lon_right;$Lon_bottom) | ||
//Resize the widget | ||
OBJECT GET COORDINATES:C663(*; $my_name+".template"; $left; $top; $right; $bottom) | ||
OBJECT SET COORDINATES:C1248(*; $my_name; $left; $top; $right; $bottom) | ||
|
||
//Offsets of the widget | ||
subform_SET_OFFSET ($Txt_me) | ||
//Offsets of the widget | ||
subform_SET_OFFSET($my_name) | ||
|
||
//______________________________________________________ | ||
//______________________________________________________ | ||
Else | ||
|
||
ASSERT:C1129(False:C215;"Form event activated unnecessary ("+String:C10($Lon_formEvent)+")") | ||
ASSERT:C1129(False:C215; "Form event activated unnecessary ("+String:C10($e.code)+")") | ||
|
||
//______________________________________________________ | ||
//______________________________________________________ | ||
End case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,51 @@ | ||
// ---------------------------------------------------- | ||
// Form method : HDI_PATH_PICKER | ||
// ID[6422098872994C57B8AC9F8BBA079A42] | ||
// Created #9-9-2014 by Vincent de Lachaux | ||
// ---------------------------------------------------- | ||
// Declarations | ||
C_LONGINT:C283($Lon_formEvent) | ||
// ---------------------------------------------------- | ||
// Form method : HDI_PATH_PICKER | ||
// ID[6422098872994C57B8AC9F8BBA079A42] | ||
// Created #9-9-2014 by Vincent de Lachaux | ||
// ---------------------------------------------------- | ||
// Declarations | ||
var $e : Object | ||
|
||
// ---------------------------------------------------- | ||
// Initialisations | ||
$Lon_formEvent:=Form event code:C388 | ||
|
||
// ---------------------------------------------------- | ||
// ---------------------------------------------------- | ||
// Initialisations | ||
$e:=FORM Event:C1606 | ||
|
||
// ---------------------------------------------------- | ||
|
||
Case of | ||
|
||
//______________________________________________________ | ||
: ($Lon_formEvent=On Load:K2:1) | ||
//______________________________________________________ | ||
: ($e.code=On Load:K2:1) | ||
|
||
GOTO OBJECT:C206(*;"") | ||
GOTO OBJECT:C206(*; "") | ||
|
||
SET TIMER:C645(-1) | ||
|
||
//______________________________________________________ | ||
: ($Lon_formEvent=On Unload:K2:2) | ||
//______________________________________________________ | ||
: ($e.code=On Unload:K2:2) | ||
|
||
//______________________________________________________ | ||
: ($Lon_formEvent=On Timer:K2:25) | ||
//______________________________________________________ | ||
: ($e.code=On Timer:K2:25) | ||
|
||
SET TIMER:C645(0) | ||
|
||
//options | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"browse"))->:=Num:C11(PathPicker Get option ("widget_path";1)) | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"showOnDisk"))->:=Num:C11(PathPicker Get option ("widget_path";2)) | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"copyPath"))->:=Num:C11(PathPicker Get option ("widget_path";3)) | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"openItem"))->:=Num:C11(PathPicker Get option ("widget_path";4)) | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"type"))->:=1+PathPicker Get type ("widget_path") | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"message"))->:=PathPicker Get message ("widget_path") | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"placeholder"))->:=PathPicker Get placeholder ("widget_path") | ||
//options | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "browse"))->:=Num:C11(PathPicker Get option("widget_path"; 1)) | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "showOnDisk"))->:=Num:C11(PathPicker Get option("widget_path"; 2)) | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "copyPath"))->:=Num:C11(PathPicker Get option("widget_path"; 3)) | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "openItem"))->:=Num:C11(PathPicker Get option("widget_path"; 4)) | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "type"))->:=1+PathPicker Get type("widget_path") | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "message"))->:=PathPicker Get message("widget_path") | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "placeholder"))->:=PathPicker Get placeholder("widget_path") | ||
|
||
//path | ||
(OBJECT Get pointer:C1124(Object named:K67:5;"path"))->:=(OBJECT Get pointer:C1124(Object named:K67:5;"widget_path"))-> | ||
//path | ||
(OBJECT Get pointer:C1124(Object named:K67:5; "path"))->:=(OBJECT Get pointer:C1124(Object named:K67:5; "widget_path"))-> | ||
|
||
//______________________________________________________ | ||
//______________________________________________________ | ||
Else | ||
|
||
ASSERT:C1129(False:C215;"Form event activated unnecessary ("+String:C10($Lon_formEvent)+")") | ||
ASSERT:C1129(False:C215; "Form event activated unnecessary ("+String:C10($e.code)+")") | ||
|
||
//______________________________________________________ | ||
//______________________________________________________ | ||
End case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.