[dabo-users] Where to catch BusinessRuleViolation

2009-10-26 Thread Miguel Lopes
I have a record that is created in code. All it takes to create it is a string, thus I'm using a dabo.ui.getString() dialog to get the string from the user. This lead me to wonder about where would be the best place to catch a validation exception (dabo.dException.BusinessRuleViolation). I'm

Re: [dabo-users] Where to catch BusinessRuleViolation

2009-10-26 Thread Ed Leafe
On Oct 26, 2009, at 7:59 AM, Miguel Lopes wrote: I have a record that is created in code. All it takes to create it is a string, thus I'm using a dabo.ui.getString() dialog to get the string from the user. This lead me to wonder about where would be the best place to catch a validation

Re: [dabo-users] Where to catch BusinessRuleViolation

2009-10-26 Thread John
On Monday 26 October 2009 06:23:25 am Ed Leafe wrote: try: myBiz.validateUserInput(val) except dException.BusinessRuleViolation, e: dabo.ui.stop(Invalid entry: %s % e) It's a much more Pythonic approach, and keeps the UI separate from   the bizobj layer logic I have

Re: [dabo-users] Where to catch BusinessRuleViolation

2009-10-26 Thread lalong1
] Where to catch BusinessRuleViolation On Monday 26 October 2009 06:23:25 am Ed Leafe wrote: try: myBiz.validateUserInput(val) except dException.BusinessRuleViolation, e: dabo.ui.stop(Invalid entry: %s % e) It's a much more Pythonic approach, and keeps the UI

Re: [dabo-users] Where to catch BusinessRuleViolation

2009-10-26 Thread Paul McNett
John wrote: On Monday 26 October 2009 06:23:25 am Ed Leafe wrote: try: myBiz.validateUserInput(val) except dException.BusinessRuleViolation, e: dabo.ui.stop(Invalid entry: %s % e) It's a much more Pythonic approach, and keeps the UI separate from the bizobj layer

Re: [dabo-users] Where to catch BusinessRuleViolation

2009-10-26 Thread John
On Monday 26 October 2009 09:18:02 am Paul McNett wrote: John wrote: On Monday 26 October 2009 06:23:25 am Ed Leafe wrote: try: myBiz.validateUserInput(val) except dException.BusinessRuleViolation, e: dabo.ui.stop(Invalid entry: %s % e) It's a much more