473,395 Members | 1,368 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.

Namespace hell

I have a user control class = guideway in namespace guideway.

The guideway control dynamically adds GuideNodeBox usercontrols to its .controls collection. At the same time it attaches 3 events from the GuideNodeBox to itself ...

private GuideNodeBox CreateGuideNodeBox(GuidewayNode newNode, eGuidewayNodeType gNodeType)

{

GuideNodeBox newNodeBox = new GuideNodeBox( newNode, gNodeType);

newNodeBox.GuideNodeBoxClick += new GuidewayEventHandler(GuideBoxClicked);

newNodeBox.GuideNodeBoxHover += new GuidewayEventHandler(GuideBoxHover);

newNodeBox.GuideNodeBoxRemove += new GuidewayEventHandler(GuideBoxRemove);

newNodeBox.Leave += new EventHandler(GuideBoxLeave);

return newNodeBox;

}

The 3 new GuidewayEventHandler lines give a compile error ...

Cannot implicitly convert type Guideway.Guideway.GuidewayEventHandler to Guideway,GuidewayEventHandler

Anyone have any suggestions ?

Thanks in advance - Abbott
Nov 17 '05 #1
2 1423
Hello,
You will need to use fully qualified name for the handler.

HTH. Cheers.
Maqsood Ahmed [MCP C#,SQL Server]
Kolachi Advanced Technologies
http://www.kolachi.net

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #2
"Maqsood Ahmed" wrote:
Hello,
You will need to use fully qualified name for the handler.

HTH. Cheers.
Maqsood Ahmed [MCP C#,SQL Server]
Kolachi Advanced Technologies
http://www.kolachi.net

*** Sent via Developersdex http://www.developersdex.com ***


It's strange. I had to qualify the the name as ...

newNodeBox.GuideNodeBoxClick += new
global::Guideway.GuidewayEventHandler(GuideBoxClic ked);

There's got to be a better way!

Thanks for the feedback

Abbott

Abbott Fleur

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #3

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

Similar topics

8
by: Jack Carter | last post by:
I have been delegated to produce a tool that has python embedded in it. The desire is to have a command line interface that inherits all the python scripting functionality so people can use the...
25
by: kj | last post by:
Consider the following XML document: <?xml version='1.0' encoding='UTF-8'?> <bar:foo xmlns:bar='someuri'> <baz/> </bar:foo> What namespace does baz belong to? What is this namespace bound...
9
by: virtual | last post by:
I have xml document like this: <?xml version="1.0" encoding="UTF-8" ?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
22
by: Jim Hubbard | last post by:
I am reposting a portion of a thread that I am involved in under a new topic because it seems that there are still people that believe the whole "DLL Hell" myth. I hope I can shed some light on...
4
by: John | last post by:
Can anybody tell me why MS would put such a basic data structure, like System.Web.UI.Pair, into a UI namespace? The Pair class, to me, is something you use just as much at a deeper level as you...
9
by: Divick | last post by:
Hi all, does any one know what is the right way to forward declare classes within namespaces. Though I have been using the syntax as follows but it doesn't sound good to me. namespace...
1
by: GreatB | last post by:
Bill Gates died in a car accident. He found himself in Purgatory being sized up by God . .. "Well, Bill, I'm really confused on this call. I'm not sure whether to send you to Heaven or Hell....
8
by: Simon Brooke | last post by:
I was debugging a new XML generator tonight and trying to determine why it wasn't working; and realised my dom printer does not output XML namespace declarations. My method to output an Element...
12
by: bgeneto | last post by:
I know that it's a very basic question, but I can't figure out or find an answer to why do we have to specify a namespace, like this #include<string> using namespace std; when using the...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.