CAB WALKTHROUGH

Topics: CAB & Smart Client Software Factory
Oct 14, 2006 at 9:01 AM
originally posted by: mistergraviton

I'm not sure why its not working...but in the walkthrough for CAB that loads a module into the shell. The module has a user control with a simple label on it. I used the exact code in the walkthrough and it didn't work. The shell loads fine ...theres a split container and a tabworkspace in the split container but the module doesn't appear to load at all. Anyone know why loading modules dosen't work?
class MyModuleInit : ModuleInit
{
private IWorkItemTypeCatalogService myCatalogService;
private WorkItem parentWorkItem;

ServiceDependency
public IWorkItemTypeCatalogService myWorkItemCatalog
{
set { myCatalogService = value; }
}

ServiceDependency
public WorkItem ParentWorkItem
{
set { parentWorkItem = value; }
}

public override void Load()
{
base.Load();
MyWorkItem myWorkItem = parentWorkItem.WorkItems.AddNew<MyWorkItem>();
myWorkItem.Run(parentWorkItem.Workspaces"tabWorkspace1");
}


<?xml version="1.0" encoding="utf-8" ?>
<SolutionProfile xmlns="http://schemas.microsoft.com/pag/cab-profile" >
<Modules>
<ModuleInfo AssemblyFile="MyModule.dll" />
</Modules>
</SolutionProfile>
Oct 14, 2006 at 10:26 AM
originally posted by: mistergraviton

is there anyone who can answer my question? about the walkthrough? I've tried almost everything but it dosen't work....the module doesn't load! what is the problem? WHY DOESN'T THE MODULE LOAD does anyone know?
Oct 18, 2006 at 4:32 AM
originally posted by: sral

Check out the CAB Hands on Labs, located in the downloads section.

Regards,

Lars Wilhelmsen
Senior Software Engineer
Teleplan Globe AS
Oct 19, 2006 at 12:29 AM
originally posted by: mistergraviton

I did download the CAB hands on labs buddy and it still dosen't work as advertised. Anyone else have any more snappy suggestions?
Oct 21, 2006 at 7:48 AM
originally posted by: kovlab49

Got here a bit late, apologies. I assume from the initial posting that the XML at the bottom is in a file ProfileCatalog.xml in your project. Is it being copied to the output dir? If it's not present, your app will run happily without bothering to load any unreferenced DLLs.
Oct 28, 2006 at 2:47 AM
originally posted by: czmuchuf

class MyModuleInit must be public
Oct 31, 2006 at 6:10 PM
originally posted by: mistergraviton

I found the problem I just wasn't able to send a message until now. just like you said MyModuleInit wasn't public. I was looking for some complex reason why it didn't work. Never thinking that if I just make the class public it would work.