SunnyD
Belgian Waffler
Anyone that might be willing to answer a few questions for me specifically regarding Delphi and visual bits 'n pieces? This environment is driving me nuts.
#1 - I inherited a project, and it's ugly. I'm fairly new to Delphi, so I'm happy just plugging along, but there's certain things that are confusing me coming from a Microsoft background. Particularly runtime creation of UI components. Basically, right now, the app's UI is a bunch of panels hiding other components, which get hidden when certain data shows up and whatnot. Think tabbed pages for the most part - but each page can have multiple "layers" on it. Having something like 6 or 7 "layers" is making it difficult to modify the UI any. Is this normal?
#2 - Again, I'm used to MS-land, where you create an instance of an object and it stays until it's out of scope. However, Delphi happily lets you do something like the attached code. The thing is, once the procedure goes out to scope, the Frame (or form, or whatnot) is still happily there and running - with no way to access it (that I'm aware of). I know the answer is "don't do that", but honestly - why is this even allowed?!
#3 - I can't seem to do the same thing, except using *.Create instead of *.CreateForm. If I use *.Create, weird things happen depending on even weirder scenarios (like if the "variable" is local, global or class - only local works, and then only in certain situations).
#4 - If I create a component based on the action of another component, using "Self" as the parent (as everything I've seen suggests), the original component disappears, moves, or otherwise gets altered. Such as a form with a button, on clicking the button dynamically creating another button causes the original button to go away. This should not happen?
I've got tons more, but these are the first ones off the top of my head.
#1 - I inherited a project, and it's ugly. I'm fairly new to Delphi, so I'm happy just plugging along, but there's certain things that are confusing me coming from a Microsoft background. Particularly runtime creation of UI components. Basically, right now, the app's UI is a bunch of panels hiding other components, which get hidden when certain data shows up and whatnot. Think tabbed pages for the most part - but each page can have multiple "layers" on it. Having something like 6 or 7 "layers" is making it difficult to modify the UI any. Is this normal?
#2 - Again, I'm used to MS-land, where you create an instance of an object and it stays until it's out of scope. However, Delphi happily lets you do something like the attached code. The thing is, once the procedure goes out to scope, the Frame (or form, or whatnot) is still happily there and running - with no way to access it (that I'm aware of). I know the answer is "don't do that", but honestly - why is this even allowed?!
#3 - I can't seem to do the same thing, except using *.Create instead of *.CreateForm. If I use *.Create, weird things happen depending on even weirder scenarios (like if the "variable" is local, global or class - only local works, and then only in certain situations).
#4 - If I create a component based on the action of another component, using "Self" as the parent (as everything I've seen suggests), the original component disappears, moves, or otherwise gets altered. Such as a form with a button, on clicking the button dynamically creating another button causes the original button to go away. This should not happen?
I've got tons more, but these are the first ones off the top of my head.