Ah, that did it, thanks H&K! To everyone else as well for suggestions.
So since Tgad is a TGadget object thats part of Object TNewWindow and MAinWindow was created as a TNewWindow type, that allows us access to the TGadget functions of Tgad going through the high level qualifier of Mainwindow.Tgad. Interesting.
Does this really buy me anything doing it this way or make my code any better? I mean I could just use a basic Mainwindow:TGadget=createwindow etc....statement and then just use all the TGadget functions strait from there. That is simpler to do.
I guess it all depends on how I structure it, if I put all my basic Gadget properties in my main gadget object TMyGadget and derive all other gadget objects from that its a good thing because I dont have to recreate the entire object structure each time.
Anyways, just wondering as Im a bit new the Object Oriented way of doing this, but I wanna do things this way as I am assuming reusing as much code as possible means more efficient code during run time.
Thanks all!
So since Tgad is a TGadget object thats part of Object TNewWindow and MAinWindow was created as a TNewWindow type, that allows us access to the TGadget functions of Tgad going through the high level qualifier of Mainwindow.Tgad. Interesting.
Does this really buy me anything doing it this way or make my code any better? I mean I could just use a basic Mainwindow:TGadget=createwindow etc....statement and then just use all the TGadget functions strait from there. That is simpler to do.
I guess it all depends on how I structure it, if I put all my basic Gadget properties in my main gadget object TMyGadget and derive all other gadget objects from that its a good thing because I dont have to recreate the entire object structure each time.
Anyways, just wondering as Im a bit new the Object Oriented way of doing this, but I wanna do things this way as I am assuming reusing as much code as possible means more efficient code during run time.
Thanks all!