Re: forceable crash required...

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: forceable crash required...

by Benny Malengier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rob, all

I don't have time to fully research the best solution to the bug in
trunk now if you use the selectors.
Patch in attachment should fix it via a work around for the time being.
There are some other places that DataViews is still imported and that
must be replaced by moving functions to utilities or removing the
DataView import. It is not good that other modules depend on how a
view looks like.

Rob, can you make a bug entry and assign to me, I'll fix this cleanly
when time this week or in the weekend.

Benny

2009/11/9 Benny Malengier <benny.malengier@...>:

> Rob, you pasted the last error, which is not the cause of the issue.
> You should paste the first error, in this case:
>
> 382492: ERROR: gramps.py: line 121: Unhandled exception
> Traceback (most recent call last):
>  File "/home/benny/programs/gramps/trunk/src/Editors/ObjectEntries.py",
> line 200, in share_clicked
>    select = self.call_selector()
>  File "/home/benny/programs/gramps/trunk/src/Editors/ObjectEntries.py",
> line 289, in call_selector
>    return cls(self.dbstate, self.uistate, self.track)
>  File "/home/benny/programs/gramps/trunk/src/Selectors/_BaseSelector.py",
> line 89, in __init__
>    self.colinfo = self.column_view_names()
>  File "/home/benny/programs/gramps/trunk/src/Selectors/_SelectPlace.py",
> line 76, in column_view_names
>    import DataViews
> ImportError: No module named DataViews
>
> Benny
>
>
> 2009/11/9 Rob Healey <robhealey1@...>:
>> Dear Benny:
>>
>> On Mon, Nov 9, 2009 at 12:23 AM, Benny Malengier <benny.malengier@...>
>> wrote:
>>>
>>> I'll look at it, as a workaround, you can drag and drop from the
>>> clipboard.
>>>
>>> Do you have the original order of columns in the place view?
>>
>> Yes, I do, and please forgive the second message regarding the crash problem
>> that I have been having....
>>
>> Sincerely yurs,
>> Rob G. Healey
>>
>>>
>>> 2009/11/9 Rob Healey <robhealey1@...>:
>>> > Dear Benny:
>>> >
>>> > I am not sure if you have gotten this one or not yet?
>>> >
>>> > I was trying to ad an address to a person that I just got their
>>> > address.  I
>>> > chose add existing place, and it locked me into a loop.  I had to
>>> > forcibly
>>> > crash it to close it down....
>>> >
>>> > I got this error:
>>> > 1732742: ERROR: gramps.py: line 121: Unhandled exception
>>> > Traceback (most recent call last):
>>> >   File "/home/Frog/gramps32/src/Editors/_EditReference.py", line 190, in
>>> > close_and_cancel
>>> >     self.close(obj)
>>> >   File "/home/Frog/gramps32/src/Editors/_EditReference.py", line 212, in
>>> > close
>>> >     ManagedWindow.ManagedWindow.close(self)
>>> >   File "/home/Frog/gramps32/src/ManagedWindow.py", line 499, in close
>>> >     self.uistate.gwm.close_track(self.track)
>>> >   File "/home/Frog/gramps32/src/ManagedWindow.py", line 149, in
>>> > close_track
>>> >     self.recursive_action(item, self.close_item)
>>> >   File "/home/Frog/gramps32/src/ManagedWindow.py", line 165, in
>>> > recursive_action
>>> >     self.recursive_action(sub_item, func, *args)
>>> >   File "/home/Frog/gramps32/src/ManagedWindow.py", line 172, in
>>> > recursive_action
>>> >     func(last_item, *args)
>>> >   File "/home/Frog/gramps32/src/ManagedWindow.py", line 177, in
>>> > close_item
>>> >     del self.id2item[item.window_id]
>>> > KeyError: 76084304
>>> >
>>> > Sincerely yours,
>>> > Rob G. Healey
>>> >
>>> >
>>
>>
>

[selector.patch]

Index: src/Selectors/_BaseSelector.py
===================================================================
--- src/Selectors/_BaseSelector.py (revision 13535)
+++ src/Selectors/_BaseSelector.py (working copy)
@@ -85,8 +85,7 @@
         self.tree.set_headers_clickable(True)
         self.tree.connect('row-activated', self._on_row_activated)
         self.tree.grab_focus()
-        
-        self.colinfo = self.column_view_names()
+
         #add the search bar
         self.search_bar = SearchBar(dbstate, uistate, self.build_tree)
         filter_box = self.search_bar.build()
@@ -220,7 +219,7 @@
         """
         returns a tuple indicating the column order of the model
         """
-        return [(1, row[3], row[1]) for row in self.get_column_titles()]
+        return [(1, row[3], row[1], row[0]) for row in self.get_column_titles()]
 
     def column_view_names(self):
         """
@@ -242,7 +241,7 @@
         """
         cols = []
         for pair in [pair for pair in self.column_order() if pair[0]]:
-            cols.append((self.colinfo[pair[1]], pair[1]))
+            cols.append((pair[3], pair[1]))
         self.search_bar.setup_filter(cols)
         
     def build_tree(self):


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gramps-devel mailing list
Gramps-devel@...
https://lists.sourceforge.net/lists/listinfo/gramps-devel