473,395 Members | 1,411 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Compiler bug with __event and derivation

I have a __gc class, let's call it ClassB, derived from ClassA, which has an
__event, and eventually derived from System::ComponentModel::Component. This
ClassB has no __event. I derived another class from ClassB, let's call it
ClassC, which has an __event. When I try to compile ClassC's source I get:

somepath\ClassC.h(119) : error C3701: 'somePath\ClassB.h': event source has no
events

Line 119 in somepath\ClassC.h is the closing brace of the ClassC definition. I
am specifying no [ event_source(...) ] in any file so I assume this is being
generated internally by the compiler when I specify __event.

Is this a known bug and, if it is, what is the workaround to this bug ?
Nov 17 '05 #1
1 1000
Edward Diener wrote:
I have a __gc class, let's call it ClassB, derived from ClassA, which
has an __event, and eventually derived from
System::ComponentModel::Component. This ClassB has no __event. I derived
another class from ClassB, let's call it ClassC, which has an __event.
When I try to compile ClassC's source I get:

somepath\ClassC.h(119) : error C3701: 'somePath\ClassB.h': event source
has no events

Line 119 in somepath\ClassC.h is the closing brace of the ClassC
definition. I am specifying no [ event_source(...) ] in any file so I
assume this is being generated internally by the compiler when I specify
__event.

Is this a known bug and, if it is, what is the workaround to this bug ?


The bug manifesats itself as soon as I add a single:

[System::ComponentModel::DescriptionAttribute("Some message")]

to a __property of ClassB.

Without a description attribute for any property of ClassB, the compile works
without error. Not using any attribute for a __property of ClassB is not an
acceptable workaround.
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dietmar Gräbner | last post by:
Hi Right now I'm dealing with derivation by restriction and I have some questions concerning the attribute property use in context of the derivation. Consider following Schema: <xs:schema...
3
by: Wells Caughey | last post by:
I am trying to create an XML Schema type definition by deriving from another type definition using restriction. For example suppose my base type was this: <xs:schema <<schema element setup>> >...
1
by: | last post by:
Serious bug discovered in VC .NET (2002) compiler. Example below should work if I understand the Microsoft documentation correctly. Hopfelly there is some compiler upgrade that fixes this bug?...
2
by: Michael Kennedy [UB] | last post by:
public __gc class CWADataManagerEvents { public: __event void CreateGauge(String * type, bool shared, String * name, GaugeCreateSettings * settings); __event void SetupGauge(unsigned short GID,...
5
by: Joe Thompson | last post by:
Hi, I am using VC++.Net 2003 with WinForms to write a serial port application. I downloaded the newest VC++ examples from MSDN and found a project called Using the COM Port. In it, there is a...
0
by: Edward Diener | last post by:
Scenario: base class in one assembly, derived class in another assembly, __event in base class, testing if event has any handlers in derived class with 'if (OnTestEvent) { //etc. }'. Result:...
1
by: | last post by:
I want to hook events handlers but need to test of any event handler is assigned or not. I need something like this: __event void OnEventHandler(Myfunc) .... if (OnEventHandler)...
0
by: Lord2702 | last post by:
Sun. Aug. 29, 2004 5:00 PM PT I have a user control class which defined as follows... public __gc class MyControl : public UserControl { //---- //-- other fields methods and properties....
6
by: PGP | last post by:
Anybody here using __event? Could you please discuss any potential issues with it other than portability? Priyesh
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.