Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: error code 50 Date: Sun, 27 Jun 2021 07:16:20 +0200 Lines: 69 Message-ID: References: <04f23ecf-226a-4b27-b7e9-457ab8cb17f8n@googlegroups.com> <9295928d-94c2-4415-8dc5-2973418f02a9n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net oDYuqqdF30m/uNBEVSLO0we5Ude82/l8r5xKDAVaII2auUg8k= Cancel-Lock: sha1:yNPLiL/fWIKh3kS239Qj1zcYDkw= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:13357 Hi Aurora, unfortunately I was very busy these days. You cannot trash an object and then access the properties of the trashed object afterwards. Wolfgang aurora baccio wrote: > Il giorno mercoledì 23 giugno 2021 alle 17:12:04 UTC+2 Wolfgang > Riedmann ha scritto: > > Hi Aurora, > > > > as I wrote: never call Destroy() on a window. > > > going by logic the problem arises only after double click in the > > > subdatawindow > > > > > > here is the method : > > 01 > AAdd(aParam,self:Owner:Server:CodOperato) > > 02 > AAdd(aParam,self:Owner:Server:CodFisc) > > 03 > AAdd(aParam,4) // start from double click > > 04 > AAdd(aParam,"") > > 05 > > > 06 > DeleteChildWindow(self:Owner:Caption) > > 07 > self:Owner:Destroy() > > 08 > > > 09 > oMenuDemNew:= > > 10 > oMenuDemNuovo_Maschera{self:Owner:Owner,,,aParam} > > 11 > FabCenterWindow(oMenuDemNew) > > 12 > oMenuDemNew:Show() > > > > this is clear (I have added numbers to the lines): > > in line 07 you are calling Destroy() on self:Owner, so you are > > cleaning it effectively up. > > But in line 10 you are accessing a member of an already destroyed > > window. > > > > I see at least two possibilities: > > - store the self:Owner:Owner to a local variable before destroying > > the self:Owner and use this variable instead of the > > self:Owner:Owner - store the shell window (this should be the > > self:Owner:Owner?) to a sort of global and retrieve it always from > > them. > > > > Wolfgang > > > > -- > > > good morning, > I have come to the conclusion, I hope correct, that the source of my > problems are these two lines of code contained in the double-click > method *DeleteChildWindow(self:Owner:Caption) > *self:Owner:Destroy() as you can see they have been disabled and the > problem has disappeared. These two lines should destroy the whole > mask named RequestFiscalCode, a data dialog in which there is the > list of appointments of the day, displayed in a subdatawindow. The > first self:Owner should close the subData, while the second should > close the datadialog, at least I think so since the entire mask > disappears. Once the two lines are deleted, the datadialog remains > active, as does the subdata. At the end of the procedure I would > like to reset it, how do I do it? thanks Aurora Baccio --