Print Page | Close Window

SOLVED: Problem cleaning up

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=13213
Printed Date: 31 January 2025 at 1:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: Problem cleaning up
Posted By: rdhaan
Subject: SOLVED: Problem cleaning up
Date Posted: 20 January 2009 at 9:02am
Hi all,
 
I have a problem with cleaning up the Panes.
 
I create 3 panes , with 1 docked to the right, and the other 2 below the first.
 
   ASSIGN h_Pane = ch_DockingPane:CreatePane( 1, 150, 100, 1 /* Right  */, ? ).
   ASSIGN h_Pane = ch_DockingPane:CreatePane( 2, 150, 100, 3 /* Bottom */, h_Pane ).
   ASSIGN h_Pane = ch_DockingPane:CreatePane( 3, 150, 100, 3 /* Bottom */, h_Pane ).
   /* Use them */
  
then for the first 2 i create a frame and set the handle (third is not used at this moment, still developing).
 
After the program is done, i want to clean it all up:

   /* Clean up */
   DO WHILE ch_DockingPane:PanesCount > 0:
      ASSIGN h_Pane = ch_DockingPane:FindPane( ip_ID ).
      IF NOT VALID-HANDLE( h_Pane ) THEN
         next.
 
      MESSAGE 'Cleaing up number: ' h_Pane:ID.
 
      ch_DockingPane:DestroyPane( h_Pane ).
   END.
  
  
But: I get the message 'Cleaing up number 3:' and then my applicatyion crashes.
What do i do wrong?
 
BTW. This is written in Openedge, but using the same kind of code in VB also crashes VB????



Replies:
Posted By: Oleg
Date Posted: 21 January 2009 at 2:16am

Hi,

Guess you call DestroyPane for same pane twice. Please attach this VB sample that crash


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: rdhaan
Date Posted: 22 January 2009 at 7:50am
Hoi Oleg,
 
I've found out what my problem was.
First my window is destroyed (and effectly set the hwnd to 0...).
then i start deleting my panes and all frames and windows atteched to them. This results in the crash.
 
I made the VB by hand, resulting in the same situation: frst the window is destroyed, then the pane(s).
 
After changing the order (first the pane, then the window) the problem is solved.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net