On Sunday 30 September 2007 13:36, Paul McNett wrote:
> johnf wrote:
> > What about creating a way to define a function for a cell?
>
> Don't we already have this? IOW, set DataSource to the biz and DataField
> to a method of your bizobj, for instance:
>
> grd.DataSource = bizProducts
> col.DataField = "formatQty"
>
> and then in the biz:
>
> def formatQty(self):
>    qty = self.Record.qty
>    if self.kilos:
>      qty = qty * 2.2
>    return qty
>
> > So what do you think of providing an easy interface to defining a cell
> > with a function???  I think your last suggestion to Larry should work but
> > it's requires that developer have insight (training).  So I'd like your
> > thoughts (or others can add their .02) on making it easier.
>
> I haven't really been following this thread, but asking for a grid cell
> that gets its value from a function sounds like stuff we've already put
> into DataField.

Yes that's correct.  However, Larry did not want to use a bizobj.  I suggested 
that a dataSet would work and I still think so.  What Larry has done is 
create a display only field within the UI.  It is fast compared to using a 
bizobj.  You would expect that it would be faster after all it by passes some 
of the Framework.  But I also don't like it because it by passes some of the 
Framework.

Background on
The real issue and why Larry decided to by pass the framework was the lack 
luster performance of a form he is writing.  Opening the form is slow and 
interacting with the form is slow.  Before Ed fixed the number of getfields() 
required per bizobj the form could take 15 seconds just to open.  Larry also 
needed to optimize the refreshes of the form.  Even with the fixes the form 
is not what I'd call quick to respond to user interaction.

Some of the reasons not to use the bizobj:
1. None of the overhead of a bizobj is required when opening the form.
 a. no getfield()
 b. no requery()
 c. no checking to see if a save is required
Background off


If Larry needed a display only field in the grid maybe others would too.  Yes 
I understand that it is available via a bizobj definition.  But I wondered 
what could be done a DataSet level.   I for one have used VFP grids as a pick 
list that had little to do with the underlying data by using create cursor , 
select statements and even hard coded values.  In VFP I can set a cell value 
to equal a function.  So why not a DataSet?

 I believe Ed sees this as a totally useless request due to the fact that 
other means are available.  I'd just like to see an easy way for the 
developer to setup a display only field at the DataSet level.  I envision the 
developer creating a cursor and setting a cell to equal a function.  
Something like:
self.grid.Columns[0].DataField = self.Form.someFunction()

Look maybe I'm full of bull here!  If there is an easy way to do it - just 
tell me.  
 
-- 
John Fabiani


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to