pharo
pharo copied to clipboard
BreakPoint MUST NOT refer to UIManager
requestConditionBlock
| script |
script := 'true'.
script := UIManager default
request: 'This expression will be evaluated in the context of the position of this breakpoint.
You can use variables, globals, `thisContext`, `self` and `super`.
`:=` and Pool variables are not supported`'
initialAnswer: script
title: 'Break on what condition?'.
script isEmptyOrNil ifTrue: [ CmdCommandAborted signal ].
^ self generateConditionBlockFrom: script
I will have a look at this in the next two weeks
There is no way of fixing that one right now. That code is called only from Calypso, and until it is not migrated to spec, it remains in its standalone bubble.
From there, what can we do:
- move the code to Calypso as extension methods (and it belongs there until any other tools requires it)
- wait that Calypso can use the spec API to request information
- copy paste the code in UIManager to remove access to the UIManager until Calypso is Spec'd
I wand to understand more in depth: does it need:
- not to refer to UIManager ? OR
- not to use UIManager
If we just don't want to refer to UIManager, we could just use the method #uiManager
defined on Object
, right?
The end goal is to remove UIManager from Pharo. So should not use UIManager
It should use the application of the presenter. An StApplication has dialogs shortcuts for inform request.... Ask me if you need more information.
The problem is that from Calypso, there is no presenter and thus no application. Calypso is the only place in the system where breakpoints have a dependency to UIManager.
What we should do is to have all the code using an application and in Calypso we introduce the methods application tyhat return StPharoApplication default
Like that we migrate to Spec then we will just have to remove/use another method.