From keith_hodges at yahoo.co.uk Wed Feb 6 12:04:07 2008 From: keith_hodges at yahoo.co.uk (Keith Hodges) Date: Wed, 06 Feb 2008 11:04:07 +0000 Subject: Tree view in IE Message-ID: <47A99427.50608@yahoo.co.uk> I am finding that the tree view does not display very well in ie, is it just me? Keith From renggli at iam.unibe.ch Wed Feb 6 12:10:13 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Wed, 6 Feb 2008 12:10:13 +0100 Subject: Tree view in IE In-Reply-To: <47A99427.50608@yahoo.co.uk> References: <47A99427.50608@yahoo.co.uk> Message-ID: Which Tree View? WATree? PRTreeWidget? SUTreeReport? On Feb 6, 2008, at 12:04 , Keith Hodges wrote: > I am finding that the tree view does not display very well in ie, is > it > just me? > > Keith > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From keith_hodges at yahoo.co.uk Wed Feb 6 12:57:37 2008 From: keith_hodges at yahoo.co.uk (Keith Hodges) Date: Wed, 06 Feb 2008 11:57:37 +0000 Subject: Tree view in IE In-Reply-To: References: <47A99427.50608@yahoo.co.uk> Message-ID: <47A9A0B1.3070304@yahoo.co.uk> Lukas Renggli wrote: > Which Tree View? > > PRTreeWidget? > > The Navigation widget... Keith From renggli at iam.unibe.ch Wed Feb 6 13:12:33 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Wed, 6 Feb 2008 13:12:33 +0100 Subject: Tree view in IE In-Reply-To: <47A9A0B1.3070304@yahoo.co.uk> References: <47A99427.50608@yahoo.co.uk> <47A9A0B1.3070304@yahoo.co.uk> Message-ID: How does your stylesheet look like? This is a normal nested list. On Feb 6, 2008, at 12:57 , Keith Hodges wrote: > Lukas Renggli wrote: >> Which Tree View? >> >> PRTreeWidget? >> >> > The Navigation widget... > > Keith > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From keith_hodges at yahoo.co.uk Wed Feb 6 13:50:38 2008 From: keith_hodges at yahoo.co.uk (Keith Hodges) Date: Wed, 06 Feb 2008 12:50:38 +0000 Subject: Tree view in IE In-Reply-To: References: <47A99427.50608@yahoo.co.uk> <47A9A0B1.3070304@yahoo.co.uk> Message-ID: <47A9AD1E.2060004@yahoo.co.uk> Lukas Renggli wrote: > How does your stylesheet look like? > > This is a normal nested list. > > The original stylesheet, though I am still stuck at versions prior to the environment changes. I have the tree positioned on the right hand side. If opened to 3 levels deep, the items at that level disappear. btw how is the blueprint css working out? Keith From cdrick65 at gmail.com Sat Feb 9 16:57:22 2008 From: cdrick65 at gmail.com (cdrick) Date: Sat, 9 Feb 2008 16:57:22 +0100 Subject: [Pier] PRMeta questions/clarifications - Is it transposable to MADescriptions ? Message-ID: Hi The purpose or PRMeta is to add meta information to structure... "additional fields to any structure (sort of a replacement of Pier-Form)" . Is it this kind of extension that could help resize picture for instance (we add 2 Number that describe height and weight). I don't see really well how to use them. Can you provide me a simple example ? What is the way to use these meta variables in computation ? Also, would PRMeta extensions to PRStructure could be added to MADescription ? I want to make a description wich is basically a single option description, except that I'd like to extend the description with a symetric matrix that held comparison similarity numbers. For instance, let's consider an attribute weatherCondition, it's options are: (excellent, good, bad, extreme). Let say, I have the following comparison matrix for the attribute weatherCondition: excellent good bad extreme excellent 1 0.8 0.1 0 good 1 0.2 0 bad 1 0.7 extreme 1 so that: similarityBetween: 'good' and: 'bad' returns 0.2 I'd like to attach this matrix to the description, and was thinkink an extension like meta could do it. It will allow me to edit the similarity matrix too (sort of edit meta like in pier). If you see any obvious alternative to do what I want, please tell me, but I find this could be nicey done with Magritte. Thanks C?drick From renggli at iam.unibe.ch Sat Feb 9 17:09:51 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sat, 9 Feb 2008 17:09:51 +0100 Subject: [Pier] PRMeta questions/clarifications - Is it transposable to MADescriptions ? In-Reply-To: References: Message-ID: > I don't see really well how to use them. Can you provide me a simple > example ? I made it for a Magritte demo. It would certainly require some more work to be really useable. > What is the way to use these meta variables in computation ? There is none. > Also, would PRMeta extensions to PRStructure could be added to > MADescription ? Yes, that could be made. > If you see any obvious alternative to do what I want, please tell me, > but I find this could be nicey done with Magritte. What about adding two MASingleOptionDescription to your structure and then do the matrix lookup from Smalltalk code? Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Sat Feb 9 17:12:55 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sat, 9 Feb 2008 17:12:55 +0100 Subject: Tree view in IE In-Reply-To: <47A9AD1E.2060004@yahoo.co.uk> References: <47A99427.50608@yahoo.co.uk> <47A9A0B1.3070304@yahoo.co.uk> <47A9AD1E.2060004@yahoo.co.uk> Message-ID: <5CCDEE19-B477-4515-A31B-91DC5FC8C63E@iam.unibe.ch> >> How does your stylesheet look like? >> >> This is a normal nested list. >> >> > The original stylesheet, though I am still stuck at versions prior to > the environment changes. > > I have the tree positioned on the right hand side. If opened to 3 > levels > deep, the items at that level disappear. That's odd. I've never seen this. If the items are in the XHTML source then this must be a style problem. > btw how is the blueprint css working out? It looks pretty cool. I guess that is a much better look as a default, because people can build on top of it. Of course it is still possible to do something completely different. If I just had time to finish it :-S Lukas -- Lukas Renggli http://www.lukas-renggli.ch From cdrick65 at gmail.com Sat Feb 9 18:24:30 2008 From: cdrick65 at gmail.com (cdrick) Date: Sat, 9 Feb 2008 18:24:30 +0100 Subject: [Pier] PRMeta questions/clarifications - Is it transposable to MADescriptions ? In-Reply-To: References: Message-ID: 2008/2/9, Lukas Renggli : > > I don't see really well how to use them. Can you provide me a simple > > example ? > > I made it for a Magritte demo. It would certainly require some more > work to be really useable. oh ok :) What kind of uses can be imaginated ? > > Also, would PRMeta extensions to PRStructure could be added to > > MADescription ? > > Yes, that could be made. that makes me wonder why there are 2 separate classes like MAObject and PRObject. They look the same to me. Is it for maintenance purpose ? > What about adding two MASingleOptionDescription to your structure and > then do the matrix lookup from Smalltalk code? > I'm not sure I get what you say. My structure contains several attributes (like weatherConditions) , each of them having its own domain (like {good, bad, extreme}). Each attribute has its own similarity matrix depending on the domain values. I have several persistant instances of my structure and I want to compare a new one, to all the persistant ones. The lookup is smalltalk code, but I'm more concerned on editing the model (options and matrix). Do you think storing the similarity matrix in the description is a good choice knowing I want to edit the attribute model (either each options and therefore the mattrix, or only the values of the matrix)) Thanks a lot Lukas From cdrick65 at gmail.com Mon Feb 11 15:58:02 2008 From: cdrick65 at gmail.com (cdrick) Date: Mon, 11 Feb 2008 15:58:02 +0100 Subject: Accessor for class inst var Message-ID: Hi, Still for my descriptor (attribute). I defined a similarity matrix in the class side. I've never used Magritte to edit class inst var, so out of curiosity, what accessor would you use ? I've use a Block Accessor. (MABlockAccessor read: [ :model | model class matrix] write: [ :model :object | model class matrix: aMatrix]); Is it ok to edit class side inst var ? What would you use ? Also, I was doing a matrix description, but I saw MATableModel and MATableComponent... it seems to be a "matrix", isnt'it ? Thanks C?drick From renggli at iam.unibe.ch Mon Feb 11 16:20:06 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Mon, 11 Feb 2008 16:20:06 +0100 Subject: Accessor for class inst var In-Reply-To: References: Message-ID: > I've never used Magritte to edit class inst var, so out of curiosity, > what accessor would you use ? You could also use a cascaded of selector accessors: MAChainAccessor selectors: #(class matrix) > Is it ok to edit class side inst var ? What would you use ? Yes, that's fine. You can edit any value. If you write an SQL-Accessor you could also access your data in a Relational Table. > Also, I was doing a matrix description, but I saw MATableModel and > MATableComponent... it seems to be a "matrix", isnt'it ? Yes, exactly. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From cdrick65 at gmail.com Thu Feb 14 13:03:26 2008 From: cdrick65 at gmail.com (cdrick) Date: Thu, 14 Feb 2008 13:03:26 +0100 Subject: MATableComponent - using condition on cells Message-ID: Hi I'd like to be able to put condition on cells of my table. I want them to be Number (float between 0 and 1 or integer between 0 and 100). So I changed the method buildDescriptionTable in MATableComponent (a copy of it) buildDescriptionTable ^ self dataTable collect: [ :row :col :each | self description reference copy "(-> return a MAStringDescription)" accessor: MANullAccessor new; label: row asString , '/' , col asString; propertyAt: #row put: row; propertyAt: #column put: col; yourself ] becomes: buildDescriptionTable ^ self dataTable collect: [ :row :col :each | MANumberDescription new accessor: (MABlockAccessor read: [ :model | (model memento cache at: (self description) ) at: row at: col ] write: [ :model :object | self halt. (model memento cache at: (self description) )at: row at: col put: object]); min: 0 max: 1; label: row asString , '/' , col asString; readonly: (col < row); propertyAt: #row put: row; propertyAt: #column put: col; yourself ]. I think that instead of a NullAccessor and write:using: and readUsing: which I removed, I can have a real accessor that can do the job. but this doesn't really work :) I'm sure I messed something with the memento (all table value are the same now), so if you see something wrong in what I did, please tell me. Thanks, C?drick From cdrick65 at gmail.com Thu Feb 14 17:23:55 2008 From: cdrick65 at gmail.com (cdrick) Date: Thu, 14 Feb 2008 17:23:55 +0100 Subject: MATableComponent - using condition on cells In-Reply-To: References: Message-ID: I solved my problem by putting the condition on hte table. It's not directly on the cell but that's ok for now... C?drick From mathk.sue at gmail.com Tue Feb 19 19:18:13 2008 From: mathk.sue at gmail.com (Mathieu Suen) Date: Tue, 19 Feb 2008 19:18:13 +0100 Subject: Why OrdeeredCollection>>removeAll Message-ID: <25B22355-7EEF-440B-AA02-BD2610E46150@gmail.com> Hi, When I look at the code of OrderedCollection>>removeAll from de Squeak- Web image I see: removeAll "remove all elements quickly" self become: OrderedCollection new It seem to me that is not a fast way of removing all element of the collection. I would rather do: removeAll self setCollection: (Array new: self size) I do not see the #removeAll method in other image and by looking at the sender it seem that is aida who use it. Mth From renggli at iam.unibe.ch Tue Feb 19 19:25:23 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 19 Feb 2008 19:25:23 +0100 Subject: Why OrdeeredCollection>>removeAll In-Reply-To: <25B22355-7EEF-440B-AA02-BD2610E46150@gmail.com> References: <25B22355-7EEF-440B-AA02-BD2610E46150@gmail.com> Message-ID: <845A828F-8FD9-4A19-85CA-A772D69A4E8A@iam.unibe.ch> > When I look at the code of OrderedCollection>>removeAll from de > Squeak- > Web image I see: > > removeAll > "remove all elements quickly" > self become: OrderedCollection new I don't have such a method in my image. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Tue Feb 19 19:26:45 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 19 Feb 2008 19:26:45 +0100 Subject: Why OrdeeredCollection>>removeAll In-Reply-To: <25B22355-7EEF-440B-AA02-BD2610E46150@gmail.com> References: <25B22355-7EEF-440B-AA02-BD2610E46150@gmail.com> Message-ID: <459C06F4-81EF-4074-9B5D-2B2247D9B2EB@iam.unibe.ch> > I do not see the #removeAll method in other image and by looking at > the sender it seem that is aida who use it. Aha, ok. Then you should post this to the aida mailing list. I guess #removeAll is implemented like this because it needs to be platform independent. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From cdrick65 at gmail.com Tue Feb 19 19:27:56 2008 From: cdrick65 at gmail.com (cdrick) Date: Tue, 19 Feb 2008 19:27:56 +0100 Subject: Why OrdeeredCollection>>removeAll In-Reply-To: <845A828F-8FD9-4A19-85CA-A772D69A4E8A@iam.unibe.ch> References: <25B22355-7EEF-440B-AA02-BD2610E46150@gmail.com> <845A828F-8FD9-4A19-85CA-A772D69A4E8A@iam.unibe.ch> Message-ID: It's Aida related ... C?drick 2008/2/19, Lukas Renggli : > > When I look at the code of OrderedCollection>>removeAll from de > > Squeak- > > Web image I see: > > > > removeAll > > "remove all elements quickly" > > self become: OrderedCollection new > > I don't have such a method in my image. > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From renggli at iam.unibe.ch Tue Feb 19 19:28:42 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 19 Feb 2008 19:28:42 +0100 Subject: [Pier] PRMeta questions/clarifications - Is it transposable to MADescriptions ? In-Reply-To: References: Message-ID: <80202292-8E1B-44BF-BCA1-275E428CE5B5@iam.unibe.ch> >>> Also, would PRMeta extensions to PRStructure could be added to >>> MADescription ? >> >> Yes, that could be made. > > that makes me wonder why there are 2 separate classes like MAObject > and PRObject. They look the same to me. Is it for maintenance purpose > ? MAObject has comparison built in. PRObject has deep copying built in. Otherwise they could be merged indeed. I guess this separation has historical reasons only. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ronaldoferraz at gmail.com Sat Feb 23 19:28:21 2008 From: ronaldoferraz at gmail.com (Ronaldo Ferraz) Date: Sat, 23 Feb 2008 15:28:21 -0300 Subject: Json visitor and MAFileModel Message-ID: Hello-- Newbie here. :-) I'm writing a Json visitor for a project and I'd like to stream MAFileModel on it but I'm at a loss about how to proceed. For most simple descriptions, streaming the value is just a matter of rendering the value according to the description using the normal visitor pattern. However, MAFileModel is a full-blown class and doesn't have a corresponding description to guide the process. What would be the most interesting path here: add the required descriptions to the classes or just go ahead and stream the attributes? It seems to me that the second options make the Json visitor to tightly coupled to the MAFileModel class. On the other hand, adding the descriptions may not be that interesting because it would mean changing a Magritte base class. Any suggestions? Thanks. :-) -- Ronaldo Ferraz http://log.reflectivesurface.com From girba at iam.unibe.ch Sat Feb 23 19:28:54 2008 From: girba at iam.unibe.ch (Tudor Girba) Date: Sat, 23 Feb 2008 19:28:54 +0100 Subject: strange behavior for edit design? Message-ID: <7B3291EB-A123-44E4-BE59-5FC45B8F755E@iam.unibe.ch> Hi, Here is what I did: - I downloaded the latest Seaside.app - Started Pier in the browser - Edit Design - Save This results in a page that shows the pages referenced in the Environment as missing. The problem seems to be that the relative links in the Environment are now solved differently. Before, they were solved relative to the Environment, but now they seem to be solved relative to the page from where I invoke Edit Design. I figured this out because if you sy Edit Design from the Environment page, the links are resolved correctly :). So, is this the intended behavior? If it is, it means that we have to specify the Environment with absolute links. Cheers, Doru -- www.tudorgirba.com www.tudorgirba.com/blog "Sometimes the best solution is not the best solution." From girba at iam.unibe.ch Sat Feb 23 20:05:22 2008 From: girba at iam.unibe.ch (Tudor Girba) Date: Sat, 23 Feb 2008 20:05:22 +0100 Subject: prmenu rocks :) Message-ID: Hi, I just gave the new PRMenu a try. It is so cool :) Cheers, Doru -- www.tudorgirba.com www.tudorgirba.com/blog "What we can governs what we wish." From renggli at iam.unibe.ch Sat Feb 23 22:03:36 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sat, 23 Feb 2008 22:03:36 +0100 Subject: Json visitor and MAFileModel In-Reply-To: References: Message-ID: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> > For most simple descriptions, streaming the value is just a matter of > rendering the value according to the description using the normal > visitor pattern. However, MAFileModel is a full-blown class and > doesn't have a corresponding description to guide the process. Yes, MAFileDescription is sort of a primitive type, mainly because in the user interface it appears as a single upload/download field. > What would be the most interesting path here: add the required > descriptions to the classes or just go ahead and stream the > attributes? I guess it would make sense to add these descriptions as a class extension. This is one of most useful techniques of Magritte, that you can attach new descriptions to any class in the system. I use this all the time. > It seems to me that the second options make the Json visitor to > tightly coupled to the MAFileModel class. On the other hand, adding > the descriptions may not be that interesting because it would mean > changing a Magritte base class. I don't know if it makes sense to add these descriptions to the core at the moment? Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Sat Feb 23 22:04:59 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sat, 23 Feb 2008 22:04:59 +0100 Subject: strange behavior for edit design? In-Reply-To: <7B3291EB-A123-44E4-BE59-5FC45B8F755E@iam.unibe.ch> References: <7B3291EB-A123-44E4-BE59-5FC45B8F755E@iam.unibe.ch> Message-ID: > So, is this the intended behavior? If it is, it means that we have to > specify the Environment with absolute links. Looks like a new bug. I will have a look. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ronaldoferraz at gmail.com Sun Feb 24 00:40:32 2008 From: ronaldoferraz at gmail.com (Ronaldo Ferraz) Date: Sat, 23 Feb 2008 20:40:32 -0300 Subject: Json visitor and MAFileModel In-Reply-To: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> Message-ID: Hi, Lukas-- > Yes, MAFileDescription is sort of a primitive type, mainly because in > the user interface it appears as a single upload/download field. That makes sense. In fact, the way I was using it until now it didn't matter but I will have to keep a little more state for the new functionality I'm developing, hence the question. > I guess it would make sense to add these descriptions as a class > extension. This is one of most useful techniques of Magritte, that you > can attach new descriptions to any class in the system. I use this all > the time. I'm a bit new to Smalltalk/Squeak/Magritte terminology and I'm not sure what class extensions mean. May I bother you for a small example and a pointer for more explanations? > I don't know if it makes sense to add these descriptions to the core > at the moment? That's what I thought but I was wondering about the tight coupling. But as you mentioned, it's likely class extensions will fit what I need--if and when I understand them. :-) Cheers, Ronaldo From renggli at iam.unibe.ch Sun Feb 24 09:17:14 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 24 Feb 2008 09:17:14 +0100 Subject: Json visitor and MAFileModel In-Reply-To: References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> Message-ID: <40948DA6-E467-4A0F-A0DF-07B57FE2B5AB@iam.unibe.ch> >> I guess it would make sense to add these descriptions as a class >> extension. This is one of most useful techniques of Magritte, that >> you >> can attach new descriptions to any class in the system. I use this >> all >> the time. > > I'm a bit new to Smalltalk/Squeak/Magritte terminology and I'm not > sure what class extensions mean. May I bother you for a small example > and a pointer for more explanations? This is when you add a method to a foreign class. In your case, your own package adds some description methods to the foreign class MAFileModel. To tell Monticello that these methods belong to your code and not to Magritte-Core you put them into a protocol (method category) named *mypackagename. Does that help? Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ronaldoferraz at gmail.com Sun Feb 24 14:27:03 2008 From: ronaldoferraz at gmail.com (Ronaldo Ferraz) Date: Sun, 24 Feb 2008 10:27:03 -0300 Subject: Json visitor and MAFileModel In-Reply-To: <40948DA6-E467-4A0F-A0DF-07B57FE2B5AB@iam.unibe.ch> References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> <40948DA6-E467-4A0F-A0DF-07B57FE2B5AB@iam.unibe.ch> Message-ID: Ah, I see. I was already using that but my lack of familiarity with the terms led me to think it was something else. :-) By the way, is there a way to add instance variable using this method? I won't need them for this particular case but I can't find any information about that and I'll need it for another part of the application. Thanks again for the help. I hope you don't mind my eventual cluelessness. :-) Cheers, Ronaldo On 2/24/08, Lukas Renggli wrote: > >> I guess it would make sense to add these descriptions as a class > >> extension. This is one of most useful techniques of Magritte, that > >> you > >> can attach new descriptions to any class in the system. I use this > >> all > >> the time. > > > > I'm a bit new to Smalltalk/Squeak/Magritte terminology and I'm not > > sure what class extensions mean. May I bother you for a small example > > and a pointer for more explanations? > > This is when you add a method to a foreign class. In your case, your > own package adds some description methods to the foreign class > MAFileModel. To tell Monticello that these methods belong to your code > and not to Magritte-Core you put them into a protocol (method > category) named *mypackagename. > > Does that help? > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Ronaldo Ferraz http://log.reflectivesurface.com From renggli at iam.unibe.ch Sun Feb 24 16:02:54 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 24 Feb 2008 16:02:54 +0100 Subject: Json visitor and MAFileModel In-Reply-To: References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> <40948DA6-E467-4A0F-A0DF-07B57FE2B5AB@iam.unibe.ch> Message-ID: > By the way, is there a way to add instance variable using this method? > I won't need them for this particular case but I can't find any > information about that and I'll need it for another part of the > application. No that is not possible, unfortunately. Most Magritte/Pier objects however include a property dictionary for exactly that reason. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ronaldoferraz at gmail.com Sun Feb 24 16:21:01 2008 From: ronaldoferraz at gmail.com (Ronaldo Ferraz) Date: Sun, 24 Feb 2008 12:21:01 -0300 Subject: Json visitor and MAFileModel In-Reply-To: References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> <40948DA6-E467-4A0F-A0DF-07B57FE2B5AB@iam.unibe.ch> Message-ID: Okay. Thanks for the answers. I believe I now know where I'm going. :-) Cheers, Ronaldo On 2/24/08, Lukas Renggli wrote: > > By the way, is there a way to add instance variable using this method? > > I won't need them for this particular case but I can't find any > > information about that and I'll need it for another part of the > > application. > > No that is not possible, unfortunately. Most Magritte/Pier objects > however include a property dictionary for exactly that reason. > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Ronaldo Ferraz http://log.reflectivesurface.com From ronaldoferraz at gmail.com Sun Feb 24 16:24:50 2008 From: ronaldoferraz at gmail.com (Ronaldo Ferraz) Date: Sun, 24 Feb 2008 12:24:50 -0300 Subject: Json visitor and MAFileModel In-Reply-To: References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> <40948DA6-E467-4A0F-A0DF-07B57FE2B5AB@iam.unibe.ch> Message-ID: Okay. Thanks for the answers. I believe I now know where I'm going. :-) Cheers, Ronaldo On 2/24/08, Lukas Renggli wrote: > > By the way, is there a way to add instance variable using this method? > > I won't need them for this particular case but I can't find any > > information about that and I'll need it for another part of the > > application. > > No that is not possible, unfortunately. Most Magritte/Pier objects > however include a property dictionary for exactly that reason. > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Ronaldo Ferraz http://log.reflectivesurface.com From ronaldoferraz at gmail.com Sun Feb 24 21:38:57 2008 From: ronaldoferraz at gmail.com (Ronaldo Ferraz) Date: Sun, 24 Feb 2008 17:38:57 -0300 Subject: Json visitor and MAFileModel In-Reply-To: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> Message-ID: Me and my questions again. :-) Altough adding descriptions would not make sense to the core, would it make sense to change MAFileModel into a MAObject? That would make it easier to build extensions on top of it. Cheers, Ronaldo On 2/23/08, Lukas Renggli wrote: > > For most simple descriptions, streaming the value is just a matter of > > rendering the value according to the description using the normal > > visitor pattern. However, MAFileModel is a full-blown class and > > doesn't have a corresponding description to guide the process. > > Yes, MAFileDescription is sort of a primitive type, mainly because in > the user interface it appears as a single upload/download field. > > > What would be the most interesting path here: add the required > > descriptions to the classes or just go ahead and stream the > > attributes? > > I guess it would make sense to add these descriptions as a class > extension. This is one of most useful techniques of Magritte, that you > can attach new descriptions to any class in the system. I use this all > the time. > > > It seems to me that the second options make the Json visitor to > > tightly coupled to the MAFileModel class. On the other hand, adding > > the descriptions may not be that interesting because it would mean > > changing a Magritte base class. > > I don't know if it makes sense to add these descriptions to the core > at the moment? > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Ronaldo Ferraz http://log.reflectivesurface.com From renggli at iam.unibe.ch Sun Feb 24 22:56:07 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 24 Feb 2008 22:56:07 +0100 Subject: Json visitor and MAFileModel In-Reply-To: References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> Message-ID: <69A1B7AF-C0D0-4B21-A0DE-191CB641D6EA@iam.unibe.ch> > Altough adding descriptions would not make sense to the core, would it > make sense to change MAFileModel into a MAObject? That would make it > easier to build extensions on top of it. The idea of MAFileModel is that you can easily subclass it to provide your own strategy to store and retrieve the file. MAFileDescription takes the #kind: as an argument, so you can tell it what class to instantiate. Maybe you can give an example, why you need to add new values to the existing MAFileModel subclasses? Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ronaldoferraz at gmail.com Mon Feb 25 01:02:28 2008 From: ronaldoferraz at gmail.com (Ronaldo Ferraz) Date: Sun, 24 Feb 2008 21:02:28 -0300 Subject: Json visitor and MAFileModel In-Reply-To: <69A1B7AF-C0D0-4B21-A0DE-191CB641D6EA@iam.unibe.ch> References: <5D72F2CB-B5F7-46B5-9FB8-3860F5177473@iam.unibe.ch> <69A1B7AF-C0D0-4B21-A0DE-191CB641D6EA@iam.unibe.ch> Message-ID: Sorry to reshash the subject but part of the problem has to do with the multiple versions (thumbnaills, etc) of a file that I mentioned briefly in the Seaside list. i went to subclass MAFileModel but realized that because I was using a memory representation in development to make things easier to test and an external representation in development, I'd have to choose to subclass only one and use it always. Maybe I should not be bothered so much but I wondered if it wouldn't be more interesting to keep the memory and external representations similar. But I was thinking about it after I sent the e-mail and maybe it would be more interesting to write a new type of description to handle that. I don't know, however, how that would play with the rest of the system. I believe Magritte makes it easy to design new descriptions, right? Anyway, I'm new to Magritte so maybe my models are not as well designed as they should be. Any ideas wil be appreciated. Cheers, Ronaldo On 2/24/08, Lukas Renggli wrote: > > Altough adding descriptions would not make sense to the core, would it > > make sense to change MAFileModel into a MAObject? That would make it > > easier to build extensions on top of it. > > The idea of MAFileModel is that you can easily subclass it to provide > your own strategy to store and retrieve the file. MAFileDescription > takes the #kind: as an argument, so you can tell it what class to > instantiate. > > Maybe you can give an example, why you need to add new values to the > existing MAFileModel subclasses? > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Ronaldo Ferraz http://log.reflectivesurface.com