Monday, April 12, 2010

Today's Slip Cover Feature: New Database

So as planned, today I added the feature for creating databases. This was one of those sweet features where it ended up on the tip of previous coding, so it took literally a matter of minutes to implement. Just get a name from the users, create the database, then load it in the UI,

    def new_database(self, widget, data=None):
title = _("New database")
msg = _("Specify a name for the new database")
response, val = prompts.string(title,msg)
if response == gtk.RESPONSE_OK:
CouchDatabase(val, create=True)
self.load_db(self,val)

So now I have an end to end tool for designing my desktopcouch databases.

Use File->New and make a name for my database:
Get an empty screen for the database.
Use the "+" to create a new record type.
Use Add keys to add keys for record type.
Then add rows and fill in the data.

No comments:

Post a Comment