Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #4051

Re: Resolving macro

From "Wolfgang Riedmann" <wriedmann@gmail.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Resolving macro
Date 2012-09-03 06:15 +0000
Message-ID <aaj08bF36oU1@mid.individual.net> (permalink)
References <e7c3ec46-c217-496a-999a-7d7bf5182cf0@googlegroups.com>

Show all headers | View raw


Hi Krystian,

as David wrote: local variables are not maintained.

Unfortunately, DBServer:Eval does not let you pass parameters to the
codeblock, so this cannot work, and DBServer:Eval cannot be used - you
need to loop the DBServer yourself.

You could use an object and it's Eval method

class MyCB
	export cKody as string

method Eval( oSrv ) class MyCB

	cKody += oSrv:Anyfield

	return self

function ServerEval( oSrv )
	local oCB as MyCB

	oCB		:= MyCB{}
	oSrv:GoTop()
	while ! oServer:EOF
		Eval( oCB, oSrv )
		oServer:Skip()
	end

	return oCB:cKody


HTH

Wolfgang

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Resolving macro Krystian <softb@softb.pl> - 2012-09-02 15:30 -0700
  Re: Resolving macro dlzc <dlzc1@cox.net> - 2012-09-02 19:28 -0700
  Re: Resolving macro "Wolfgang Riedmann" <wriedmann@gmail.com> - 2012-09-03 06:15 +0000
  Re: Resolving macro Krystian <softb@softb.pl> - 2012-09-04 13:35 -0700
    Re: Resolving macro "Wolfgang Riedmann" <wriedmann@gmail.com> - 2012-09-05 06:28 +0000

csiph-web