Page 2 of 2

Re: Need Autorestore Window in @ .. DCDIALOG

Posted: Sun Jan 31, 2010 7:41 pm
by rdonnay
Ok Michael, there are several issues that I corrected in your code:

Your call to DC_AutoRestoreWindow() was incorrect.
Was: DC_AutoRestoreWindow ({HKEY_CURRENT_USER, '\Software\Michael\Demo\Fenster'})
Is: DC_AutoRestoreWindow ({HKEY_CURRENT_USER, 'Software\Michael\Demo\Fenster'})

The parent of the subdialog window was not a drawing area.
Was: ACTION {|o| o:=Thread():new(),o:Start("Test1",oDialog) }
Is: ACTION {|o| o:=Thread():new(),o:Start("Test1",oDialog:drawingArea) }

The GetList was not being saved, therefore DC_GetDestroy() was not working:
Was: DCREAD GUI parent oDialog OPTIONS GetOptions HANDLER _DlgHandler TO lOK
Is: DCREAD GUI parent oDialog OPTIONS GetOptions HANDLER _DlgHandler TO lOK SAVE

Re: Need Autorestore Window in @ .. DCDIALOG

Posted: Sun Jan 31, 2010 7:47 pm
by edv-rudrich
Hi Roger

thanks...

I just did remove the '\' in the reg-entry and it seems to work..

When I use the SAVE clause - could it happen that I run into memory
problems? When every Getlist is kept again and again?

Thks

- Michael

Re: Need Autorestore Window in @ .. DCDIALOG

Posted: Sun Jan 31, 2010 8:27 pm
by rdonnay
You only need to use the SAVE clause when you use DC_GetDestroy() to destroy your windows.

As long as you use LOCAL variable for GetList, this is not a problem.

The GetList will be released from memory when returning from the procedure.

Re: Need Autorestore Window in @ .. DCDIALOG

Posted: Mon Feb 01, 2010 2:29 am
by Tom
If you use the "CODE"-Tag (Button above the edit window, just mark the text and press "Code") of the forum, code snippets are much easier to read:

Code: Select all

#include "dcdialog.ch"

STATIC oDialog

Procedure APPSYS()
RETURN