Skip to content

Commit 0590755

Browse files
committed
Update README.md
1 parent ce52ab5 commit 0590755

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,9 @@ You can enhance `4DPop` with [your own components](#how-to), and you are also ab
168168
* One or more components from the collection
169169
* **Don't forget** to open your database structure settings dialog and go to the `Security` page to enable, if necessary, the `Execute the "On host database event" method of the component` option.
170170

171+
## ![Static Badge](https://img.shields.io/badge/Project%20Dependencies-blue?logo=4d&link=https%3A%2F%2Fdeveloper.4d.com%2Fdocs%2FProject%2Fcomponents%2F%23loading-components)
171172

172-
## 4D 20R6+ - Project mode
173-
174-
All the components in the 4DPop collection are compatible with the project's dependency manager.
173+
All the components in the 4DPop collection are compatible with the [Project dependencies](https://developer.4d.com/docs/Project/components#monitoring-project-dependencies) feature. So you can simply integrate one or components into your project by selecting `Design` > `Project dependencies` and adding `vdelachaux/4DPop{-name}` as the repository address in the dedicated dialog box. **This way, you can benefit from updates over time**.
175174

176175
You can download a pre-configured `dependencies.json` file for the complete collection [**here**](./dependencies.json) and place it in the `Sources` folder of your project.
177176

@@ -256,39 +255,44 @@ The manifest describes the elements of the component that will be available via
256255
| `name` | The name that will be displayed below the button | ① | Mandatory
257256
| `media` | File name of the image used for the button. |⑦| If omitted a default picture is used
258257
| `handler` | The name of the ‘entry point’ method for your component. <br>I suggest that this name starts with an underscore (`_`) to avoid it interfering with the type ahead, as it is shared. | ② | Mandatory
259-
| `default` | The name of the method to be executed when the user clicks on the strip's button | ③ ④ ⑤| Optional if `tools`is defined
258+
| `default` | The name of the method to be executed when the user clicks on the strip's button | ③ ⑤| Optional if `tools`is defined
260259
| `tools` | Collection of [tool objects](#tool) that will be displayed as a linked menu | ④ ⑥
261-
| `popup` | To force the display of a linked menu indicator even if there is only one tool |
262-
|`ondrop` | The name of the method to be executed at the time of a drop on the button | ③
263-
| `initproc` | The name of the method to be executed when the component is loaded | ③
264-
| `helptip` | Text of help tip associated with button
260+
| `popup` | To force the display of a linked menu indicator even if there is only one tool |
261+
| `ondrop` | The name of the method to be executed at the time of a drop on the button | ③
262+
| `initproc` | The name of the method to be executed when the component is loaded | ③
263+
| `helptip` | Text of help tip associated with button | ①
265264

266265
### <a name="tool">tool object</a>
267266

268267
| Attributes |    |      |    |
269268
|------------|----|:----:|----|
270-
| `name` | Name of the tool as it will appear in the menu associated with the button | ① ④ | Mandatory if there are several `tool`<br>• pass "-" to display a separator line
269+
| `name` | Name of the tool as it will appear in the menu | ① ④ | Mandatory if there is more than one `tool`
271270
| `method` | The name of the method to run when the item is selected | ③ | Mandatory
272-
----
271+
272+
<hr>
273+
273274
> ① The `name` & `helptip` attributes accepts the syntax ‘ :xliff :resname’, so the string must be defined in the component's xliff files, and the string displayed will be localized.
274275
275-
> You must check the `Shared by component and host project` property. The method code must be:
276+
> ② The method code must be:
276277
277278
```4d
278279
#DECLARE() : 4D.Function
279-
>return Formula(Formula from string($1))
280+
return Formula(Formula from string($1))
280281
```
282+
> ⚠️ Don't forget to enable the `Shared by component and host project` property for this method.
281283
282284
> ③ The methods called receive an object as a parameter (for future use). If you plan to compile the component, this parameter must be declared explicitly `#DECLARE($data: Object)` in all the methods of the component called. It is not necessary to declare the method as shared.
283285
284-
> ④ If there is only one `tool`, the method is executed as soon as the button is clicked. If there are several `tool`, a menu arrow linked with the button is displayed and a menu listing the available tools is provided for the user.
286+
> ④ If there is only one `tool`, the method is executed as soon as the button is clicked. If there are several `tools`, a menu arrow linked to the button is displayed and a menu, listing the available tools, is displayed when the user clicks on the arrow or performs a long click.
285287
286-
> ⑤ The component method may be responsible for constructing and displaying the menu. In this case, set the `default` attribute to the name of the method whose code displays the menu and processes the user's choice. For the menu arrow to be displayed on your tool's button, you need to specify ‘True’ in the `popup` attribute.
288+
> ⑤ The component method may be responsible for building and displaying the menu. In this case, set the `default` attribute to the name of the method whose code displays the menu and processes the user's choice. This method will be called when the user clicks on the button or the arrow. For the menu arrow to be displayed on your tool's button, you need to specify “True” in the `popup` attribute.
289+
290+
> ⑥ If more than one tool is defined and the `default` attribute is set, a single click launches the `default` method and a long click or click on the arrow displays the tool menu. If there is no `default` attribute, the menu is always displayed.
287291
288-
> ⑥ In case of the default attribute is defined, a simple clic launches the `default` method and a long click or an on arrow click display the tools' menu.
289-
>
290292
> ⑦ You must provide an image of 512x512 pixels, 4DPop builds the various icons needed to display in the strip, the settings or the About dialog.
291293
294+
> ⑧ Put “-” to display a separator line
295+
292296
# <a name="topic">Topic 4DPop</a>
293297

294298
If you develop a [component compatible with 4DPop](#how-to), it is strongly recommended to add the "4DPop" [topic](https://docs.github.com/en/github/administering-a-repository/managing-repository-settings/classifying-your-repository-with-topics) to be referenced in the [list of 4DPop compatible components](https://github.com/topics/4dpop).
@@ -301,3 +305,6 @@ Found the issue? Go on and join its discussion thread.
301305
Not found? Go on and <a href="https://github.com/vdelachaux/4DPop/issues/new" target="_blank">create one</a>.
302306

303307
I strongly recommend that you create a [clone of this repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) and do a [pull-request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) for your improvements and bug fixes.
308+
309+
<hr>
310+
`Enjoy the 4th dimension`

0 commit comments

Comments
 (0)