Extending an Existing GT Presentation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Extending an Existing GT Presentation

Sean P. DeNigris
Administrator
Is there a mechanism for this? Say I want to add some actions to SequenceableCollection's Items presentation without overriding the existing method...

Also, is there a canonical documentation for GT? I found the blog posts, and the presentation documentation in the Moose book, but nothing about GT's hooks (e.g. my question above).

Thanks!
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Extending an Existing GT Presentation

Sven Van Caekenberghe-2
'Spot' for 'gtInspectorPresentationOrder' and inspect the Pragma, you get a free code browser to go with it

> On 02 Sep 2016, at 18:18, Sean P. DeNigris <[hidden email]> wrote:
>
> Is there a mechanism for this? Say I want to add some actions to
> SequenceableCollection's Items presentation without overriding the existing
> method...
>
> Also, is there a canonical documentation for GT? I found the blog posts, and
> the presentation documentation in the Moose book, but nothing about GT's
> hooks (e.g. my question above).
>
> Thanks!
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Extending-an-Existing-GT-Presentation-tp4913845.html
> Sent from the Moose mailing list archive at Nabble.com.
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Extending an Existing GT Presentation

Sean P. DeNigris
Administrator
Sven Van Caekenberghe-2 wrote
'Spot' for 'gtInspectorPresentationOrder' and inspect the Pragma, you get a free code browser to go with it
As a start, is that simple advice documented anywhere! But beyond that, while fine for me in the simplest case, is that a real answer for newbies?
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Extending an Existing GT Presentation

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Sean P. DeNigris wrote
Is there a mechanism for this? Say I want to add some actions to SequenceableCollection's Items presentation without overriding the existing method...
Let me take a step back. The reason I want to do this is that I want to add context menu actions for items to generic presentations as seen in this screenshot:


The above is in a custom presentation. I want to add this same functionality to generic ones (e.g. SequenceableCollection)
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Extending an Existing GT Presentation

Tudor Girba-2
Hi Sean,

As of now, there is no option for extending one presentation. At the moment, you should create your own, and make it have a priority lower than the existing “Items" one. This will make your presentation appear first.

In the near future, we will also make all Inspector extensions toggle-able, like we did for the Spotter ones:
http://www.humane-assessment.com/blog/discovering-and-managing-spotter-extensions

Like this you will not have to override a method. You will create your own and disable the existing one.

Does this help?

Cheers,
Doru


> On Sep 2, 2016, at 7:50 PM, Sean P. DeNigris <[hidden email]> wrote:
>
> Sean P. DeNigris wrote
>> Is there a mechanism for this? Say I want to add some actions to
>> SequenceableCollection's Items presentation without overriding the
>> existing method...
>
> Let me take a step back. The reason I want to do this is that I want to add
> context menu actions for items to generic presentations as seen in this
> screenshot:
> <http://forum.world.st/file/n4913857/Screenshot_2016-09-02_13.png>
>
> The above is in a custom presentation. I want to add this same functionality
> to generic ones (e.g. SequenceableCollection)
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Extending-an-Existing-GT-Presentation-tp4913845p4913857.html
> Sent from the Moose mailing list archive at Nabble.com.
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"It's not what we do that matters most, it's how we do it."

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Extending an Existing GT Presentation

Sean P. DeNigris
Administrator
Tudor Girba-2 wrote
Does this help?
I was hoping for a hook like
    myGtItemsExtension: composite
        <gtInspectorExtend: #gtInspectorItemsIn:>

But I guess disabling and delegating isn't that much worse:
    myGtInspectorItemsIn: composite
        ...
        ^ (self gtInspectorItemsIn: composite)
                selectionAct: ...;
                yourself
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Extending an Existing GT Presentation

Tudor Girba-2
Hi,

> On Sep 3, 2016, at 9:28 PM, Sean P. DeNigris <[hidden email]> wrote:
>
> Tudor Girba-2 wrote
>> Does this help?
>
> I was hoping for a hook like
>    myGtItemsExtension: composite
>        <gtInspectorExtend: #gtInspectorItemsIn:>
>
> But I guess disabling and delegating isn't that much worse:
>    myGtInspectorItemsIn: composite
>        ...
>        ^ (self gtInspectorItemsIn: composite)
>                selectionAct: ...;
>                yourself

Exactly!

Doru

>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Extending-an-Existing-GT-Presentation-tp4913845p4913964.html
> Sent from the Moose mailing list archive at Nabble.com.
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.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.list.inf.unibe.ch/listinfo/moose-dev