Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Eval and barrayserver

105 views
Skip to first unread message

Krystian

unread,
Jun 6, 2013, 5:30:23 AM6/6/13
to
Hallo,

There is a barrayserver in bbrowser; field "Wybrany" is logical.
What is wrong in this sentences (called from CaptionClick method) :
lret := SELF:srv_koszt:Eval({|Server| Server:FIELDPUT("Wybrany", FALSE),,, DBSCOPEALL})

lret := SELF:srv_koszt:Eval({|Server| Server:Wybrany := FALSE})

in both cases lret is false and only the first record is cleared.

Thanks in advance
Krystian

Malcolm G

unread,
Jun 6, 2013, 6:17:41 AM6/6/13
to
On 06/06/2013 10:30, Krystian wrote:
> Hallo,
>
> There is a barrayserver in bbrowser; field "Wybrany" is logical.
> What is wrong in this sentences (called from CaptionClick method) :
> lret := SELF:srv_koszt:Eval({|Server| Server:FIELDPUT("Wybrany", FALSE),,, DBSCOPEALL})

Is that really what you have? (with DBSCOPEALL inside the codeblock but
outside of the fieldput) (if it is intentional it seems odd the have 3
commas rather than 1)

Beyond that I cannot comment as I don't use bbrowser

Krystian

unread,
Jun 6, 2013, 7:40:23 AM6/6/13
to
Hi,
Malcolm, you are right with the notice about commas; i was so irritated for this tool, that i made a mistake. But the second example is correct; i change the place of the scope clause, put the for condition ({|| True}) but it still does not work.
Of course, it is simple to substitute it by do while statement, but it should work and i do not know why not.

Any other suggestions will be appreciated
Krystian

Malcolm G

unread,
Jun 6, 2013, 9:12:34 AM6/6/13
to
Google finds

http://www.votools.de/english/bbrowser/help4.net/barrayserver_fieldput.htm
============
The new field value is not directly put into the data array, but put
into a temporary buffer up until the next movement and/or to call of the
method bArrayServer:Commit().
============
so what does a codeblock of
Server:FIELDPUT("Wybrany", FALSE),Server:Commit();
do
?

Krystian

unread,
Jun 6, 2013, 10:38:37 AM6/6/13
to
Hi,
Thank you very much;
you have more experience and better know that bizarre tool; i tried with the commit in a separate instruction, but it also does not work.
There is a statement in the manual, that also the movement is enough to actualize the record but if you compare the recno before and after the eval method, they are the same. I checked, that it works also with the simple ascription instruction (Server:field := uvalue).

Thanks
Krystian

Malcolm G

unread,
Jun 6, 2013, 11:59:14 AM6/6/13
to

> Hi,
> Thank you very much;
> you have more experience and better know that bizarre tool; i tried with the commit in a separate instruction, but it also does not work.

I have never used bbrowser - I simply read the help and guessed based on
experience of other tools that the eval would not call skip.

Joachim Bieler

unread,
Jun 11, 2013, 7:20:56 AM6/11/13
to
Hello Krystian,

the problem is the codeblock. The return value of the evaluated codeblock is FALSE because the
return value of bArrayServer:FieldPut() is the passed field value, in your case FALSE. The method
bArrayServer:Eval() breaks when the return value of the codeblock is FALSE.

You can solve the problem with the following codeblock:

lret := SELF:srv_koszt:Eval({|Server| Server:FIELDPUT("Wybrany", FALSE), TRUE}, , , DBSCOPEALL)

Regards,
Joachim Bieler

Krystian

unread,
Jun 19, 2013, 6:29:38 PM6/19/13
to
Hallo Joachim
I am sorry for may late replay; your answer shows the merits of the problem - thank you very much.

With regards
Krystian
0 new messages