I'm trying to set some actions on items in a glamour tree presentation, say:
actions: [:tree | tree selection xMenuItems ] But #selection called on the widget returns nil. Is this the expected behaviour? I managed to get what I wanted after diving in the object: actions: [:tree | tree selectionPath last xMenuItems ] -- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
I cannot reproduce this problem :).
Are you sure that you selected the item before hand? In any case, take a look at the code examples from MooseBrowsers. For example: MooseBrowsers>>navigationBrowserOn: scopeSelector ... actions: [ :tree | tree selection mooseInterestingEntity mooseFinderActions ] Cheers, Doru On Thu, May 27, 2010 at 11:35 AM, Simon Denier <[hidden email]> wrote: I'm trying to set some actions on items in a glamour tree presentation, say: _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On 27 mai 2010, at 13:01, Tudor Girba wrote: I cannot reproduce this problem :). Pretty sure yes, because the browser behavior relies on such a selection otherwise. But I can't find a simple example to reproduce the case. If you are really motivated, I can explain how to reproduce in my current example.
-- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Yes, I am interested. I never encountered this case. "tree selection"
gets the result from the #selection port. Please describe the scenario. Cheers, Doru On 27 May 2010, at 18:19, Simon Denier wrote: > > On 27 mai 2010, at 13:01, Tudor Girba wrote: > >> I cannot reproduce this problem :). >> >> Are you sure that you selected the item before hand? > > Pretty sure yes, because the browser behavior relies on such a > selection otherwise. > > But I can't find a simple example to reproduce the case. > > If you are really motivated, I can explain how to reproduce in my > current example. > > >> >> In any case, take a look at the code examples from MooseBrowsers. >> For example: >> >> MooseBrowsers>>navigationBrowserOn: scopeSelector >> ... >> actions: [ :tree | tree selection mooseInterestingEntity >> mooseFinderActions ] >> >> Cheers, >> Doru >> >> >> On Thu, May 27, 2010 at 11:35 AM, Simon Denier >> <[hidden email]> wrote: >> I'm trying to set some actions on items in a glamour tree >> presentation, say: >> >> actions: [:tree | tree selection xMenuItems ] >> >> But #selection called on the widget returns nil. Is this the >> expected behaviour? >> >> I managed to get what I wanted after diving in the object: >> >> actions: [:tree | tree selectionPath last xMenuItems ] >> >> >> -- >> Simon >> >> >> >> >> _______________________________________________ >> 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 > > -- > Simon > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Not knowing how to do something is not an argument for how it cannot be done." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On 27 mai 2010, at 20:04, Tudor Girba wrote: > Yes, I am interested. I never encountered this case. "tree selection" gets the result from the #selection port. > > Please describe the scenario. ok, 1) register the Moqam project from squeaksource MCHttpRepository location: 'http://www.squeaksource.com/moqam' user: '' password: '' 2) load the latest of Moqam-All Moqam-All-simondenier.44.mcz 3) open a MoosePanel, right-click on a moosemodel, and launch a 'Moqam mark browser bis' from the moqam category It opens a new browser 4) right click on any item in the tree, you should have two actions - 'inspect item' to launch an inspector on the current selection, but open an inspector on nil - 'inspect tree' to launch an inspector on the instance of GLMTreePresentation > > Cheers, > Doru > > > On 27 May 2010, at 18:19, Simon Denier wrote: > >> >> On 27 mai 2010, at 13:01, Tudor Girba wrote: >> >>> I cannot reproduce this problem :). >>> >>> Are you sure that you selected the item before hand? >> >> Pretty sure yes, because the browser behavior relies on such a selection otherwise. >> >> But I can't find a simple example to reproduce the case. >> >> If you are really motivated, I can explain how to reproduce in my current example. >> >> >>> >>> In any case, take a look at the code examples from MooseBrowsers. For example: >>> >>> MooseBrowsers>>navigationBrowserOn: scopeSelector >>> ... >>> actions: [ :tree | tree selection mooseInterestingEntity mooseFinderActions ] >>> >>> Cheers, >>> Doru >>> >>> >>> On Thu, May 27, 2010 at 11:35 AM, Simon Denier <[hidden email]> wrote: >>> I'm trying to set some actions on items in a glamour tree presentation, say: >>> >>> actions: [:tree | tree selection xMenuItems ] >>> >>> But #selection called on the widget returns nil. Is this the expected behaviour? >>> >>> I managed to get what I wanted after diving in the object: >>> >>> actions: [:tree | tree selectionPath last xMenuItems ] >>> >>> >>> -- >>> Simon >>> >>> >>> >>> >>> _______________________________________________ >>> 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 >> >> -- >> Simon >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "Not knowing how to do something is not an argument for how it cannot be done." > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ahh, the problem is that you also specify the #send: clause, which is
a post transformation that affects the value of the #selection port. Given that sometimes this value is nil, you get nil :). Cheers, Doru On 27 May 2010, at 22:17, Simon Denier wrote: > > On 27 mai 2010, at 20:04, Tudor Girba wrote: > >> Yes, I am interested. I never encountered this case. "tree >> selection" gets the result from the #selection port. >> >> Please describe the scenario. > > > ok, > > 1) register the Moqam project from squeaksource > > MCHttpRepository > location: 'http://www.squeaksource.com/moqam' > user: '' > password: '' > > 2) load the latest of Moqam-All > Moqam-All-simondenier.44.mcz > > 3) open a MoosePanel, right-click on a moosemodel, and launch a > 'Moqam mark browser bis' from the moqam category > It opens a new browser > > 4) right click on any item in the tree, you should have two actions > - 'inspect item' to launch an inspector on the current selection, > but open an inspector on nil > - 'inspect tree' to launch an inspector on the instance of > GLMTreePresentation > > >> >> Cheers, >> Doru >> >> >> On 27 May 2010, at 18:19, Simon Denier wrote: >> >>> >>> On 27 mai 2010, at 13:01, Tudor Girba wrote: >>> >>>> I cannot reproduce this problem :). >>>> >>>> Are you sure that you selected the item before hand? >>> >>> Pretty sure yes, because the browser behavior relies on such a >>> selection otherwise. >>> >>> But I can't find a simple example to reproduce the case. >>> >>> If you are really motivated, I can explain how to reproduce in my >>> current example. >>> >>> >>>> >>>> In any case, take a look at the code examples from MooseBrowsers. >>>> For example: >>>> >>>> MooseBrowsers>>navigationBrowserOn: scopeSelector >>>> ... >>>> actions: [ :tree | tree selection mooseInterestingEntity >>>> mooseFinderActions ] >>>> >>>> Cheers, >>>> Doru >>>> >>>> >>>> On Thu, May 27, 2010 at 11:35 AM, Simon Denier <[hidden email] >>>> > wrote: >>>> I'm trying to set some actions on items in a glamour tree >>>> presentation, say: >>>> >>>> actions: [:tree | tree selection xMenuItems ] >>>> >>>> But #selection called on the widget returns nil. Is this the >>>> expected behaviour? >>>> >>>> I managed to get what I wanted after diving in the object: >>>> >>>> actions: [:tree | tree selectionPath last xMenuItems ] >>>> >>>> >>>> -- >>>> Simon >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >>> -- >>> Simon >>> >>> >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> www.tudorgirba.com >> >> "Not knowing how to do something is not an argument for how it >> cannot be done." >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > Simon > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Reasonable is what we are accustomed with." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On 27 mai 2010, at 22:39, Tudor Girba wrote: > Ahh, the problem is that you also specify the #send: clause, which is a post transformation that affects the value of the #selection port. Given that sometimes this value is nil, you get nil :). Funnily, it's also what issue http://code.google.com/p/moose-technology/issues/detail?id=390 is about. I don't know how I came to this conclusion in the first place. Anyway, thanks > > Cheers, > Doru > > > On 27 May 2010, at 22:17, Simon Denier wrote: > >> >> On 27 mai 2010, at 20:04, Tudor Girba wrote: >> >>> Yes, I am interested. I never encountered this case. "tree selection" gets the result from the #selection port. >>> >>> Please describe the scenario. >> >> >> ok, >> >> 1) register the Moqam project from squeaksource >> >> MCHttpRepository >> location: 'http://www.squeaksource.com/moqam' >> user: '' >> password: '' >> >> 2) load the latest of Moqam-All >> Moqam-All-simondenier.44.mcz >> >> 3) open a MoosePanel, right-click on a moosemodel, and launch a 'Moqam mark browser bis' from the moqam category >> It opens a new browser >> >> 4) right click on any item in the tree, you should have two actions >> - 'inspect item' to launch an inspector on the current selection, but open an inspector on nil >> - 'inspect tree' to launch an inspector on the instance of GLMTreePresentation >> >> >>> >>> Cheers, >>> Doru >>> >>> >>> On 27 May 2010, at 18:19, Simon Denier wrote: >>> >>>> >>>> On 27 mai 2010, at 13:01, Tudor Girba wrote: >>>> >>>>> I cannot reproduce this problem :). >>>>> >>>>> Are you sure that you selected the item before hand? >>>> >>>> Pretty sure yes, because the browser behavior relies on such a selection otherwise. >>>> >>>> But I can't find a simple example to reproduce the case. >>>> >>>> If you are really motivated, I can explain how to reproduce in my current example. >>>> >>>> >>>>> >>>>> In any case, take a look at the code examples from MooseBrowsers. For example: >>>>> >>>>> MooseBrowsers>>navigationBrowserOn: scopeSelector >>>>> ... >>>>> actions: [ :tree | tree selection mooseInterestingEntity mooseFinderActions ] >>>>> >>>>> Cheers, >>>>> Doru >>>>> >>>>> >>>>> On Thu, May 27, 2010 at 11:35 AM, Simon Denier <[hidden email]> wrote: >>>>> I'm trying to set some actions on items in a glamour tree presentation, say: >>>>> >>>>> actions: [:tree | tree selection xMenuItems ] >>>>> >>>>> But #selection called on the widget returns nil. Is this the expected behaviour? >>>>> >>>>> I managed to get what I wanted after diving in the object: >>>>> >>>>> actions: [:tree | tree selectionPath last xMenuItems ] >>>>> >>>>> >>>>> -- >>>>> Simon >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> -- >>>> Simon >>>> >>>> >>>> >>>> _______________________________________________ >>>> Moose-dev mailing list >>>> [hidden email] >>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >>> >>> -- >>> www.tudorgirba.com >>> >>> "Not knowing how to do something is not an argument for how it cannot be done." >>> >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> >> -- >> Simon >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "Reasonable is what we are accustomed with." > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- Simon _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |