If you DESTROY a HIDDEN control, your program may become instable! 
Author Message
 If you DESTROY a HIDDEN control, your program may become instable!

Hi All,

Last nigt a tried to solve a clients problem. The bete release of his CW50
program I made was very instable (GPF).
After research I found the cause: I used the DESTROY(?MenuControl) command
to get rid of a menu choice because of the autorisation of a user of the
program. Else were (earlier) in the procedure I used the command
HIDE(?MenuControl)  for the same control.
Conclusion: don't destroy hidden controls.

I took me quite a time to find the 'GPF' so I decided to warn you all.

Roel Grit



Mon, 02 Jun 2003 20:53:03 GMT  
 If you DESTROY a HIDDEN control, your program may become instable!
Hi Roel!

Quote:
> After research I found the cause: I used the DESTROY(?MenuControl) command

If ?MenuControl is not a menu ITEM but a menu GROUP, then you must first
destroy all the contents of the group, including items and submenus and
THEIR items, before destroying the group itself.

-- Craig (The Data Ferret)
http://www.pcferret.com/ for RARS, NetClip
http://www.pcferret.com/teletools.html for Telephony
http://www.pcferret.com/gps.html for GPS!
Virtual Access 5.50 build 311 Win98
http://counter.li.org ID #184149
"Do not meddle in the affairs of FERRETS..."



Mon, 02 Jun 2003 17:00:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Hide or Destroy controls?

2. Why does ActiveX video control becomes corrupt?

3. DESTROY-ing menu item or control

4. To become: or not to become: th

5. to become: or not to become:

6. binding <Destroy> of windows to hide the windows and not destroy them

7. Can't destroy widget without destroying window

8. Hiding checkbox control with static text

9. Hiding/Unhiding report Controls

10. Hiding controls and fields on a report

11. Problem with hiding PARTS on tab-control-pages

12. Hide another windows control

 

 
Powered by phpBB® Forum Software