On Sun, Jul 12, 2009 at 3:03 PM, Miguel Lopes<[email protected]> wrote:
> On Sun, Jul 12, 2009 at 2:40 PM, Ed Leafe<[email protected]> wrote:
>> On Jul 12, 2009, at 8:33 AM, Miguel Lopes wrote:
>>
>>> Well, not much of an override!
>>>
>>>    def save(self, evt): self.super()
>>
>>        That's your problem: you've overridden a framework method and changed
>> the interface. Delete that and the error should go away.
>>
>>        Also, the use of 'evt' indicates to me that you are using save() as
>> an event handler. Don't confuse handlers with regular methods; it's
>> typically better to do something like:
>>
>> def onSave(self, evt):
>>        self.save()
>>
>>        This way it is clear that onSave() is there to handle the event, and
>> it handles it by calling the save() method.
>>
>>
>>
>> -- Ed Leafe
>>
>
> Ok! I clean that up. But still, if I do a change in the current record
> and then navigate to a different page Dabo doesn't recogine the
> existence of changes. I still have the behavior of recognizing changes
> when I go back to the page.
>
> If I issue self.PrimaryBizobj.getChangedRows(includeNewUnchanged=True)
> has a first call on my onAppModuleNav(self, evt) method I get an empty
> list!
>
> Using self.requery() works but there are some caveats:
> * I would rather not query the database if there's no need for that,
> and here it makes no sense to do it!
> * Chosing "Yes" or "No" in the "Do you wish to save your changes
> dialog" works well. "No" aborts the method, "Yes" saves and moves on.
> * But "Cancel" does not stop the method, navigates away and remains
> active when I came back. It makes sense its active since neither Yes
> nor No was choosen! But it should also abort navigation.
> * I checked the return value of self.requery(). Seems like it's bugged:
>          * "Yes" returns True
>          * "Cancel" returns None
>          * "No" returns True. Should it not return False?
>
> Miguel
>

Correction!
"No" does not abort the method. It discards changes and proceeds with
navigation.
Sorry for the mistake.
Miguel


_______________________________________________
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]

Reply via email to