adding local repos to configuration browser

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

adding local repos to configuration browser

Peter Uhnak
Hi,

is it possible to hijack Configuration Browser and put there references to my own _local_ projects?

Thanks,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: adding local repos to configuration browser

Ben Coman
There is probably not a built in way - but its open source so definitely possible to "hijack" it in any way you please.  You just need to do some digging. Here is how...

1. Bring up halos on a useful button of Configuration Browser. Keep clicking to cycle through LabelMorph, AlignmentMorph until you get to PLuggableButtonMorph.

2. Click the spanner "Debug" icon and select "Inspect Morph".

3. Find somewhere to break the message sent when the button is clicked, which will vary with widget. In this case, you might change the /actionSelection/ from #action to #breakMe. 

Note to devs: It seems setting a value is a little broken in cleanly displaying the new value as it is typed.  Only a blank field is shown, but the value still gets set with <enter>.

4. Now click the button (btw, make sure a package is selected).    A debugger will open with "MNU #breakMe" at a #perform: message.

5. In the debugger, set /actionSelection/ back to #action, then <Restart> and step down to and then into the the #perform: message.  Continue stepping to dig in behind the app.

In this case you get to something interesting stepping into "actionHolder value value" , and further on where #selectedItem is sent searching on senders of #configurationList gives you a class of interest to look into.  Look on the class-side of this to discover methods returning default values and put halts in these to see where they are called from when Configuration Browser initialises, and work out how to add your own.

6. Work out how to make it easier for others to add their our _local_ projects and contribute back for inclusion into Pharo.

cheers -ben

On Sat, Mar 21, 2015 at 8:19 PM, Peter Uhnák <[hidden email]> wrote:
Hi,

is it possible to hijack Configuration Browser and put there references to my own _local_ projects?

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: adding local repos to configuration browser

Ben Coman
Note to devs: It seems setting a value is a little broken in cleanly displaying the new value as it is typed.  Only a blank field is shown, but the value still gets set with <enter>.

This only happened one time.  I cannot reproduce again.
cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: adding local repos to configuration browser

Sean P. DeNigris
Administrator
In reply to this post by Peter Uhnak
Peter Uhnák wrote
is it possible to hijack Configuration Browser and put there references to
my own _local_ projects?
In Pharo 4.0 (not sure about 3.0): MetacelloConfigurationBrowserPane availableRepositories add: myRepoUrlString
Cheers,
Sean