Dear dabo users,
I currently ran into the following problem.
I have two dabo.ui.dTextBox fields, the first one connected to the
database, the second should be a multiple (times 1.08) of the first one
and is not stored in the database.
On changing one of both, I want them automatically be correct.
Moreover, I am working in a form, inherited from the datanav.Form class,
and multiple bizobjects are in use.
I already tried overriding the
def afterNext(self):
if self.prijsexclID.Value:
self.prijsinclID.Value=Decimal(str(float(self.prijsexclID.Value)*1.08))
def afterFirst(self):
if self.prijsexclID.Value:
self.prijsinclID.Value=Decimal(str(float(self.prijsexclID.Value)*1.08))
def afterLast(self):
if self.prijsexclID.Value:
self.prijsinclID.Value=Decimal(str(float(self.prijsexclID.Value)*1.08))
def afterPrior(self):
if self.prijsexclID.Value:
self.prijsinclID.Value=Decimal(str(float(self.prijsexclID.Value)*1.08))
But its synchronization seems to run one step behind. Am I missing
something?
I also made a small extension of the dabo.ui.dTextBox
/** begin code
******************************************************
# -*- coding: utf-8 -*-
import dabo
dabo.ui.loadUI("wx")
import FrmBase
from decimal import Decimal
class PrijsIncltextbox(dabo.ui.dTextBox):
def onKeyUp(self,evt):
if self.Value:
self.Form.prijsexclID.Value=Decimal(str(float(self.Value)/1.08))
class PrijsExcltextbox(dabo.ui.dTextBox):
def onKeyUp(self,evt):
if self.Value:
self.Form.prijsinclID.Value=Decimal(str(float(self.Value)*1.08))
******************************************************
end code**/
Best regards,
Freagel.
_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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/[email protected]