Category Archives: 4D

Tools for 4D Write Pro

4D is finally working towards creating a new 4D Write and since 14 R5 we can actually use some of it.

Of course there is still quite a lot missing but with what we already have we can for example create nice looking E-Mails.

Now most of us have worked with 4D Write until now and moving to 4D WritePro requires quite a few conversion in order to prevent us from doing all again.

Converting a 4D Write Document to WritePro works fine, as long as you go through a document on Disk, using Blobs with WP New has yet to work reliably for me.

Using References or Expressions in 4D WritePro works surpassingly well, although the tools for manipulating these References and expressions are a bit lacking.

So I have created a few helper methods that I gladly share here:

Continue reading

OSX 10.10 Working with components and plugins without aliases

Apple has broken Aliases.

Well, at least for us working with 4D and until 4D supports the new OS X aliases that now are more like bookmarks.

So, what can a developer do?
Copy all Plugins and Components into the appropriate folders and overtime a component changes, copy it again to all destinations, hoping you don’t forget one…

Tedious huh?
But aren’t we developers?
Let’s solve this in code:

Continue reading

AC_QuickBase, a Memory based Data storage for 4D V14

Ever needed to keep structured data without creating tables?
Need simple data structures for a component without adding persistent storage tables to the host database or using an external database?
Well, I may have a thing for you:

AC_QuickBase

A simple, memory based Database Component for 4D.

The command set at a glance:

AC_QuickBase – initializes the database system

ACQB_CreateTable – create a database table
ACQB_DropTable – drop the table specified
ACQB_Truncate – clears all records from a table

ACQB_Insert – create a new record
ACQB_Update – modify an existing record
ACQB_Delete – delete a record

ACQB_Value – retrieves a field value
ACQB_ValueToArray – retrieves a field value for multiple records

ACQB_Find – find a specific record, the first match is returned
ACQB_FindSel – find all records matching the request

ACQB_Count – Count records in a table

ACQB_Export – exports the database to disk
ACQB_Import – imports a database from disk

ACQB_Clear – clears the database from memory

ACQB_Editor – displays a data view and editor

Interested?

Continue reading

Copying a Menu

Ever needed to create copy of a menu you defined using CREATE MENU?
For example to use it in 2 separate processes with different settings or different states of enabling/disabling or different lines added or removed?
Well, despair not, here is a piece of code that might come in handy:

Continue reading