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!

How to make Intellisense respect the case of user defined methods?

Status
Not open for further replies.

TomSlayton

Programmer
Oct 21, 2011
19
0
1
US
Hi,

Does anyone know if there is an option to tell fox not to change user defined method names to lowercase? It's a bit frustrating. I generally name my methods in mixed case but fox keeps converting them. All of the Fox defined methods in the class are mixed case.

Thanks,

Tom.
 
Change the Intellisense Capitalization settings using the menu option Tools->Intellisense Manager.

 
No, the intellisense manager settings just handles, whether native keywords are written in CamelCase.

While in the class designer, choose "Member Editor" from the Class menu. Choose a member (property or method) and check "HasMemberdata". You then can edit the displayname. Once you edit members, a property _MemberData is added to the class and there you find some simple XML to configure display name and also, whether members are show in the Favorites tab of the property window. So to change lots of names in one go you better edit or create that xml directly.

There is a more comfortable way to make VFP use your capitalisation right away: Go to codeplex.com, VFPX project and download the PEMEditor. It will replace the Edit Property/Method Editor and the other editors, so it writes _MemberData right away.

As a sidenote: You can do something in the intellisense manager, too: Click Browse in the general tab of the Intellisense Manager, to get a few capitalisations better, egg you could change the "Expanded" field in the record for ADDBS to AddBS or AddBs (Add Backslash) and for LPARAMETERS to LParameters (Local Parameters), etc.

You can do a lot here, too, but the place for the capitalisation of userdefined PEMs is within the class itself, in the _memberdata property. It's better embedded there, isn't it? because that will always stay together with the class. You can check the option to always add that _MemberData property to classes in the MemberData Editor.

Bye, Olaf.
 
Hi Tom, and welcome to the forum.

It's not Intellisense that is changing the names of your methods to lower case. By default, all custom method (and property) names are always displayed in lower case, throughout the IDE.

In VFP 8.0 and earlier, there's nothing you can do about that. In VFP 9.0, you can override the behaviour by using the Member Data Editor:

1. From the Form or Class menu, choose Edit Member Data.

2. Select the method or property in question.

3. Tick "Has Member Data".

4. In the Display As box, edit the property name so that it has the case that you wish to see.

5. OK out of the editor and save the class or form.

Hope this helps.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike/Olaf,

Thanks for the help, that's help a lot.

Best,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top