Some beginners questions

Topics: CAB & Smart Client Software Factory
Aug 26, 2006 at 8:28 PM
originally posted by: SwissSteve

I have been working through thte documentation and samples for CAD and the folowing issues have arose for which
I would appreciae zour advice

1. In two places (e.g. Module Loader Examples) there is a ServiceDependency attribute used in relation to work items. the first is the
Root Work ITem and the second the GPSModule Work item. How does the system determine which work item
to assign in the setter property?

2. (Module Loader Example ) In SampleWorkItem, how is the string "MainWorkSpace" associated to the mainworkspace? Was expecting this
to be a constant definition in the framework.

3. Are nested workspaces allowed in CAB. For example, in the "Implementing the Application" example in the CAB
help. There is a split panel which the example adds a tab workspace to the left panel and then proceeds to
work within this tabbed workspace. In the Summary text there is no mention of creating a Workspace for the
right panel. So how should one use the right panel. Is it allowed ( or recmmended )to add a second tabbed
workspace in this panel?

4. Where can I find an example or more information on how to use the Visualizer?

5. I want to a add a tab title to a tabbed workspace so I have an empty smartpart which will be displayed on a
TabbedWorkspace. I drag a TabSmartPartInfo object onto the SmartPart design Surface and then set the title
field, that is all. When I try to compile the app it complains

"Cannot implicitly convert type 'Presentation.CarDetails.CarDetailsSmartPart' to 'Micr
An explicit conversion exists (are you missing a cast?)"

The above code was automatically added when I dragged the TabSmartPartInfo object onto the Smart part component.

What have I done wrong?

Aug 27, 2006 at 11:26 AM
originally posted by: matiaswoloski

1. Read this thread to understand the hierarchy of workitem and what happens with injection. Also the Smart Client Software Factory documentation has lot of information.

2. Any Workspace is identified with a string. How that happens? The framework goes through the controls collection of any control added to the workitem (the shell is added to the root workitem by default) and if it finds a control that implements IWorkspace, it will add it to the Workspaces collection of the workitem in scope using the Name property of the control as the identifier: (workItem.Workspaces.Add( theworkspace, "MainWorkspace" );

3. Yes they are allowed. Read this post

4. What do you want to know?

5. The TabSmartPartInfo control is used on the smartparts (usercontorls). You have to implement the ISmartPartInfoProvider interface in your smartpart and return an ISmartPartInfo. Each special workspace has its own smartpartinfo (TabSmartPartInfo, WindowsSmartPartInfo, etc.) if the workspace requires this. For example, the TabSmartPartInfo allows you to put Tab information apart from Title and Desc. You also have a generic smartpartinfo (SmartPartInfo) which provides Title and Description.

Hope this helps