Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What causes the highlighting of coded code text to reverse the highlighting?

Status
Not open for further replies.

dkean4

Programmer
Feb 15, 2015
282
0
0
US
Messing with the former problem, (with Resources), I now suddenly have this strange effect. If anyone has seen and cured this problem, please let me know...
The Click, MouseDown, and RightClick have code are they are not highlighted. The events that have no code, however, are highlighted!

Reversed_qkcjh2.png


Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
This is the opposite of what you would expect. Not only are the wrong items shown in bold, but they in the opposite order. Normally, the items shown in bold are at the top of the list, and the others are below it. In your screenshot, they are the other way round. Very strange.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
No idea what causes this. I could explain the background colors in your syntax highlighting, but I guess you set it that way. The bold/normal font setting isn't configurable and I doubt there is something in options or the VFP9 registry. It might be something to do with window themes, but then you'd see a swap of bold and non-bold text elsewhere, too.

Chriss
 
It might be something to do with window themes, but then you'd see a swap of bold and non-bold text elsewhere, too.

Dennis, Chris has made a good point. Can you check to see if there is a swap of bold and non-bold elsewhere in the IDE. For example, in the properties window, those properties which have been changed from their default settings are normally shown in bold (and in a different colour), with others shown in non-bold. Is that what you are seeing, or is it the other way round for you?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike and Chriss

No, it seems to be just fine in the Properties window. Do your Properties windows look like this?

Qlipboard09_nitfuz.png


Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Chriss,

Yes, I set my colors according to my way of seeing things. I sure hope that I will not have to reinstall VFP 9.0 ...



Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
I sure hope that I will not have to reinstall VFP 9.0

Well, I hate it when these things happen and there is no explanation, but personally, rather than re-installing VFP, I would learn to live with it. It's up to you, of course.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike,

I clicked on your Link "Visual FoxPro articles, tips and downloads"... You rock, Dude! Great tips! Thanks...



Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Mike,

Something else, I should say about that impossible reversal of Highlights... Some of my Projects in the Environment behave normally. But some Newer Projects come up that way once I invoke them through the Environment Manager. Others come up normal, but once I invoke one with that flaw, then succeeding calls to the good projects corrupts into that reversed order. However, if I close all the Projects XXXXXXXX.PJX and shut down and return to VFP, invoking the good XXXXXXXX.PJX returns ok.


Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Maybe it has something to do with the font you chose, what happens, when you choose another font?

 
Dennis,

the Method tab of the properties windows would be the one to look into, as your bold inversion is about the methods (and events).

Otherwise, by what you say it could be the Environment Manager, but I have no idea how it does influence that. I also don't know, but it could be one of the many IDE features and extensions that in itself is programmed in VFP and part of XSource. So you might even look into what Windows API declarations are done in the environment managers, that could influence fonts and looks.

Chriss
 
Chriss,

Here is the Methods window:
Properties2_ggoaoc.png



I think it is OK...

Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
ManniB

Here it is in Courier 12!... It makes no difference...

Courier_ax9mbw.png


Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
OK then it has to be something else, because one time when I changed the font they all appeared bold (or not bold, I don't remember...).

 
Chriss,

It must have something to do with the XXXXXXX.PJX file. I think that I deleted one record from one of the PJX files and it propagated the error somehow. VFP does not manage the Project (PJX) files adequately if you work with several projects in the same session.
You have to install something like CD Project_directory\XXXX1.DBF in the section "Run script before the environment is set" so that the Resources are properly aligned. I work on multiple projects all the time, going back and forth, and I must have messed one up!

Thanks for your tips. You and Mike have been very helpful. Thank you both kindly for your patience and endurance...

Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Dennis - I think you are one of the few people using the Environment Manager, so it's possible you've found some bugs in it.

Tamar
 
I don't know what you're after with
Code:
CD Project_directory\XXXX1.DBF
It doesn't make any sense to CD into a dbf file.

You have a point with the current/default directory and the ability of projects to work only based on that being correct. That can cause trouble with two projects needing different default directories, so usually you only work with a set of projects homed to the same base directory. But that affects compiling and finding correct includes, I don't see how that affects the evaluation of methods with/without code highlighting.

You also have a point in that "run scripts before the environment is set" can do anything, but that's given by you. Do you do anything with fonts in VFP windows in your scripts?
The environment manager is indeed part of XSource, so its source code can be searched for anything about font changes, the VFP9 SP2 version of it is at

Chriss
 
Dennis,

I can't add much more to everything that's already been said, except to say that I have some eight to ten projects on my main development machine - all separate applications that I have developed over the years and which I still work on from time to time. Each has its own PJX file. I frequently switch between projects in the same session. But I have never come across anything like this problem before.

But then I have never used the environment manager. It would be interesting to look at its source code. And I wonder if you can actually run the environment manager under the debugger - it's written in VFP after all.

Thank you for your kind words about my articles, by the way. It's always good to know that someone actually reads them.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 


I had a bad FOXUSER.DBF file and made the mistake of copying it into each Project's subdirectory. I looked and found a good one and copied it in its stead. ... back to normal.

Mike, Chris, Mannib, and Tamar... Thank you all for the help! That was just my gaff. But it sure is a doozy!


Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top