Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #13358

Re: error code 50

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Wolfgang Riedmann" <wriedmann@gmail.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: error code 50
Date Sun, 27 Jun 2021 14:32:02 +0200
Lines 104
Message-ID <ijr9e3Fca8mU1@mid.individual.net> (permalink)
References <f75c62ec-6104-4b64-aba0-f94b99b34533n@googlegroups.com> <ije9ioFrt0dU1@mid.individual.net> <e18ae42c-916f-41e8-92b9-1ef381babe50n@googlegroups.com> <ijgc81F9glmU1@mid.individual.net> <04f23ecf-226a-4b27-b7e9-457ab8cb17f8n@googlegroups.com> <ijh1a3Fdg78U1@mid.individual.net> <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 7pcwX7ENWTgRxiOzrKonMA7f1pTTHWQTMesATUFXlF2A6cdMs=
Cancel-Lock sha1:H+trOiqGge9OnPvwHwDRhEjXngY=
User-Agent XanaNews/1.18.1.6
Xref csiph.com comp.lang.clipper.visual-objects:13358

Show key headers only | View raw


Hi Aurora,

after thinking again how to explain it better to you, I have two things
to say: (and I will repeat the text below in Italian so you don't need
DeepL to understand)

- first of all: to close a window, don't destroy it, but close it. For
dialogs the correct method is :EndDialog(), for windows :EndWindow().
The destructor method (Destroy() in this case) should only be needed in
rare cases.
- second: as I wrote before (please re-read my message!), if you
destroy an object, you cannot access the properties of it anymore. If
you throw your handbag in the sea, you have no access anymore to the
money in your wallet that is in the handbag. In your case, you are
destroying self:Owner, but you try to access self:Owner:Owner in the
next codeline.

and now the Italian text:
dopo averci pensato come spiegare meglio, ho due cose da dire:
- prima: se deve chiudere und finestra, non distruggerla con Destroy(),
ma chiuderla correttamente. Per i dialog il metodo da chiamare è
EndDialog(), per le Window EndWindow(). Il metodo di distruzione
(Destroy() in questo caso) dovrebbe essere necessario only in casi
veramente rari.
- secondo: come scritto prima (e per favore rilegga il mio messaggio!)
se un oggetto viene distrutto, dopo non si ha più accesso alle
proprietà. Se butta la Sua borsa nel mare, non avrà più accesso ai
soldi che si trovano nel portafoglio nella borsa. Nel Suo caso
distrugge prima self:Owner, e nella prossima riga cerca di accedere a
self:Owner:Owner.

HTH

Wolfgang

P.S. if you are not sure that you understand this, please ask again,
maybe better with a private email in Italian (even if I my nationality
is Italian, my mothers language is German, so my Italian is not
perfect).

And I'm far from being a "VO guru" - I have only a few years of
experience with it, so don't expect too much.


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



-- 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

error code 50 aurora baccio <aurorabaccio@gmail.com> - 2021-06-22 05:51 -0700
  Re: error code 50 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-06-22 16:14 +0200
    Re: error code 50 aurora baccio <aurorabaccio@gmail.com> - 2021-06-22 11:33 -0700
      Re: error code 50 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-06-23 11:12 +0200
        Re: error code 50 aurora baccio <aurorabaccio@gmail.com> - 2021-06-23 04:45 -0700
          Re: error code 50 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-06-23 17:12 +0200
            Re: error code 50 aurora baccio <aurorabaccio@gmail.com> - 2021-06-24 06:58 -0700
              Re: error code 50 JohnMartens <martens@tennishulp.info> - 2021-06-24 18:32 +0200
                Re: error code 50 aurora baccio <aurorabaccio@gmail.com> - 2021-06-24 10:12 -0700
                Re: error code 50 JohnMartens <martens@tennishulp.info> - 2021-06-24 21:35 +0200
                Re: error code 50 aurora baccio <aurorabaccio@gmail.com> - 2021-06-25 05:41 -0700
                Re: error code 50 JohnMartens <martens@tennishulp.info> - 2021-06-25 16:49 +0200
                Re: error code 50 aurora baccio <aurorabaccio@gmail.com> - 2021-06-25 23:33 -0700
                Re: error code 50 JohnMartens <martens@tennishulp.info> - 2021-06-26 08:58 +0200
              Re: error code 50 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-06-27 07:16 +0200
              Re: error code 50 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-06-27 14:32 +0200
                Re: error code 50 aurora baccio <aurorabaccio@gmail.com> - 2021-06-30 06:00 -0700
                Re: error code 50 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2021-06-30 17:13 +0200

csiph-web