On Dec 23, 2007, at 5:31 PM, Adrian Klaver wrote:

> 1) Given-
> bz=self.PrimaryBizobj
> bz.moveTo RowNumber(45)
> self.update(0)
> Is this the best way to bring the UI in sync with the bizobj?

        Calling the form's update() method should refresh the data-bound  
controls with the current values of the objects to which they are  
bound. Are you seeing any problems, or just asking a general question  
about recommended practices?

> 2) I updated a field in a table from psql. I then ran self.update 
> (0) against
> the form that pointed to that table. I expected to see the field value
> changed to reflect the update in the backend, but it was not. Am I  
> missing
> something?

        Yes. When you changed the table in the backend, the data in the  
bizobj is now out-of-date. You would have to call requery() to get  
the latest values in the database.

> 3) Am I correct in assuming bizobj.seek() only does exact matches (the
> caseSensitive & near options notwithstanding). In other words I cannot
> do '%mint%'?

        It's not 'exact'; it's more like a string.startswith() search. IOW,  
you could seek for the equivalent of 'mint%' by seeking 'mint'; it  
will return the first record that equals 'mint', and if 'near' is  
True, it will return the first record that begins with 'mint' or the  
closest record that is not alphabetically greater than 'mint'.

        The typical use for seek() is when you have a bunch of data and  
start entering characters to locate the desired record. For example,  
if you have a bunch of names and want to let the user start typing a  
few characters to locate the desired name, you would use seek() with  
near==True to move them to the closest record that matches what  
they've typed.

        Does that help?

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
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