Changeset 4178

Show
Ignore:
Timestamp:
06/25/08 12:58:11 (4 months ago)
Author:
nate
Message:

If the DataSource? is set to a locally referenced bizobj as a string (i.e. 'self.Form._myBizobj'), the object would be evaluated correctly by the _getSrc method but it wouldn't check to see if it's a bizobj. This commit fixes that.

Also, if the DataSource? is the name of a locally referenced object in a string and we can't eval it properly, we print an error message to the error log instead of suppressing it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/ui/dDataControlMixinBase.py

    r3969 r4178  
    382382                        try: 
    383383                            self.__src = eval(ds) 
    384                         except: pass 
     384                            self._srcIsBizobj = isinstance(self.__src, dabo.biz.dBizobj) 
     385                        except: 
     386                            dabo.errorLog.write("Couldn't evaluate DataSource '%s'" % ds) 
    385387                    else: 
    386388                        # See if it's a RegID reference to another object