Page 1 of 1

lEditCol

PostPosted: Sat Dec 08, 2007 12:53 am
by acwoo
Hi,

Where can I find out more about this lEditCol.
Thanks

PostPosted: Sat Dec 08, 2007 10:01 am
by Antonio Linares
Acwoo,

Please review samples\fwBrow.prg

lEditCol

PostPosted: Sat Dec 08, 2007 11:38 am
by acwoo
Thanks for the reply

(FwBrow.prg)
function EditRecord( oLbx )

local i
local cVar
local cAlias := oLbx:cAlias

for i := 1 to 4
cVar = ( cAlias )->( FieldGet( i ) )
if ! oLbx:lEditCol( i + 1, @cVar,, { || Validate() } )
exit
endif
( cAlias )->( FieldPut( i , cVar ) )
next

return nil

In FWH2.4, if cVar is an numeric field, it is accepted by @cVar, but in FWH7.11, I have to change cVar to a string before it is accepted by @cVar.

How do I solve this problem.

Thanks

PostPosted: Sat Dec 08, 2007 2:46 pm
by Antonio Linares
Acwoo,

> I have to change cVar to a string before it is accepted by @cVar.

Do you get an error if you don't do it ?

lEditCol

PostPosted: Sun Dec 09, 2007 1:17 am
by acwoo
Thanks for the help

> I have to change cVar to a string before it is accepted by @cVar.

>Do you get an error if you don't do it ?

Yes. Error description: Error BASE/1099 Argument error: STR

Thanks

PostPosted: Sun Dec 09, 2007 1:50 am
by Antonio Linares
Acwoo,

Please post the error calls stack, thanks

lEditCol

PostPosted: Sun Dec 09, 2007 5:49 am
by acwoo
Thanks for your help


Application
===========
Path and name: C:\abc\test.exe (32 bits)
Size: ********* bytes
Time from start: 0 hours 0 mins 13 secs
Error occurred at: 09/12/07, 09:14:44
Error description: Error BASE/1099 Argument error: STR
Args:
[ 1] = U

Stack Calls
===========
Called from: => STR(0)
Called from: => TCLIPGET:_PICTURE(1345)
Called from: => TWBROWSE:LEDITCOL(0)
Called from: .\test1.prg => EDITOPENBAL(3439)
Called from: .\test1.prg => (b)GLPRLYBA(3320)
Called from: => TWINDOW:KEYDOWN(0)
Called from: => TCONTROL:KEYDOWN(0)
Called from: => TWBROWSE:KEYDOWN(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TWBROWSE:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: .\test1.prg => GLPRLYBA(3377)
Called from: .\ec.prg => (b)BUILDMENU2(2582)
Called from: => TMENU:COMMAND(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TWINDOW:ACTIVATE(0)
Called from: .\test.prg => MAIN(146)

Thanks

PostPosted: Sun Dec 09, 2007 9:14 am
by Antonio Linares
Acwoo,

Please modify source\classes\wbrowse.prg line 802 this way and try it again, thanks:
Code: Select all  Expand view
         if ! Empty( cPicture )
            oGet:oGet:Picture = cPicture
         endif   

lEditCol

PostPosted: Sun Dec 09, 2007 11:10 am
by acwoo
Thanks a lot. It Works!


Thanks