Hi Andy and Blair,
I regularly get a Duplicate Name error in the Idea Space when opening a new CHB. (regularly as in about once a day when using DX6 full-time). I typically have the Package Browser as the first tab in the IS and then select classes from there to open in a CHB. I think it only happens after I've closed a couple of CHB tabs in that IS, so it might loses track of which names have been used when generating a new tab name? Closing the error dialog and trying again 'solves' the problem. See below for an error log - not that much use as it doesn't show references to where the duplicate name is generated (well, I couldn't find it). The error log is always the same (except for the class name to browse of course). This is the DX602 download Ted 12:36:11, 01 February 2006: Unhandled exception - an Error('duplicate name: ClassBrowserShell8') Presenter(Object)>>error: Presenter>>errorDuplicateName: Presenter>>name:as: Presenter>>add:name:helpId: Presenter>>add:name: Presenter>>add: ClassBrowserShell class(Shell class)>>create:in:on: ClassBrowserShell class(Presenter class)>>create:in: ClassBrowserShell class(Presenter class)>>createIn: [] in IdeaSpaceShell>>newEmbeddedCardOfClass: [] in View>>noRedrawDo: BlockClosure>>ifCurtailed: BlockClosure>>ensure: ShellView(View)>>noRedrawDo: IdeaSpaceShell>>newEmbeddedCardOfClass: ClassBrowserShell class(SmalltalkToolShell class)>>show:inIdeaSpace: ClassBrowserShell class(SmalltalkToolShell class)>>show RefactoringSmalltalkSystem(SmalltalkSystem)>>browseMethod:with: RefactoringSmalltalkSystem(SmalltalkSystem)>>browseMethod: CompiledMethod>>browse |
Ted wrote:
> Hi Andy and Blair, > > I regularly get a Duplicate Name error in the Idea Space when opening a > new CHB. (regularly as in about once a day when using DX6 full-time). > > I typically have the Package Browser as the first tab in the IS and then > select classes from there to open in a CHB. I think it only happens > after I've closed a couple of CHB tabs in that IS, so it might loses > track of which names have been used when generating a new tab name? > Am I the only one where this happens or do other people see this problem as well? I'm asking as it seems to be happening more frequently now. Andy, Blair, would you like to have more info, if so, what would you like? Should I worry about it? Should I move all my packages to a clean image and see if it start occurring again? Ted |
Ted wrote:
> Ted wrote: > >> Hi Andy and Blair, >> >> I regularly get a Duplicate Name error in the Idea Space when opening >> a new CHB. (regularly as in about once a day when using DX6 full-time). >> >> I typically have the Package Browser as the first tab in the IS and >> then select classes from there to open in a CHB. I think it only >> happens after I've closed a couple of CHB tabs in that IS, so it might >> loses track of which names have been used when generating a new tab name? >> > > Am I the only one where this happens or do other people see this problem > as well? I'm asking as it seems to be happening more frequently now. > > Andy, Blair, would you like to have more info, if so, what would you > like? Should I worry about it? Should I move all my packages to a clean > image and see if it start occurring again? > > Ted I think it is related to the IS not removing closed CHB's properly, because it tries to name it for example ClassBrowserShell7 even though there are only 4 CHB's open. I'll keep you informed (but I guess you already gathered that) Ted |
Ted wrote:
> Ted wrote: > >> Ted wrote: >> >>> Hi Andy and Blair, >>> >>> I regularly get a Duplicate Name error in the Idea Space when opening >>> a new CHB. (regularly as in about once a day when using DX6 full-time). >>> >>> I typically have the Package Browser as the first tab in the IS and >>> then select classes from there to open in a CHB. I think it only >>> happens after I've closed a couple of CHB tabs in that IS, so it >>> might loses track of which names have been used when generating a new >>> tab name? >>> >> >> Am I the only one where this happens or do other people see this >> problem as well? I'm asking as it seems to be happening more >> frequently now. >> >> Andy, Blair, would you like to have more info, if so, what would you >> like? Should I worry about it? Should I move all my packages to a >> clean image and see if it start occurring again? >> >> Ted > > > > I think it is related to the IS not removing closed CHB's properly, > because it tries to name it for example ClassBrowserShell7 even though > there are only 4 CHB's open. > > I'll keep you informed (but I guess you already gathered that) > > Ted Actually, it's a lot simpler ... Open a new idea space. Open a CHB Open another CHB Close the first CHB Open another CHB - TADA The problem is that the second CHB gets the name ClassBrowserShell2 (as there is one open, the number is incremented by 1). Then closing the first means that the number of open CHB's is one, so the next allocated name is ClassHierarchyBrowser(1+1), however, that already exists. The offending method is: Presenter>>defaultNameOf: Could probably be done prettier, but this works: defaultNameOf: aView "Private - Answer a default name for aView within the receiver. The name is of the form: classnn, where 'class' is the class of aView and 'nn' is an integer based on the count of existing instances of that class as sub-presenters of the receiver" | count name | #tbChanged. count := (self subPresenters select: [:each | each class == aView class]) size. name := aView class name displayString , (count := count + 1) displayString. names ifNil: [^name]. "no names yet" [names values includes: name] whileTrue: [name := aView class name displayString , (count := count + 1) displayString]. ^name Ted |
Free forum by Nabble | Edit this page |