In a bBrowser I added the following code:
cStr:="0017"
SELF:oDCBrowser:InsertNewColumn(#Contactnaam,1,{|o|TestThis(cString+o:Contact)})
Basically, this calls:
METHOD InsertNewColumn(sLabel,nPos,oBlock,lShowNow) CLASS
.....
oColumn := bDataColumn{SELF,SELF:Server,oBlock,#Expression}
Now what happend is this. TestThis is receiving cString + the (string)
content of o:contact, a databasefield, as expected. It performs some
seek operation and returns a string value in the database which is
displayed correctly in the inserted column.
However, as soon as I click on the cell, the value disappears to be
replaced by NIL. For every cell I click upon, one by one! Even if the
function doesn't use the passed parameter at all, the same happens,
e.g.:
FUNCTION TestThis(ctest)
RETURN "Something"
After dozens of attempts, I find that passing a fixed string and the
content of the database (oContact) together causes the problem. When I
pass a fixed string to TestThis or the content only there is no
problem.
I wonder is what happens here. Why is the initial value correct and
why does it turn into nil when you click on the cell?
Dick van Kooten


|