debugger syntax definition - debugging

Zerobrane has a color scheme but also shows underlining (some solid, some dotted) when viewing a .lua file.
e.g.,
buttonMain.y = display.contentCenterY - ...
where buttonMain is dotted underline & "display" is solid underline (only the word display, not the .content... part.
It is probably trying to tell me something useful, but I cannot understand it.
Is there a source to describe the different formats, etc. and their meaning within the Zerobrane Corona debugger?
I looked in ZBS but did not see an explanation of this.
Thanks for any help.

These are indicators that show the scope of a variable: global, local, masking, or masked. See the FAQ and the documentation for details. There is also a blog post that describes them with a screenshot.

Related

How can I change the color of the comments in Code::Blocks?

The comments in the Code::Blocks IDE are difficult to see because their color is too light. How can I change the color?
Menu: Settings/Editor...
Syntax highlighting
Comments
There are several different "Comments" entries, play around to find the one you need.

What system color to use to highlight required fields in delphi/windows

a bit background
I am currently using the clHighlight color together with a StyleServices.GetSystemColor call to set the background color of controls that are:
not focused
have a NULL value (field.IsNull=True)
and are about a required field (field.required=True)
Its not about how to do the highlighting itself, I figured that out already.
Currently I am using system color clHighlight, but this makes confuses my users as they think the entire contents of the field is selected (see screenshot).
But I also have style support implemented, so using a custom predefined color is not really what I am looking for. after googling a bit I found quite a list here https://learn.microsoft.com/en-us/dotnet/api/system.windows.systemcolors?view=netframework-4.7.2 but I am unable to find what I am looking for.
Using RAD studio Rio 10.3.1 Enterprise.
The actual question
So - what system color should I use? (not really looking for subjective suggestions, but for a more or less "officially recommended" constant to use.)
a screenshot
Answer: There is no more or less system color constant defined for this specific purpose.
Solution/workaround:
Thanks all for the suggestions. I decided to go for the clInfoBk constant (background color for hint windows), this looks far less confusing. One could interpret the color as a "hint" for fields that need to be filled out.
And it looks like this, in the default color scheme:

Visual Studio Code - meaning of syntax highlight colors

I'm looking for a reference as to what each color of syntax highlighting in Visual Studio Code actually means. I'm currently using the dark default theme Dark+. I've gotten used to recognizing a few of the highlight colors and I get the gist of what I'm looking at, but I'm looking for a more detailed reference of what each color means.
I've searched for a while for this and can not find any reference guide or glossary/index listing the colors and meanings. Not sure if it matters, but I am solely writing in JavaScript.
Thank you in advance.
edit: I have included a screenshot of the type of syntax highlighting I am referring to.
The meaning of the syntax highlight colors comes in two parts:
How are the characters in the file organized into meaningful tokens?
How are those tokens assigned a particular color and font style?
Partitioning text to tokens
The first part is determined by a grammar description built in to VSCode. VSCode uses a system based on TextMate grammars. The grammars are defined in the VSCode sources (e.g., JavaScript.tmLanguage.json), but in that form have gone through a couple stages of postprocessing, making them nearly unreadable. There is no documentation of the intent of these grammar files. They tend to at least roughly follow the relevant language specification, but with plenty of ad-hoc deviations.
The most practical way to understand what tokens are defined is to use the "Developer: Inspect TM Scopes" tool available in the Command Palette (Ctrl+Shift+P). When you put your cursor on a token, it will show you the "scope labels" that describe that token. These labels are more or less human-readable.
Edit 2020-07-24: As of VSCode 1.47 (and possibly a little earlier) the command is called "Developer: Inspect Editor Tokens and Scopes".
Example:
Above, we can see that the return keyword is most specifically classified as keyword.control.flow.js. It is within a brace-enclosed code block (meta.block.js), within a function definition (meta.function.js), within Javascript source code (source.js).
That sequence of scope labels is the closest thing there is to a "meaning" for a token in VSCode.
Assigning colors to tokens
Next, there is the process of mapping that sequence of scope labels to a color and font style. That is done by the theme. In my case I am using Visual Studio Light, defined in the VSCode sources in light_vs.json. In the case of the return keyword, this is the applicable fragment:
{
"scope": "keyword.control",
"settings": {
"foreground": "#0000ff"
}
},
This says, basically, that anything with a scope label beginning with "keyword.control" shall have a blue color. But other fragments may override this one; the rules are somewhat complex. Why blue? It's an arbitrary aesthetic choice.
Why do function and NaN have the same color? The grammar assigns them different scope labels (storage.type.function.js versus constant.language.nan.js), but it just happens that the theme you are using (Dark+) assigns them the same color (as does mine). I find that an odd choice, but can only speculate about the reason.
Customizing the colors
You didn't ask, but an obvious follow-on question would be how to customize these colors, for example giving function and NaN different colors. See this answer.

Using Mathematica to build presentations and documents

I use Mma mainly to solve relatively small problems.
I want to start using it also to prepare my presentations and documents, but I am having troubles to learn how to do it from the embedded help, and I guess some good resources may be available elsewhere.
Do you know any useful pointers (books, papers, videos ...)?
Do you have a "bag of tricks" to post here?
Edit
This question received two answers so far (#mzabsky's and Mr.Wizard's) and although both are useful, perhaps my concerns are much more basic. So I am posting an example of the kind of things I am unable to do (or understand how to discern how others did them).
I took the following example from The Mathematica Journal (the notebook at the left on the following image - click on the image to see full size):
So, some issues, just to get the idea of my troubles:
1) I copied the text to my .nb on the right, formatted it with the same style (text), but the appearance is different, so I guess the style definition is different. How can I copy the style definitions from one .nb to the other?
2) The table below the text block doesn't have an attached style. How was it formatted? Where is the background color defined?
I would like pointers to read (or videos to look, or whatever) about these issues. I don't want you to write down here a book on Mathematica formatting!
Summary of the links posted in answers
A Mathgroup thread (John Browne) and here (David Park and
Selwyn Hollis)
Advice from Bob Ueland
The Writing Assistant Palette
David Park's notes
Simon's documents
Tips for Mathematica SlideShow presenters
Notebook formatting
Presentations with Mathematica
Videos
Tips for Mathematica Slide Show Presenters
How to - Automatic Slide Show
Create a Lecture Notebook
I use Mathematica to take lecture notes in real time without any major issues (while the proud TeX guys struggle hard to keep up :) ). I have also used it for most math-related homework/assignments I wrote during past two and half years on university.
Before you start, you may want to look at some of these video tutorials.
Also, a few recommendations from me:
Keyboard shortcuts are the key to type fast. Ctrl+9 for inline math cell, Ctrl+6 for superscript, etc.
Learn symbol identifiers for the "esc - symbol - esc" notation. "sum" for Sum, "es" for empty set...you can find list of these in the Mathematica documentation. I have encountered only very few symbols I wanted to type that don't have the esc notation name (for example, leftwards double arrow or double right tee).
Type all math-related stuff into inline math cells. The math cell will do some of the math related formatting for you - put spaces where they belong, render all variables and symbols in italics, etc.
Use the preformatted templates found in "New"->"Styled Notebook".
Do not use ENTER for breaklines, individual paragraph should go into separate text cells (Ctrl+Shift+D) so Mathematica can break the content into individual pages/slides correctly.
In-built Mathematica PDF export sucks big-time; I use CutePDF printer for this.
Also, save often and back up often (Dropbox/Syncplicity are the ideal solution), one misplaced keyboard shortcut can turn hundred hours of work worth document into a goulash (trust me, been there) :)
Example of lecture notes I took in real-time during lecture (it is in Czech, but that doesn't matter much).
I agree with all that mzabsky said in his answer.
Here's a few of extra things:
I find it useful to make statements using a Text or DisplayFormula cell then manually group a Mathematica check/proof to the statement which is then collapsed and can be displayed when you want.
The Writing Assistant Palette has quite a few useful constructions in it that you can learn from.
Finally, I found it really useful to make my own style sheet for a couple reasons:
1) the built-in ones are a bit ugly; 2) it really helps you to understand how the notebooks work.
To see examples of the stylesheet I made (which I don't claim to be perfect - I didn't bother making it work in all screen environments) look at some of the files in ftp://ftp.physics.uwa.edu.au/pub/MATH2200/2010/. I use a similar stylesheet in all of my notes - I have many research projects primarily contained in Mma notebooks, eg http://arxiv.org/abs/1102.3043.
Like Mr Wizard, I also recommend David Park's notes as a starting point. Also, you should study stylesheets that you like by going to the Format menu and clicking "Edit Stylesheet". Don't forget to follow the links through the cascade of stylesheets (version 6 onwards).
To answer the questions in your edit: Once you are viewing a notebook's stylesheet, you can save it, edit it, and use it in your own documents. Stylesheets in
$UserBaseDirectory/SystemFiles/FrontEnd/StyleSheets are automatically available in the menu. You can then use that stylesheet in any notebook by simply selecting it from the menu.
The formating in the screenshot that you posted is all contained in the stylesheet. This includes the grey background in the table.
Addendum:
When distributing notebooks to others, if the stylesheet is external from the notebook, then other people will not see it as you do. To include the stylesheet into the current notebook, you need code like
ss = StyleDefinitions /. Options[EvaluationNotebook[]]
fn = ToFileName[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}, ss]
If[FileExistsQ[fn],
style=Get[fn];SetOptions[EvaluationNotebook[],StyleDefinitions->style];,
Print["Can not find file"]]
(Assuming the file is in stored in the conventional place)
Here's an EmbedStylesheet.m that is an improved version of the above.
A Mathgroup thread on embedded stylesheets, particularly here (John Browne) and here (David Park and Selwyn Hollis) might be of interest.
I find stylesheets problematical. In particular I don't like having to remember to embed a stylesheet before I give the notebook to someone else, or before I try to print from an unfamiliar computer. However, along with David Park's tutorial (referenced above by Mr Wizard), I find this advice from Bob Ueland very useful.
If you browse the back-issues of The Mathematica Journal you will see that articles are available in Notebook format. These may be a useful reference.
Edit
I cannot recall a good formatting tutorial at the moment. You can use Show Expression (Win: Shift+Ctrl+E) to view the code expression for a block, such as the table in your example. While one may not enter code by hand in the same form, it can give indications of the options or methods that are used. Code can also be procedurally produced as needed.
I will add links as I find or recall them.
David Park's StyleSheet creation notes
Tips for Mathematica SlideShow presenters
These are brief, but may still be useful:
Notebook formatting
Presentations with Mathematica

How to change Instantiated Objects Font Colour in Visual Studio

I know the colours are changed in Environment > Fonts and Colors but I haven't found out which Display Item the object is.
Can someone please tell how I can colour the following code:
lblMessage.Text = "You have successfully answered my question!"
I have the string coloured pink, I would like the lblMessage purple and the .Text a light green.
For me the darker the colour the less it will "change". I won't often change object names, I'll more often change properties and am always changing strings - although I have another question about this that I'll post later.
Thanks
Go to Environment > Fonts and Colors > Display Items and change
Identifier
String
I was hoping that their is I can be
more specific with the colours - if
their isn't then that's an acceptable
answer - just disappointing for me.
Yeah, I don't think you can do that. :)
This is possible if you use a 3rd party addin like Visual Assist. It lets you assign different colors to classes, variables, macros and functions (among other features).

Resources