- This topic has 7 replies, 3 voices, and was last updated 11 years, 9 months ago by IPSteven.
-
AuthorPosts
-
February 16, 2013 at 10:06 am #35649IPStevenParticipant
I noticed a problem in an application that I was working on – problem does not exist with AlphaSkins v8.16 or earlier, only with versions 8.17 and 8.18.
I built a demo application to demonstrate the problem.
The demo application uses 3 speedbuttons to load sub-forms onto a pagecontrol tab.
Subform1 is loaded by default.
The image below is from then demo application – built using AlphaSkins v8.16.
Clicking on buttons hides current subform and loads/shows alternate sub-forms as show below.
Below are images from same demo application but this time built using AlphaSkins v8.18.
Notice that when the Form2 button is clicked (Form2 button is in down state) that it looks like subform2 failed to load.
But when I move the demo app I see that form2 is hidden beneath subform1.
Subform1 is not only not hiding – it is a 'dead' form!
I'm calling it a dead form because it is not clickable (not active) and it fails the assigned(formX) test – see code below.
more dead forms created…
and those dead forms create memory leaks.
Here is what the code looks like for the btnForm2 click event:
Code:procedure TMain.btnLaunchForm2Click(Sender: TObject);
begin
if tabMMTools.Tag = Ord(csfForm2) then //check what form# is loaded
Exit;form1.Hide;
if Assigned(form3) then
form3.Hide;if Assigned(form2) then begin
form2.Show;
tabMMTools.Tag := Ord(csfForm2); //set form# flag
exit;
end;// form has not been create yet – create & load
//setting tab in pagecontrol as parent
Application.CreateForm(Tform2, form2);
form2.Parent := tabMMTools;
form2.Align := alClient;
form2.BorderStyle := bsNone;Application.ProcessMessages;
form2.Show;tabMMTools.Tag := Ord(csfForm2); //set form# flag
end;Here is a link to demo code and 2 demo EXEs (one built with A.S.v8.16 and the other built with 8.18)
[attachment=6223:as8_16formhideProb.rar]
February 17, 2013 at 4:49 pm #50199SupportKeymasterHello IPSteven, thanks for this excellent report :a3:
The issue will be solved in the nearest release.
February 18, 2013 at 8:23 am #50204HamiltonParticipant+1 . This issue affects every docked form. I'm not calling Form.Hide like the sample, instead I'm calling Form.Close with a caFree action in the OnClose event, yet the same behaviour is observed. Fingers crossed for a fast fix, until then I'm going back to 8.16.
Regards,
Hamilton
February 18, 2013 at 8:44 am #50205SupportKeymasterI can give the patched file already, if needed. 🙂
February 19, 2013 at 4:25 am #38391HamiltonParticipantNice 🙂 Pls email me the file or post it here and I'll find it. Ty Serge.
February 19, 2013 at 11:07 am #38386SupportKeymasterSent by mail :).
February 22, 2013 at 9:51 am #38357HamiltonParticipantThx for the file, I notice this is also fixed in v819.
Cheers,
Hamilton
February 25, 2013 at 11:45 pm #50233IPStevenParticipantVerified as fixed in 8.19,
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.