Hi Paul,
On 3/6/2015 17:09, Paul McNett wrote:
On 3/6/15 7:32 AM, Werner wrote:
Hi Paul,
On 3/6/2015 16:06, Paul McNett wrote:
On 3/6/15 1:31 AM, Werner wrote:
Could it be that the tests have not been updated along with changes
done
to Dabo?
Yes, and also that the tests were never run on a particular platform
or specific version.
O.K. no problem, making progress on it and learning a lot about
unittests and such. I am at a point (with the latest commits) were all
tests pass on Py3.4 except the following. Note that some tests are
marked to skip, e.g. due to Platform or database backend not installed.
One thing I am still fighting with is the frm.someField.Value is
always "".
So I think I remember that test failing for me too, and I wanted to
keep it failing because I think that it doesn't fail on all platforms
and I wanted to eventually get it fixed to be consistent. I believe
that it can be 'fixed' by immediately calling either update() or
refresh() on the control after that addObject() call.
In the test the fields are created like this:
frm.addObject(dabo.ui.dTextBox, DataSource=biz.DataSource,
DataField="cField", RegID="cField")
And speaking of addObject(), we should add as a task someone to change
all such calls to this form instead:
textbox = dabo.ui.dTextBox(frm, DataSource=...)
...and deprecate addObject(). There's no need for it. Another mistake
I made early on trying to work similarly to Visual FoxPro.
If I check this just after I get "" returned:
frm.cField.DataSource
So, changed the test to also do:
frm.cField.DataSource=biz.DataSource
Now when we test the fields the DataSource is still set but "Value"
still returns "", but checking "biz.Record.cField" I see the correct
value, so the form doesn't get its fields updated.
Any idea?
I think it's that the test is running before the form has had a full
event loop yet.
That could be, will have to look at Robin's MyYield in the Unittest
stuff and convert it to Dabo.
Will give all this a go tomorrow, have to run.
See you
Werner
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]