Skip to content

4DPop, the main component of the 4DPop familly, manage the tool bar integrated into the 4D development environment.

License

Notifications You must be signed in to change notification settings

vdelachaux/4DPop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge Static Badge
release license

4DPop is a series of productivity components grouped into a toolbar that integrates perfectly with the 4D development environment.

strip

4D TN Spotlight

4DPop.4dbase is the container component that handles loading and provides an interface to compatible components.

Filled with clever tools and immediately useful for developers, 4DPop has many advantages:

A Mind for Productivity

Every 4DPop component is a handy little nugget you’ll wonder how you ever did without. Created by 4D developers for 4D developers, they’ll help you save precious time on repetitive operations, be the little helpers you always dreamt of having, and put an even friendlier face on your development environment.

Easy to Use

Installing a new component is easy: Just drag and drop on to the 4DPop toolbar! Each comes with its own online help.

Modular

You can compose your 4DPop strip à la carte with the tools you prefer, without overloading your screen.

Free

4DPop and its components are free to use and distribute in all 4D development environments.

Source Code Provided

Like all 4D components, 4DPop tools are miniature 4D projects delivered to you compiled for your immediate use, but also in interpreted mode, so that you can explore the source code. You may wonder how rules are created in 4DPop Rulers, for example, or how 4DPop Commands manages predictive typing, or how to manage a strip, a help file or to create a component. It’s all there in the code. 4DPop’s code is also a very good example of the art of programming efficiently in 4D... even if we do say so ourselves!

Open

You can enhance 4DPop with your own components, and you are also able to share them, and find others in the 4D developer community.

Repository Last release Build status
4DPop release release
AppMaker release release
Bookmarks release release
ColorChart release release
Commands release release
Constants Editor release release
Git release release
Image buddy release release
KeepIt release release
Macros release release
Pasteboard release release
QuickOpen release release
Rulers release release
sqlSchemas release release
Window release release
XLIFF-Pro release release

📌 Click on a component name in the "Repository" column above to access its repository, where the source code is available.

📌 Click on the Release tag of each component above to access its latest revision.

  • At least the 4DPop component.
  • One or more components from the collection
  • 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.

4D 20R6+ - Project mode

All the components in the 4DPop collection are compatible with the project's dependency manager.

You can download a pre-configured dependencies.json file for the complete collection here and place it in the Sources folder of your project.

📍The project's dependency manager ensures that you are always using the latest available version of the components.

📍No more notarisation problems with this installation method!

Earlier versions of 4D or binary database

  1. Create a Components folder next to the Project folder of your database *.

  2. Place the 4DPop.4dbase component ** in the Components folder.

  3. Place one or more 4DPop components you want to use in the same folder.

  4. Open your database.

  5. Open the structure settings dialog and go to the Security page to activate, if any, the option Execute "On Host Database Event" Method of the component

  6. Reopen the database, the strip is displayed in the lower left corner of the screen in Design mode.

    * For a binary database, the Components folder must be located next to the structure file of your database (".4db").
    ** On macOS, the component is a package whose ".4dbase" extension is not necessarily visible depending on your display preference settings.

📍It is always preferable to use an alias file (macOS) or shortcut file (Windows) instead of the component and thus store the originals in a single copy. Updates will be simplified especially if you maintain several projects.

The settings dialog is available in the menu associated with the cog wheel located in the title bar of the strip.

settings

In this dialogue, you can :

  • Define the position of the strip by clicking on the desired corner.
  • Choose whether the strip should expand/contract automatically.
  • Define the order of the components, either by name or by using your own drag-and-drop arrangement of icons.

When you build your application, do not include the 4DPop components (which, by definition, are not useful to the end user) so as not to increase the size of your executable. To do this, uncheck the 4DPop components in the Plugins & components page of the Build Application dialog.

Some developers provide tools that are displayed in the 4DPop strip. You can access the list of compatible components referenced on Github (with the 4dpop topic).

 Here are the ones I know:        
4D SVG* 4D JSON Validator chromo4D RegexLab Math4D
ogResources Buddy QS_Toolbox

*Embedded into the 4D application

It will be very appreciated if you publish your component on Github and don't forget to link your project with the 4DPop topic.

The compatibility of a component with the 4DPop strip is based on the presence of a manifest file in its ‘Resources’ folder. The name of the manifest must be 4DPop.json and as you can guess, it is a json file. The manifest describes the elements of the component that will be available via its icon in the 4DPop strip. Here is a sample:

{
  "name": "Dev tool",
  "media": "devTool.png",
  "handler": "_4DPopDevTool",
  "default": "run", 
  "tools": [
    {
      "name": ":xliff:DevTool_run",
      "method": "run"
    },
    {
      "name": "-"
    },
    {
      "name": ":xliff:DevTool_parameters",
      "method": "settings"
    }
  ]
}
Attributes                 
name The name that will be displayed below the button Mandatory
media File name of the image used for the button. If omitted a default picture is used
handler The name of the ‘entry point’ method for your component.
I suggest that this name starts with an underscore (_) to avoid it interfering with the type ahead, as it is shared.
Mandatory
default The name of the method to be executed when the user clicks on the strip's button ③ ④ ⑤ Optional if toolsis defined
tools Collection of tool objects that will be displayed as a linked menu ④ ⑥
popup To force the display of a linked menu indicator even if there is only one tool
ondrop The name of the method to be executed at the time of a drop on the button
initproc The name of the method to be executed when the component is loaded
helptip Text of help tip associated with button
Attributes                 
name Name of the tool as it will appear in the menu associated with the button ① ④  Mandatory if there are several tool
• pass "-" to display a separator line
method The name of the method to run when the item is selected Mandatory

① 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.

② You must check the Shared by component and host project property. The method code must be:

#DECLARE() : 4D.Function
return Formula(Formula from string($1))

③ 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.

④ 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.

⑤ 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.

⑥ 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.

⑦ 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.

If you develop a component compatible with 4DPop, it is strongly recommended to add the "4DPop" topic to be referenced in the list of 4DPop compatible components.

If you encountered a bug or have a feature request, feel free to create an issue. However, it is highly appreciated if you browse and search current issues first. Found the issue? Go on and join its discussion thread. Not found? Go on and create one.

I strongly recommend that you create a clone of this repository and do a pull-request for your improvements and bug fixes.

About

4DPop, the main component of the 4DPop familly, manage the tool bar integrated into the 4D development environment.

Topics

Resources

License

Stars

Watchers

Forks

Languages