Bug in TCBrowse:lEditCol() method (fixed)

Bug in TCBrowse:lEditCol() method (fixed)

Postby Enrico Maria Giordano » Mon Oct 31, 2005 5:40 pm

This is the sample. Valid is never executed:

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8307
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Sat Nov 26, 2005 11:32 am

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
Antonio Linares
Site Admin
 
Posts: 41283
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Sat Nov 26, 2005 4:40 pm

Great, thank you!

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8307
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 2 guests