Inherited controls of inherited controls

Posted by jmls on 23-Jan-2009 15:04

I have a user control that inherits from an ultracombo (called common)

I then need to create another control that is specific to an application (called base)

I then need to create another control that is specific to a function (called user)

so, I have

user->base->common->Ultracombo

In base I have the following line:

when I try to load base into the visual designer, I get

Line 16: Unable to resolve type information for type Library.SessionSingleton for field SessionObject

However, it compiles just fine.

when I load user into the designer, I get

Line 63: Unable to locate method SuspendLayout in type combo.UserCombo

however, it compiles just fine .

What is wrong here ?

All Replies

Posted by Matt Baker on 23-Jan-2009 15:21

Julian,

When visual designer opens any class it verifies that all class member fields of the current class and all variables in the current class' "initializecomponent" method can be resolved for type information. It needs this information to open the form. In addition to fields, and variables, any type information for referenced fields, properties, methods, events, and other types referenced in InitializeComponent are resolved as well.

What this means is that you have to have all the required assemblies as well as the PROPATH setup so that everything can be found. If anything is missing it won't load the form since it won't be able to pass the required information to .NET.

Are the objects in different projects or are any of them outside of the workspace (e.g. not in an OEA project) other than the one you are working in? If you are then check two things.

1. Make sure that any of the assemblies required by the parent classes (common) are referenced in the project containing the child class (user).

You can share an assemblies directory/file between projects by specifying -assemblies parameter for all the projects and have them all point at the same file.

2. In windows->preferences->openedge->advanced->class cache, make sure that the "limit scope of class cache information" is set to PROPATH instead of workspace. By default it is set to "workspace". The label is misleading since "workspace" really means "project".

This parameter controls the search scope the internal class model (used by visual designer to resolve type information). Setting this to PROPATH causes this to scan outside the workspace for class information. You'll need to restart OEA after you change this.

If everything is in a single project, then this won't help you much.

Posted by jmls on 23-Jan-2009 16:17

What this means is that you have to have all the

required assemblies as well as the PROPATH setup so

that everything can be found. If anything is missing

it won't load the form since it won't be able to pass

the required information to .NET.

ok ..

Are the objects in different projects or are any of

them outside of the workspace (e.g. not in an OEA

project) other than the one you are working in? If

you are then check two things.

No, they are all part of the same project

If everything is in a single project, then this won't

help you much.

damn

Posted by Matt Baker on 23-Jan-2009 16:20

But, you can still try it anyway

Are you using linked directories? If so then, number 2 will fix that as well.

Posted by jmls on 23-Jan-2009 16:22

Weeeelllll, blow me down with a feather.

I restarted the AVM, and it all works now ...

Posted by jmls on 23-Jan-2009 16:23

But, you can still try it anyway

I've been trying. The keboard-shaped dents in my forehead are a mute testament to that

Are you using linked directories? If so then, number

2 will fix that as well.

Nope.

BUT : See the above comment ...

This thread is closed