Alaska Software Inc. - tdHiBrow() and bPostEdit
Username: Password:
AuthorTopic: tdHiBrow() and bPostEdit
Don Keating tdHiBrow() and bPostEdit
on Wed, 01 Sep 2010 18:15:41 -0400
Hi Y'all,

I use bPostEdit to call procedure UPDATETRN(oCOL,oBROW).

The procedure is called fine.

In that procedure I want to use the value of the cell being edited in
tdHiBrow.  How do I get the value of that cell?

Thanks.

     >don<
Bruce Carroll Re: tdHiBrow() and bPostEdit
on Thu, 02 Sep 2010 08:50:37 +0100
Don,

Not done with bPostEdit but other changes in a bBlock with tdHiBrow I 
use {oGet|somefunction(oGet:currentvalue,xxx,yyy)}

HTH,

Best regards,

Bruce


On 01/09/2010 23:15, Don Keating wrote:
> Hi Y'all,
>
> I use bPostEdit to call procedure UPDATETRN(oCOL,oBROW).
>
> The procedure is called fine.
>
> In that procedure I want to use the value of the cell being edited in
> tdHiBrow.  How do I get the value of that cell?
>
> Thanks.
>
>       >don<
Don Keating Re: tdHiBrow() and bPostEdit
on Thu, 02 Sep 2010 05:32:59 -0400
Thanks Bruce,

In which column array parameter do you put your bBlock?

>don<

On Thu, 02 Sep 2010 08:50:37 +0100, Bruce Carroll wrote:

> Don,
> 
> Not done with bPostEdit but other changes in a bBlock with tdHiBrow I 
> use {oGet|somefunction(oGet:currentvalue,xxx,yyy)}
> 
> HTH,
> 
> Best regards,
> 
> Bruce
> 
> 
> On 01/09/2010 23:15, Don Keating wrote:
> > Hi Y'all,
> >
> > I use bPostEdit to call procedure UPDATETRN(oCOL,oBROW).
> >
> > The procedure is called fine.
> >
> > In that procedure I want to use the value of the cell being edited in
> > tdHiBrow.  How do I get the value of that cell?
> >
> > Thanks.
> >
> >       >don<
Bruce Carroll Re: tdHiBrow() and bPostEdit
on Mon, 06 Sep 2010 19:06:32 +0100
Don,

Sorry for the delay in replying.  I use the aCols definition setting in 
tdhibrow and then set individual bWhen blocks; as tdHiBrow treats each 
cell like a Get block.  Thus, by calling the bValid with the {|oGet|... 
  I can obtain the current contents of that block in the browse.

HTH?

Best regards,

Bruce


On 02/09/2010 10:32, Don Keating wrote:
> Thanks Bruce,
>
> In which column array parameter do you put your bBlock?
>
>> don<
>
> On Thu, 02 Sep 2010 08:50:37 +0100, Bruce Carroll wrote:
>
>> Don,
>>
>> Not done with bPostEdit but other changes in a bBlock with tdHiBrow I
>> use {oGet|somefunction(oGet:currentvalue,xxx,yyy)}
>>
>> HTH,
>>
>> Best regards,
>>
>> Bruce
>>
>>
>> On 01/09/2010 23:15, Don Keating wrote:
>>> Hi Y'all,
>>>
>>> I use bPostEdit to call procedure UPDATETRN(oCOL,oBROW).
>>>
>>> The procedure is called fine.
>>>
>>> In that procedure I want to use the value of the cell being edited in
>>> tdHiBrow.  How do I get the value of that cell?
>>>
>>> Thanks.
>>>
>>>        >don<
Don Keating Re: tdHiBrow() and bPostEdit
on Mon, 06 Sep 2010 18:17:33 -0400
Thanks Bruce,

At least I was consistent, I misread the help file everytime I read it. 

bVALID was what I needed.  And, don't know why I got confused I've used it
several times.

I'm still confused about the new parameter bPostEdit but, will solve that
confusion another day.

Again, thanks for your time.

     >don<


On Mon, 06 Sep 2010 19:06:32 +0100, Bruce Carroll wrote:

> Don,
> 
> Sorry for the delay in replying.  I use the aCols definition setting in 
> tdhibrow and then set individual bWhen blocks; as tdHiBrow treats each 
> cell like a Get block.  Thus, by calling the bValid with the {|oGet|... 
>   I can obtain the current contents of that block in the browse.
> 
> HTH?
> 
> Best regards,
> 
> Bruce
> 
> 
> On 02/09/2010 10:32, Don Keating wrote:
> > Thanks Bruce,
> >
> > In which column array parameter do you put your bBlock?
> >
> >> don<
> >
> > On Thu, 02 Sep 2010 08:50:37 +0100, Bruce Carroll wrote:
> >
> >> Don,
> >>
> >> Not done with bPostEdit but other changes in a bBlock with tdHiBrow I
> >> use {oGet|somefunction(oGet:currentvalue,xxx,yyy)}
> >>
> >> HTH,
> >>
> >> Best regards,
> >>
> >> Bruce
> >>
> >>
> >> On 01/09/2010 23:15, Don Keating wrote:
> >>> Hi Y'all,
> >>>
> >>> I use bPostEdit to call procedure UPDATETRN(oCOL,oBROW).
> >>>
> >>> The procedure is called fine.
> >>>
> >>> In that procedure I want to use the value of the cell being edited in
> >>> tdHiBrow.  How do I get the value of that cell?
> >>>
> >>> Thanks.
> >>>
> >>>        >don<
Clayton Jones Re: tdHiBrow() and bPostEdit
on Fri, 10 Sep 2010 21:41:01 -0400
Hello Don,

>I'm still confused about the new parameter bPostEdit but, will solve that
>confusion another day.

Here are some thoughts about bPostEdit.  First, it's not meant to be
involved with a cell edit's functioning, or it's Get object.  By the
time it's eval'd the cell edit is done, it's Get object destroyed and
it's data is written to disk.  Any routine called by this codeblock
that needs to access data should expect to get it's data from the DBF.

For example, in the tdAllBrow demo it is used to display the sum of a
numeric column (actually the sum of the DBF field) in the column's
footer.  The routine that does the calculations operates on the data
in the DBF, not in the browse cells (see CalcTot() in demAllBrow.prg)

If a bPostEdit routine needs the value of a particular cell, then that
can be obtained from the DBF field that the cell is representing.  

Here's some additional technical info that may be helpful: bPostEdit
is eval'd as part of the shutdown sequence that terminates a cell
edit.  You can see this in the oGet:bDone codeblock at around Line
1217 in tdcHiBrow.prg.  The line o:destroy(), in the middle of the
sequence, is the Get object being destroyed.  The bPostEdit eval
happens three lines after that.  The oCol and oBrow params give us
access to the column's header and footer and all the browse object's
methods and ivars.

To summarize, bPostEdit is simply a convenient way to automatically
call an external function immediately after a cell edit.  It does not
inherently affect the browse or cell editing functionality.

I hope this helps.


Regards,
Clayton

Clayton Jones   www.cjcom.net 
 Top-Down Library for Xbase++
 X-DBU Database Utility   
 X-MEMO Memo Field Replacement
Don Keating Re: tdHiBrow() and bPostEdit
on Sat, 11 Sep 2010 08:33:53 -0400
Thanks Clayton!


On Fri, 10 Sep 2010 21:41:01 -0400, Clayton Jones wrote:

> Hello Don,
> 
> >I'm still confused about the new parameter bPostEdit but, will solve
that
> >confusion another day.
> 
> Here are some thoughts about bPostEdit.  First, it's not meant to be
> involved with a cell edit's functioning, or it's Get object.  By the
> time it's eval'd the cell edit is done, it's Get object destroyed and
> it's data is written to disk.  Any routine called by this codeblock
> that needs to access data should expect to get it's data from the DBF.
> 
> For example, in the tdAllBrow demo it is used to display the sum of a
> numeric column (actually the sum of the DBF field) in the column's
> footer.  The routine that does the calculations operates on the data
> in the DBF, not in the browse cells (see CalcTot() in demAllBrow.prg)
> 
> If a bPostEdit routine needs the value of a particular cell, then that
> can be obtained from the DBF field that the cell is representing.  
> 
> Here's some additional technical info that may be helpful: bPostEdit
> is eval'd as part of the shutdown sequence that terminates a cell
> edit.  You can see this in the oGet:bDone codeblock at around Line
> 1217 in tdcHiBrow.prg.  The line o:destroy(), in the middle of the
> sequence, is the Get object being destroyed.  The bPostEdit eval
> happens three lines after that.  The oCol and oBrow params give us
> access to the column's header and footer and all the browse object's
> methods and ivars.
> 
> To summarize, bPostEdit is simply a convenient way to automatically
> call an external function immediately after a cell edit.  It does not
> inherently affect the browse or cell editing functionality.
> 
> I hope this helps.
> 
> 
> Regards,
> Clayton
> 
> Clayton Jones   www.cjcom.net 
>  Top-Down Library for Xbase++
>  X-DBU Database Utility   
>  X-MEMO Memo Field Replacement