CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

June 2003 - Posts

  • Under construction

    Last time I blogged I mentioned the SDGN as a Dutch .net developpers association. Jonne Kats pointed out I did not mention DotNed. An organization I do not know personally but they have a good meeting planned for the 26th.

    Lately I've been strugling somewhat with constructors. Every class does need a default (that is parameterless) constructor to be a base class. Take this class decalaration

    public class DLitem

    {
       private DataListItem dlItem; 

       public DataListItem Item 
       { // do something }

       public DLitem(DataListItem item) 
       {
          dlItem = item;
       }

      }

    This class has only one, overloaded, constructor. It compiles fine but the moment you try to create a derived class the derived class won't compile until you add a default constructor to the base class

    public class DLitem

    {
       private DataListItem dlItem; 

       public DataListItem Item 
       { // do something }

       public DLitem()
      {
       }

       public DLitem(DataListItem item) 
       {
          dlItem = item;
       }

      }

    Now your descendent classes will compile.

    private class ListTemplate : Algemeen.DLitem
    {
      
    // New members here
    }

    To use the overloaded constructor of the base class you have to overide it, even if the override does not add any functionality

    public ListTemplate(System.Web.UI.WebControls.DataListItem item) : base(item)
    {
    }

    No extra implementation needed so : base(item) will do to call the constructor of the base class.

    I had read the advise : "allways give your class a default constructor", and now I've seen the compiler enforces it.. But I am still somewhat puzzeled by the fact I have to override the overload constructor. Back to the library.

    Blog On.

    Peter

     

     

  • Blog on

    hi everybody,

    just great to see a community evolving over here with such varying topics as hard core code to (used) cars. Where I live, the Netherlands, we do have several user groups. One of them, the SDGN does run a site and some forums (amongst others) on .NET but the amount of posts there are not to great. Maybe due to their historical background in Clipper and Delphi.

    Anyway, over here we've been installing a (rather) complicated asp.net for a company who (so far) mainly relies on an SAP system. They have set up an IIS / SQL server box and ran setup.exe. The application consist of several virtual directories but configuring them can be done in one place. All virtual dirs share their parent dir. In the web.config file over there we set authentication and the database connection string and all parts were running. Except for a bug in one page... Will fix that.

    Also did some work on my own web-site. Added a couple of reviews on imho essential books. Originally I've been trained to do scientific research and when publishing in that world you have to show your sources. I'll do just that for my software material.

    blog on,

    Peter

  • Getting the hang of it

    Spent quite some visits to the new dnj site now and I really getting "the hang of it". It inspired me to finishing and submitting my new contribution. It will take some time before it will be on the site, everybody is at TechEd.

    I would like to go to the european Teched, but given the amount of miles, time and money that will take I don't think my family nor my bookkeeper will agree on that. A more efficient way to spend the time is reading "applied xml programming" by Dino Esposito. Man, that is a great book ! But when reading in the garden you don't meet that many other developers (my kids are still at the Freddy-Fish and Pokemon level), that's where the weblog comes is.

    Programming time last days I spent in Delphi (6). It's still a great language but gives me RSI compared to C#. And the Delphi IDE just drives you nuts. Borland just introduced a new IDE (Sidewinder), looks like a VS.NET clone.

    Peter

  • Hello weblog

    Weblogging is quite new to me but sounds exciting. And it looks even more exiting as I browse around on the new dnj-site. What you can do in a browser these days...

    Anyway, at this moment I am working on aother contribution for the dnj. Again on editing in a datagrid. Not a very original subject, but I want to share some of the ideas I used recently in an asp.net app. It will be great discussing it on the new dnj forums.

    blog on, Peter

More Posts