A problem with xBrowse and arrays

A problem with xBrowse and arrays

Postby Enrico Maria Giordano » Wed May 02, 2018 1:51 pm

Can you tell me why this sample selects the workarea 0 after closing the window?

Code: Select all  Expand view
#include "fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd, oBrw, oCol

    LOCAL aCell := { {} , {} ,{} ,{} ,{} ,{} ,{} }

    SELECT 0

    USE CUSTOMER

    AADD( aCell[ 1 ] , "One"   )
    AADD( aCell[ 1 ] , "Two"   )
    AADD( aCell[ 1 ] , "Three" )

    DEFINE WINDOW oWnd

    @ 100, 100 XBROWSE oBrw OF oWnd DATASOURCE aCell CELL LINES

    oCol = oBrw:AddCol()
    oCol:bEditValue   = { || aCell[ 1 , oBrw:nArrayAt  ] }

    oBrw:CreateFromCode()

    oWnd:oClient = oBrw

    ? "Before:", ALIAS(), SELECT()

    ACTIVATE WINDOW oWnd

    ? "After:", ALIAS(), SELECT()

    RETURN NIL


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

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 45 guests