This is a migrated thread and some comments may be shown as answers.

Style convention for naming using object_event

9 Answers 104 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 21 Jan 2012, 03:48 PM
Hi,
 
I see that last version is accomodating ASP.NET naming conventions.
 
For example, the "Page_Load" style convention for naming using object_event - this is recommended to be changed to PageLoad.
 
I trying to rename "Page_Load" to "PageLoad" but that means it isn't called anymore.
 
How can I accomodate Page_Load event?
 
David.

9 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 21 Jan 2012, 04:59 PM
Hi,

Thank you for your feedback. Currently, there is no rule that will be satisfied by this syntax "Page_Load".
However, we have already implemented two additional rules that will help you cover this scenario.
They will be included in our next internal build.
As a temporary workaround you could ignore the warning that JustCode is showing, disable the naming convention for methods or add a secondary naming convention that has Pascal Case as a rule and "_Load" as a suffix.
If you have any more questions or remarks, please do not hesitate to contact us again!

Kind regards,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Stuart Hemming
Top achievements
Rank 2
answered on 29 Jan 2012, 07:28 PM
Realistically, we're going to need a whole raft of exceptions for these conventions. -- Stuart
0
Ivan
Telerik team
answered on 30 Jan 2012, 01:28 PM
Hello,

Do you mean that a lot of secondary naming policies(the combination of a prefix, a rule and  a suffix) will be needed in order to cover all possible cases, or that more rules should be introduced.
If it is the second case, it would be highly appreciated to give us some examples. That way, if we have missed something, we can add/fix it.
Thank you for your help!

Kind regards,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Stuart Hemming
Top achievements
Rank 2
answered on 31 Jan 2012, 09:52 AM
Ivan, I actually mean the former case. If you think about just the number of events used in telerik's controls... I know it's been said that we (the developer's) choose the names, but that's only true part of the time (the name is suggested for you if you are using the property Grid in design mode). -- Stuart
0
Ivan
Telerik team
answered on 01 Feb 2012, 12:43 PM
Hi,

You are absolutely correct. That is why there is an option to add secondary rules. We also do our best to provide you with the necessary rules, so that you will be able to cover every possible case.
After all, our goal is to make our customers more productive, not get in their way.

Greetings,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Stuart Hemming
Top achievements
Rank 2
answered on 01 Feb 2012, 02:20 PM
Ivan, The point I was hoping to make is that we, individual JC users, shouldn't have to create all of these exceptions/secondary rules for ourselves.
0
David
Top achievements
Rank 1
answered on 02 Feb 2012, 12:25 PM
Hi,

I have just downloaded new internal build, and i'm still getting the same problem. How can I disable name convention? I'm looking at JustCode --> Options --> Code Analysis --> Warnings --> C# but i didnt find anything yet.

Thanks
0
Ivan
Telerik team
answered on 02 Feb 2012, 01:44 PM
Hello,

You have to set a secondary naming convention for the "Methods" conventions, in order not to get this warning any more. Here is a sample demo how to do this: http://screencast.com/t/PKDeqhiZIl.
If you, however, want to disable the naming conventions warnings - there are two ways of doing that. The first one is to disable them from JustCode --> Options --> Code Analysis --> Warnings --> C# --> Naming inconsistency. Or from the Naming conventions view: JustCode -> Options -> Code Style -> Naming Conventions. Then you have to disable all naming conventions one by one.
Please let me know if adding a secondary naming convention helped you.
If you have more questions or remarks, please do not hesitate to contact us again!

Regards,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
David
Top achievements
Rank 1
answered on 02 Feb 2012, 02:30 PM
Thats all, thx
Tags
Code Analysis
Asked by
David
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Stuart Hemming
Top achievements
Rank 2
David
Top achievements
Rank 1
Share this question
or