couchwidget throws error if record_type is set before headings

Bug #412266 reported by Rick Spencer on 2009-08-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rick Spencer

Bug Description

This is the logical order to set properties on a couchwidget:
        self.couchwidget.database = "super_text"
        self.couchwidget.record_type = ""
        self.couchwidget.headings = ["title"]

But this causes the error:
Traceback (most recent call last):
  File "bin/super_text", line 121, in open_file
    opener = OpenDialog.NewOpenDialog()
  File "/home/rick/super_text/super_text/", line 73, in NewOpenDialog
  File "/home/rick/super_text/super_text/", line 39, in finish_initializing
    self.couchwidget.record_type = ""
  File "/home/rick/desktopcouch/desktopcouch/records/", line 119, in record_type
  File "/home/rick/desktopcouch/desktopcouch/records/", line 127, in __populate_treeview
  File "/home/rick/desktopcouch/desktopcouch/records/", line 317, in __reset_model
    col_count = len(self.headings) + 1

The code must be written like this:
        self.couchwidget.database = "super_text"
        self.couchwidget.headings = ["title"]
        self.couchwidget.record_type = ""

Related branches

Changed in desktopcouch:
assignee: nobody → Rick Spencer (rick-rickspencer3)
status: New → Confirmed
Changed in desktopcouch:
status: Confirmed → Fix Committed

The committed fix was not good. You are supposed to be able to use the couchwidget without setting the headings.

Changed in desktopcouch:
status: Fix Committed → Confirmed

modified the code so that couchwidget can respond flexibly depending on whether the developer has set up headings, or whether they can be inferred from existing records.

Changed in desktopcouch:
status: Confirmed → In Progress
tags: added: ubuntuone-karmic

I think this is fix release now

Changed in desktopcouch:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers