Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - SOLVED: Problem cleaning up
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Problem cleaning up

 Post Reply Post Reply
Author
Message
rdhaan View Drop Down
Newbie
Newbie
Avatar

Joined: 11 December 2008
Location: Netherlands
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhaan Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Problem cleaning up
    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????
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
rdhaan View Drop Down
Newbie
Newbie
Avatar

Joined: 11 December 2008
Location: Netherlands
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhaan Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.