Hi Ed,

Sorry for the delay!

Example file is on dabo.codepad.org.

While I was creating the example file for you, I found myself unable
to reproduce the error. Or, more precisely, the error was present BOTH
when using a wizard and when using a dForm for displaying the page.

I have not yet figured out the reason for this difference. It must
have something to do with the way things are initialized, because
everything else is about the same, except that my TestStage is run via
the layout produced by AppWizard. [My TestStage form only do the
following: 1) add page to existing pageframe, 2) calls
prepareTestingEnvironment if the wizard page has any such method, 3)
self.layout(), 4) self.TestPage.onPageEnter(direction=forward), 5)
self.update() ]

Anyway, while I didn't find the reason for why my TestStage form
worked and the wizard didn't, I did find a cure to the problem: avoid
using inBatch=True when adding columns. Now it works both in the
wizard and in form.

I was a little puzzled of why inBatch=True has such a destructive
influence; after all, I did call fillGrid(force=True) TWICE after I
have added my columns. (And I have previously been able to use the
exact same setup in other non-wizard forms!) -- Even if I ran
fillGrid(force=True) every time I added a column, it didn't help.

Looking into dGrid.py I found that _syncColumnCount() is not called in
batch mode (or is fillGrid). If I added a call to the grid's
_syncColumnCount after adding all columns, then everything worked. :-)

But of course, methods starting with underscore should not be used
directly by me as a user. I've tried to find an "official" way to
invoke _syncColumnCount, which could include: showing or removing
individual columns or setting the DataSet, "Width" or "Visible"
properties. E.g. just call column.Visible = True on any one of the
columns.

So, I think it is actually because somewhere in my original forms I
change the width of one or more of columns or something else that then
invokes the grid's _syncColumnCount.


Hehe, sorry it got a little bit of a long story -- I was digging while
writing, so it likely got a bit too detailed.



But anyways, thanks for the support (and excellent response time!)




Best,

Rasmus.



---
Rasmus S. Sørensen
PhD-student,
Centre for DNA Nanotechnology,
Interdisciplinary Nanoscience Center,
Department of Molecular Biology,
Aarhus University, Denmark.
Tel: +4530200573
Email: scho...@inano.au.dk
Office: 1131-624 / Lab: 1130-415
Address: C.F. Mollers Allé 3, 8000 Aarhus C, Denmark.




On 1 April 2011 17:52, Ed Leafe <e...@leafe.com> wrote:
> On Apr 1, 2011, at 11:41 AM, Rasmus Schøler Sørensen wrote:
>
>> Every time it comes down to the same conclusion: it works in dForm but
>> not in the Wizard.
>>
>> I have tried for half a day to debug, and I cannot seem to find the
>> problem, so really need some fresh inputs on this :-S
>
>
>        Is it possible to post the code on dabo.codepad.org? From your 
> description, it sounds like everything is correct, so I'd need to run it here 
> to see what the problem might be.
>
>
> -- Ed Leafe
>
>
>
> _______________________________________________
> Post Messages to: Dabo-users@leafe.com
> 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/e5a0ebd9-0b2f-4f1a-9b04-8d8090fc2...@leafe.com
>
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/AANLkTi=H2=1h-nvg58ns95ozbqj0fnepfbssx1p-k...@mail.gmail.com

Reply via email to