Style convention for naming using object_event

10 posts, 0 answers
  1. David
    David avatar
    4 posts
    Member since:
    Aug 2011

    Posted 21 Jan 2012 Link to this post

    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.
  2. Ivan
    Admin
    Ivan avatar
    106 posts

    Posted 21 Jan 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 29 Jan 2012 Link to this post

    Realistically, we're going to need a whole raft of exceptions for these conventions. -- Stuart
  5. Ivan
    Admin
    Ivan avatar
    106 posts

    Posted 30 Jan 2012 Link to this post

    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 >>

  6. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 31 Jan 2012 Link to this post

    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
  7. Ivan
    Admin
    Ivan avatar
    106 posts

    Posted 01 Feb 2012 Link to this post

    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 >>

  8. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 01 Feb 2012 Link to this post

    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.
  9. David
    David avatar
    4 posts
    Member since:
    Aug 2011

    Posted 02 Feb 2012 Link to this post

    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
  10. Ivan
    Admin
    Ivan avatar
    106 posts

    Posted 02 Feb 2012 Link to this post

    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 >>

  11. David
    David avatar
    4 posts
    Member since:
    Aug 2011

    Posted 02 Feb 2012 Link to this post

    Thats all, thx
Back to Top
DevCraft banner