With a DateTimePicker, I receive the following message.
8:51:44 AM, Friday, June 09, 2006: 'failed to create window (16r0: The operation completed successfully.)' EmbeddedDateTimePicker(View)>>unhookWindowCreate: EmbeddedDateTimePicker(View)>>createAt:extent: EmbeddedDateTimePicker(View)>>create EmbeddedDateTimePicker>>createEmbeddedIn: EditableListViewColumn>>createEditorIn: [] in EditableListView>>onViewOpened OrderedCollection>>do: EditableListView>>onViewOpened ListPresenter(Presenter)>>onViewOpened [] in Presenter>>onViewOpened OrderedCollection>>do: EditableListViewDemo(Presenter)>>onViewOpened EditableListViewDemo(Shell)>>onViewOpened EditableListViewDemo>>onViewOpened The control is a new EmbeddedDateTimePicker for use with EditableListView. Prior to this walkback, the contol was working well. Just wondering if this is a view resource/binary filing issue or an OS issue. Currently running Windows XP Home Edition V 5.1 SP1. Pax |
Initially, EmbeddedDateTimePicker>>createEmbeddedIn: aView has a valid
view instance. After inspecting the views creation parent (aView) in the debugger shows this has changed to aDeafObject. Why is the creationParent, interactor and presenter for the control being changed to aDeafObject? Am I missing something during the initialization process for the control? Thanks, Pax |
In reply to this post by pax
Pax wrote:
> EmbeddedDateTimePicker(View)>>unhookWindowCreate: [...] > EditableListViewDemo>>onViewOpened I think EditableListViewDemo is part of John Aspinal's EditableListView http://www.solutionsoft.co.uk/widgets/ But my copy of that (and I've just downloaded a fresh copy) has no class called EmbeddedDateTimePicker. Where does that come from ? BTW, are you using D5 or D6 -- it wasn't quote clear from your post ? -- chris |
> But my copy of that (and I've just downloaded a fresh copy) has no class called
> EmbeddedDateTimePicker. Where does that come from ? > > BTW, are you using D5 or D6 -- it wasn't quote clear from your post ? > > -- chris Correct Chris, EmbeddedDateTimePicker is an enhancement I am developing for EditableListView. Its not production release at this timeI have already mailed a copy of the code to John Aspinal as this is a collaboration of sorts. Once complete, the contol will have more flexibility in terms of the number of controls it supports. EmbeddedDateTimePicker was a request from my end users for a future release. BTW: this is for D6 patch level 2. I just wanted to get some feedback regarding DeafObjects and view since I have never come across this problem before. Anyway, between John and self (pun intended) we should be able to figure out the problem and get the new control working. If you have dealt with DeafObjects and views, I would love to hear about it as it may help solve the current issues I am facing. Regards, Pax |
Pax,
> If you have dealt with DeafObjects and views, I would love to hear > about it as it may help solve the current issues I am facing. Only a little, I'm afraid. And I doubt if this will help much... As far as I know live Views shouldn't normally hold a reference to a (or rather "the", since there's only one) DeafObject. Deaf objects are used as placeholders for Views while an MVP triad initialises itself. First the Presenter is created and connected to a (possibly pre-existing) model, and then the Views are created and linked in. Also, when a Presenter is told that its View has been destroyed, it replaces its #view with a reference to a DeafObject. So, although Presenters often have references to DeafObjects, Views don't usually have them. The only place I know of where a View /should/ hold a reference to a DeafObject is after it has been destroyed (see View>>wmNcDestroy:wParam:lParam:), where it sets its #presenter, #creationParent, and #interactor to DeafObject current. One possibility (rather remote, I admit) is that as the EmbeddedDateTimePicker executes #createEmbeddedIn: it is doing something which causes the control (or some parent ?) to rebuild itself. Normally, when a View has to change some aspect of itself which it isn't sure that the underlying Windows control can change on-the-fly, it just saves its state, kills the current Windows control (and subviews too, I think), then recreates it from the saved state. The reason that /might/ be relevant is that #recreate causes #wmNcDestroy:wParam:lParam: to be invoked when the View is temporarily destroyed. /If/ something has gone wrong with the #recreate method, so that for some reason it hasn't set the #isStateRestoring flag while it does this stuff, then the code in #wmNcDestroy:wParam:lParam: will throw away the reference to #presenter, #creationParent, and #interactor. So if you stepped over that change, those three fields would suddenly be set to a DeafObject. That's rather unlikely, since it depends on "something" having gone wrong with #recreate. But, fwiw, I did once break #recreate myself accidentally (by defining a useful "new" aspect called #placement and not noticing that it overrode an important system method...). Also I think the code in View using #recreate has changed a bit between D5 and D6, so it may be that something that would have worked with D5 no longer works with D6. -- chris |
Chris,
thanks for the information. John Aspinall spotted a problem with my code during the creation process for the control. EmbeddedDateTimePicker works fine now but its still being tested prior to being relased. Regards, Pax |
Free forum by Nabble | Edit this page |