TransferDataFromWindow

I am using validators to load data from/to the database.

In the past I used:

    self.InitDialog()
    self.subwindow.InitDialog()
    ... etc

I changed the code to use SetExtraStyle, i.e.
        WindowOrPanelOrFlatNotebook.SetExtraStyle(wx.WS_EX_VALIDATE_RECURSIVELY)

The call to "self.Initdialog() is fine and controls get their data loaded, including the controls on subwindows:

Now I see that the call to "self.TransferDataFromWindow()" just returns False, and this is not coming from any of my validators as when debugging it none of them get called.
   If I comment the calls to SetExtraStyle then my self.TransferDataFromWindow work again, but controls on subwindows don't get filled with data (obviously).

Does anyone have some hints of what I might be doing wrong.

Werner

Robin,

Robin Dunn wrote:

Werner F. Bruhin wrote:

I am using validators to load data from/to the database.

In the past I used:

   self.InitDialog()
   self.subwindow.InitDialog()
   ... etc

I changed the code to use SetExtraStyle, i.e.
       WindowOrPanelOrFlatNotebook.SetExtraStyle(wx.WS_EX_VALIDATE_RECURSIVELY)

The call to "self.Initdialog() is fine and controls get their data loaded, including the controls on subwindows:

Now I see that the call to "self.TransferDataFromWindow()" just returns False, and this is not coming from any of my validators as when debugging it none of them get called.
  If I comment the calls to SetExtraStyle then my self.TransferDataFromWindow work again, but controls on subwindows don't get filled with data (obviously).

Does anyone have some hints of what I might be doing wrong.

I'll need to see a sample.

Yesterday I tried to create a simple example with a similar structure, i.e.:
Frame
- Panel
-- splitterWindow
--- listctrl
--- flatnotebook
---- panel
----- panel
------ controls with problems

But in the sample things work, i.e. I get True back. In my real app when I debug it I don't even get into any of my validators and False is returned. When debugging (in Boa) I get to _core.py.TransferDataFromWindow just once and it comes back the call _core_.Window_TransferDataFromWindow(*args, **kwargs) returns False.

Is there anyway I can set something that shows me who (which type of control or even better which control) returns False). If yes, I will give it another try in a few days.

As this is holding me back I went back to calling InitDialog and TransferDataFromWindow on all the sub-panels (not that nice but it does the trick, except when I forget to add an additional call when I add another panel :frowning: ).

Werner