Re: Once again - Object of type x...
Chris Anderson <[email protected]> Mon, 18 Dec 2006 19:38:30 -0000
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <[email protected]> |
It's probably compiling your code for design-time use and trying to pass
one build version of GraphConfiguration to an "older" function that
accepts and "older" build of GraphConfiguration (or vice versa).
Is the usercontrol in a separate library to the GraphConfiguration
class?
If not, try to separate them into separate libraries - it should mean
that only one build version of the class exists
However...do you need to use the class while in the designer?
If not, start the user controls OnLoad, painting, etc routines with code
like this:
if (this.DesignMode)
return;
(Note: this.DesignMode only returns sensible results after the window
has been instantiated, so will not work in the ctor for example)
Then you'll never have problems, because it's not running code that was
only designed for use at runtime.
Hope that helps
Chris
> -----Original Message-----
> From: Discussion relating to the specifics of the C# and Managed C++
> languages [mailto:[email protected]] On Behalf Of Peter
> Osucha
> Sent: 18 December 2006 19:31
> To: [email protected]
> Subject: [DOTNET-CX] Once again - Object of type x...
>
> I apologize for posting this again - it's been a while since I've seen
> it
> and I can't find a solution...
>
> I have a class 'GraphConfiguration' that contains some info about,
> well,
> graph configurations for an application. Nothing really fancy. Just
a
> few
> properties dealing with user configurable things about the way a graph
> is
> set up.
>
> Anyway, there is an instance of this class in a user control I'm
> creating.
> I repeatedly get to a point in the IDE where I can no longer click on
> the
> gui portion of the user control - instead , the IDE gives me an
'error'
> page
> stating that...
>
> Object of type 'ETI.Controls.Graph.GraphConfiguration' cannot be
> converted
> to type 'ETI.Controls.Graph.GraphConfiguration.'
>
> with a line number of 0 and a column number of 0.
>
> I can find no information about what may cause this error or about
what
> the
> compiler is doing trying to do this 'conversion' (ie, I don't know
what
> on
> earth the error message is trying to tell me).
>
> Any ideas, please?
>
> Peter
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com