Some time ago and with Dolphin 3, I was needing CardContainer that did
more than the standard CardContainer. So, I made NewCardContainer and added some functions to it. Next it needed to be used in the View Composer, so I did something like CompositePresenter addView: NewCardContainer asResource: 'New card container'. and proceded to add it to views. I recall some strange error messages when I added subviews to it. I seem to remember now that I had to use the standard CardContainer and then possibly mutate the view to a NewCardContainer. That seemed to work OK. But now, using Dolphin 4, something is going wrong with these same views and I have to revisit the problem. If I don't to the mutation, Windows doesn't seem to be recognizing the TabView that automatically gets placed into the CardContainers when subviews are added as a tab. tcmGetItemCount, for instance, always returns 0, which is supposed to indicate an error. Any idea why one can't simply derive from CardContainer and use it like this? What's going wrong? Keith Alcock |
Keith,
I'm not sure about all this mutating. The "correct" way to use a new view class is to install it into the resource manager and then it is available to be dragged into the view composer and used just like any other view. So create your NewCardContainer class as before and install it into the toolbox as follows: NewCardContainer makeResource: 'New card container' inClass: CompositePresenter. Now you should be able to use this normally. Actually, I suspect this is what you must have done anyway. If you had errors when adding subviews then I imagine these were probably caused by the changes you made to the subclass. I think it would be best to track down the source of these first. You shouldn't need to mutate anything. Best Regards, Andy Bower Dolphin Support http://www.object-arts.com --- Visit the Dolphin Smalltalk WikiWeb http://www.object-arts.com/wiki/html/Dolphin/FrontPage.htm --- "Keith Alcock" <[hidden email]> wrote in message news:[hidden email]... > Some time ago and with Dolphin 3, I was needing CardContainer that did > more than the standard CardContainer. So, I made NewCardContainer and > added some functions to it. Next it needed to be used in the View > Composer, so I did something like > > CompositePresenter > addView: NewCardContainer asResource: 'New card container'. > > and proceded to add it to views. I recall some strange error messages > when I added subviews to it. I seem to remember now that I had to use > the standard CardContainer and then possibly mutate the view to a > NewCardContainer. That seemed to work OK. > > But now, using Dolphin 4, something is going wrong with these same views > and I have to revisit the problem. If I don't to the mutation, Windows > doesn't seem to be recognizing the TabView that automatically gets > placed into the CardContainers when subviews are added as a tab. > tcmGetItemCount, for instance, always returns 0, which is supposed to > indicate an error. > > Any idea why one can't simply derive from CardContainer and use it like > this? What's going wrong? > > Keith Alcock > > > > > |
Andy,
That's just it, the subclass has no changes at all: no variables, no methods, nothing (at least in my test version). CardContainer subclass: #NewCardContainer instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' classInstanceVariableNames: '' Add the class, then do NewCardContainer makeResource: 'New card container' inClass: CompositePresenter. like you say. Then I add a NewCardContainer to a shell view, for example, and then try to add anything to the NewCardContainer and a walkback like the following results: 13:54:18, woensdag 24 januari 2001: 'Index 1 is out of bounds' TabView(Object)>>errorSubscriptBounds: [] in TabView(IconicListAbstract)>>selectionByIndex: TabView>>selectionByIndex:ifAbsent: TabView(IconicListAbstract)>>selectionByIndex: TabView(IconicListAbstract)>>selection:ifAbsent: TabView(IconicListAbstract)>>selection: NewCardContainer(CardContainer)>>onCurrentCardChanged EventMessageSend(MessageSend)>>value [] in EventMessageSequence(MessageSequenceAbstract)>>value EventMessageSequence>>do: EventMessageSequence(MessageSequenceAbstract)>>value EventsCollection>>triggerEvent: CardLayout(Object)>>trigger: CardLayout>>showCard: NewCardContainer(AbstractCardContainer)>>onSubViewAdded: NewCardContainer(CardContainer)>>onSubViewAdded: CheckBox(STBViewProxy)>>restoreTopView MessageSend>>value [] in STBInFiler>>evaluateDeferredActions OrderedCollection>>do: STBInFiler>>evaluateDeferredActions STBInFiler>>next ResourceSTBByteArrayAccessor>>loadWithContext: ViewResource(Resource)>>loadWithContext: ViewComposer>>basicPasteResource:context: ViewComposer>>onDropOverShield: EventMessageSend>>valueWithArguments: [] in EventsCollection>>triggerEvent:with: EventMessageSequence>>do: EventsCollection>>triggerEvent:with: Shield(Object)>>trigger:with: Shield(View)>>drop: Shield(View)>>ddDrop: InternalDragDropSession(DragDropSession)>>dropTargetDrop InternalDragDropSession>>endTrackingAt: [] in MouseTracker>>dragButtonUp: BlockClosure>>ensure: MouseTracker>>dragButtonUp: MouseTracker>>onLeftButtonReleased: MouseTracker(View)>>wmLButtonUp:wParam:lParam: MouseTracker(View)>>dispatchMessage:wParam:lParam: [] in InputState>>wndProc:message:wParam:lParam:cookie: BlockClosure>>ifCurtailed: ProcessorScheduler>>callback:evaluate: InputState>>wndProc:message:wParam:lParam:cookie: InputState>>pumpMessage: InputState>>loopWhile: MouseTracker>>startTracking: InternalDragDropSession>>doDragDropAt:button: ListView(View)>>onBegin:drag: Strange, very strange. Someone else mentioned a somewhat similar problem recently in Dolphin 4 that surfaced with patch 1, so I thought this might have something to do with it. The problem I describe here has been there since Dolphin 3, though. Keith Alcock Andy Bower wrote: > Keith, > > I'm not sure about all this mutating. The "correct" way to use a new view > class is to install it into the resource manager and then it is available to > be dragged into the view composer and used just like any other view. So > create your NewCardContainer class as before and install it into the toolbox > as follows: > > NewCardContainer makeResource: 'New card container' inClass: > CompositePresenter. > > Now you should be able to use this normally. Actually, I suspect this is > what you must have done anyway. If you had errors when adding subviews then > I imagine these were probably caused by the changes you made to the > subclass. I think it would be best to track down the source of these first. > You shouldn't need to mutate anything. > > Best Regards, > > Andy Bower > Dolphin Support > http://www.object-arts.com > > --- > Visit the Dolphin Smalltalk WikiWeb > http://www.object-arts.com/wiki/html/Dolphin/FrontPage.htm > --- > > "Keith Alcock" <[hidden email]> wrote in message > news:[hidden email]... > > Some time ago and with Dolphin 3, I was needing CardContainer that did > > more than the standard CardContainer. So, I made NewCardContainer and > > added some functions to it. Next it needed to be used in the View > > Composer, so I did something like > > > > CompositePresenter > > addView: NewCardContainer asResource: 'New card container'. > > > > and proceded to add it to views. I recall some strange error messages > > when I added subviews to it. I seem to remember now that I had to use > > the standard CardContainer and then possibly mutate the view to a > > NewCardContainer. That seemed to work OK. > > > > But now, using Dolphin 4, something is going wrong with these same views > > and I have to revisit the problem. If I don't to the mutation, Windows > > doesn't seem to be recognizing the TabView that automatically gets > > placed into the CardContainers when subviews are added as a tab. > > tcmGetItemCount, for instance, always returns 0, which is supposed to > > indicate an error. > > > > Any idea why one can't simply derive from CardContainer and use it like > > this? What's going wrong? > > > > Keith Alcock > > > > > > > > > > |
Keith,
> That's just it, the subclass has no changes at all: no variables, no methods, > nothing (at least in my test version). > > CardContainer subclass: #NewCardContainer > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > classInstanceVariableNames: '' > > Add the class, then do > > NewCardContainer makeResource: 'New card container' inClass: > CompositePresenter. > > like you say. Then I add a NewCardContainer to a shell view, for example, > then try to add anything to the NewCardContainer and a walkback like the > following results: > > 13:54:18, woensdag 24 januari 2001: 'Index 1 is out of bounds' > TabView(Object)>>errorSubscriptBounds: > [] in TabView(IconicListAbstract)>>selectionByIndex: > TabView>>selectionByIndex:ifAbsent: > TabView(IconicListAbstract)>>selectionByIndex: > TabView(IconicListAbstract)>>selection:ifAbsent: > TabView(IconicListAbstract)>>selection: > NewCardContainer(CardContainer)>>onCurrentCardChanged > EventMessageSend(MessageSend)>>value > [] in EventMessageSequence(MessageSequenceAbstract)>>value > EventMessageSequence>>do: > EventMessageSequence(MessageSequenceAbstract)>>value > EventsCollection>>triggerEvent: > CardLayout(Object)>>trigger: > CardLayout>>showCard: > NewCardContainer(AbstractCardContainer)>>onSubViewAdded: > NewCardContainer(CardContainer)>>onSubViewAdded: > CheckBox(STBViewProxy)>>restoreTopView > MessageSend>>value > [] in STBInFiler>>evaluateDeferredActions > OrderedCollection>>do: > STBInFiler>>evaluateDeferredActions > STBInFiler>>next > ResourceSTBByteArrayAccessor>>loadWithContext: > ViewResource(Resource)>>loadWithContext: > ViewComposer>>basicPasteResource:context: > ViewComposer>>onDropOverShield: > EventMessageSend>>valueWithArguments: > [] in EventsCollection>>triggerEvent:with: > EventMessageSequence>>do: > EventsCollection>>triggerEvent:with: > Shield(Object)>>trigger:with: > Shield(View)>>drop: > Shield(View)>>ddDrop: > InternalDragDropSession(DragDropSession)>>dropTargetDrop > InternalDragDropSession>>endTrackingAt: > [] in MouseTracker>>dragButtonUp: > BlockClosure>>ensure: > MouseTracker>>dragButtonUp: > MouseTracker>>onLeftButtonReleased: > MouseTracker(View)>>wmLButtonUp:wParam:lParam: > MouseTracker(View)>>dispatchMessage:wParam:lParam: > [] in InputState>>wndProc:message:wParam:lParam:cookie: > BlockClosure>>ifCurtailed: > ProcessorScheduler>>callback:evaluate: > InputState>>wndProc:message:wParam:lParam:cookie: > InputState>>pumpMessage: > InputState>>loopWhile: > MouseTracker>>startTracking: > InternalDragDropSession>>doDragDropAt:button: > ListView(View)>>onBegin:drag: > > Strange, very strange. Someone else mentioned a somewhat similar problem > recently in Dolphin 4 that surfaced with patch 1, so I thought this might > something to do with it. The problem I describe here has been there since > Dolphin 3, though. I've just tried what you describe on Dolphin 4.0 under Win98 and Win2000 both patched (PL1) and unpatched and I don't see this problem. You could try packaging up an example and sending it through and we'll take a look. Best Regards, Andy Bower Dolphin Support http://www.object-arts.com --- Visit the Dolphin Smalltalk WikiWeb http://www.object-arts.com/wiki/html/Dolphin/FrontPage.htm --- |
Andy,
I hope that it isn't a case of my personal computer taking revenge for anything. I'm reasonably sure the the midi configuration is good now. The package has one resource. When I made it, I couldn't add anything to the NewCardContainer, so I left that empty. To test it, I quit Dolphin (no image save), restarted Dolphin, and reloaded the package. If I double click on the resource from the package manager to get a view composer and try to add a Boolean Presenter to the NewCardContainer, it (oh no!) works. However, if in the view composer I then chose file | close and then file | new shell view, and add a NewCardContainer by dragging it from the resource toolbox, I won't be able to add a Boolean Presenter or anything else to the NewCardContainer without getting the same errors that I normally get. This makes me wonder if it is more a problem with the view composer than the class itself. The exact same thing happens both for Dolphin 3.06 and 4.0 and (I'll double check tonight) on Win95 and Win2000. Now if only this attachment will get past DIS.DFN.DE... Thanks Keith Alcock Andy Bower wrote: > Keith, > > > That's just it, the subclass has no changes at all: no variables, no > methods, > > nothing (at least in my test version). > > > > CardContainer subclass: #NewCardContainer > > instanceVariableNames: '' > > classVariableNames: '' > > poolDictionaries: '' > > classInstanceVariableNames: '' > > > > Add the class, then do > > > > NewCardContainer makeResource: 'New card container' inClass: > > CompositePresenter. > > > > like you say. Then I add a NewCardContainer to a shell view, for example, > and > > then try to add anything to the NewCardContainer and a walkback like the > > following results: > > > > 13:54:18, woensdag 24 januari 2001: 'Index 1 is out of bounds' > > TabView(Object)>>errorSubscriptBounds: > > [] in TabView(IconicListAbstract)>>selectionByIndex: > > TabView>>selectionByIndex:ifAbsent: > > TabView(IconicListAbstract)>>selectionByIndex: > > TabView(IconicListAbstract)>>selection:ifAbsent: > > TabView(IconicListAbstract)>>selection: > > NewCardContainer(CardContainer)>>onCurrentCardChanged > > EventMessageSend(MessageSend)>>value > > [] in EventMessageSequence(MessageSequenceAbstract)>>value > > EventMessageSequence>>do: > > EventMessageSequence(MessageSequenceAbstract)>>value > > EventsCollection>>triggerEvent: > > CardLayout(Object)>>trigger: > > CardLayout>>showCard: > > NewCardContainer(AbstractCardContainer)>>onSubViewAdded: > > NewCardContainer(CardContainer)>>onSubViewAdded: > > CheckBox(STBViewProxy)>>restoreTopView > > MessageSend>>value > > [] in STBInFiler>>evaluateDeferredActions > > OrderedCollection>>do: > > STBInFiler>>evaluateDeferredActions > > STBInFiler>>next > > ResourceSTBByteArrayAccessor>>loadWithContext: > > ViewResource(Resource)>>loadWithContext: > > ViewComposer>>basicPasteResource:context: > > ViewComposer>>onDropOverShield: > > EventMessageSend>>valueWithArguments: > > [] in EventsCollection>>triggerEvent:with: > > EventMessageSequence>>do: > > EventsCollection>>triggerEvent:with: > > Shield(Object)>>trigger:with: > > Shield(View)>>drop: > > Shield(View)>>ddDrop: > > InternalDragDropSession(DragDropSession)>>dropTargetDrop > > InternalDragDropSession>>endTrackingAt: > > [] in MouseTracker>>dragButtonUp: > > BlockClosure>>ensure: > > MouseTracker>>dragButtonUp: > > MouseTracker>>onLeftButtonReleased: > > MouseTracker(View)>>wmLButtonUp:wParam:lParam: > > MouseTracker(View)>>dispatchMessage:wParam:lParam: > > [] in InputState>>wndProc:message:wParam:lParam:cookie: > > BlockClosure>>ifCurtailed: > > ProcessorScheduler>>callback:evaluate: > > InputState>>wndProc:message:wParam:lParam:cookie: > > InputState>>pumpMessage: > > InputState>>loopWhile: > > MouseTracker>>startTracking: > > InternalDragDropSession>>doDragDropAt:button: > > ListView(View)>>onBegin:drag: > > > > Strange, very strange. Someone else mentioned a somewhat similar problem > > recently in Dolphin 4 that surfaced with patch 1, so I thought this might > have > > something to do with it. The problem I describe here has been there since > > Dolphin 3, though. > > I've just tried what you describe on Dolphin 4.0 under Win98 and Win2000 > both patched (PL1) and unpatched and I don't see this problem. You could try > packaging up an example and sending it through and we'll take a look. > > Best Regards, > > Andy Bower > Dolphin Support > http://www.object-arts.com > > --- > Visit the Dolphin Smalltalk WikiWeb > http://www.object-arts.com/wiki/html/Dolphin/FrontPage.htm > --- NewCardContainer.pac (4K) Download Attachment |
Andy,
I did test on Win95 and experienced the same problem. Just to be sure, I also tried it on a computer today that I had not previously touched and got the same result. There's a problem somewhere in there. Keith Alcock Keith Alcock wrote: > Andy, > > I hope that it isn't a case of my personal computer taking revenge for > anything. I'm reasonably sure the the midi configuration is good now. > > The package has one resource. When I made it, I couldn't add anything to the > NewCardContainer, so I left that empty. To test it, I quit Dolphin (no image > save), restarted Dolphin, and reloaded the package. If I double click on the > resource from the package manager to get a view composer and try to add a > Boolean Presenter to the NewCardContainer, it (oh no!) works. > > However, if in the view composer I then chose file | close and then file | new > shell view, and add a NewCardContainer by dragging it from the resource toolbox, > I won't be able to add a Boolean Presenter or anything else to the > NewCardContainer without getting the same errors that I normally get. > > This makes me wonder if it is more a problem with the view composer than the > class itself. The exact same thing happens both for Dolphin 3.06 and 4.0 and > (I'll double check tonight) on Win95 and Win2000. > > Now if only this attachment will get past DIS.DFN.DE... > > Thanks > > Keith Alcock > > Andy Bower wrote: > > > Keith, > > > > > That's just it, the subclass has no changes at all: no variables, no > > methods, > > > nothing (at least in my test version). > > > > > > CardContainer subclass: #NewCardContainer > > > instanceVariableNames: '' > > > classVariableNames: '' > > > poolDictionaries: '' > > > classInstanceVariableNames: '' > > > > > > Add the class, then do > > > > > > NewCardContainer makeResource: 'New card container' inClass: > > > CompositePresenter. > > > > > > like you say. Then I add a NewCardContainer to a shell view, for example, > > and > > > then try to add anything to the NewCardContainer and a walkback like the > > > following results: > > > > > > 13:54:18, woensdag 24 januari 2001: 'Index 1 is out of bounds' > > > TabView(Object)>>errorSubscriptBounds: > > > [] in TabView(IconicListAbstract)>>selectionByIndex: > > > TabView>>selectionByIndex:ifAbsent: > > > TabView(IconicListAbstract)>>selectionByIndex: > > > TabView(IconicListAbstract)>>selection:ifAbsent: > > > TabView(IconicListAbstract)>>selection: > > > NewCardContainer(CardContainer)>>onCurrentCardChanged > > > EventMessageSend(MessageSend)>>value > > > [] in EventMessageSequence(MessageSequenceAbstract)>>value > > > EventMessageSequence>>do: > > > EventMessageSequence(MessageSequenceAbstract)>>value > > > EventsCollection>>triggerEvent: > > > CardLayout(Object)>>trigger: > > > CardLayout>>showCard: > > > NewCardContainer(AbstractCardContainer)>>onSubViewAdded: > > > NewCardContainer(CardContainer)>>onSubViewAdded: > > > CheckBox(STBViewProxy)>>restoreTopView > > > MessageSend>>value > > > [] in STBInFiler>>evaluateDeferredActions > > > OrderedCollection>>do: > > > STBInFiler>>evaluateDeferredActions > > > STBInFiler>>next > > > ResourceSTBByteArrayAccessor>>loadWithContext: > > > ViewResource(Resource)>>loadWithContext: > > > ViewComposer>>basicPasteResource:context: > > > ViewComposer>>onDropOverShield: > > > EventMessageSend>>valueWithArguments: > > > [] in EventsCollection>>triggerEvent:with: > > > EventMessageSequence>>do: > > > EventsCollection>>triggerEvent:with: > > > Shield(Object)>>trigger:with: > > > Shield(View)>>drop: > > > Shield(View)>>ddDrop: > > > InternalDragDropSession(DragDropSession)>>dropTargetDrop > > > InternalDragDropSession>>endTrackingAt: > > > [] in MouseTracker>>dragButtonUp: > > > BlockClosure>>ensure: > > > MouseTracker>>dragButtonUp: > > > MouseTracker>>onLeftButtonReleased: > > > MouseTracker(View)>>wmLButtonUp:wParam:lParam: > > > MouseTracker(View)>>dispatchMessage:wParam:lParam: > > > [] in InputState>>wndProc:message:wParam:lParam:cookie: > > > BlockClosure>>ifCurtailed: > > > ProcessorScheduler>>callback:evaluate: > > > InputState>>wndProc:message:wParam:lParam:cookie: > > > InputState>>pumpMessage: > > > InputState>>loopWhile: > > > MouseTracker>>startTracking: > > > InternalDragDropSession>>doDragDropAt:button: > > > ListView(View)>>onBegin:drag: > > > > > > Strange, very strange. Someone else mentioned a somewhat similar problem > > > recently in Dolphin 4 that surfaced with patch 1, so I thought this might > > have > > > something to do with it. The problem I describe here has been there since > > > Dolphin 3, though. > > > > I've just tried what you describe on Dolphin 4.0 under Win98 and Win2000 > > both patched (PL1) and unpatched and I don't see this problem. You could try > > packaging up an example and sending it through and we'll take a look. > > > > Best Regards, > > > > Andy Bower > > Dolphin Support > > http://www.object-arts.com > > > > --- > > Visit the Dolphin Smalltalk WikiWeb > > http://www.object-arts.com/wiki/html/Dolphin/FrontPage.htm > > --- > > ------------------------------------------------------------------------ > Name: NewCardContainer.pac > NewCardContainer.pac Type: Proxy Auto-Config (application/x-ns-proxy-autoconfig) > Encoding: base64 |
Free forum by Nabble | Edit this page |