-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added documentation for shared methods
- Loading branch information
1 parent
deedca6
commit 9086c9e
Showing
16 changed files
with
227 additions
and
26 deletions.
There are no files selected for viewing
Binary file modified
BIN
-417 Bytes
(100%)
Build/Components/4DPop QuickOpen.4dbase/4DPop QuickOpen.4DZ
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
Build/Components/4DPop QuickOpen.4dbase/Documentation/Methods/QUICK_OPEN.md
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- QUICK_OPEN() --> | ||
## Description | ||
`QUICK_OPEN` display the quick open dialog | ||
|
||
## Usage | ||
|
||
Call `QUICK_OPEN` from your code. For example, a button. |
82 changes: 82 additions & 0 deletions
82
...omponents/4DPop QuickOpen.4dbase/Documentation/Methods/quickOpenEventHandler.md
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!-- quickOpenEventHandler() -> $caught : Boolean --> | ||
|
||
## Description | ||
|
||
`quickOpenEventHandler` first tests the modifier, then the key and finally whether we are in design process. If all tests are satisfied, the quick open dialog is displayed. | ||
|
||
## Syntax | ||
|
||
`quickOpenEventHandler() ➞ Boolean` | ||
|
||
## Usage | ||
|
||
See the [complete documentation](https://github.com/vdelachaux/4DPop-QuickOpen/blob/master/README.md) | ||
|
||
|
||
### A - If you do not use an event-catching method | ||
|
||
Create, if any, the database method On startup and enter this code: | ||
|
||
```4d | ||
If (Not(Is compiled mode)) | ||
ARRAY TEXT($componentsArray; 0) | ||
COMPONENT LIST($componentsArray) | ||
If (Find in array($componentsArray; "4DPop QuickOpen")>0) | ||
// Installing quickOpen | ||
EXECUTE METHOD("quickOpenInit"; *; Formula(MODIFIERS); Formula(KEYCODE)) | ||
ON EVENT CALL("quickOpenEventHandler"; "$quickOpenListener") | ||
End if | ||
End if | ||
``` | ||
|
||
|
||
### B - If you already use an event-catching method | ||
|
||
1 - Call the init method before installing your event-catching method. Something like: | ||
|
||
```4d | ||
ARRAY TEXT($componentsArray; 0) | ||
COMPONENT LIST($componentsArray) | ||
If (Find in array($componentsArray; "4DPop QuickOpen")>0) | ||
// Installing quickOpen | ||
EXECUTE METHOD("quickOpenInit"; *; Formula(MODIFIERS); Formula(KEYCODE)) | ||
End if | ||
ON EVENT CALL("MY_METHOD"; "$eventHandler") | ||
``` | ||
|
||
|
||
2 - Modify your event-catching method like this: | ||
|
||
```4d | ||
var $quickOpen : Boolean | ||
// Only in development mode | ||
If (Not(Is compiled mode(*))) | ||
// Only if the component is loaded | ||
ARRAY TEXT($components; 0) | ||
COMPONENT LIST($components) | ||
If (Find in array($components; "4DPop QuickOpen")>0) | ||
// Is it a quickOpen call? | ||
EXECUTE METHOD("quickOpenEventHandler"; $quickOpen) | ||
End if | ||
End if | ||
If (Not($quickOpen)) | ||
// <THE DATABASE EVENT HANDLER CODE> | ||
End if | ||
``` | ||
|
12 changes: 12 additions & 0 deletions
12
Build/Components/4DPop QuickOpen.4dbase/Documentation/Methods/quickOpenInit.md
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- quickOpenInit(Formula(MODIFIERS); Formula(KEYCODE) {; modifierBit {; keyCode }}) --> | ||
## Description | ||
|
||
`quickOpenInit` must be called once, generally in the `On Startup` method to initialize the QuickOpen component and eventually set the main shortcut. | ||
|
||
## Syntax | ||
|
||
`quickOpenInit()` | ||
|
||
## Usage | ||
|
||
See the [quickOpenEventHandler method documentation](quickOpenEventHandler.md) or the [complete documentation](https://github.com/vdelachaux/4DPop-QuickOpen/blob/master/README.md) |
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
Binary file modified
BIN
-144 Bytes
(100%)
Build/Components/4DPop QuickOpen.4dbase/Libraries/lib4d-arm64.dylib
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Build/Components/4DPop QuickOpen.4dbase/Resources/InfoPlist.strings
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- QUICK_OPEN() --> | ||
## Description | ||
`QUICK_OPEN` display the quick open dialog | ||
|
||
## Usage | ||
|
||
Call `QUICK_OPEN` from your code. For example, a button. |
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!-- quickOpenEventHandler() -> $caught : Boolean --> | ||
|
||
## Description | ||
|
||
`quickOpenEventHandler` first tests the modifier, then the key and finally whether we are in design process. If all tests are satisfied, the quick open dialog is displayed. | ||
|
||
## Syntax | ||
|
||
`quickOpenEventHandler() ➞ Boolean` | ||
|
||
## Usage | ||
|
||
See the [complete documentation](https://github.com/vdelachaux/4DPop-QuickOpen/blob/master/README.md) | ||
|
||
|
||
### A - If you do not use an event-catching method | ||
|
||
Create, if any, the database method On startup and enter this code: | ||
|
||
```4d | ||
If (Not(Is compiled mode)) | ||
ARRAY TEXT($componentsArray; 0) | ||
COMPONENT LIST($componentsArray) | ||
If (Find in array($componentsArray; "4DPop QuickOpen")>0) | ||
// Installing quickOpen | ||
EXECUTE METHOD("quickOpenInit"; *; Formula(MODIFIERS); Formula(KEYCODE)) | ||
ON EVENT CALL("quickOpenEventHandler"; "$quickOpenListener") | ||
End if | ||
End if | ||
``` | ||
|
||
|
||
### B - If you already use an event-catching method | ||
|
||
1 - Call the init method before installing your event-catching method. Something like: | ||
|
||
```4d | ||
ARRAY TEXT($componentsArray; 0) | ||
COMPONENT LIST($componentsArray) | ||
If (Find in array($componentsArray; "4DPop QuickOpen")>0) | ||
// Installing quickOpen | ||
EXECUTE METHOD("quickOpenInit"; *; Formula(MODIFIERS); Formula(KEYCODE)) | ||
End if | ||
ON EVENT CALL("MY_METHOD"; "$eventHandler") | ||
``` | ||
|
||
|
||
2 - Modify your event-catching method like this: | ||
|
||
```4d | ||
var $quickOpen : Boolean | ||
// Only in development mode | ||
If (Not(Is compiled mode(*))) | ||
// Only if the component is loaded | ||
ARRAY TEXT($components; 0) | ||
COMPONENT LIST($components) | ||
If (Find in array($components; "4DPop QuickOpen")>0) | ||
// Is it a quickOpen call? | ||
EXECUTE METHOD("quickOpenEventHandler"; $quickOpen) | ||
End if | ||
End if | ||
If (Not($quickOpen)) | ||
// <THE DATABASE EVENT HANDLER CODE> | ||
End if | ||
``` | ||
|
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- quickOpenInit(Formula(MODIFIERS); Formula(KEYCODE) {; modifierBit {; keyCode }}) --> | ||
## Description | ||
|
||
`quickOpenInit` must be called once, generally in the `On Startup` method to initialize the QuickOpen component and eventually set the main shortcut. | ||
|
||
## Syntax | ||
|
||
`quickOpenInit()` | ||
|
||
## Usage | ||
|
||
See the [quickOpenEventHandler method documentation](quickOpenEventHandler.md) or the [complete documentation](https://github.com/vdelachaux/4DPop-QuickOpen/blob/master/README.md) |
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
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 +1,7 @@ | ||
ON_STARTUP | ||
If (Not:C34(Is compiled mode:C492(*))) | ||
|
||
// Installing quickOpen | ||
quickOpenInit(Formula:C1597(MODIFIERS); Formula:C1597(KEYCODE)) | ||
ON EVENT CALL:C190("quickOpenEventHandler"; "$quickOpenListener") | ||
|
||
End if |
This file was deleted.
Oops, something went wrong.
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
Binary file not shown.