Dataprovider calculations and scope

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Dataprovider calculations and scope

Postby agiletortoise » Wed Oct 01, 2008 4:48 pm

It seems to me that inside a calculation defined on the dataprovider, "this" should refer to the current record.

I'm not sure how the internals of Rhino are hooked up to interpret calculations, but currently, 'this' refers to the calculation function as if it is a standalone function not attached to an object and somehow the dataprovider members and injected into the scope for execution.

I would like to be able to abstract some standard calculation functionality into globals, but it would be a lot easier to do if I could access a reference to the record that was currently executing that calculation, but I can't figure out a way to do that.

Is that a change that would be technically possible? I don't think it would break any existing calculations.

greg.
Greg Pierce
Agile Tortoise
SAN Developer
http://www.agiletortoise.com
User avatar
agiletortoise
 
Posts: 278
Joined: Wed Oct 12, 2005 3:26 pm
Location: Texas, USA

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 6 guests