Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Saturday, March 24, 2012

Namespace Question

The AtlasControlToolkit has a root namespace of AtlasControlToolkit, and the class files also have a namespace AtlasControlToolkit specified. To register the control, the namespace AtlasControlToolkit is used.

I am writing a new extender and am wrapping into a toolkit framework so that the next time I decide to add a control, my "toolkit" is already setup. I have specified a root namespace of My and my class files contain a namespace dictating My as well. In order to register my toolkit, I am forced to use "My.My". Where does the AtlasControlToolkit lose this extra level? Having My.MyAutoComplete is much nicer than My.My.MyAutoCompleteConfused

I'm not sure I fully understand your question. What do you mean by "register my toolkit" exactly?

Are you using VB? VB specifies a default root namespace, whereas C# does not. So if you apply a namespace, yes, you'll get the doubling up. So in your case, change the Default Namespace in the project properties to "My" and then don't add a namespace to your class files.


Yes, I am using VB. For not understanding my question, you did a darn good job of answering it! Smile Now if only you could solve my other problems haha.
Better lucky than good...:)

Namespace registered once but used in severel Files

Hi everyone!I'm sorry for my english, it's a bit rusty, because I'm german.My problem:I am developing a custom webcontrol, which is inherited from WebCrontrol and IScriptControl. Everything works fine on codebehind (I think ;)). I have also developed 4 JS-Files.In JSFile1.js I registered my namespaces (i.e. "Sample", "Sample.Control", Sample.Collection").In JSFile2.js I DO NOT register any Namespace, but I want USE the registered namespaces. But when I start my webapplication, IE says that "Sample" is unknown in JSFile2.js. Is my way of implementation possible at all?I hope you guys understand what I want. :)Thanks and greetsPuppetMasterP.S. I'm sorry for doubleposting, haven't seen this area at first.

Sounds like you may have an issue with the order of files being added into the page. Make sure JSFile1.js comes before JSFile2.js when your page is rendered.

-Damien


I fixed the problem. It was a simple comma. One comma to much...What is it called like? "wood for the trees" or something? :)Thanks and greetsPuppetMaster

Glad you fixed it. Please mark this topic as answered / resolved.

-Damien