Constructor Request

7 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 11 Apr 2013 Link to this post

    You know how right now you have the ability to create a constructor?

    Could you give us another one to create a constructor that also passes in all the properties and initializes them?

    So it would take this
    public class AlphaPagerItem {
         public string Text { get; set; }
         public string Url { get; set; }
         public string Class { get; set; }
     }

    ANd do this
    public class AlphaPagerItem {
         public AlphaPagerItem(string text, string url, string cssClass)
         {
               this.Text = text;
               this.Url = url;
               this.CssClass = cssClass;
         }
     
         public string Text { get; set; }
         public string Url { get; set; }
         public string CssClass { get; set; }
     }
    Going the extra mile would be the ability to remove properties before it "saves"

    ...thoughts?
  2. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 12 Apr 2013 Link to this post

    Hello Steve,

     Thanks for the suggestion.
    We will discuss it within the team. I was thinking to pop up an additional window to the current command that will allow you to select which properties to pass and if none selected to create constructor without parameters.

    Thanks.

    Kind regards,
    Zdravko
    the Telerik team
    Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
  3. DevCraft banner
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 12 Apr 2013 Link to this post

    If you could work it such that keystrokes would just work, that'd be fantastic...generally I hate having to move from keyboard to a mouse in a popup....like the replace dialog that pops up, always feel I need to go to the mouse to make sure I'm not replacing solution-wide

    Google your competitors "Smart Constructor"
  5. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 12 Apr 2013 Link to this post

    Hi,

     Right now you can generate constructor by selecting the properties that you want to include for initialization. But this way you can't skip any.
    Thanks.

    All the best,
    Zdravko
    the Telerik team
    Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
  6. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 12 Apr 2013 Link to this post

    Right now you can generate constructor by selecting the properties that you want to include for initialization

    Oh!?...how?  Is there any documentation or video...or?

    I tried just screwing around with Ctrl-~ on a new class and couldn't see (wasn't obvious)
  7. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 12 Apr 2013 Link to this post

    Hi,

     Indeed, it seems there is a lapse in the documentation which I will fix right now. Here is the demo.
    Thanks.

    Greetings,
    Zdravko
    the Telerik team
    Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
  8. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 12 Apr 2013 Link to this post

    OH!  See that's not even obvious from the JC UI that it would even happen!...documentation aside

    Thanks
Back to Top
DevCraft banner