Hi Cédrick,
> I'm still doing tests on how to model my exprience attributes with > Magritte... I don't avance as I'd like but I get a better > understanding on how Magritte and Seaside works... I think I > mainly have to use existing descriptions while creating specific > views as you suggested to me whereas at start, I was trying to do > specific descriptions... > > ExpAttribute are a kind of proxy on a real value (traditional > attribute) to which I add a simple attribute (range) that reflects > an analyses (traduces the relevance of the attribute in the > occurence of the event). > > I hope on monday I'll be able to show you something better... > I've made some hacks in Magritte like the possibility to put > descriptions in a collection in the class side ( not sure useful > though :) but in that way I can see and change all of them in one > place). Also I added a revert (or cancel) buttons to > MAOneToOneComponent so as to cancel the memento and choose another > classe... the descriptions are already within a collection accessible from the class-side, even-tough you define them within separate methods. Send the message #description to your class and you get your collection. Well actually it is a bit more, you get an instance of MAPriorityContainer supporting the whole collection protocol. > I ve tried to adapt what Michel Bany did (http:// > cdrick.seasidehosting.st/seaside/LiveTests the scrollbar) to the > new renderer to have a MARangeComponent compatible with all browser > but without success... Does it seems possible to you as it uses > some functions of seaside Async ? anyway, I'll see that point > later... No, MARangeComponent only works in KHTML based browsers, such as Safari or Konqueror. It is based on the draft of the next XHTML standard and it gently degenerates to a plain input box if not supported. I don't use SeasideAsync, there are a few experimental controls using script.aculo.us. This library works nicely together with seasides canvas framework and would also provide a cross-browser compatible slider, that could be integrated if I (or somebody else) had the time. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
Hi :)
> the descriptions are already within a collection accessible from the > class-side, even-tough you define them within separate methods. Send > the message #description to your class and you get your collection. > Well actually it is a bit more, you get an instance of > MAPriorityContainer supporting the whole collection protocol. Actually I've been learning quite a bit how descriptions are generated as it's necessary for what I want to achieve. To sum up, I have an attribute which is a container (wrapper) that points to an object model (domain) and to an analysis element (a simple object that has a value) nb: for now I have two parallel hierarchies. One for ExpAttributes and one for the domain objects. ExpAttribute model:= aMAPerson analyse:= anAnalyse All my domain objects are meta described as the analyse one. So now I have an experience that is composed of ExpAttribute and for these I'd like to dynamically generate the description what is not so easy as the model element is not of the same type for all ExpAttribute (I only differentiate Attribute that are Leaf (equivalent to Magritte descriptions minus MARelationDescription...) and those that are composed (equivalent to MARelationDescription)). Whereas on your slides, "dynamic descriptions" are build from existing descriptions on class side, here I need to build them according to the object wrapped in the ExpAttribute>>model So that is why I was interested in description generation. Is it possible for instance to overwrite description like: Model>>description container := super description <- return a MAPriorityContainer container add: aNewDescription etc... doing like that, I had a problem because descriptions are added over and over after each new session because MACachedBuilder keeps a cache with the previous descriptions. I've overwritten in my ExpAttribute class description ^MABuilder default build: self It now works but not sure it's a good solution... What is the purpose of MACachedBuilder instead of MABuilder? avoiding creating descriptions over and over? Also I was thinking of doing that: Model>>description ^MASpecificBuilder new build: self So before going further, can you tell me if it is a good practice - to redefine description on the instance side ? - to use a specific builder ? Is there a better way to create dynamically descriptions according to the Magritte framework (when some descriptions are accessible in the class side and others in class side of other objects class side...)... Maybe I should do that with a MAScafolder ?? >> I ve tried to adapt what Michel Bany did (http:// >> cdrick.seasidehosting.st/seaside/LiveTests the scrollbar) to the >> new renderer to have a MARangeComponent compatible with all browser >> but without success... Does it seems possible to you as it uses >> some functions of seaside Async ? anyway, I'll see that point later... > > > No, MARangeComponent only works in KHTML based browsers, such as > Safari or Konqueror. It is based on the draft of the next XHTML > standard and it gently degenerates to a plain input box if not > supported. as provided in the exemple (http:// cdrick.seasidehosting.st/seaside/LiveTests) to WARenderCanvas. It's a live div but Michel Bany (I think he made that) did it for WAHtmlRenderer. WAHtmlRenderer>>scrollbarWithHeight: heightNumber size: sizeNumber liveCallback: liveBlock | id uri | id := self ensureId. self attributeAt: 'style' put: 'position: relative; left: -3px; width: 19px; overflow: auto; height: ', heightNumber displayString 'px'. self div: [self attributeAt: 'style' put: 'width: 1px; height: ', sizeNumber displayString, 'px'. self div: '']. uri := self **urlForLiveRequest:** [:t :h | liveBlock value: t asInteger value: h]. self script: 'document.getElementById(' , id asString printString , ').onscroll = liveScroll(' , id asString printString , ', ' , (self class encode: **uri** asString) printString , ')' I just started to do it "like" you did with MARangeComponent (renderEditorOn: and updateScript) so as to adapt to WARenderCanvas but I didnt' succeed yet and as it is not that important, I gave up for now ;)... > > I don't use SeasideAsync, there are a few experimental controls using > script.aculo.us. This library works nicely together with seasides > canvas framework and would also provide a cross-browser compatible > slider, that could be integrated if I (or somebody else) had the time. ok didn't know that :) where can I find the javascript code for that ? see you Cédrick -------------------------------- L'ENIT vous invite a sa journee portes ouvertes le 17 mars 2006 de 13h30 a 19h30 Enit , 47 avenue d'Azereix 65000 Tarbes Bus N°1, arret ENI _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
Hi Cédrick,
> To sum up, I have an attribute which is a container (wrapper) that > points to an object model (domain) and to an analysis element (a > simple object that has a value) > nb: for now I have two parallel hierarchies. One for ExpAttributes > and one for the domain objects. > > ExpAttribute > model:= aMAPerson > analyse:= anAnalyse > > All my domain objects are meta described as the analyse one. > > So now I have an experience that is composed of ExpAttribute and > for these I'd like to dynamically generate the description what is > not so easy as the model element is not of the same type for all > ExpAttribute (I only differentiate Attribute that are Leaf > (equivalent to Magritte descriptions minus > MARelationDescription...) and those that are composed (equivalent > to MARelationDescription)). > > Whereas on your slides, "dynamic descriptions" are build from > existing descriptions on class side, here I need to build them > according to the object wrapped in the ExpAttribute>>model Mhh ... it is a bit hard to understand how the objects play together, maybe some diagram could help to understand your object model? > So that is why I was interested in description generation. Is it > possible for instance to overwrite description like: > > Model>>description > container := super description <- return a MAPriorityContainer > container add: aNewDescription etc... Yes, it is common to do something like this. You can always override #description on the class- or on the instance-side of any model. > I had a problem because descriptions are added over and over after > each new session because MACachedBuilder keeps a cache with the > previous descriptions. Hehe, I thought I said that somewhere in the slides: you have to manually make a copy of your original description, else you modify the original description that is cached by Magritte. Model>>description container := super description copy. container add: aNewDescription > What is the purpose of MACachedBuilder instead of MABuilder? > avoiding creating descriptions over and over? Yes, the current way of creating descriptions is not really efficient. I have to manually collect and compose the descriptions from special methods, taking inheritance and overrides into play, etc. This will become simpler as soon as Pragmas will be standard in Squeak ;-) > Model>>description > ^MASpecificBuilder new build: self > > So before going further, can you tell me if it is a good practice > - to redefine description on the instance side ? > - to use a specific builder ? > > Is there a better way to create dynamically descriptions according > to the Magritte framework (when some descriptions are accessible in > the class side and others in class side of other objects class > side...)... Yes, you can do that. It is possible hook for Magritte, however I never really used it myself. I prefer to do static stuff in methods on the class-side and let Magritte cache it, and to do dynamic stuff on the instance-side and take a copy of what Magritte returns as a prototype. > Maybe I should do that with a MAScafolder ?? Yes, MAScaffolder is doing it the way I described. >>> I ve tried to adapt what Michel Bany did (http:// >>> cdrick.seasidehosting.st/seaside/LiveTests the scrollbar) to >>> the new renderer to have a MARangeComponent compatible with all >>> browser but without success... Does it seems possible to you >>> as it uses some functions of seaside Async ? anyway, I'll see >>> that point later... >> >> No, MARangeComponent only works in KHTML based browsers, such as >> Safari or Konqueror. It is based on the draft of the next XHTML >> standard and it gently degenerates to a plain input box if not >> supported. > > Yes I knew that... but what I tried was to adapt the scrollbar > component as provided in the exemple (http:// > cdrick.seasidehosting.st/seaside/LiveTests) to WARenderCanvas. It's > a live div but Michel Bany (I think he made that) did it for > WAHtmlRenderer. I never worked much with the Seaside life framework. I do only advertise script.aculo.us and they have a slider that works pretty well, it is not integrated into Seaside yet but that should be simple. >> I don't use SeasideAsync, there are a few experimental controls >> using script.aculo.us. This library works nicely together with >> seasides canvas framework and would also provide a cross-browser >> compatible slider, that could be integrated if I (or somebody >> else) had the time. > > ok didn't know that :) > where can I find the javascript code for that ? Demos: http://scriptaculous.seasidehosting.st Source: http://www.squeaksource.com/Seaside.html Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |