All the Subcanvas examples use a brand new instance of some
application class for the argument of #client:spec:. When I tried to use an existing instance of the application class (I wanted to keep some information stored in instance variables to be shown), it does not display. I think the difference is that builder is not nil for existing instance. I tried to trace the codes, but not that easy. It would be appreciated if somebody has already figured out how to do that. Thanks Shiro Ogawa _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Shiro,
If you are trying to reuse an existing app model instance, you must release the existing builder of that instance and give it a new one. So, from the parent application that is trying to build the canvas with the existing model (for example, in response to a change in folder or notebook tab), you need to do something like this: ... appModel builder release. appModel builder: self builder newSubBuilder. canvasWidget client: appModel spec: #someSpec. ... Cheers! Tom Hawker -------------------------- Senior Framework Developer -------------------------- Home +1 (408) 274-4128 Office +1 (408) 576-6591 Mobile +1 (408) 835-3643 -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Shiro Ogawa Sent: Wednesday, December 03, 2008 3:05 PM To: [hidden email] Subject: [vwnc] Subcanvas reusing an existing object All the Subcanvas examples use a brand new instance of some application class for the argument of #client:spec:. When I tried to use an existing instance of the application class (I wanted to keep some information stored in instance variables to be shown), it does not display. I think the difference is that builder is not nil for existing instance. I tried to trace the codes, but not that easy. It would be appreciated if somebody has already figured out how to do that. Thanks Shiro Ogawa _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc IMPORTANT NOTICE Email from OOCL is confidential and may be legally privileged. If it is not intended for you, please delete it immediately unread. The internet cannot guarantee that this communication is free of viruses, interception or interference and anyone who communicates with us by email is taken to accept the risks in doing so. Without limitation, OOCL and its affiliates accept no liability whatsoever and howsoever arising in connection with the use of this email. Under no circumstances shall this email constitute a binding agreement to carry or for provision of carriage services by OOCL, which is subject to the availability of carrier's equipment and vessels and the terms and conditions of OOCL's standard bill of lading which is also available at http://www.oocl.com. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Shiro Ogawa
On Wed, Dec 3, 2008 at 3:05 PM, Shiro Ogawa <[hidden email]> wrote:
> All the Subcanvas examples use a brand new instance of some > application class for the argument of #client:spec:. When I tried to > use an existing instance of the application class (I wanted to keep > some information stored in instance variables to be shown), it does > not display. I think the difference is that builder is not nil for > existing instance. I tried to trace the codes, but not that easy. It > would be appreciated if somebody has already figured out how to do > that. Yes, this is an old problem, and you correctly identified the reason. It should work if you set the builder of an existing instance to nil before installing. See VisualWorks' own tools, like Workbook, for an example. Cheers, --Vassili _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by thomas.hawker
Tom and Vassili, following your suggestion. it worked like a charm.
Thanks a lot. The same thing applies for TabControl and using different application classes for each tab. I am kind of disappointed by the quality of documentation. This matter is not mentioned in GUIDevGuide.pdf. James is doing great job in his daily, but GUIDevGuid should be improved. Shiro Ogawa _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Shiro Ogawa
I only saw your reactions today. In my comment on tabpages I
mentioned my own refinement of the ApplicationModel. As I am working on the documentation of my stuff, I decided to document my DCApplicationModel. I had to dig a bit into stuff and reasoning I saw some 10 years ago. Tim Howard, in his book mentioned the problem with resources lost hen the interface (tab page) is rebuild. I moved the resources from UIBuilder to DCApplicationModel. This works great. I now have a) the actual code in a package "DC ApplicationModel", b) a simple example in a package, c) a stepwise tutorial description of the example, d) a generated comment documentation of the classes in "DC ApplicationModel" I need some help posting this stuff. Reinier van Oosten Pelschans 7 2728 GV Zoetermeer tel: 079-3437073 gsm: 0651335993 email: [hidden email] On 04 Dec 2008, at 00:05, Shiro Ogawa wrote: > All the Subcanvas examples use a brand new instance of some > application class for the argument of #client:spec:. When I tried to > use an existing instance of the application class (I wanted to keep > some information stored in instance variables to be shown), it does > not display. I think the difference is that builder is not nil for > existing instance. I tried to trace the codes, but not that easy. It > would be appreciated if somebody has already figured out how to do > that. > > Thanks > > Shiro Ogawa > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |