Hi,
I have problems when updating my tabbed panels :'( After modifying the data on one panel I update several other panels, that are not necessarily connected together. Using only #update e.g. (browser paneNamed: #example) update. The data is correctly updated, but not the presentations. Based on the example #updateableBrowser I am showing the errors. 1) #when in the second list does not react. * If you start with an empty collection, the list does not appear, then if you add an element the list does not appear neither. * if you start with some elements, the list is there, but after removing all the elements the list does not disappear, and instead you have a SubscriptOutOfBounds error because of a tab index (this is my same scenario: tabbed panels) 2) #shouldValidate: what is the logic of this?. I tried to use it, but i got into problems on the selected item. I could only inspect the selected item of the panel using #shouldValidate. In the second panel -> selected item is nil or the value of the first panel. | browser collection | collection := GLMAnnouncingCollection new. collection add: 1. browser := GLMTabulator new. browser column: #automatic; column: #menu. browser act: [:b | b entity add: (b entity size + 1) ] entitled: 'Add an item in the collection'. browser act: [:b | b entity removeLast ] entitled: 'Remove last item from the collection'. browser act: [:b | b update ] entitled: 'Update complete browser'. browser transmit to: #automatic; andShow: [ :a | a title: 'Updated automatically'. a stackedArrangement. a list title: [:x | 'List: ', x size printString ]; shouldValidate: true; updateOn: GLMItemAdded from: #yourself; updateOn: GLMItemRemoved from: #yourself ]. browser transmit to: #menu; andShow: [ :a | a title: 'Updated via menu'. a list title: 'List'; when:[ :e| e size > 0 ]; act: [:p | p update ] entitled: 'Update'. a text title: 'Text'; act: [:p | p update] entitled: 'Update'. ]. browser openOn: collection Please some help. Best Regards, Veronica _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Veronica,
On 1 Dec 2011, at 17:37, Veronica Isabel Uquillas Gomez wrote: > Hi, > > I have problems when updating my tabbed panels :'( > After modifying the data on one panel I update several other panels, that are not necessarily connected together. > Using only #update e.g. (browser paneNamed: #example) update. > The data is correctly updated, but not the presentations. > > Based on the example #updateableBrowser I am showing the errors. > > 1) #when in the second list does not react. > * If you start with an empty collection, the list does not appear, then if you add an element the list does not appear neither. > * if you start with some elements, the list is there, but after removing all the elements the list does not disappear, and instead you have a SubscriptOutOfBounds error because of a tab index (this is my same scenario: tabbed panels) Thanks. This is indeed a problem. Please open a bug ticket with this part. > 2) #shouldValidate: what is the logic of this?. > I tried to use it, but i got into problems on the selected item. I could only inspect the selected item of the panel using #shouldValidate. In the second panel -> selected item is nil or the value of the first panel. shouldValidate is a special functionality that is under documented :). The idea is that sometimes we would like to give the presentation the option to validate the values of ports. This is particularly relevant for updates. For example: - suppose you have a list (1 2 3) and 3 is selected. That means that the value of the #selection port is 3. - if you remove 3 from the model and update the presentation, we would now want the value in the #selection port to be nil (or at least not 3). So, if you tell the list to "shouldValidate: true", then instead of 3 you will get nil. As an example, take a look at: |collection| collection := GLMAnnouncingCollection new. collection add: 1; add: 2; add: 3. GLMBasicExamples new validatingPresentation openOn: collection. Now, this validation is a little expensive, so by default, it is false. Cheers, Doru > > > | browser collection | > collection := GLMAnnouncingCollection new. > collection add: 1. > browser := GLMTabulator new. > browser column: #automatic; column: #menu. > browser act: [:b | b entity add: (b entity size + 1) ] entitled: 'Add an item in the collection'. > browser act: [:b | b entity removeLast ] entitled: 'Remove last item from the collection'. > browser act: [:b | b update ] entitled: 'Update complete browser'. > browser transmit to: #automatic; andShow: [ :a | > a title: 'Updated automatically'. > a stackedArrangement. > a list title: [:x | 'List: ', x size printString ]; > shouldValidate: true; > updateOn: GLMItemAdded from: #yourself; > updateOn: GLMItemRemoved from: #yourself ]. > browser transmit to: #menu; andShow: [ :a | > a title: 'Updated via menu'. > a list title: 'List'; > when:[ :e| e size > 0 ]; > act: [:p | p update ] entitled: 'Update'. > a text title: 'Text'; act: [:p | p update] entitled: 'Update'. ]. > browser openOn: collection > > > Please some help. > > Best Regards, > Veronica > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "What is more important: To be happy, or to make happy?" _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Doru,
I entered the issue.. but just noticed that i wrote component-mondrian (oops) Cheers, Veronica On 01 Dec 2011, at 18:33, Tudor Girba wrote: > Hi Veronica, > > On 1 Dec 2011, at 17:37, Veronica Isabel Uquillas Gomez wrote: > >> Hi, >> >> I have problems when updating my tabbed panels :'( >> After modifying the data on one panel I update several other panels, that are not necessarily connected together. >> Using only #update e.g. (browser paneNamed: #example) update. >> The data is correctly updated, but not the presentations. >> >> Based on the example #updateableBrowser I am showing the errors. >> >> 1) #when in the second list does not react. >> * If you start with an empty collection, the list does not appear, then if you add an element the list does not appear neither. >> * if you start with some elements, the list is there, but after removing all the elements the list does not disappear, and instead you have a SubscriptOutOfBounds error because of a tab index (this is my same scenario: tabbed panels) > > Thanks. This is indeed a problem. Please open a bug ticket with this part. > >> 2) #shouldValidate: what is the logic of this?. >> I tried to use it, but i got into problems on the selected item. I could only inspect the selected item of the panel using #shouldValidate. In the second panel -> selected item is nil or the value of the first panel. > > shouldValidate is a special functionality that is under documented :). The idea is that sometimes we would like to give the presentation the option to validate the values of ports. This is particularly relevant for updates. For example: > - suppose you have a list (1 2 3) and 3 is selected. That means that the value of the #selection port is 3. > - if you remove 3 from the model and update the presentation, we would now want the value in the #selection port to be nil (or at least not 3). > > So, if you tell the list to "shouldValidate: true", then instead of 3 you will get nil. > > As an example, take a look at: > > |collection| > collection := GLMAnnouncingCollection new. > collection add: 1; add: 2; add: 3. > GLMBasicExamples new validatingPresentation openOn: collection. > > Now, this validation is a little expensive, so by default, it is false. > > Cheers, > Doru > > >> >> >> | browser collection | >> collection := GLMAnnouncingCollection new. >> collection add: 1. >> browser := GLMTabulator new. >> browser column: #automatic; column: #menu. >> browser act: [:b | b entity add: (b entity size + 1) ] entitled: 'Add an item in the collection'. >> browser act: [:b | b entity removeLast ] entitled: 'Remove last item from the collection'. >> browser act: [:b | b update ] entitled: 'Update complete browser'. >> browser transmit to: #automatic; andShow: [ :a | >> a title: 'Updated automatically'. >> a stackedArrangement. >> a list title: [:x | 'List: ', x size printString ]; >> shouldValidate: true; >> updateOn: GLMItemAdded from: #yourself; >> updateOn: GLMItemRemoved from: #yourself ]. >> browser transmit to: #menu; andShow: [ :a | >> a title: 'Updated via menu'. >> a list title: 'List'; >> when:[ :e| e size > 0 ]; >> act: [:p | p update ] entitled: 'Update'. >> a text title: 'Text'; act: [:p | p update] entitled: 'Update'. ]. >> browser openOn: collection >> >> >> Please some help. >> >> Best Regards, >> Veronica >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "What is more important: To be happy, or to make happy?" > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Thanks :)
Doru On 1 Dec 2011, at 19:02, Veronica Isabel Uquillas Gomez wrote: > Hi Doru, > > I entered the issue.. but just noticed that i wrote component-mondrian (oops) > > Cheers, > Veronica > > On 01 Dec 2011, at 18:33, Tudor Girba wrote: > >> Hi Veronica, >> >> On 1 Dec 2011, at 17:37, Veronica Isabel Uquillas Gomez wrote: >> >>> Hi, >>> >>> I have problems when updating my tabbed panels :'( >>> After modifying the data on one panel I update several other panels, that are not necessarily connected together. >>> Using only #update e.g. (browser paneNamed: #example) update. >>> The data is correctly updated, but not the presentations. >>> >>> Based on the example #updateableBrowser I am showing the errors. >>> >>> 1) #when in the second list does not react. >>> * If you start with an empty collection, the list does not appear, then if you add an element the list does not appear neither. >>> * if you start with some elements, the list is there, but after removing all the elements the list does not disappear, and instead you have a SubscriptOutOfBounds error because of a tab index (this is my same scenario: tabbed panels) >> >> Thanks. This is indeed a problem. Please open a bug ticket with this part. >> >>> 2) #shouldValidate: what is the logic of this?. >>> I tried to use it, but i got into problems on the selected item. I could only inspect the selected item of the panel using #shouldValidate. In the second panel -> selected item is nil or the value of the first panel. >> >> shouldValidate is a special functionality that is under documented :). The idea is that sometimes we would like to give the presentation the option to validate the values of ports. This is particularly relevant for updates. For example: >> - suppose you have a list (1 2 3) and 3 is selected. That means that the value of the #selection port is 3. >> - if you remove 3 from the model and update the presentation, we would now want the value in the #selection port to be nil (or at least not 3). >> >> So, if you tell the list to "shouldValidate: true", then instead of 3 you will get nil. >> >> As an example, take a look at: >> >> |collection| >> collection := GLMAnnouncingCollection new. >> collection add: 1; add: 2; add: 3. >> GLMBasicExamples new validatingPresentation openOn: collection. >> >> Now, this validation is a little expensive, so by default, it is false. >> >> Cheers, >> Doru >> >> >>> >>> >>> | browser collection | >>> collection := GLMAnnouncingCollection new. >>> collection add: 1. >>> browser := GLMTabulator new. >>> browser column: #automatic; column: #menu. >>> browser act: [:b | b entity add: (b entity size + 1) ] entitled: 'Add an item in the collection'. >>> browser act: [:b | b entity removeLast ] entitled: 'Remove last item from the collection'. >>> browser act: [:b | b update ] entitled: 'Update complete browser'. >>> browser transmit to: #automatic; andShow: [ :a | >>> a title: 'Updated automatically'. >>> a stackedArrangement. >>> a list title: [:x | 'List: ', x size printString ]; >>> shouldValidate: true; >>> updateOn: GLMItemAdded from: #yourself; >>> updateOn: GLMItemRemoved from: #yourself ]. >>> browser transmit to: #menu; andShow: [ :a | >>> a title: 'Updated via menu'. >>> a list title: 'List'; >>> when:[ :e| e size > 0 ]; >>> act: [:p | p update ] entitled: 'Update'. >>> a text title: 'Text'; act: [:p | p update] entitled: 'Update'. ]. >>> browser openOn: collection >>> >>> >>> Please some help. >>> >>> Best Regards, >>> Veronica >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> www.tudorgirba.com >> >> "What is more important: To be happy, or to make happy?" >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Value is always contextual." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |