When foo.dll has a namespace beginning by a lower letter, can cobra treat it?
I was able to compile it before...
Forums
Lowerletter beginning namespace
9 posts
• Page 1 of 1
Re: Lowerletter beginning namespace
Yes, if someone using C# or VB makes a foo.dll with a lower namespace it should work. Cobra requires the capitalization when compiling code (to distinguish namespaces and types from locals and arguments).
If you're having problems, post more details.
Thanks,
Chuck
If you're having problems, post more details.
Thanks,
Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Lowerletter beginning namespace
Hi, Chuck
This code is transferred a sample of "wx.NET"(http://wxnet.sourceforge.net/) to a cobra.
I was able to compile it on the day(Dec 02, 2008) when I asked forum a question before.
and I can still compile it in the 0.8.0 stable.
This code is transferred a sample of "wx.NET"(http://wxnet.sourceforge.net/) to a cobra.
I was able to compile it on the day(Dec 02, 2008) when I asked forum a question before.
and I can still compile it in the 0.8.0 stable.
- Attachments
-
- WxMinimal.cobra
- (2.33 KiB) Downloaded 633 times
- arisawa
- Posts: 51
Re: Lowerletter beginning namespace
I changed "namespace wx.Test" to "namespace WX.Test" and it gets past that problem.
The idea in Cobra is that:
-- locals and args start with lowercase, like "foo"
-- namespaces and classes start uppercase like "Foo"
-- object members start with _ like "_foo" or are accessed with a . like ".foo"
It means that when you read code like this:
You can tell that:
-- “e” and “alphabet” are local variables or arguments
-- “_random” is an object variable
-- “Element” is a type
Also, it's not likely you would want to put your own classes in the namespace of another library. You could end up with collisions/errors when upgrading the library in the future. I would call it:
The idea in Cobra is that:
-- locals and args start with lowercase, like "foo"
-- namespaces and classes start uppercase like "Foo"
-- object members start with _ like "_foo" or are accessed with a . like ".foo"
It means that when you read code like this:
e = Element(alphabet[_random.next(alphabet.length)])
You can tell that:
-- “e” and “alphabet” are local variables or arguments
-- “_random” is an object variable
-- “Element” is a type
Also, it's not likely you would want to put your own classes in the namespace of another library. You could end up with collisions/errors when upgrading the library in the future. I would call it:
namespace Arisawa.WX.Test
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Lowerletter beginning namespace
The problem was able to be settled.
however, different way was necessary. (adding "use wx")
I have another problem since I installed .NET 3.5 sp1.
cobra cannot refer to System.Drawing.dll(without appointing it) well, and at this time.
may be, my .NET is broken or not expected structure
Vista sp1
.NET 2.0
.NET 3.5 sp1
however, different way was necessary. (adding "use wx")
I have another problem since I installed .NET 3.5 sp1.
cobra cannot refer to System.Drawing.dll(without appointing it) well, and at this time.
may be, my .NET is broken or not expected structure
Vista sp1
.NET 2.0
.NET 3.5 sp1
- arisawa
- Posts: 51
Re: Lowerletter beginning namespace
I don't understand your last message. Can you provide a source file and the command line you are using?
Thanks,
Chuck
Thanks,
Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Lowerletter beginning namespace
Actually, I think I know what you're talking about now. You have to explicitly -ref:System.Drawing even though you have a "use" for it. At least, I've experienced this myself.
I caused this problem when I was fixing other problems.
The work around is to use -ref: on the command line or add this to your source file:
I've added ticket:152 to track this.
I caused this problem when I was fixing other problems.
The work around is to use -ref: on the command line or add this to your source file:
%% args -ref:System.Drawing
I've added ticket:152 to track this.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Lowerletter beginning namespace
Yes, just I think so.
I was interested in "%%".
Is the variation only "%% args" ?
I was interested in "%%".
Is the variation only "%% args" ?
- arisawa
- Posts: 51
Re: Lowerletter beginning namespace
I'm not sure what your question means, but I'll add more information:
You can use "%% args -ref:..." in the code. Or you can use the command line like so:
Also, you can add any other arguments you want after "%% args" like:
Hope that helps,
-Chuck
You can use "%% args -ref:..." in the code. Or you can use the command line like so:
- Code: Select all
cobra -ref:Foo.Bar.dll ...
Also, you can add any other arguments you want after "%% args" like:
%% args -v:3
Hope that helps,
-Chuck
- Charles
- Posts: 2515
- Location: Los Angeles, CA
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 17 guests