FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

couple of questions

 
Post new topic   Reply to topic     Forum Index -> Visual D
View previous topic :: View next topic  
Author Message
creatio



Joined: 13 Nov 2010
Posts: 5

PostPosted: Sun Jan 30, 2011 12:58 pm    Post subject: couple of questions Reply with quote

First: Colors in the editor

I usually program with a black background that is tailored with some specific colors, but when programming in a .d file I seem to get a black color for almost everything. I tried changing the colors in the Options window, but I have had no success. I've been getting around this by treating .d files as .cs, but then I lose everything else from Visual D



Second: module.ddoc

Visual D can generate a module.ddoc file from the documentation directory. Which in turn generates this for my specific project:

Code:
MODULES =
    $(MODULE jabber.dlang.protocol)
    $(MODULE jabber.dlang.xml)
    $(MODULE .main)


The module.ddoc file gets added to the build.bat file. Now the problem that i have is that I can't seem to get access to the MODULES macro from the candydoc.ddoc file or from a custom modified one.

Thank you in advance. Great project btw, Very Happy
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Mon Jan 31, 2011 1:18 pm    Post subject: Re: couple of questions Reply with quote

creatio wrote:
First: Colors in the editor


What version of Visual Studio do you use? In VS2008, basic editing works for me if you adjust the colors "Comment", "Identifier", "Keyword", "Number", "String" and "Visual D Operator" ("Operator is not available in the VS-Shell, it's a setting specific to some other languages). Please note that there are also some more colors to set up that start with "Visual D".

Rainer
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Mon Jan 31, 2011 1:26 pm    Post subject: Re: couple of questions Reply with quote

creatio wrote:
Second: module.ddoc

The module.ddoc file gets added to the build.bat file. Now the problem that i have is that I can't seem to get access to the MODULES macro from the candydoc.ddoc file or from a custom modified one.


The idea is to add the candy.ddoc to the project aswell. When both files are specified on the command line to dmd, they can access the macros of the other file, as the standard candy.ddoc does in this line

Code:
ADD_MODULES =<script>$(MODULES)</script>


Does this work for you?
See also http://www.dsource.org/projects/visuald/wiki/Tour/ProjectConfig

Rainer
Back to top
View user's profile Send private message
creatio



Joined: 13 Nov 2010
Posts: 5

PostPosted: Mon Jan 31, 2011 3:57 pm    Post subject: Re: couple of questions Reply with quote

sagitario wrote:
creatio wrote:
First: Colors in the editor


What version of Visual Studio do you use? In VS2008, basic editing works for me if you adjust the colors "Comment", "Identifier", "Keyword", "Number", "String" and "Visual D Operator" ("Operator is not available in the VS-Shell, it's a setting specific to some other languages). Please note that there are also some more colors to set up that start with "Visual D".

Rainer


I'm using visual studio 2010. I tried the suggested color for "Comment" etc. It didn't change anything
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Tue Feb 01, 2011 2:28 am    Post subject: Re: couple of questions Reply with quote

creatio wrote:
I'm using visual studio 2010. I tried the suggested color for "Comment" etc. It didn't change anything


I just tried it in the VS2010 Shell and it worked.

http://www.dsource.org/projects/visuald/browser/wiki/colors.png
(The img tag does not seem to work for me...)

The default and automatic color settings where still black, though... Do these adapt with C++/C#?

Rainer
Back to top
View user's profile Send private message
creatio



Joined: 13 Nov 2010
Posts: 5

PostPosted: Wed Feb 02, 2011 3:29 pm    Post subject: Re: couple of questions Reply with quote

sagitario wrote:
creatio wrote:
I'm using visual studio 2010. I tried the suggested color for "Comment" etc. It didn't change anything


I just tried it in the VS2010 Shell and it worked.

http://www.dsource.org/projects/visuald/browser/wiki/colors.png
(The img tag does not seem to work for me...)

The default and automatic color settings where still black, though... Do these adapt with C++/C#?

Rainer


Just checked, and yes it does change with C++/C#. The colors for those languages are as they should be. I went through the whole list for the font colors. Not one that might influence it is set to black.
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Thu Feb 03, 2011 12:46 am    Post subject: Re: couple of questions Reply with quote

creatio wrote:
Just checked, and yes it does change with C++/C#. The colors for those languages are as they should be. I went through the whole list for the font colors. Not one that might influence it is set to black.


The black tokens in your screenshot should be colored by the settings for "Text Editor"->"Identifier". If this is set to "Default" or "Automatic", it inherits the setting of "Plain Text".

Do the other colors for keywords, operators, etc. work for you? Also, please try putting some code in a "version(none)" block, it should then use slightly different colors from the "Visual D Disabled..." colors.
Back to top
View user's profile Send private message
creatio



Joined: 13 Nov 2010
Posts: 5

PostPosted: Fri Feb 04, 2011 1:38 pm    Post subject: Re: couple of questions Reply with quote

sagitario wrote:
The black tokens in your screen-shot should be colored by the settings for "Text Editor"->"Identifier". If this is set to "Default" or "Automatic", it inherits the setting of "Plain Text".


This is how the settings for "Identifier" are currently. You can also see how it is in the background. As you are able to see, the 'string' D keyword isn't highlighted. This leads me to believe that the keywords that are being highlighted, are coming from the C/C++/C# environment.



sagitario wrote:
Do the other colors for keywords, operators, etc. work for you? Also, please try putting some code in a "version(none)" block, it should then use slightly different colors from the "Visual D Disabled..." colors.


This is how it looks like inside the version block. Now also the colors of the main changed, but they kinda change back after writing ';' after a statement. I might add the main also changed after writing '{' and '}'

Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Fri Feb 04, 2011 4:31 pm    Post subject: Reply with quote

Did you try to set the color explicitely using "Custom" settings instead of "Default"? That's what worked for me, as the default stayed black. Would using custom color settings be a problem for you? I'm not sure I can influence that behaviour, but I will have a look...
Back to top
View user's profile Send private message
creatio



Joined: 13 Nov 2010
Posts: 5

PostPosted: Fri Feb 04, 2011 4:52 pm    Post subject: Reply with quote

sagitario wrote:
Did you try to set the color explicitely using "Custom" settings instead of "Default"? That's what worked for me, as the default stayed black. Would using custom color settings be a problem for you? I'm not sure I can influence that behaviour, but I will have a look...


I set it to 'automatic' and it's started working now...I stupidly forgot to test that in my last post. Thanks!!! Especially with the quick reply's.

Edit: ddoc is also working now.,,
Back to top
View user's profile Send private message
kfo



Joined: 09 Apr 2011
Posts: 8

PostPosted: Sat Apr 09, 2011 6:49 pm    Post subject: Reply with quote

I am having a similar problem where all number literals are showing up as black. The 'Literal' color appears to have no effect on the color. Any ideas?

Version 0.3.23
VS 2010
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Sun Apr 10, 2011 2:27 am    Post subject: Reply with quote

The color used for numbers is called 'Number' Wink

If you have troubles with the 'Default' and 'Automatic' color setting, try setting the color explicitely.
Back to top
View user's profile Send private message
kfo



Joined: 09 Apr 2011
Posts: 8

PostPosted: Sun Apr 10, 2011 6:17 pm    Post subject: Reply with quote

Setting 'Number' to a custom color fixed it. Thank you :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Visual D All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group