I have moved a form from one directory (form) to another (workshop) using the "move" menu option in OEA. I replaced all of the "form." with "workshop." and it compiled.
However, when I try to load it with the visual editor, I now get the error
com.openedge.pdt.ve.editor.serialize.CodeSerializationException: Unable to resolve type information for field reference bindingSource1
Is this a bug or a problem with me ?
I found the problem, and think that it is a bug.
I had added the binding component onto the form and the designer added the line
DEFINE PRIVATE VARIABLE bindingSource1 AS Progress.Data.BindingSource NO-UNDO .
Later on, I wanted to be able to access bindingSource1 from another component, so I changed it into a property.
DEFINE PUBLIC PROPERTY bindingSource1 AS Progress.Data.BindingSource NO-UNDO GET . PRIVATE SET .
this had the desired effect, the program compiles and runs ok.
However, you can no longer load it into visual designer without getting the error message in the first post.
Julian,
Please log this as a bug with tech support. I believe the visual designer does not look at properties of the current class when resolving references from InitializeComponent. If it actually did, then the message should have said "unable to resolve type information for property reference..."
I have, reference is W810010022
I should add that this is nothing to do with moving directories - the move highlighted the error.
Currently the serializer only looks at variables, not properties. To do what you want you can...
DEFINE PRIVATE VARIABLE bindingSource1 AS Progress.Data.BindingSource NO-UNDO .
DEFINE PUBLIC PROPERTY PublicBindingSource1 AS Progress.Data.BindingSource NO-UNDO
GET ():
RETURN bindingSource1.
END.
PRIVATE SET.
that is what I ended up doing. Thanks.
Works, but tacky, no?
it's not ideal, but if there is a simple workaround then that suits me.
Multiple inheritance (see the other thread http://www.psdn.com/library/thread.jspa?threadID=12641&tstart=0) would be nice to have
There is a school of OO which thinks that multiple inheritance is the road to evil.
Would you happen to be in that school ? If so, why do you think that ?
I've never missed id! And for the other sample you have, the Interface or exposing the PBS as a Property is a way easier and probably cleaner way to do it.
Not formally, but I do tend to stand on that side of the room. There are some really bizarre complexities which can arise if you allow it. I don't like bizarre complexities.
the room. There are some really bizarre complexities
which can arise if you allow it. I don't like
bizarre complexities.
Hold on, aren't you married ?
L L!!!
Yup and that's its own story ... and a good reason to minimize complexities in other parts of my life.