On Jan 24, 2007, at 11:48 AM, Simen Haugen wrote:
> I need it to be data aware, and CalendarCtrl isn't(?).
>
> I have a date field in my database, and when the DateTextBox tries to
> receive it's value I get:
>
> Dabo Error Log: Wed Jan 24 17:34:31 2007: !!! Data Type Mismatch:
> field=dato. Expecting: <type 'datetime.date'>; got: <type 'unicode'>
>
> But it still gets the right date.
That has nothing to do with the Calendar control - that's part of
the underlying problems with dDateTextBox. We do a lot of 'under-the-
hood' manipulation to allow the control to display dates in various
formats. I'm thinking that it would probably be best to simply let
the user's system control that instead. But I need to spend some time
working on this.
> The calendar popup only works if the control is lying directly on a
> form, not if it's in a panel. Then it is shown directly on the form so
> you can't change anything.
I don't see that. What platform? The calendar is on a panel, and
that panel is created in the same parent object as the dDateTextBox.
> If I change the date value, it doesn't update the value in the bizobj.
Again, I haven't see that. Can you set up individual tracker issues
for these, along with steps to reproduce them? I'm leaving town for a
couple of days tomorrow, and don't want to forget.
> Anther thing is that I want my fields to start with a None value, so I
> have None in my DefaultValues. I then get (but only for the first
> record
> I create):
> Dabo Error Log: Wed Jan 24 17:41:27 2007: cannot create 'NoneType'
> instances
OK, that's probably a bug. Please enter a tracker issue on it.
> Another thing is that validateField doesn't fire when there it is
> getting a valid value from the table and you change it to an invalid
> value. It just sets the value to its original value.
That's by design. It has to first get a value before it can validate
it. Invalid values ideally shouldn't be allowed to ever be entered,
but since we are using a text box, it unfortunately can happen.
> I also get an exception when trying to save the new records.. This
> might
> be because of the None values..?
Perhaps, but impossible to say with that traceback. I've never tried
entering default values of None, but I can see how the inconsistent
typing could be a problem.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev