Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2006

Tip: Looking for answers? Try searching our database.

Failed to return new code element

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RML - 31 May 2006 19:09 GMT
Hi, I have a VS2005 VC++ application which no longer allows me to add a
Variable or Function to a class in the project.  I attempt to add a new
(public) Variable called Temp123, and get this error...

Failed to return new Code Element.  Possibley syntax error.  New Element
Name.  Temp123

I recently changed the name of the cpp file (using Solution Explorer) of
this class.  Since that change, the error always occurs.  I attempted to
change the cpp name back to its original name, but still get the error.

Can anyone help me out.

RML
Marcus Heege - 01 Jun 2006 07:31 GMT
Hi RML

> Hi, I have a VS2005 VC++ application which no longer allows me to add a
> Variable or Function to a class in the project.  I attempt to add a new
[quoted text clipped - 10 lines]
>
> RML

Does this problem still exist if you add a new cpp file with the name you
want and copy the whole contents of the old file to the new one and remove
the old one from the solution?

Marcus
RML - 01 Jun 2006 14:45 GMT
Hi Marcus, I tried your suggestion, but still have the same problem.

RML

> Hi RML
>
[quoted text clipped - 18 lines]
>
> Marcus
Marcus Heege - 01 Jun 2006 15:14 GMT
> Hi Marcus, I tried your suggestion, but still have the same problem.
>
[quoted text clipped - 26 lines]
>>
>> Marcus

Next attempt: Close the poject, delete the .ncb file and reopen the project.
RML - 01 Jun 2006 15:53 GMT
Tried that, and it did not work.

RML

> > Hi Marcus, I tried your suggestion, but still have the same problem.
> >
[quoted text clipped - 28 lines]
>
> Next attempt: Close the poject, delete the .ncb file and reopen the project.
Marcus Heege - 01 Jun 2006 17:00 GMT
> Tried that, and it did not work.
>
> RML

In this case, it seems to be somehow realted to your file itself. To find
the source, I would comment out the whole body of the class and see if it is
possilbe to add a new function to the empty class. If yes, uncomment more
and more parts until the problem reappears.
If you have found the reason, please share it here.

I don't see anything better to do here, sorry

Marcus
RML - 01 Jun 2006 21:07 GMT
Here is what I did to get it to work.

I created a new class.  I cut & pasted the code from the original classes .h
& .cpp files into the respective .h & .cpp files of the new class.  In the
new class files, I then replace the old class name with the new, then I
deleted the original class files.

It was a round about way, but it worked.

RML

> > Tried that, and it did not work.
> >
[quoted text clipped - 9 lines]
>
> Marcus
Gary Edstrom - 26 Jul 2006 19:58 GMT
Here is what worked for me after wasting a half a day on the problem:

1. Close the workspace
2. Delete the Intellisense (NCB) Database
3. Reopen the workspace
4. Allow VC to rebuild the Intellisense database

Now the add method / property worked just fine.

Gary Edstrom

>Here is what I did to get it to work.
>
[quoted text clipped - 20 lines]
>>
>> Marcus

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.