On Nov 14, 2007, at 4:52 AM, VGSoftware wrote:
> You just have to remove te Caption from the dTextBox construction, as
> far as i know, it is not needed anyway....
Done. The idea is that one of the potential controls (the check box)
takes a caption, so it was added to the boilerplate code used by the
wizard. I've posted an update that removes that.
> - The font related error message happens because in dPemMixin.py line
> 1847 (_setDaboFont) gets not a dFont but a wxFont as a parameter,
> hence
> the assert. I thing it doesnt hurt to patch it like this:
That's very similar to the code I was playing with. I hope to add
that fix ASAP.
> Now comes the part i dont understand... my python skills are far from
> perfect, but hey...i'm a quick learner...:D
> With this problem fixed, i started getting the _autofit problem,
> but not
> in the Masked field, no, in the next created field, a plain regular
> dTextBox without a Mask.
>
> I added some debugging prints around and this is what i found:
> It seems like as soon as i add a mask all of the dTextBoxes become
> wx.lib.masked.TextCtrl and not plain simple wx.TextCtrls
I don't understand why this happens, but somewhere the wires are
getting crossed. The problem is not that the subsequent controls are
masked.TextCtrl (checking the type or using isinstance() will show
that), but that the code *thinks* that they are masked, and calls
methods as if they *were* masked controls. Remember, if they truly
were masked controls, they *would* have the _autofit attribute.
There is a a lot of sleuthing to do here. I may have the time to dig
into this later.
> The reason we we only got errors in datanav apps is because only there
> we use the Caption on dTextBox, and as far as i know, it is
> useless, right?
I don't think that that's the case. I've removed the Caption setting
from the textboxes, and I still get the error with controls on the
Select page. Just adding a Mask to one textbox seems to cause some
sort of confusion, and it will take some digging to uncover it.
> I also detected another bug in the use of Masks, here is a patch:
> dTextBoxMixin.py:662
> if strVal != self.GetValue():
> setter(strVal)
>
> becomes:
>
> if strVal != self.GetValue():
> #PVG: maskedtextedit sometimes fails, on value
> error..allow the code to continue
> try:
> setter(strVal)
> except ValueError:
> pass
>
> If we dont do this, we will get semi-full forms when a field has
> data in
> the db that does not validates with the Mask
OK, that looks like a good fix; I'll add a message to the
dabo.errorLog instead of the 'pass' statement, since we want to let
the developer know why the data isn't showing up.
> BTW, you guys know you rock right?
> Dabo is really turning into a GREAT framework, it still need polish as
> you well know, but it has my full confidence.
> I hope i helped in getting it to be PERFECT, and i also hope i will
> help
> more!
Welcome aboard, and thanks for the compliments! The more people who
get involved, the better the framework will become.
> Sorry for my english, i'm portuguese, if i was not clear in some
> point,
> please tell me and i will try to explain myself.
Until I can speak a second language, I don't criticize those who
can. But in case you were wondering, your English is excellent.
-- 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]