KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Replacing the deprecated command AP SET TIP STATE and AP GET TIP STATE
PRODUCT: 4D | VERSION: 16R4 | PLATFORM: Mac & Win
Published On: August 16, 2017

Starting with v16.x, the Plugin commands AP GET TIP STATE and AP SET TIP STATE from the 4D Pack plugin have been deprecated and have been renamed with a _o_ prefix to denote that the commands are obsolete. The commands are now named _o_AP GET TIP STATE and _o_AP SET TIP STATE.

Starting v16R4 you can now replace these obsolete Plugin calls with calls to a native 4D command. This is achieved in v16R4 with a new parameter that has been added to the SET DATABASE PARAMETER command:

So previous call like this in v15.x

AP SET TIP STATE(1) // enable tips in v15.x
AP SET TIP STATE(0) // disable tips in v15.x


Or calls like this in v16.x
_o_AP SET TIP STATE(1) // enable tips in v16.x
_o_AP SET TIP STATE(0) // disable tips in v16.x


Can be replaced with this in v16R4:
SET DATABASE PARAMETER(Tips enabled;0) //disable tips in v16R4
SET DATABASE PARAMETER(Tips enabled;1) //enable tips in v16R4





In addition to this native replacement command in v16R4, you can also now control the amount of time delay before displaying the tip as well as the duration of time the tip is displayed for in v16R4.

To control the delay before displaying the tip in v16R4 use this:
// Set the delay (ticks = 1/60 s) before the display of the tip
SET DATABASE PARAMETER(Tips delay;10)


To control the duration the tip is displayed for in v16R4 use this:
// Set the duration (ticks = 1/60 s) of the display of the tip
SET DATABASE PARAMETER(Tips duration;50)





You can also use the GET DATABASE PARAMETER for all of these new constants like this in v16R4:

C_LONGINT(TipsDuration;TipsDelay;EnableTips)

// Get the duration (ticks = 1/60 s) of the display of the tip
TipsDuration:=Get database parameter(Tips duration)

// Get the delay (ticks = 1/60 s) before the display of the tip
TipsDelay:=Get database parameter(Tips delay)

// Get the status of tips displaying in the application
EnableTips:=Get database parameter(Tips enabled)