Does anyone know about the following odd behaviour?
In MyMainPresenter (Shell subclass), I have a ListPresenter and another presenter, MySubPresenter (mysub). For msp, I use a ReferenceView. Now, if MyMainPresenter sends the #hide message to mysub, then mysub is of course hidden. But then if the ListPresenter gains the focus, the entire image crashes ("The program has performed an illegal action..." etc) It never happens as long as mysub is shown, or if it is dereferenced. Neither does it happen if I put up a ContainerView (cv), put mysub into cv, and sends #hide to cv instead of mysub. So there are some kind of workaround at least. But isn't this a bug anyway? There is nothing in my code connecting the ListPresenter to mysub. I have tried it on both Dolphin 4.0 and XP 5.0, Standard Edition. I use Win98. Kjell Fredrik Pettersen |
Kjell Fredrik Pettersen wrote:
> Does anyone know about the following odd behaviour? > [cut] As noone has given any comments, I'll try to be more specific, as I have checked a little bit more on this: - Start up with a new image. - Create the class MyShell as a subclass of Shell. - Open the ViewComposer on a new view in MyShell - Insert a MethodBrowser/Default view as a ReferenceView, give it the name 'rv'. - Insert a ListPresenter/Default view. - Save the view as MyShell/Default view and close the VC. - Define the MyShell instance variable 'rvPresenter'. - Insert the following two methods: MyShell>>#createComponents super createComponents. rvPresenter := self add: MethodBrowser new name: 'rv'. MyShell>>#onViewOpened super onViewOpened. rvPresenter hide. - Save the image - Evaluate 'MyShell show'. The last evaluation crashes my image. I have tried it on version 4.0 and 5.0, Standrad Edition, and on two separate computers, one running Win98, the other Win95. All cases crashed. Now any of the following modifications don't crash: - Dereference the MethodBrowser ReferenceView. So being a ReferenceView is essential. - Remove the MethodBrowser, and insert a ReferenceView for a TextPresenter instead. So "low-level" windows components behave differently than Resources built up in Dolphin? - Encapsulate the problem: Insert a ContainerView instead, and put the MethodBrowser ReferenceView into the container. Send #hide to the ContainerView. - Remove the ListPresenter, insert somthing else, like a TextPresenter. Kjell Fredrik Pettersen |
Kjell Fredrik Pettersen wrote:
> The last evaluation crashes my image. I have tried it on version 4.0 > and > 5.0, Standrad Edition, and on two separate computers, one running > Win98, the other Win95. All cases crashed. FWIW, it works OK on Win2K. I've seen similar problems with adjusting layout before a window is fully open on W98 (my app just died without warning too). You might be able to work around the problem by defering the #hide until the next idle time: SessionManager inputState queueDeferredAction: [rvPresenter hide]. -- chris |
In reply to this post by Kjell Fredrik Pettersen
Kjell,
> As noone has given any comments, I'll try to be more specific, as I have > checked a little bit more on this: I duplicated those details (twice) on my XP machine running Dolphin 5.01 Pro and had no obvious problem, it certainly didn't crash the image. I then added a couple of PushButtons to send #hide/#show rvPresenter and that also worked as expected. I copied the package to my Win2000/Dolphin Pro box and it worked on there as well (I didn't try the push buttons though). Just in case I installed Dolphin Standard on my XP machine and tried. It still worked without any problem. It looks like it may be an OS related problem (but I didn't think D5 was supported on Win95 anyway?). Feel free to mail me a package containing the a class that crashes your machine and I'll try that on XP - you never know. -- Ian Bartholomew |
Free forum by Nabble | Edit this page |