Should Workspaces inherit from Control?

Topics: CAB & Smart Client Software Factory
Jun 23, 2005 at 11:45 AM
originally posted by: aaguiarz

DeckWorkspace and TabWorkspace inherit from Control. MDIWorkspace and WindowWorkspace don't.

When I try to use MDIWorkspace and I try to get a reference to it doing


it cannot find it, because it looks that the workspaces are loaded in the WorkItem by iterating on the SmartPart.Controls collection. If the Workspace is not loaded in the SmartPart.Controls, then it's not added to the WorkItem.

I did change WindowWorkspace to inherit from Control instead of inheriting from Component and it seemed to work OK, but I'm not sure if it's the right thing to do.
Jun 24, 2005 at 8:06 PM
originally posted by: PProvost

Personally, I wouldn't do it that way. When you create a non-control Workspace, you should just add it to the WorkItem yourself.

We've been thinking about an idea where all window (top-level) Workspaces get added to either the ApplicationHost or the DefaultWorkItem.

What do people think of that idea?
Jul 14, 2005 at 5:57 PM
originally posted by: Autocrat

I think that it's not very consistent, and very confusing to have a Workspaces collection which contains only non-window workspaces - how are they to know without digging into the deep dark depths of the documentation? :)

I think that either ALL workspaces should be added to the workspaces collection, or there should be 2 collections named WindowWorkspaces and ControlWorkspaces...(if you wish to keep it uniform and seperated).

I prefer the first option myself...
Aug 1, 2005 at 10:52 AM
originally posted by: kljones16

I'd like that Pete. I'd be happy with having the component based workspaces added to the workspaces collection. I ran into this problem today after creating a custom component based workspace.