Login  Register

How to port this code to 1.3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

How to port this code to 1.3

Sean P. DeNigris
Administrator
5777 posts
Old code:
Smalltalk isMorphic
        ifTrue:
                [self buildMorphicViewOn: aSyntaxError.
                CurrentProjectRefactoring newProcessIfUI: Processor activeProcess.
                ^ Processor activeProcess suspend].

I started with:
self buildViewOn: aSyntaxError. "Using Polymorph?"
UIManager default spawnNewProcessIfThisIsUI: Processor activeProcess.
^ Processor activeProcess suspend.

But #spawnNewProcessIfThisIsUI: is only defined for MorphicUIManager, which delegates to Project (I didn't know Project was even still in the image). It seems the UIManager hierarchy needs to be cleaned, but I don't understand it well enough. Some questions:
* why does Project still exist? It doesn't seem very useful...
* does Project play well with UIManager e.g. if DummyUIManager is active, does Project answer nil to #uiProcess?
* is it reasonable to have a default UIManager>>#spawnNewProcessIfThisIsUI: that doesn't do anything, and override in UIManagers with UIs?

Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: How to port this code to 1.3

Marcus Denker-4
7582 posts

On Oct 31, 2011, at 3:48 AM, Sean P. DeNigris wrote:

> Old code:
> Smalltalk isMorphic
> ifTrue:
> [self buildMorphicViewOn: aSyntaxError.
> CurrentProjectRefactoring newProcessIfUI: Processor activeProcess.
> ^ Processor activeProcess suspend].
>
> I started with:
> self buildViewOn: aSyntaxError. "Using Polymorph?"
> UIManager default spawnNewProcessIfThisIsUI: Processor activeProcess.
> ^ Processor activeProcess suspend.
>
> But #spawnNewProcessIfThisIsUI: is only defined for MorphicUIManager, which
> delegates to Project (I didn't know Project was even still in the image). It
> seems the UIManager hierarchy needs to be cleaned, but I don't understand it
> well enough. Some questions:
> * why does Project still exist? It doesn't seem very useful...

It is supposed to be removed. There is even a tracker entry:

        http://code.google.com/p/pharo/issues/detail?id=1817

        Marcus


--
Marcus Denker -- http://marcusdenker.de


Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: How to port this code to 1.3

Sean P. DeNigris
Administrator
5777 posts
Marcus Denker-4 wrote
It is supposed to be removed. There is even a tracker entry:
        http://code.google.com/p/pharo/issues/detail?id=1817
Thanks, that issue addresses everything I mentioned. I'll wait until the dust settles before porting this snippet.

Sean
Cheers,
Sean