New Posts New Posts RSS Feed: Conductor<IScreen>
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Conductor<IScreen>

 Post Reply Post Reply
Author
jkattestaart View Drop Down
Newbie
Newbie


Joined: 30-Jul-2010
Location: Netherlands
Posts: 37
Post Options Post Options   Quote jkattestaart Quote  Post ReplyReply Direct Link To This Post Topic: Conductor<IScreen>
    Posted: 27-Aug-2013 at 11:30pm
Hello Marcel,

I'm still on Cocktail 2010, but i had some trouble in getting my conductor to work in a special case.
I have conductor<Iscreen> programs working throughout my application like the Temphire example. However in one program i tried to use a Conductor<Iscreen> directly on a activeItem of another Conductor. This gave me a stackoverflow when i moved to another activeitem.
Is this by design or is there a problem with assembling conductors on a conductor. May be this is a Caliburn thing but adding a seperate Iscreen in between seems to solve the issue. It looks a bit strange to add an extra viewmodel what doensn't do anything.

Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 31-Aug-2013 at 3:09am
I'm not sure I fully understand what you are trying to do, but I'm assuming that you are trying to activate a ViewModel in a conductor, which itself is a conductor. If that's what you are doing, then this is pretty straight forward and we are not aware of any issues. We do this regularly. TempHire actually does this, too. The shell is a Conductor<T> and the resource mgt view model is a Conductor<T> as well, which becomes the active item of the shell. 
Back to Top
jkattestaart View Drop Down
Newbie
Newbie


Joined: 30-Jul-2010
Location: Netherlands
Posts: 37
Post Options Post Options   Quote jkattestaart Quote  Post ReplyReply Direct Link To This Post Posted: 31-Aug-2013 at 5:21am
Yes, what you say seems right, but the shellview does a navigate to a workspace not the conductor itself. What i did was a navigate to a conductor directly.

I wanted to reuse my logic, so thats why i placed my entire program in the conductor<IScreen>.
I can live with my workaround but wondered why this fails.


Edited by jkattestaart - 31-Aug-2013 at 5:22am
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 01-Sep-2013 at 10:16am
The workspace is simply a higher level abstraction around the view model. Notice that the shell overwrites the Activator of the NavigationService to extract the view model (conductor) from the workspace and make it the active item. If you want to navigate directly to a view model, then you don't need to overwrite the Activator. 

_navigationService = new NavigationService<IWorkspace>(this)
                .Configure(config => config.WithActivator(navigation => ActivateItem(navigation.Target.Content)));
Back to Top
jkattestaart View Drop Down
Newbie
Newbie


Joined: 30-Jul-2010
Location: Netherlands
Posts: 37
Post Options Post Options   Quote jkattestaart Quote  Post ReplyReply Direct Link To This Post Posted: 01-Sep-2013 at 10:26am
OK,

What i did was a navigate inside a conductor<IScreen> viewmodel (like the tempHire conductor) like this (copied from the createdetailfactory)


      _navigationBookingService = new NavigationService<UpdateBookingViewModel>(this);

:
:

     _navigationBookingService.NavigateToAsync(() => bookingManagementFactory.CreatePart()


the bookingmanagment was another conductor<IScreen>
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 02-Sep-2013 at 4:39pm
If you want me to look at this closer, I'm gonna need a small repro solution from you. Without seeing the whole picture, I'm not sure what issue you ran into. As I said, I'm not aware of any issues based on your description. 
Back to Top
jkattestaart View Drop Down
Newbie
Newbie


Joined: 30-Jul-2010
Location: Netherlands
Posts: 37
Post Options Post Options   Quote jkattestaart Quote  Post ReplyReply Direct Link To This Post Posted: 03-Sep-2013 at 10:37pm
No my workaround is ok for now. I will start a new project soon. Probably i will use Cocktail 2.0 for this and if i get the sdame error there i will post the issue gain. Thanks for your time!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down