Re: Once again - Object of type x...
Peter Osucha <[email protected]> Mon, 18 Dec 2006 14:45:43 -0500
| 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). This I don't understand. Since the classes and user controls are all in the same 'project', where would it be getting this old information from? The last time it was built successfully? > 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 The project holds a few user controls - all have to do with graphing. There are many classes that the user controls share (GraphConfiguration being one of them). Since the user controls were all sharing these, I figured I'd just put them into the same project as the user controls. I guess I will move them to their own project. > > However...do you need to use the class while in the designer? No, not really. Nor do the classes 'do' anything. The classes involved here are really basic - just holding 'groups' of properties that the graphs use. > 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. I'll give this a whirl as well and see what happens. Though any further comment on my first response above (the one I said I didn't understand) would be great. Peter > > -----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Ā® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com