Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
FDestroying ??? |
Fri, Mar 31 2023 10:13 PM | Permanent Link |
Ian Branch | HI Team,
I have this in the Form type.. {code} ... private { Private declarations } FDestroying: Boolean; ... {code} and {code} ... protected property Destroying: Boolean read FDestroying write FDestroying; end; {code} and this procedure in the App.. {code} procedure TLogInForm.DBSLoginRemoteReconnect(Sender: TObject; var Continue, StopAsking: Boolean); begin // if FDestroying then begin Continue := False; StopAsking := True; end else begin Continue := True; ... ... {code} DBSLogin being a TEDBSession. What I can't establish is where FDestroying is being set one way or the other. Or, where it should be set one way or the other. Thoughts/suggestions appreciated. Regards & TIA, Ian |
Sat, Apr 1 2023 3:23 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
Maybe I'm misunderstanding but it looks like FDestroying is yours so its your responsibility to set it to True or False. However, it also looks like you're trying to reference a private variable defined in one form in a second form even if they both inherit from a common form which has FDestroying they are separate instances of the form and I think the private variables will be just that. Think of when you drop a component onto a form you can set the properties individually for each component. Inheritance is always fun and I'm never certain as to the rules so I generally have a bit of a play. I'm not sure just what you're trying to accomplish. Should FDestroying should only be set to True when the application is closing, or when specific forms are closing or what? Roy Lambert |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |