Frequently Asked Questions

General Dabo Questions:

Dabo DB Questions:

Dabo Bizobj Questions:

Dabo UI Questions:

Dabo IDE and Visual Design Tools Questions:


How do I do ... in Dabo?

We're focusing on expanding our documentation. Check out the HowTos page to see if your question is answered there. If not, write to the authors on the dabo-users or dabo-dev lists, or add it to the DaboQuestions? page, and we'll add your question to the how-to list.


How is Dabo licensed?

As of 11/4/2004, Dabo is licensed under the very liberal MIT License, which allows you to do whatever you want with our code, as long as the copyright notice and license terms remain intact. See http://www.dabodev.com/licensing.


Running Dabo

You might want to try the Dabo Runtime Engine, which contains all the stuff you need to run Dabo.


Does Dabo come with its own Debugger?

No; we are in the very early stages of creating an IDE for Dabo. We are looking at several existing open-source products to see if we can integrate with them. In the meantime, you can always use Python's own pdb module. It's not as fancy as a GUI debugger, but it certainly gets the job done.

Update, Oct. 2005: We have had promising results in testing Winpdb with Dabo. It's an excellent debugger, and seems to work great with Dabo. See the instructions on the Winpdb page. Note: Winpdb is not only for Windows.


What editor should I use when working with Dabo?

Any text editor will work fine. It is recommended to use a text editor that has syntax highlighting for python. You could also use the editor that comes with Dabo. It currently has syntax highlighting and some auto completion.


How do you pronounce "Dabo"?

Paul came up with the name, and pronounces it 'dah-bo'; it rhymes with "Bob - o".

Listen to it here.


What the hell does "dabo" mean, anyway?

Everything you can imagine, and nothing at all. IOW, we're not telling .

However, we have collected various meanings of dabo from around the world on the DaboDefined page


How mature is the framework?

Dabo is actually two distinct entities: the framework itself, and the visual tools designed to make developing with the framework easier. The framework is very mature, and has not changed significantly in the last two years. Aside from a few bugfixes, most of the change has been in the UI layer, where we have added several new controls, and enhanced the API. The visual tools are still a work in progress, though. I think of them as extremely complex Dabo applications, and I'm not done creating them yet. I still find things that I want to add to the Class Designer, for example, or places where some features are not fully implemented. Over the past few months I retro-fitted support for non-sizer-based designs into what had previously been a sizer- only tool, and there are still some kinks that need to be worked out with that. There are also some tools that need to be created, such as the Menu Designer mentioned above. Once they are completed, we want to tie them all together into a single IDE that will allow you to develop and manage all the parts of your application. That goal is still a long ways off, but it guides the way we develop the tools today.


Has anyone used dabo in a real-world App?

We've been contacted for support by several people in various industries who are using Dabo for their businesses, but I can't give you more specifics than that. Perhaps one or two of them may come forward and respond if they are on this list. I'm still looking for that first paid Dabo client, but until then I've re-written all of my internal apps for managing the MySQL databases on my server in Dabo.

An equally good demonstration of what Dabo can do is the fact that all of the Dabo tools, such as the Class Designer, are written in Dabo! There are no external libraries or specialized C code anywhere; it's 100% Dabo.


How to report Problems or Bugs?

When reporting Problems or Bugs always include the versions of your Operating System, Python, Wxwidgets and Dabo. Most of the used versions of your system can be found in every Dabo app (Class Designer, AppWizard, DaboDemo) under the menu item Help/About).

If you have any problems or questions use the mailinglist dabo-users.

For Bugreports please use the Dabo Trac system: http://trac.dabodev.com


What is the latest Web Update revision?

The latest revision for Web update is: 5241


What is the difference between a property and a dynamic property?

A plain property takes a value. checkbox.Enabled = False will disable the checkbox. A dynamic property takes a function. This function will be evaluated at the proper time by Dabo to dynamically determine the value of the property.

        def dynEnabled():
                import datetime
                return datetime.datetime.now().minute > 30
        checkbox.DynamicEnabled = dynEnabled

Now, the checkbox will be enabled only in the last half of each hour.

A dynamic property can be used at different places:

1) in the constructor:

        cb = dabo.ui.dCheckBox(frm, DynamicEnabled=dynEnabled)

2) in the class definition:

        class MyCheckBox(dabo.ui.dCheckBox):
                def initProperties(self):
                        self.DynamicEnabled = dynEnabled

3) after the instanciating:

        cb = dabo.ui.dCheckBox(frm)
        cb.DynamicEnabled = dynEnabled


How do I connect to a database?

Except if you are using SQLite, you will need the name of the database, username, password, server and port (there is a default port for each type of database, it is normaly not changed).

        from connectInfo import ConnectInfo
        from dConnection import dConnection

        ci = ConnectInfo("MySQL")
        ci.Host = "servername"
        ci.Database = "name_of_database"
        ci.User = "user_name"
        ci.PlainTextPassword = "password"
        #Setting the port is not realy needed.

        conn = dConnection(ci).getConnection()

If you want to connect to a SQLite database, you only need the database file.

        from connectInfo import ConnectInfo
        from dConnection import dConnection

        ci = ConnectInfo("SQLite")
        ci.Database = "databasefile.db"

        conn = dConnection(ci).getConnection()


How can I execute a simple query?

To execute a query you need to get a cursor and use that to execute the query.

mycursor = conn.getDaboCursor()
mycursor.execute("query here")


is PostgreSQL stable on dabo?

PostgreSQL support is very stable on Dabo. We use the psycopg2 database adapter for dbapi access to Postgres, so our stability is basically the same as psycopg2.


What is a Bizobj?

"Bizobj" is an abbreviated term for "business object", which is a programmatic object that enforces BusinessRules in an application.

Here's a simple explanation from a recent post on dabo-users: BizobjConcepts?


How can I manipulate data on load and on save for a bizobj?

You can manipulate the data that loads into a bizobj by overriding bizobj.getFieldVal():

def getFieldVal(self, fld, row=None):
ret = super(MyBizobj, self).getFieldVal(fld, row)
if fld == "field name":
  #change ret here
return ret

You can manipulate the data that is saved from a bizobj by overriding bizobj.setFieldVal():

def setFieldVal(self, fld, val):
if fld == "field name":
  #change val here
super(MyBizobj, self).setFieldVal(fld, val)


I'm having a hard time using dBizobj, and it might be that I don't understand the underlying concept very well, but I cannot find any decent information on the subject. Can someone recommend some reading?

I don't know of any particular source, but you can do a Google search for "business object" or "3-tier" to come up with several possibilities. Here are two quick finds, one in VB and one in Visual FoxPro?:

http://www.jamesbooth.com/n-tier.htm http://www.asp101.com/articles/visible/vbbizobjprimer/default.asp

I think it's pretty clear to most people what the UI is, and what database interaction is. The bizobj is the layer that connects the two. UIs? are boring without being able to display data, and useless if they can't take what the user has entered and store it. So the UI code asks the bizobj for its data, and then tells it to store what the user entered. But the bizobj outranks the UI; it determines if the user should be able to see the data in the first place, and if so, it handles all the details of getting that from the database. Then when the UI tells the bizobj to save the data, the bizobj first checks to make sure that the data is valid before passing it on to the database layer for storage. This is the heart of the "business" part of the name "business object": it enforces the rules that make sense for the business application it is part of. For example, your business may have a rule that it will not accept an order from an account whose current balance is more than 30 days overdue for payment. When the UI tells this Order bizobj to save a new order, it is responsible for validating that the account is in good standing, and if not, to refuse to save the order, and return an error code so that the UI knows that there is a problem and can display that to the user.

While you're Googling, also check out the chain of responsibility design pattern. It is a design in which objects are not supposed to know everything; all they know is their particular task, and which object to call when it receives a request it doesn't know how to do. Example: when you click the Save button, it doesn't know anything except that it's supposed to tell its Form that someone clicked it. The form then gets that save() message, and since it doesn't know about the database, it passes it up the chain to the bizobj. The bizobj knows that it needs to run validation on the data, and if it fails, to return an error code. However, if validation passes, it doesn't know how to actually handle the storing of the data, so it passes the save() message to the database tier. This is the object that knows how to take the data and write it to the appropriate storage, so here is where the saving actually happens. When it is done, it returns a value that indicates success or failure back to the bizobj that called it. The bizobj passes it back to the form, which then displays an appropriate message to the user.

So in a nutshell, code that deals with the display of information and interaction with the user belongs in the UI layer (form, controls). Code that deals with reading and writing to a database belongs in the data layer (dCursor). Everything else belongs in the bizobj. Hope that this helps clarify the workings of a 3-tier application design.


What are the color names available?

Dabo uses the same color names as HTML. I mean, who wanted to think up names for all those different shades? You can see what each color looks like on the ColorExamples page.


How can I draw shapes or text?

See DrawObjects.


How can I use a simple message box?

Dabo provides many simple and easy to use methods for displaying a message box.

-To show a message box with the info icon, use:

dabo.ui.info("message")

-To show a message box with the exclamation icon, use:

dabo.ui.exclaim("message")

-To show a message box with the stop icon, use:

dabo.ui.stop("message")


Won't real-life applications become slow when using Dabo? Or very limited compared to make-everything-you-like-in-C++?

I haven't seen anything that indicates that wxPython is any slower than any other GUI out there. wxWidgets (the new name for wxWindows) is written in C++, and is very fast. wxPython simply wraps wxWidgets. And to be honest, in database applications, it isn't the UI that is the limiting factor; it's the database read/write operations. Dabo isn't targeted to be a graphics program, where UI speed is critical; it's a database app framework.


Can we drop down to WxPython if needed?

Yes. There is nothing that would stop you from using wxPython code and objects if needed. You would be limited to doing this in code, since the visual tools are designed to work with Dabo objects. You would also need to rely on wxPython events instead of the Dabo event model. And I would ask that if you find some place where you feel the need to use wxPython, please post a note here explaining the problem. Either there is a way to do it in Dabo that is just not obvious, as we don't follow wxPython naming all the time, or perhaps it is a part of wxPython that we have not yet wrapped. In the latter case it is very likely that we could come up with a Dabo wrapper in a very short period of time.


Is there a Dabo IDE?

Not yet. Once all the components of the IDE are done, then work will begin on the IDE.


Can the Select/Edit/Browse Forms generated by the App Wizard be customized?

They can be customized, but only with a text editor. They are standard Python/Dabo .py code files, stored in the ui folder of the generated app.


I'm running the Class Designer on Windows, and I'm getting a SyntaxError on the last line of a method, and that line is only a comment! What did I do wrong?

You didn't do anything wrong; this is a strange behavior of the Windows Python compiler - it doesn't happen on other platforms. To fix this, either remove the comment, or add a line that does nothing afterwards, such as pass or x = 1.