windows in all projects?

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

windows in all projects?

Eliot Miranda-2
Hi,

    occasionally I find it useful to have a window that is always present in the current project, so that wen I change projects the window either moves to the new project, or is in all worlds.  Is there a way of doing this in the standard system?  (I can't see this from reading the labyrinthine project enter code, but I could be missing something ;-) ).  Anyone have a changeset to do the same?

--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: windows in all projects?

Karl Ramberg
You can maybe put the window in a shared flap?

Karl

On Wed, Oct 15, 2014 at 9:45 PM, Eliot Miranda <[hidden email]> wrote:
Hi,

    occasionally I find it useful to have a window that is always present in the current project, so that wen I change projects the window either moves to the new project, or is in all worlds.  Is there a way of doing this in the standard system?  (I can't see this from reading the labyrinthine project enter code, but I could be missing something ;-) ).  Anyone have a changeset to do the same?

--
best,
Eliot






Reply | Threaded
Open this post in threaded view
|

Re: windows in all projects?

timrowledge

> On Wed, Oct 15, 2014 at 9:45 PM, Eliot Miranda <[hidden email]> wrote:
> Hi,
>
>    occasionally I find it useful to have a window that is always present in the current project, so that wen I change projects the window either moves to the new project, or is in all worlds.  Is there a way of doing this in the standard system?  (I can't see this from reading the labyrinthine project enter code, but I could be missing something ;-) ).  Anyone have a changeset to do the same?

Wow, I remember using this all the time back in the Old Days. I think you wrote the code for MVC to do it. Or maybe it was me after talking with you about it? Dunno.  IIRC it wasn’t at all hard in MVC-land but after looking at how this sort of thing is done in Ankh-Morph-pork I’m not sure it’s intelligible to mere humans.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful Latin Phrases:- Fac me cocleario vomere! = Gag me with a spoon!



Reply | Threaded
Open this post in threaded view
|

Re: windows in all projects?

David T. Lewis
On Wed, Oct 15, 2014 at 01:23:25PM -0700, tim Rowledge wrote:
>
> > On Wed, Oct 15, 2014 at 9:45 PM, Eliot Miranda <[hidden email]> wrote:
> > Hi,
> >
> >    occasionally I find it useful to have a window that is always present in the current project, so that wen I change projects the window either moves to the new project, or is in all worlds.  Is there a way of doing this in the standard system?  (I can't see this from reading the labyrinthine project enter code, but I could be missing something ;-) ).  Anyone have a changeset to do the same?
>
> Wow, I remember using this all the time back in the Old Days. I think you wrote the code for MVC to do it. Or maybe it was me after talking with you about it? Dunno.  IIRC it wasn?t at all hard in MVC-land but after looking at how this sort of thing is done in Ankh-Morph-pork I?m not sure it?s intelligible to mere humans.
>

Interesting question. Karl's suggestion of using a shared flap is probably
the quickest expedient. But more generally:

MorphicProject and MVCProject would need to handle this differently as would
(the regrettably yet to be implemented) SeasideProject, AidaProject, and
CuisMorphic3Project. So the concept would make sense within a given species
of Project.

For MVC it would presumably be a matter of adding a new View for the given
Model in all of the projects of type MVCProject. For Morphic, it is probably
a matter of inserting the actual Morph into the morph hierarchy for all
projects of type MorphicProject. In either case, these would need to be
top level windows, so the insertion logic is probably not too hard to figure
out.

I guess you would want some window menu option to make the window sticky
in all projects, or to remove it from all other projects except the currently
active one. Also a visual indicator that the window has been pinned to all
relevant projects.

It is probably also possible to make the window be migratory (Eliot's
suggestion of having it be reopened in the currently active project,
whatever that might happen to be). However, as a practical matter that
probably would need to be limited to moving from one project to another
of the same type, unless of course we do a more complete implementation
of ToolBuilder for all windows of interest.

This would make a great project for somebody to try. Part concept, part
requirements, part design, part implementation, and none of it too huge
in scope. Any takers?

Dave

cbc
Reply | Threaded
Open this post in threaded view
|

Re: windows in all projects?

cbc


On Wed, Oct 15, 2014 at 2:22 PM, David T. Lewis <[hidden email]> wrote:
On Wed, Oct 15, 2014 at 01:23:25PM -0700, tim Rowledge wrote:
>
> > On Wed, Oct 15, 2014 at 9:45 PM, Eliot Miranda <[hidden email]> wrote:
> > Hi,
> >
> >    occasionally I find it useful to have a window that is always present in the current project, so that wen I change projects the window either moves to the new project, or is in all worlds.  Is there a way of doing this in the standard system?  (I can't see this from reading the labyrinthine project enter code, but I could be missing something ;-) ).  Anyone have a changeset to do the same?
>
> Wow, I remember using this all the time back in the Old Days. I think you wrote the code for MVC to do it. Or maybe it was me after talking with you about it? Dunno.  IIRC it wasn?t at all hard in MVC-land but after looking at how this sort of thing is done in Ankh-Morph-pork I?m not sure it?s intelligible to mere humans.
>

Interesting question. Karl's suggestion of using a shared flap is probably
the quickest expedient. But more generally:

MorphicProject and MVCProject would need to handle this differently as would
(the regrettably yet to be implemented) SeasideProject, AidaProject, and
CuisMorphic3Project. So the concept would make sense within a given species
of Project.

Maybe an alternative would be to actually make use of the native windows support (finally?) to handle this.  I think I remember that one of the prototypes was to have one of the native windows be its own project - so you could with the primary window around like mad between project (event including a Tweak project, say), while this other window just stays open.

As I understand it, this isn't done yet, and I probably wouldn't be able to do it, but sounds like an actually useful use for the native window concept - a window that sticks around when you switch projects.

-cbc


Reply | Threaded
Open this post in threaded view
|

Re: windows in all projects?

Eliot Miranda-2
In reply to this post by David T. Lewis


On Wed, Oct 15, 2014 at 2:22 PM, David T. Lewis <[hidden email]> wrote:
On Wed, Oct 15, 2014 at 01:23:25PM -0700, tim Rowledge wrote:
>
> > On Wed, Oct 15, 2014 at 9:45 PM, Eliot Miranda <[hidden email]> wrote:
> > Hi,
> >
> >    occasionally I find it useful to have a window that is always present in the current project, so that wen I change projects the window either moves to the new project, or is in all worlds.  Is there a way of doing this in the standard system?  (I can't see this from reading the labyrinthine project enter code, but I could be missing something ;-) ).  Anyone have a changeset to do the same?
>
> Wow, I remember using this all the time back in the Old Days. I think you wrote the code for MVC to do it. Or maybe it was me after talking with you about it? Dunno.  IIRC it wasn?t at all hard in MVC-land but after looking at how this sort of thing is done in Ankh-Morph-pork I?m not sure it?s intelligible to mere humans.
>

Interesting question. Karl's suggestion of using a shared flap is probably
the quickest expedient. But more generally:

MorphicProject and MVCProject would need to handle this differently as would
(the regrettably yet to be implemented) SeasideProject, AidaProject, and
CuisMorphic3Project. So the concept would make sense within a given species
of Project.

When I did this years ago I just added a per-window property and had the Project enter code check for the property and move it if set.  So one could move windows between projects by setting, entering and unsetting.  That's simple.  But I hoped someone had already done this.  The Project code is complex enough as it is...


For MVC it would presumably be a matter of adding a new View for the given
Model in all of the projects of type MVCProject. For Morphic, it is probably
a matter of inserting the actual Morph into the morph hierarchy for all
projects of type MorphicProject. In either case, these would need to be
top level windows, so the insertion logic is probably not too hard to figure
out.

I guess you would want some window menu option to make the window sticky
in all projects, or to remove it from all other projects except the currently
active one. Also a visual indicator that the window has been pinned to all
relevant projects.

It is probably also possible to make the window be migratory (Eliot's
suggestion of having it be reopened in the currently active project,
whatever that might happen to be). However, as a practical matter that
probably would need to be limited to moving from one project to another
of the same type, unless of course we do a more complete implementation
of ToolBuilder for all windows of interest.

This would make a great project for somebody to try. Part concept, part
requirements, part design, part implementation, and none of it too huge
in scope. Any takers?

Dave




--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: windows in all projects?

David T. Lewis
On Wed, Oct 15, 2014 at 03:25:30PM -0700, Eliot Miranda wrote:
>
> When I did this years ago I just added a per-window property and had the
> Project enter code check for the property and move it if set.  So one could
> move windows between projects by setting, entering and unsetting.  That's
> simple.  But I hoped someone had already done this.  The Project code is
> complex enough as it is...

Sorry, I am confused. Do you mean that you have done this previously in
another dialect and that you are hoping that someone has done something
similar in Squeak? I think I am misunderstanding your question, sorry.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: windows in all projects?

Chris Muller-3
In reply to this post by Eliot Miranda-2
Maui has a similar requirement.  I implemented it by handling the
#aboutToLeaveWorld triggered by World's (PasteUpMorphs).  There is
also #aboutToEnterWorld available if that suits you better.

Example from Maui:

MauiWorld class>>#listenForLeavingWorlds
    Project allProjects do:
        [ : each |
        each world
            when: #aboutToLeaveWorld
            send: #setUpTransferMorphListeners
            to: self ]

"Release"
releaseLeavingWorldListeners
    Project allProjects do:
        [ : each |
        each world removeActionsForEvent: #aboutToLeaveWorld ]

On Wed, Oct 15, 2014 at 2:45 PM, Eliot Miranda <[hidden email]> wrote:

> Hi,
>
>     occasionally I find it useful to have a window that is always present in
> the current project, so that wen I change projects the window either moves
> to the new project, or is in all worlds.  Is there a way of doing this in
> the standard system?  (I can't see this from reading the labyrinthine
> project enter code, but I could be missing something ;-) ).  Anyone have a
> changeset to do the same?
>
> --
> best,
> Eliot
>
>
>