Due to changes in the API in 4D 2003, its currently not possible to get the name of the variable dropped on 4D Agenda in a compiled database in 4D 2003/2003.1/2003.2
To solve this problem change your AG_DropHandler method to the following code
The method for the AG_DropHandler method
C_STRING (32;$1) `Variable name
C_LONGINT ($2) `Array index, if the dropped item is an array element
C_LONGINT ($3) `Table number, if the dropped item is a field
C_LONGINT ($4) `Field number, if the dropped item is a field
C_LONGINT ($5) `Event ID
C_DATE ($6) `Date location of the drop
C_TIME ($7) `Time location of the drop
C_LONGINT ($8) `Process number where the drop came from
C_BOOLEAN ($9) `Is it an inter process drag/drop
C_LONGINT ($10) `Area reference number
C_BOOLEAN ($0) `Return value to 4D Agenda
C_LONGINT (AGDROP_EVENTID)
C_DATE (AGDROP_DATE)
C_TIME (AGDROP_TIME)
AGDROP_EVENTID := $5
AGDROP_DATE := $6
AGDROP_TIME := $7
$0:=True
The method for the 4D Agenda area
C_POINTER (SrcObject)
C_LONGINT (srcElement)
C_LONGINT (srcProcess)
C_INTEGER (tableNum)
C_INTEGER (fieldNum)
C_STRING (32;varName)
Case of
: (Form event=On Drop )
DRAG AND DROP PROPERTIES (srcObject ; srcElement ; srcProcess)
RESOLVE POINTER (srcObject ; varName ; tableNum ; fieldNUM)
$Message:="Variable name: "+varName+Char(13)
$Message:=$Message+"Event ID: "+String(AGDROP_EventID)+Char(13)
$Message:=$Message+"Drop date: "+String(AGDROP_DropDate)+Char(13)
$Message:=$Message+"Drop time: "+String(AGDROP_DropTime)+Char(13)
ALERT ($Message)
End case
|