Custom button in GTPlayground

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

Custom button in GTPlayground

Peter Uhnak
Hi,

(how) can one add a new button to GTPlayground, next to the "do it all and go" and "remote publish"?

I want to add integration with Gists (because I find the remote publish only remotely useful),
however it seems that the buttons are hard coded.

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

Re: Custom button in GTPlayground

Henrik Nergaard
GTPlayground>>#codeIn: builds the buttons

-----Original Message-----
From: Moose-dev [mailto:[hidden email]] On Behalf Of Peter Uhnak
Sent: Saturday, August 27, 2016 5:43 PM
To: Moose-related development <[hidden email]>
Subject: [Moose-dev] Custom button in GTPlayground

Hi,

(how) can one add a new button to GTPlayground, next to the "do it all and go" and "remote publish"?

I want to add integration with Gists (because I find the remote publish only remotely useful), however it seems that the buttons are hard coded.

Thanks,
Peter
_______________________________________________
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: Custom button in GTPlayground

Peter Uhnak
On Sat, Aug 27, 2016 at 04:16:17PM +0000, Henrik Nergaard wrote:
> GTPlayground>>#codeIn: builds the buttons

As I've said:

> however it seems that the buttons are hard coded.

I don't see how I can add them without changing the source code.

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

Re: Custom button in GTPlayground

Uko2

> On 27 Aug 2016, at 19:09, Peter Uhnak <[hidden email]> wrote:
>
> On Sat, Aug 27, 2016 at 04:16:17PM +0000, Henrik Nergaard wrote:
>> GTPlayground>>#codeIn: builds the buttons
>
> As I've said:
>
>> however it seems that the buttons are hard coded.
>
> I don't see how I can add them without changing the source code.

<troll-mode>

use metalinks ;)

</troll-mode>

>
> Peter
> _______________________________________________
> 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: Custom button in GTPlayground

Aliaksei Syrel
Inspector is just a Morph. Button is also just a Morph :)

so it would be very simple, for example (generated randomly, just to show the idea)

inspector submorphs second submorphs first submorphs third submorphs first submorphs second addMorphBack: button.

Cheers,
Alex

On 27 August 2016 at 21:05, Yuriy Tymchuk <[hidden email]> wrote:

> On 27 Aug 2016, at 19:09, Peter Uhnak <[hidden email]> wrote:
>
> On Sat, Aug 27, 2016 at 04:16:17PM +0000, Henrik Nergaard wrote:
>> GTPlayground>>#codeIn: builds the buttons
>
> As I've said:
>
>> however it seems that the buttons are hard coded.
>
> I don't see how I can add them without changing the source code.

<troll-mode>

use metalinks ;)

</troll-mode>

>
> Peter
> _______________________________________________
> 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


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

Re: Custom button in GTPlayground

Peter Uhnak
In reply to this post by Uko2
On Sat, Aug 27, 2016 at 09:05:24PM +0200, Yuriy Tymchuk wrote:

>
> > On 27 Aug 2016, at 19:09, Peter Uhnak <[hidden email]> wrote:
> >
> > On Sat, Aug 27, 2016 at 04:16:17PM +0000, Henrik Nergaard wrote:
> >> GTPlayground>>#codeIn: builds the buttons
> >
> > As I've said:
> >
> >> however it seems that the buttons are hard coded.
> >
> > I don't see how I can add them without changing the source code.
>
> <troll-mode>
>
> use metalinks ;)
>
> </troll-mode>

Oh! You've just solved my problems with unloading code when I do custom overrides from startup scripts... :-D

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

Re: Custom button in GTPlayground

Peter Uhnak
In reply to this post by Aliaksei Syrel
On Sat, Aug 27, 2016 at 09:13:49PM +0200, Aliaksei Syrel wrote:
> Inspector is just a Morph. Button is also just a Morph :)
>
> so it would be very simple, for example (generated randomly, just to show
> the idea)
>
> inspector submorphs second submorphs first submorphs third submorphs first submorphs second addMorphBack: button.

Demeter is rolling in her grave. :-D

I'll go with metalinks... :)

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

Re: Custom button in GTPlayground

EstebanLM
In reply to this post by Aliaksei Syrel

On 27 Aug 2016, at 21:13, Aliaksei Syrel <[hidden email]> wrote:

Inspector is just a Morph. Button is also just a Morph :)

so it would be very simple, for example (generated randomly, just to show the idea)

inspector submorphs second submorphs first submorphs third submorphs first submorphs second addMorphBack: button.

if one day I accept a code like this in the image… please, fire me… I will understand it.

:P


Cheers,
Alex

On 27 August 2016 at 21:05, Yuriy Tymchuk <[hidden email]> wrote:

> On 27 Aug 2016, at 19:09, Peter Uhnak <[hidden email]> wrote:
>
> On Sat, Aug 27, 2016 at 04:16:17PM +0000, Henrik Nergaard wrote:
>> GTPlayground>>#codeIn: builds the buttons
>
> As I've said:
>
>> however it seems that the buttons are hard coded.
>
> I don't see how I can add them without changing the source code.

<troll-mode>

use metalinks ;)

</troll-mode>

>
> Peter
> _______________________________________________
> 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

_______________________________________________
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: Custom button in GTPlayground

Andrei Chis
In reply to this post by Peter Uhnak
Hi Peter.

Right now you can only add an action to the context menu by adding to the  class side of GTPlayground  a method annotated with <playgroundContextMenu> that takes a parameter and returns a list of glamour actions. The parameter will be the actual instance of the playground. You can find an example in #contextMenuBasicActionsFor:

GTPlayground class>>#customActions: aPlayground
<playgroundContextMenu>
^ {
GLMGenericAction new
action: [ self inform: 'action' ];
icon: GLMUIThemeExtraIcons glamorousBrowse;
title: 'Action' }

Indeed we should have a similar  option for  customizing the buttons from the toolbar.

Cheers,
Andrei

On Sat, Aug 27, 2016 at 5:42 PM, Peter Uhnak <[hidden email]> wrote:
Hi,

(how) can one add a new button to GTPlayground, next to the "do it all and go" and "remote publish"?

I want to add integration with Gists (because I find the remote publish only remotely useful),
however it seems that the buttons are hard coded.

Thanks,
Peter
_______________________________________________
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: Custom button in GTPlayground

Peter Uhnak


On Mon, Aug 29, 2016 at 12:26 PM, Andrei Chis <[hidden email]> wrote:
Hi Peter.

Right now you can only add an action to the context menu by adding to the  class side of GTPlayground  a method annotated with <playgroundContextMenu> that takes a parameter and returns a list of glamour actions. The parameter will be the actual instance of the playground. You can find an example in #contextMenuBasicActionsFor:

GTPlayground class>>#customActions: aPlayground
<playgroundContextMenu>
^ {
GLMGenericAction new
action: [ self inform: 'action' ];
icon: GLMUIThemeExtraIcons glamorousBrowse;
title: 'Action' }

Thanks, this is a good non-hacky solution for now. (besides, I am not going to use it that often so maybe it's better to be hidden in context menu).

Thanks!

Peter

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev