Page 1 of 1

XBROWSER with SETUP possible?

Posted: Thu Feb 02, 2023 11:45 am
by Horizon
Hi,

I have changed mr. rao's example like this. but does not run properly.

Code: Select all | Expand

#include "fivewin.ch"

function Main()

   local aData    := { { "ONE  ", 2000 }, { "TWO  ", -5000 }, { "THREE", 2000 } }

   XBROWSER aData SETUP BrwSetup( oBrw )

return nil

static function BrwSetup( oBrw )
    oBrw:nMarqueeStyle := 5
    oBrw:bLDblClick := {|nRow, nCol, nFlags|Dummy(oBrw,2)}
return nil
Function Dummy(obrw, nnn)
  ? "here"
return
 
Should I use traditional method xbrowse?

Re: XBROWSER with SETUP possible?

Posted: Thu Feb 02, 2023 11:51 am
by Antonio Linares
Dear Hakan,

I have just tested your code and here it is working fine

What is missing there ?

Re: XBROWSER with SETUP possible?

Posted: Thu Feb 02, 2023 12:07 pm
by Horizon
Hi Antonio,

yes, this code compiled with buildh32 without any error and run. But does not work brwsetup function.

Re: XBROWSER with SETUP possible?

Posted: Thu Feb 02, 2023 3:42 pm
by cnavarro
Horizon wrote:Hi Antonio,

yes, this code compiled with buildh32 without any error and run. But does not work brwsetup function.
Your sample work OK for me and execute your SETUP xbrowser function correctly

Re: XBROWSER with SETUP possible?

Posted: Thu Feb 02, 2023 5:50 pm
by FiveWiDi
Horizon wrote:Hi,

I have changed mr. rao's example like this. but does not run properly.

Code: Select all | Expand

#include "fivewin.ch"

function Main()

   local aData    := { { "ONE  ", 2000 }, { "TWO  ", -5000 }, { "THREE", 2000 } }

   XBROWSER aData SETUP BrwSetup( oBrw )

return nil

static function BrwSetup( oBrw )
    oBrw:nMarqueeStyle := 5
    oBrw:bLDblClick := {|nRow, nCol, nFlags|Dummy(oBrw,2)}
return nil
Function Dummy(obrw, nnn)
  ? "here"
return
 
Should I use traditional method xbrowse?

Try this:

Code: Select all | Expand

function Main()

   local aData    := { { "ONE  ", 2000 }, { "TWO  ", -5000 }, { "THREE", 2000 } }

   XBROWSER aData SETUP ( oBrw:nMarqueeStyle := 5, oBrw:bLDblClick := {|nRow, nCol, nFlags|Dummy(oBrw,2)} )

return nil

Function Dummy(obrw, nnn)
  ? "here"
return

 
But if Antonio and Cristobal say your code work ok ...

Try delete de .EXE, .C, .OBJ files before compiling