Discussion:
Creating custom constants
Steve Makohin
2015-09-14 16:18:03 UTC
Permalink
I'm using 4D v14.3. How do I create custom constants? I've done some
Googling, and it appears that a product called 4D Pop (from 4D) does this,
however, I'm stymied at finding step-by-step instructions for how to install
4D Pop, how to access and use the new Constants functionality offered by 4D
Pop.



Thanks in advance.



-Steve Makohin

Water's Edge Software



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
*************************
Peter Bozek
2015-09-14 16:53:54 UTC
Permalink
Post by Steve Makohin
I'm using 4D v14.3. How do I create custom constants? I've done some
Googling, and it appears that a product called 4D Pop (from 4D) does this,
however, I'm stymied at finding step-by-step instructions for how to install
4D Pop, how to access and use the new Constants functionality offered by 4D
Pop.
Constants are now a XLIFF file in Resources foder. Get one and edit it in
your favorite XML or text editor.
--
Peter Bozek
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
*******************************************
Steve Makohin
2015-09-14 17:58:04 UTC
Permalink
Peter Bozek wrote: "Constants are now a XLIFF file in Resources folder. Get one and edit it in your favorite XML or text editor."

Thanks for quick reply, and for the answer! :-)

-Steve Makohin
Water's Edge Software


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
**************************************************************
David Adams
2015-09-14 20:43:23 UTC
Permalink
Post by Steve Makohin
I'm using 4D v14.3. How do I create custom constants? I've done some
Googling,
Post by Steve Makohin
and it appears that a product called 4D Pop (from 4D) does this, however,
I'm
Post by Steve Makohin
stymied at finding step-by-step instructions for how to install 4D Pop,
how to
Post by Steve Makohin
access and use the new Constants functionality offered by 4D Pop.
You can edit the XLIFF manually, but 4D Pop makes it a whole lot easier. I
just looked for it yesterday to put into a small demo database so the
details are fresh in my mind. The 4D Pop page on the 4D site links to the
general downloads page which has no information about 4D Pop and I didn't
hunt around to find it on their servers. The 4D installers include 4D Pop
now. As an example, here's the path on 4D 14.4 on OS X:

/Volumes/4D v14.4 Release/4D 14.4/Components Databases/4DPop/

Within the 4DPop folder, you'll find a bunch of different databases. Here's
what to do:

* Drop 4DPop.4dbase and 4D Pop Constants Editor.4base into the /Components
folder next to your structure. (Create the folder if it is missing.)

* Restart your database.

* Run the following line of code:

4DPop_Palette

After a second you should see the 4D Pop palette window while you're in
Design mode. Click it, click on the Constants icon and away you go. From
here, you'll need to create your external custom constants file (the XLIFF
file) and add your constants themes and items.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
***********************************************
Wayne Stewart
2015-09-14 23:37:02 UTC
Permalink
G'Day,

Definitely use 4D Pop! Also look at the constants module, I find it
really (really really) useful especially for creating key/property
names in objects.

Regards,

Wayne


Wayne Stewart
about.me/waynestewart
Post by Steve Makohin
Post by Steve Makohin
I'm using 4D v14.3. How do I create custom constants? I've done some
Googling,
Post by Steve Makohin
and it appears that a product called 4D Pop (from 4D) does this, however,
I'm
Post by Steve Makohin
stymied at finding step-by-step instructions for how to install 4D Pop,
how to
Post by Steve Makohin
access and use the new Constants functionality offered by 4D Pop.
You can edit the XLIFF manually, but 4D Pop makes it a whole lot easier. I
just looked for it yesterday to put into a small demo database so the
details are fresh in my mind. The 4D Pop page on the 4D site links to the
general downloads page which has no information about 4D Pop and I didn't
hunt around to find it on their servers. The 4D installers include 4D Pop
/Volumes/4D v14.4 Release/4D 14.4/Components Databases/4DPop/
Within the 4DPop folder, you'll find a bunch of different databases. Here's
* Drop 4DPop.4dbase and 4D Pop Constants Editor.4base into the /Components
folder next to your structure. (Create the folder if it is missing.)
* Restart your database.
4DPop_Palette
After a second you should see the 4D Pop palette window while you're in
Design mode. Click it, click on the Constants icon and away you go. From
here, you'll need to create your external custom constants file (the XLIFF
file) and add your constants themes and items.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
*************
Steve Makohin
2015-09-15 00:55:50 UTC
Permalink
Thanks! This explains a lot :-)

For Windows users, here’s where the 4D installer installed 4DPop (Win7)...
C:\Program Files (x86)\4D\4D v14.4\Components Databases\4DPop

Go to that directory and read the ReadMe file for more info, installation instructions, etc.

-Steve Makohin
Water's Edge Software


-----Original Message-----
From: 4D_Tech [mailto:4d_tech-***@lists.4d.com] On Behalf Of David Adams
Sent: Monday, September 14, 2015 4:43 PM
To: 4D iNug Technical
Subject: Re: Creating custom constants
Post by Steve Makohin
I'm using 4D v14.3. How do I create custom constants? I've done some
Googling,
Post by Steve Makohin
and it appears that a product called 4D Pop (from 4D) does this, however,
I'm
Post by Steve Makohin
stymied at finding step-by-step instructions for how to install 4D Pop,
how to
Post by Steve Makohin
access and use the new Constants functionality offered by 4D Pop.
You can edit the XLIFF manually, but 4D Pop makes it a whole lot easier. I just looked for it yesterday to put into a small demo database so the details are fresh in my mind. The 4D Pop page on the 4D site links to the general downloads page which has no information about 4D Pop and I didn't hunt around to find it on their servers. The 4D installers include 4D Pop now. As an example, here's the path on 4D 14.4 on OS X:

/Volumes/4D v14.4 Release/4D 14.4/Components Databases/4DPop/

Within the 4DPop folder, you'll find a bunch of different databases. Here's what to do:

* Drop 4DPop.4dbase and 4D Pop Constants Editor.4base into the /Components folder next to your structure. (Create the folder if it is missing.)

* Restart your database.

* Run the following line of code:

4DPop_Palette

After a second you should see the 4D Pop palette window while you're in Design mode. Click it, click on the Constants icon and away you go. From here, you'll need to create your external custom constants file (the XLIFF file) and add your constants themes and items.

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
************************************
Rob Laveaux
2015-09-15 09:28:16 UTC
Permalink
I take a slightly different approach. I just have a few project methods that help me to create the constants by code.

For example:

Constants_Init

Constants_AddGroup ("Deletion Rules")
Constants_Add ("Ignore Rule";"1";"L")
Constants_Add ("Cascade Rule";"2";"L")
Constants_Add ("Restrict Rule";"3";"L")
Constants_Add ("Nullify Rule";"4";"L")

Constants_ExportToFile

Then I just run the project method and it creates the XLIFF file for me.

- Rob Laveaux

--------------------------------------------------------
Pluggers Software
Bleriotlaan 62
2497 BM Den Haag
The Netherlands

Email: ***@pluggers.nl
Website: http://www.pluggers.nl

--------------------------------------------------------



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
********************************
Ortwin Zillgen
2015-09-15 09:37:51 UTC
Permalink
Post by Rob Laveaux
I take a slightly different approach. I just have a few project methods that help me to create the constants by code.
to add to this approach

I use "Constants or Helper" functions to have more complex constants
<http://dddd.mettre.de/konstanten.shtml>
Google will translate if necessary

For best performance I call those functions once and put their result into local-vars when used in any kind of loop


O r t w i n Z i l l g e n
---------------------------------------------------------
<http://dddd.mettre.de/wp/> <feed://dddd.mettre.de/dddd.xml> <https://twitter.com/Ozett>
Mitglied des Entwicklernetzwerkes www.die4dwerkstatt.de




**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-***@lists.4D.com
******************

Continue reading on narkive:
Loading...