Hi list,
Maybe this is a dumb question, but I couldn't find anything in the VW documentation. I've created an ApplicationModel subclass which allows me to edit a domain object. Now I would like to display a list of those interfaces in a scrollable-list fashion. I know I can embed a single instance using a subcanvas, however I'm a bit lost on how to create a scrollable list of subcanvasses. To clarify my example, suppose I have a PersonApplicationModel that can be opened on a Person instance to edit its properties. Now I would like to show the list of persons in a PhonebookApplicationModel by embedding a collection of PersonApplicationModel instances. Is this possible? I'm using VW 7.6 Thanks in advance, Andrés _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi Cesar, thanks for your quick reply! (I'm replying back to the list)
I'm actually looking for embedding multiple subcanvasses, not to adapt a domain model. In the Adaptor4 example would be like replacing the list in the left for a collection of views, where each view showed the details of a customer. Adding a new customer would mean to add a new subcanvas at the bottom of the list. Best regards, Andrés Cesar Rabak escribió: > Em 11/11/2010 20:20, andres escreveu: >> Hi list, >> Maybe this is a dumb question, but I couldn't find anything in >> the VW documentation. I've created an ApplicationModel subclass which >> allows me to edit a domain object. Now I would like to display a list of >> those interfaces in a scrollable-list fashion. I know I can embed a >> single instance using a subcanvas, however I'm a bit lost on how to >> create a scrollable list of subcanvasses. >> >> To clarify my example, suppose I have a PersonApplicationModel that can >> be opened on a Person instance to edit its properties. Now I would like >> to show the list of persons in a PhonebookApplicationModel by embedding >> a collection of PersonApplicationModel instances. Is this possible? >> > Indeed it is. IIUC you can find things similar to what you're willing > to do in the examples Adaptor4Example and Adaptor5Example. > > vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hello Andrés.
Here is a striped down version. I hope this will work for you. postBuildWith: aBuilder | applicationModel windowSpec b theBounds extent height completeHeight scs | "EASY CONFIGURATION" applicationModel := ApplicationModelB. windowSpec := #windowSpec. b := aBuilder. theBounds := applicationModel windowSpec decodeAsLiteralArray window bounds. extent := theBounds extent. height := theBounds height. completeHeight := 0. self myList do: [:each | scs := SubCanvasSpec named: aComponentId layout: ((Point x: 0 y: completeHeight) extent: extent). scs majorKey: (LiteralBindingReference pathString: usedApplicationModel asString); minorKey: windowSpec; clientKey: applicationModelClient; hasBorder: false. b add: scs. completeHeight := completeHeight + height]. ^super postBuildWith: aBuilder To update your list, simply rebuild your subcanvas A. Best regards, Tom Grünewald ________ Carl Zeiss Industrielle Messtechnik GmbH Softwareentwicklung/Software Development T o m G r ü n e w a l d 73446 Oberkochen, Germany tel: +49.7364.20-8541 fax: +49.7364.20-4800 email: [hidden email] http://www.zeiss.de/imt Carl Zeiss Industrielle Messtechnik GmbH Carl–Zeiss–Straße 22, 73447 Oberkochen Aufsichtsratsvorsitzender: Dr. Dieter Kurz Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger Sitz der Gesellschaft: 73446 Oberkochen, Deutschland Handelsregister: Amtsgericht Ulm, HRB 501561 USt–IdNr.: DE 811 515 346 andres <[hidden email]>
Hi Cesar, thanks for your quick reply! (I'm replying back to the list) I'm actually looking for embedding multiple subcanvasses, not to adapt a domain model. In the Adaptor4 example would be like replacing the list in the left for a collection of views, where each view showed the details of a customer. Adding a new customer would mean to add a new subcanvas at the bottom of the list. Best regards, Andrés Cesar Rabak escribió: > Em 11/11/2010 20:20, andres escreveu: >> Hi list, >> Maybe this is a dumb question, but I couldn't find anything in >> the VW documentation. I've created an ApplicationModel subclass which >> allows me to edit a domain object. Now I would like to display a list of >> those interfaces in a scrollable-list fashion. I know I can embed a >> single instance using a subcanvas, however I'm a bit lost on how to >> create a scrollable list of subcanvasses. >> >> To clarify my example, suppose I have a PersonApplicationModel that can >> be opened on a Person instance to edit its properties. Now I would like >> to show the list of persons in a PhonebookApplicationModel by embedding >> a collection of PersonApplicationModel instances. Is this possible? >> > Indeed it is. IIUC you can find things similar to what you're willing > to do in the examples Adaptor4Example and Adaptor5Example. > > vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc ---------------------------------------- This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc pic19051.gif (1K) Download Attachment |
Thanks Tom, that's exactly what I was looking for! A few tweaks and it
worked like a charm :). Cheers! Andrés Gruenewald, Tom escribió: > Hello Andrés. > Try the following procedure. > > Add a subcanvas A (your list) into your user interface. > Add a vertical scroll bar to subcanvas A. > Install the user interface. > Create window (application model) B, what will represent your list item. > Now you can e.g. add your list items in the #postBuildWith: method of > subcanvas A. > > Here is a striped down version. I hope this will work for you. > > > postBuildWith: aBuilder > | applicationModel windowSpec b theBounds extent height > completeHeight scs | > > "EASY CONFIGURATION" > applicationModel := ApplicationModelB. > windowSpec := #windowSpec. > > b := aBuilder. > theBounds := applicationModel windowSpec decodeAsLiteralArray window > bounds. > extent := theBounds extent. > height := theBounds height. > completeHeight := 0. > > self myList do: > [:each | > scs := SubCanvasSpec named: aComponentId layout: ((Point x: 0 > y: completeHeight) extent: extent). > scs > majorKey: (LiteralBindingReference pathString: > usedApplicationModel asString); > minorKey: windowSpec; > clientKey: applicationModelClient; > hasBorder: false. > b add: scs. > completeHeight := completeHeight + height]. > > ^super postBuildWith: aBuilder > > To update your list, simply rebuild your subcanvas A. > > Best regards, > Tom Grünewald > > ________ > > Carl Zeiss Industrielle Messtechnik GmbH > Softwareentwicklung/Software Development > > T o m G r ü n e w a l d > > 73446 Oberkochen, Germany > tel: +49.7364.20-8541 > fax: +49.7364.20-4800 > email: [hidden email] > http://www.zeiss.de/imt > > Carl Zeiss Industrielle Messtechnik GmbH > Carl?Zeiss?Straße 22, 73447 Oberkochen > Aufsichtsratsvorsitzender: Dr. Dieter Kurz > Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger > Sitz der Gesellschaft: 73446 Oberkochen, Deutschland > Handelsregister: Amtsgericht Ulm, HRB 501561 > USt?IdNr.: DE 811 515 346 > > > > andres > <[hidden email] > o.unlp.edu.ar> An > Gesendet von: [hidden email], VWNC List > [hidden email] <[hidden email]> > iuc.edu Kopie > > Thema > 12.11.2010 00:22 Re: [vwnc] Embedding multiple > instances of an application model > inside another > > > > > > > > > > > Hi Cesar, thanks for your quick reply! (I'm replying back to the list) > I'm actually looking for embedding multiple subcanvasses, not to adapt a > domain model. In the Adaptor4 example would be like replacing the list > in the left for a collection of views, where each view showed the > details of a customer. Adding a new customer would mean to add a new > subcanvas at the bottom of the list. > > Best regards, > Andrés > > > Cesar Rabak escribió: >> Em 11/11/2010 20:20, andres escreveu: >>> Hi list, >>> Maybe this is a dumb question, but I couldn't find anything > in >>> the VW documentation. I've created an ApplicationModel subclass which >>> allows me to edit a domain object. Now I would like to display a list of >>> those interfaces in a scrollable-list fashion. I know I can embed a >>> single instance using a subcanvas, however I'm a bit lost on how to >>> create a scrollable list of subcanvasses. >>> >>> To clarify my example, suppose I have a PersonApplicationModel that can >>> be opened on a Person instance to edit its properties. Now I would like >>> to show the list of persons in a PhonebookApplicationModel by embedding >>> a collection of PersonApplicationModel instances. Is this possible? >>> >> Indeed it is. IIUC you can find things similar to what you're willing >> to do in the examples Adaptor4Example and Adaptor5Example. >> >> > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > > > ---------------------------------------- > This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted. > vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |