Skip to content

Callsite fix for Implementors in code presenter - #1939

Open
AlexisCnockaert wants to merge 2 commits into
pharo-spec:Pharo15from
AlexisCnockaert:call-fix
Open

Callsite fix for Implementors in code presenter#1939
AlexisCnockaert wants to merge 2 commits into
pharo-spec:Pharo15from
AlexisCnockaert:call-fix

Conversation

@AlexisCnockaert

Copy link
Copy Markdown
Contributor

So the SpCodePresenter calls the tool directly, allowing it to open in the method browser tabs

So the `SpCodePresenter` calls the tool directly, allowing it to open in the method browser tabs
@estebanlm
estebanlm self-requested a review August 31, 2026 21:24

@estebanlm estebanlm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the same problem as with doBrowseSenders. You should not call this directly but through SystemNavigation :)

@Ducasse

Ducasse commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

We should not use browse and other from system navigation. This architecture is a crap.
We should stop to use it and I wanted to discuss this during the meeting.

@Ducasse

Ducasse commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The StApplication should be enhanced and used and systemNavigation should not be used anymore.
All the logic behind using Smalltalk tools is lame.

@estebanlm

Copy link
Copy Markdown
Member

let's not change horses in the middle of the ride.
the fact that SystemNavigation is not a satisfactory answer (I agree) does not means not using just like that it is better.

in these cases,

  • if you use Smalltalk tools I need to register the tool to use globaly and I cannot adapt my application without changing the whole system behavior and this is obviously bad.
  • Using directly the presenter (StMethodBrowser), without intermediary, means the user is forced to use that presenter (and no other) to show a method list to the user.

with SystemNavigation (not great, but there), I just need to give a new instance of it and everything can be adapted as desired. E.g. I can make things like this (a popover, not a dialog), without touching the code presenter at all:

image

without using SystemNavigation I need to

  • subclass SpCodePresenter and override the methods to have my desired behavior, or...
  • re-do my own set of commands that will call other methods to get the desired behavior
  • ... (there has to be other ways, but none of them is easier than just subclassing SystemNavigation and give it to my presenter).

So, I will still ask to use SystemNavigation, even if not ideal.

  • This will avoid mix of designs for the same purpose on the system (SystemNavigation is already there, and used)
  • this will also concentrate the refactoring place when we decide how to change it.

And then yes, I would say we need to sit and design a solution better than what we have now :)

@estebanlm

Copy link
Copy Markdown
Member

Thinking in loud, the long term solution would be to decouple the command execution from the presenters, and let users define their own.
But I still think than for the moment we need to keep using SystemNavigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants