Hi Aparajita,
Thanks for replying so quickly.
>> I am running 4D 6.7.4 and A4D 3.0b14.
> 3.0b14 is two versions behind. Why not use 3.0MC1?
I will look into doing this.
> Pulling an array out of a session and putting it back in just to change an
element was no longer necessary as of 3.0b15 (another reason to upgrade). As
of 3.0b15 you can reference a session array element like this:
> session{"key"}{$element}
This will be excellent, I looked for this kind of functionality in the
documentation, but didn't think to upgrade to the latest version.
> Is W_ConvertToString an Active4D method or 4D method?
W_ConvertToString is an Active4D method. However it does call a 4D method
called "WW_Constant" (Are you thinking that should I be suspicious of any 4D
code because the page only breaks when the 4D application is compiled?)
HERE IS THE ACTIVE 4D CODE FOR "W_ConvertToString"...
method "W_ConvertToString"($vPointer;$vFilter)
c_pointer($vPointer)
c_text($vFilter)
c_longint($vDataTypeToConvertFrom)
`
$vDataTypeToConvertFrom:=type($vPointer->)
`
case of
:($vDataTypeToConvertFrom=ww_constant("Is Alpha Field")) |
($vDataTypeToConvertFrom=ww_constant("Is String Var")) |
($vDataTypeToConvertFrom=ww_constant("Is Text"))
return($vPointer->)
:($vDataTypeToConvertFrom=ww_constant("Is Real")) |
($vDataTypeToConvertFrom=ww_constant("Is LongInt")) |
($vDataTypeToConvertFrom=ww_constant("Is Integer"))
return(string($vPointer->;$vFilter))
:($vDataTypeToConvertFrom=ww_constant("Is Boolean"))
if ($vPointer->=True)
return("TRUE")
else
return("FALSE")
end if
:($vDataTypeToConvertFrom=ww_constant("Is Date"))
$vDateString:=w_datetostring($vPointer->;ww_constant($vFilter))
return($vDateString)
:($vDataTypeToConvertFrom=ww_constant("Is Time")) `hopefully never
need this (should only need if we need to allow sumitting time values)
return(string($vPointer->;ww_constant($vFilter)))
end case
end method
HERE IS THE ACTIVE 4D CODE FOR "W_DateToString"...
method "W_DateToString"($Date;$DateFormat)
`Converts date to string, if using american dates then some formats
are...
`...switched to normal dates (ie, day and month reversed).
`1 = Short
`4 = mm dd yyyy
`7 = mm dd yyyy forced
`
C_DATE($Date)
C_LONGINT($DateFormat;$Seperator1Position;$Seperator2Position)
C_TEXT($DateString;$DateStringMinusMonths;$Month;$Day;$Year)
`
$DateString:=String($Date;$DateFormat)
`
If (<>UsingAmericanDates) & (($DateFormat=1) | ($DateFormat=4) |
($DateFormat=7)) `if using american dates and if format is "numeric",
reverse day and month
`
$Seperator1Position:=Position("/";$DateString)
$DateStringMinusMonths:=Substring($DateString;($Seperator1Position+1))
$Seperator2Position:=$Seperator1Position+Position("/";$DateStringMinusMonths
)
`
$Month:=Substring($DateString;1;($Seperator1Position-1))
$Day:=Substring($DateString;($Seperator1Position+1);(($Seperator2Position-$S
eperator1Position)-1))
$Year:=Substring($DateString;($Seperator2Position+1))
`
$DateString:=$Day+"/"+$Month+"/"+$Year
End if
`
return($DateString)
end method
HERE IS THE 4D CODE FOR "WW_Constant"...
C_LONGINT($0)
��`
C_TEXT($1)
��`
EXECUTE("$temp:="+$1)
��`
$0:=$temp
Sorry about the size of this email. Thanks again for your help.
-Kevin Williams