Bug in TCBrowse:lEditCol() method (fixed)

Post Reply
User avatar
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Bug in TCBrowse:lEditCol() method (fixed)

Post by Enrico Maria Giordano »

This is the sample. Valid is never executed:

Code: Select all | Expand

#include "Fivewin.ch"
#include "Tcbrowse.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBrw, cVar

    LOCAL bValid := { || MsgInfo(), .T. }

    USE C:\XHARBOUR\TEST

    cVar = FIELD -> first

    DEFINE DIALOG oDlg SIZE 300, 300

    @ 0, 0 BROWSE oBrw;
           ON RIGHT CLICK oBrw:lEditCol( 1, @cVar, , bValid )

    ADD COLUMN TO oBrw;
               DATA TEST -> first;
               HEADER "FIRST"

    @ 6, 0 BUTTON "Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
User avatar
Antonio Linares
Site Admin
Posts: 42512
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Post by Antonio Linares »

Fixed. Please change this in source\classes\tcbrowse.prg line 863:

@ 10, 0 BUTTON oBtn PROMPT "" ACTION ( oBtn:SetFocus(), oDlg:End(), lOk := .t. ) OF oDlg

Also, to get a better screen position change this in line 868:

ACTIVATE DIALOG oDlg ;
ON INIT ( oDlg:Move( aDim[ 1 ] + 1, aDim[ 2 ] + 1,;
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Post by Enrico Maria Giordano »

Great, thank you!

EMG
Post Reply