[futurebasic] Re: [FB] CloseDialog or DisposDialog

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2001 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Sun, 28 Oct 2001 09:40:28 +1300
>When I open dialog resource with NEWDIALOG,
>I used CloseDialog for a long time, but new OS-X does not support
>CloseDialog.
>
>I happened to find DisposDialog.
>Which should I used, CloseDialog or DisposDialog?
>Is there any harmfull effect to use DisposDialog in stead of CloseDialog?


DisposDialog is an old name for DisposeDialog.


A dialog created by
  dPtr = fn GetNewDialog( ... 

or by these rarely-used methods
  dPtr = fn NewDialog( _nil, ....
  dPtr = fn NewColorDialog( _nil, ...

should be disposed of with
  DisposeDialog( dPtr )

It is technically incorrect to use CloseDialog for these dialogs, although no harm seems to result. CloseDialog is used in several examples on the Release 5 CD, which will therefore need updating (to use DisposeDialog) in OS X:

Palette animation
CTB routine_FB^3.INCL
Dialog With UserItems.BAS


Robert P.