Alaska Software Inc. - Problem with get
Username: Password:
AuthorTopic: Problem with get
BapuProblem with get
on Tue, 10 Aug 2004 12:44:09 -0700
Dear Sir(s)

I have converting my clipper programe to xbase++ 1.80

The procedure is to get opening stock with tbrowse. When I am debugging with
xppdbg with get is successfull but in run time it is not getting the xGet.

Any soluation

Thanks & Regards

Baupu

PROCEDURE DoGet( oBrowse )
local oCol,nKey, nLen,lAppend,bSavIns, xNewKey, xSavKey
local nSavRecNo := recno()
local GetList := {}
oBrowse:forceStable()
xSavKey := iif( empty( indexkey() ), NIL, &( indexkey() ) )
oCol := oBrowse:getColumn( oBrowse:colPos )
xOld := Eval(oCol:block)
xGet := xOld
nLen := oBrowse:colWidth( oBrowse:colPos )
bSavIns := setkey( K_INS, { || InsToggle() } )
if upper(oCol:heading)="OPENING;STOCK"
   setcursor(3)
   readexit(.t.)     //oCol:heading
   @row(),col() get xGet  color 'w+/n,w+/r'   ******** Problem
   read
  if STOCK->(rlock())
     skip 0
     STOCK->OP_BAL=xGet
     STOCK->STOCK=STOCK->STOCK-xOld+STOCK->OP_BAL
     //eval(ocol:block,(STOCK->STOCK-xOld+STOCK->OP_BAL))
     unlock
  endif
  readexit(.f.)
  setcursor(0)
  oBrowse:forceStable()
   Get the record's key value (or NIL) after the GET
  xNewKey := if( empty( indexkey() ), NIL, &( indexkey() ) )
  oBrowse:inValidate()
  oBrowse:refreshAll():forceStable()
  while &( indexkey() ) > xNewKey .and. !oBrowse:hitTop()
        oBrowse:up():forceStable()
  enddo
endif
return

static procedure InsToggle()
if readinsert()
   readinsert( FALSE )
   setcursor( SC_NORMAL )
else
   readinsert( TRUE )
   setcursor( SC_INSERT )
endif
return
BapuRe: Problem with get
on Tue, 10 Aug 2004 17:19:56 -0700
Dear Sir,
When I click  with mouse I can able to get the value. before that I am not
Please provide me the solution

Thanks & Regards

Bapu

" <dagia_y_h@yahoo.com> wrote in message news:$jCul9sfEHA.7820@S15147418...
> Dear Sir(s)
>
> I have converting my clipper programe to xbase++ 1.80
>
> The procedure is to get opening stock with tbrowse. When I am debugging
with
> xppdbg with get is successfull but in run time it is not getting the xGet.
>
> Any soluation
>
> Thanks & Regards
>
> Bapu
>
> PROCEDURE DoGet( oBrowse )
> local oCol,nKey, nLen,lAppend,bSavIns, xNewKey, xSavKey
> local nSavRecNo := recno()
> local GetList := {}
> oBrowse:forceStable()
> xSavKey := iif( empty( indexkey() ), NIL, &( indexkey() ) )
> oCol := oBrowse:getColumn( oBrowse:colPos )
> xOld := Eval(oCol:block)
> xGet := xOld
> nLen := oBrowse:colWidth( oBrowse:colPos )
> bSavIns := setkey( K_INS, { || InsToggle() } )
> if upper(oCol:heading)="OPENING;STOCK"
>    setcursor(3)
>    readexit(.t.)     //oCol:heading
>    @row(),col() get xGet  color 'w+/n,w+/r'   ******** Problem
>    read
>   if STOCK->(rlock())
>      skip 0
>      STOCK->OP_BAL=xGet
>      STOCK->STOCK=STOCK->STOCK-xOld+STOCK->OP_BAL
>      //eval(ocol:block,(STOCK->STOCK-xOld+STOCK->OP_BAL))
>      unlock
>   endif
>   readexit(.f.)
>   setcursor(0)
>   oBrowse:forceStable()
>    Get the record's key value (or NIL) after the GET
>   xNewKey := if( empty( indexkey() ), NIL, &( indexkey() ) )
>   oBrowse:inValidate()
>   oBrowse:refreshAll():forceStable()
>   while &( indexkey() ) > xNewKey .and. !oBrowse:hitTop()
>         oBrowse:up():forceStable()
>   enddo
> endif
> return
>
> static procedure InsToggle()
> if readinsert()
>    readinsert( FALSE )
>    setcursor( SC_NORMAL )
> else
>    readinsert( TRUE )
>    setcursor( SC_INSERT )
> endif
> return
>
>
Mark CarewRe: Problem with get
on Wed, 11 Aug 2004 05:37:19 +1000
Hi Bapu,

Have you seperately included xbpget and xbpgetc in your project file. You
will only see their code that way. You will find an updated source version
of both in the acsn section on the downloads section of the alaska web site.

        Regards Mark