On Dec 12, 2007, at 5:09 PM, Dennis Meulensteen wrote:
> Thanks, I did just that and it works great. But what do I now need
> to do in
> order to add a new row to the (child) grid on the right while
> staying with
> the current record of the parent table?
The form methods (new(), save(), etc.) default to the PrimaryBizobj,
which in your case would be the parent table. To add a record to the
child, the code would only be slightly different:
self.Form.new("childDataSource")
...where "childDataSource" is the name of the child table.
> it was the mySQL datatype TIME that was not recognized. IIRC, the
> connection
> wizard also listed it as "". I have since removed that column from
> the DB.
You shouldn't have to modify your database to use Dabo. If there is
a problem, we need to be able to handle it.
Looking at the code for the MySQL adapter, we don't support a 'time'
type. We also don't use a 'time' type internally:
daboTypes = {
"C": unicode, ## text
"M": unicode, ## memo (longtext)
"I": int, ## integer
"G": long, ## long integer
"F": float, ## float
"B": bool, ## boolean (logical)
"D": datetime.date, ## date
"T": datetime.datetime, ## datetime
"N": Decimal, ## decimal (numeric)
"L": str, ## BLOB
}
We could certainly add a time type with a Python type of
datetime.time, but those are pretty useless for editing. Perhaps it
would be best to use a Python string?
> I can't seem to get the right click context menu when I click on the
> right-side grid or anywhere on the right sizer's domain. That sizer
> is never
> selected, though I can select the panel background.
Sizers are not actual objects; they are rules that govern the
objects assigned to them. To modify a sizer in the Class Designer, go
to the property sheet, and click on the reveal triangle in the upper
right corner; this will reveal the Object tree. Sizers will show up
here just as any other object, and you can select them by clicking on
them in the tree. You can usually right-click right on the tree node
for any object to get the same context menu you would had you right-
clicked on the design surface.
> I also can't save the widths of any of my buttons in the Object
> Info screen!
> They always revert to width=80!?!
Are they in sizers? Remember, if they are and the sizer is set to
Expand, the Width is meaningless, so it won't be saved. If you set
the Proportion to 0 and Expand to False, then you can manually change
the size and have it saved in the .cdxml file.
> I get loads of these in the ClassDesigner but it still works:
> (python:23055): Gtk-WARNING **: gtkwidget.c:4249: no accelerator
> (113,4)
> installed in accel group (0x348b0c0) for GtkImageMenuItem (0x3c3e370)
> (python:23055): Gtk-CRITICAL **: gtk_widget_add_accelerator: assertion
> `GTK_IS_WIDGET (widget)' failed
Yeah, there doesn't seem to be much we can do about this. It has
something to do with the different way menu objects are defined on
Gtk. They are annoying, but they don't seem to hurt anything - menus
and accelerators work just fine on Gtk.
> File "/usr/local/lib64/python2.5/site-packages/Dabo-0.8.2-py2.5.egg/
> dabo/ui/uiwx/dGrid.py",
> line 2336, in onIncSearchTimer
> self.runIncSearch()
>
> File "/usr/local/lib64/python2.5/site-packages/Dabo-0.8.2-py2.5.egg/
> dabo/ui/uiwx/dGrid.py",
> line 2607, in runIncSearch
> toofar = fldval > srchStr
> TypeError: can't compare datetime.date to unicode
> Segmentation fault
You were on a date field in a grid, and were typing to do
incremental search? Well, first off, don't do that! ;-) Seriously,
though, even though that makes no sense, you shouldn't crash. I'll
look into it and post a fix ASAP.
-- 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]