Visual designer cannot show form

Posted by Alex_u4a on 12-Mar-2009 05:39

I keep getting problems with the visual designer in OEA 10.2A. When I use an inheritted form or inheritted controls the form will show when I am designing it. But the next time I close and restart the OEA I often get the message Visual Designer cannot load this class: 'Unable to resolve type information' or 'Unable to locate method SuspendLayout'. Messing around with the propath, recompiling, restarting the AVM etc. will sometimes help, but the next time I restart the OEA the problem is there again. Since it seems a bit random it's very frustrating. Is it me or the OEA?

For example (with all default settings for working directory, propath etc.):

I have a workspace with two projects. In each project I have a package (folder). I make an inheritted control, for example MyLabel that inherrits from Label. This control is then in MyProject1.MyPackage1.MyLabel. When I want to use it in MyProject2.Mypackage2.MyForm I need to add an external directory to the propath of MyProject2. Next I can add the control to the toolbox and put it on the Form. Now restarting OEA will lead to the error in the visual designer: Unable to resolve type information for MyPackage1.MyControl for field myControl1.

Any suggestions are very welcome.

All Replies

Posted by Admin on 12-Mar-2009 06:01

Messing around with the propath,

Maybe that's the issue?

Classes in the ABL are dependent on the relative path. I haven't seen the issue you have described at all (and we make heavy use of inherited controles), but I never depend on a PROPATH to be able to locate a .cls (or .r file) by the TypeName. All my package (or namespace) directories start either at the project root directory or a directory src.

I never experiement with propath settings as an abreviation (or global USING) for type names. I like the fact, that the full typename and the physical location are a way more tight binding than with .p files.

Posted by Matt Baker on 12-Mar-2009 07:29

Usually this can be fixed by changing the following preference:

window->preferences->openedge->advanced->class cache->limit scope of class cache...

Make sure this is set to PROPATH and not workspace.

Posted by Alex_u4a on 06-Apr-2009 08:12

Thanks for the input. It did not help me enough though, so I changed to a workspace with just one project. Not exactly what I wanted but it keeps me out of trouble...

Posted by Admin on 19-Jan-2010 08:10

A colleague of mine is also having this problem, can anyone shed some light on the subject?

FYI he is running 10.2B with Infragistic Ultra Controls.


Thanks, Derek

Posted by Matt Baker on 19-Jan-2010 08:53

Make sure that the proper assemblies are referenced in the assemblies.xml file.  You can use the assembly upgrade utility to make sure they are upgraded from 10.2A properly to the Infragistics controls supported in 10.2B.

Check the workspace log file for more details about any error messages.  You can find it as a file without a name at /.metadata/.log

Posted by Admin on 21-Jan-2010 09:43

Cheers Matt thanks for the advice

Derek

Posted by jquerijero on 10-Feb-2010 15:59

I normally load the base class on the Design View, compile the base class, then try to open the derived class (you might need to close and reopen OE). This sometimes helps.

Also when adding the control to the toolbox, add the one that points to the source code (.cls) instead of the one that points to the r-code because if you happened to clean the project, you are are screwed unless you rebuild you project.

This thread is closed