Skip to content

Commit a938178

Browse files
author
Gary Criblez
committed
Updated documentation
1 parent 87b5fe3 commit a938178

5 files changed

Lines changed: 91 additions & 51 deletions

File tree

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
<!-- AJUI_BC_info ( ) -> version -->
22

3-
# AJUI_BC_info
4-
5-
## Parameters
6-
7-
* none
8-
9-
## Return value
10-
11-
(text) version
123

134
## Description
145

156
Show the version info of the component.
167

8+
```4d
9+
AJUI_BC_info ( ) -> version
10+
```
11+
12+
| Parameter | Type | In/Out | Description |
13+
| --------- | ---- | ------ | ----------- |
14+
| version | text | out | version info of the component |
15+
1716
## Example
1817

1918
```
2019
C_String($version)
2120
22-
$version:= AJUI_BC_info ()
21+
$version:= AJUI_BC_info () //AJUI BreadCrumb (v18): 1.2.2-Build37
2322
```

Documentation/Methods/AJUI_BC_loadTemplates.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
<!-- AJUI_BC_loadTemplates ( ) -> templates -->
1+
<!-- AJUI_BC_loadTemplates ( {folderPath} ) -> templates -->
22

3-
# AJUI_BC_loadTemplates
4-
5-
## Parameters
6-
7-
* (text) (optional) folderPath
8-
9-
## Return value
10-
11-
(collection) content of the template files
123

134
## Description
145

156
Utility method to retrieve in a collection (templates_col), all templates JSON files inside a folder. You can pass in parameter (folder_path) the path of the folder containing the templates. If this is not the case, the method will search in default path (.../Resources/AJUI_BreadCrumb_Templates/).
167

8+
```4d
9+
AJUI_BC_loadTemplates ( {folderPath} ) -> templates
10+
```
11+
12+
| Parameter | Type | In/Out | Description |
13+
| --------- | ---- | ------ | ----------- |
14+
| folderPath | text | in | where to find the template json files |
15+
| templates | collection | out | content of the template files  |
16+
1717
## Example
1818

1919
```

Documentation/Methods/AJUI_Breadcrumb.md

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
1-
<!-- AJUI_Breadcrumb ( ) -> Breadcrumb class -->
1+
<!-- AJUI_Breadcrumb.new ( {template} ) -> instance of Breadcrumb class -->
22

3-
# AJUI_Breadcrumb
43

5-
## Parameters
6-
7-
* none
8-
9-
## Return value
4+
## Description
105

11-
(object) Breadcrumb class
6+
Exposes the Breadcrumb class at the host base. Replace New AJUI_BreadCrumb since V18R3. It is possible to pass an object as a parameter to it in order to import an AJUI Breadcrumb template (JSON file).
127

13-
## Description
8+
```4d
9+
AJUI_Breadcrumb.new ( {template} ) -> instance
10+
```
1411

15-
Exposes the Breadcrumb class at the host base.
12+
| Parameter | Type | In/Out | Description |
13+
| --------- | ---- | ------ | ----------- |
14+
| template | object | in | Properties :<br> - (text) templateName : Name of the folder containing the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI BreadCrumb.<br> - (text) (optional) templatePath : You can specify a path to retrieve the file otherwise, the component will search in the default folder located in the resources (.../Resources/AJUI_BreadCrumb_Templates/). |
15+
| instance | object | out | instance of AJUI_BreadCrumb with all the member functions |
1616

1717
## Example
1818

19+
```4d
20+
21+
//Import template and add callback with params from the lab (HDI groupedButtons)
22+
Case of
23+
: (Form event code=On Load)
24+
C_OBJECT($bc)
25+
$bc:=New object()
26+
$bc.templateName:="groupedBtn_selection.json"
27+
28+
Form.bc1:=AJUI_BreadCrumb.new ($bc)
29+
Form.bc1.Name("bc1")
30+
31+
//add callback
32+
$section_obj:=New object
33+
$section_obj.onClickCB:="HDI_setNote"
34+
$params:=New object
35+
$params.notationNB:=1
36+
For ($i;1;5)
37+
$params.note:=$i
38+
$section_obj.onClickCBParams:=OB Copy($params)
39+
Form.bc1.UpdateSection("note"+String($i);$section_obj)
40+
End for
41+
42+
End case
43+
44+
Form.bc1.Draw()
1945
```
20-
C_Object ($breadcrumbClass)
21-
22-
$breadcrumbClass:=AJUI_Breadcrumb
23-
```
Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
11
<!--New AJUI_BreadCrumb ( {template_obj} ) -> AJUI BreadCrumb instance -->
22

3-
# New AJUI_BreadCrumb
43

5-
## Parameters
64

7-
* (object) (optional) template :
8-
* (text) templateName : Represents the name of the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI_Breadcrumb.
9-
* (text) (optional) templatePath : You can specify a path to recover the file otherwise, the component will search in the default folder located in the host database resources (.../Resources/AJUI_BreadCrumb_Templates/).
10-
11-
## Return value
5+
## Description
126

13-
(object) instance of an AJUI BreadCrumb
7+
This method returns an object variable (breadcrump) that represents an instance of AJUI_BreadCrumb. It contains all the properties and their default values as well as the formulas (member functions) to manipulate them.It is possible to pass an object as a parameter to it in order to import an AJUI Breadcrumb template (JSON file).
148

15-
## Description
9+
```4d
10+
New AJUI_BreadCrumb ( {template} ) -> instance
11+
```
1612

17-
This method returns an object variable (breadcrump) that represents an instance of AJUI_BreadCrumb. It contains all the properties and their default values as well as the formulas (member functions) to manipulate them.
13+
| Parameter | Type | In/Out | Description |
14+
| --------- | ---- | ------ | ----------- |
15+
| template | object | in | Properties :<br> - (text) templateName : Name of the folder containing the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI BreadCrumb.<br> - (text) (optional) templatePath : You can specify a path to retrieve the file otherwise, the component will search in the default folder located in the resources (.../Resources/AJUI_BreadCrumb_Templates/). |
16+
| instance | object | out | instance of AJUI_BreadCrumb with all the member functions |
1817

1918
## Example
2019

21-
```
22-
C_Object($myBC;$template_obj)
23-
C_String($path;$templateName)
24-
25-
$template_obj:=New object("templateName";$templateName;"templatePath";$path)
26-
$myBC:=New AJUI_BreadCrumb ($template_obj)
20+
```4d
21+
22+
//Import template and add callback with params from the lab (HDI groupedButtons)
23+
Case of
24+
: (Form event code=On Load)
25+
C_OBJECT($bc)
26+
$bc:=New object()
27+
$bc.templateName:="groupedBtn_selection.json"
28+
29+
Form.bc1:=New AJUI_BreadCrumb ($bc)
30+
Form.bc1.Name("bc1")
31+
32+
//add callback
33+
$section_obj:=New object
34+
$section_obj.onClickCB:="HDI_setNote"
35+
$params:=New object
36+
$params.notationNB:=1
37+
For ($i;1;5)
38+
$params.note:=$i
39+
$section_obj.onClickCBParams:=OB Copy($params)
40+
Form.bc1.UpdateSection("note"+String($i);$section_obj)
41+
End for
42+
43+
End case
44+
45+
Form.bc1.Draw()
2746
```

Project/Sources/Methods/AJUI_BC_info.4dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ End if
2020

2121
C_TEXT:C284($0)
2222

23-
$version_t:="1.2.2-Build37" // Thu, 25 Jun 2020 13:17:21 GMT
23+
$version_t:="1.2.2-Build38" // Fri, 26 Jun 2020 09:22:34 GMT
2424

2525
$0:="AJUI BreadCrumb (v18): "+$version_t

0 commit comments

Comments
 (0)