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


Groups > comp.lang.clipper.visual-objects > #13342 > unrolled thread

error code 50

Started byaurora baccio <aurorabaccio@gmail.com>
First post2021-06-22 05:51 -0700
Last post2021-06-30 17:13 +0200
Articles 18 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  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

#13342 — error code 50

Fromaurora baccio <aurorabaccio@gmail.com>
Date2021-06-22 05:51 -0700
Subjecterror code 50
Message-ID<f75c62ec-6104-4b64-aba0-f94b99b34533n@googlegroups.com>
fternoon.
Here in Sicily it is 37 degrees Celsius.
My application presents an initial facade that is launched through this class
 CLASS Mainwindow INHERIT ShellWindow

EXPORT oColour AS Color // The color object if selected
EXPORT Red AS INT
EXPORT Green AS INT
EXPORT Blue AS INT
PROTECT oSB AS StatusBar
PROTECT hBkGndBitMap AS PTR
EXPORT CaptionOK AS STRING

Here is the main menu with the method to exit the program. And it is here that I return all methods at the end of the procedures.
The initial mask is launched with the Launch method

METHOD Launch() CLASS MainWindow   
	
LOCAL oWin as RichiestaCodiceFiscale_Maschera  
	
PlaySound(String2Psz(pathname+"patients.wav"),null,SND_FILENAME+SND_ASYNC)
	
oWin := RichiestaCodiceFiscale_Maschera{self}   
FabCenterWindow(oWin)
oWin:Show()   
	
RETURN nil

In the launched mask (a data dialog) there are a whole series of quick procedures, including the launch of the dispensing of recipes by double-clicking from a sub data window. If I exit from this mask I should, by my logic, return to the initial, basic screen. This is what happens if I exit after performing any procedure other than double click. In this case you get the following error
ERROR CODE 50 ACCESS VIOLATION
.....
DESCRIPTION APPLICATION CODE ERRORCAUSIN ACCES VIOLATION
CALLSTACK:
MAINWINDOS LAUNCHES (LINE 13) (corresponds to : owin:show())
APP:START LINE 443
START: LINE 6
 Can someone help me?
thanks
Aurora Baccio

Translated with www.DeepL.com/Translator (free version)

[toc] | [next] | [standalone]


#13344

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2021-06-22 16:14 +0200
Message-ID<ije9ioFrt0dU1@mid.individual.net>
In reply to#13342
Hi Aurora,

> In the launched mask (a data dialog) there are a whole series of
> quick procedures, including the launch of the dispensing of recipes
> by double-clicking from a sub data window. If I exit from this mask I
> should, by my logic, return to the initial, basic screen. This is
> what happens if I exit after performing any procedure other than
> double click. In this case you get the following error ERROR CODE 50
> ACCESS VIOLATION .....  DESCRIPTION APPLICATION CODE ERRORCAUSIN
> ACCES VIOLATION CALLSTACK:  MAINWINDOS LAUNCHES (LINE 13)
> (corresponds to : owin:show()) APP:START LINE 443 START: LINE 6 

this may be difficult to find: a GPF like this is occurring most of the
time if you are accessing an object that is being destroyed.

Searching for a GPF cause can be really time consuming....

Wolfgang


-- 

[toc] | [prev] | [next] | [standalone]


#13345

Fromaurora baccio <aurorabaccio@gmail.com>
Date2021-06-22 11:33 -0700
Message-ID<e18ae42c-916f-41e8-92b9-1ef381babe50n@googlegroups.com>
In reply to#13344
Il giorno martedì 22 giugno 2021 alle 16:14:49 UTC+2 Wolfgang Riedmann ha scritto:
> Hi Aurora,
> > In the launched mask (a data dialog) there are a whole series of 
> > quick procedures, including the launch of the dispensing of recipes 
> > by double-clicking from a sub data window. If I exit from this mask I 
> > should, by my logic, return to the initial, basic screen. This is 
> > what happens if I exit after performing any procedure other than 
> > double click. In this case you get the following error ERROR CODE 50 
> > ACCESS VIOLATION ..... DESCRIPTION APPLICATION CODE ERRORCAUSIN 
> > ACCES VIOLATION CALLSTACK: MAINWINDOS LAUNCHES (LINE 13) 
> > (corresponds to : owin:show()) APP:START LINE 443 START: LINE 6
> this may be difficult to find: a GPF like this is occurring most of the 
> time if you are accessing an object that is being destroyed. 
> 
> Searching for a GPF cause can be really time consuming.... 
> 
> Wolfgang 
> 
> 
> --
Good evening Mr. Riedman, and thank you always.
Your conclusion is my conclusion as well.
But the point is that I destroy (with theExit button) the RequestFiscalCode window and not the mainwindow.
I have tried both Destroy(9 and Endwindow().
And if I don't double click on the subdatawindow contained in the TaxCodeRequest window everything works normally.
And in any case the procedures activated with the double click are activated and closed regularly.
A question: what does GPF mean?
thanks
Aurora Baccio

[toc] | [prev] | [next] | [standalone]


#13346

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2021-06-23 11:12 +0200
Message-ID<ijgc81F9glmU1@mid.individual.net>
In reply to#13345
Hi Aurora,

a GPF is a general protection failure - VO calls it "access violation".

It basically means that a process tries to access memory that is
outside of its memory space.
Since VO's memory is handled by its own dynamic memory system, normally
this means that the program tries to access objects that are already
destroyed.

Unfortunately I cannot say more without seeing the entire logic, but I
suspect that a reference to the RequestFiscalCode window is stored
somewhere and your code tries to access it nevertheless it is already
garbage collected.

A call to the Destroy() method should only be used in rare cases - it
was requested in earlier VO versions to cleanup Windows ressources like
fonts or pens. But you should never call the Destroy() method on a
window or control class.

Wolfgang



aurora baccio wrote:

> Il giorno martedì 22 giugno 2021 alle 16:14:49 UTC+2 Wolfgang
> Riedmann ha scritto:
> > Hi Aurora,
> > > In the launched mask (a data dialog) there are a whole series of 
> > > quick procedures, including the launch of the dispensing of
> > > recipes by double-clicking from a sub data window. If I exit from
> > > this mask I should, by my logic, return to the initial, basic
> > > screen. This is what happens if I exit after performing any
> > > procedure other than double click. In this case you get the
> > > following error ERROR CODE 50 ACCESS VIOLATION ..... DESCRIPTION
> > > APPLICATION CODE ERRORCAUSIN ACCES VIOLATION CALLSTACK:
> > > MAINWINDOS LAUNCHES (LINE 13) (corresponds to : owin:show())
> > > APP:START LINE 443 START: LINE 6
> > this may be difficult to find: a GPF like this is occurring most of
> > the time if you are accessing an object that is being destroyed. 
> > 
> > Searching for a GPF cause can be really time consuming.... 
> > 
> > Wolfgang 
> > 
> > 
> > --
> Good evening Mr. Riedman, and thank you always.
> Your conclusion is my conclusion as well.
> But the point is that I destroy (with theExit button) the
> RequestFiscalCode window and not the mainwindow.  I have tried both
> Destroy(9 and Endwindow().  And if I don't double click on the
> subdatawindow contained in the TaxCodeRequest window everything works
> normally.  And in any case the procedures activated with the double
> click are activated and closed regularly.  A question: what does GPF
> mean?  thanks Aurora Baccio



-- 

[toc] | [prev] | [next] | [standalone]


#13347

Fromaurora baccio <aurorabaccio@gmail.com>
Date2021-06-23 04:45 -0700
Message-ID<04f23ecf-226a-4b27-b7e9-457ab8cb17f8n@googlegroups.com>
In reply to#13346
Il giorno mercoledì 23 giugno 2021 alle 11:12:36 UTC+2 Wolfgang Riedmann ha scritto:
> Hi Aurora, 
> 
> a GPF is a general protection failure - VO calls it "access violation". 
> 
> It basically means that a process tries to access memory that is 
> outside of its memory space. 
> Since VO's memory is handled by its own dynamic memory system, normally 
> this means that the program tries to access objects that are already 
> destroyed. 
> 
> Unfortunately I cannot say more without seeing the entire logic, but I 
> suspect that a reference to the RequestFiscalCode window is stored 
> somewhere and your code tries to access it nevertheless it is already 
> garbage collected. 
> 
> A call to the Destroy() method should only be used in rare cases - it 
> was requested in earlier VO versions to cleanup Windows ressources like 
> fonts or pens. But you should never call the Destroy() method on a 
> window or control class. 
> 
> Wolfgang
> aurora baccio wrote: 
> 
> > Il giorno martedì 22 giugno 2021 alle 16:14:49 UTC+2 Wolfgang 
> > Riedmann ha scritto: 
> > > Hi Aurora, 
> > > > In the launched mask (a data dialog) there are a whole series of 
> > > > quick procedures, including the launch of the dispensing of 
> > > > recipes by double-clicking from a sub data window. If I exit from 
> > > > this mask I should, by my logic, return to the initial, basic 
> > > > screen. This is what happens if I exit after performing any 
> > > > procedure other than double click. In this case you get the 
> > > > following error ERROR CODE 50 ACCESS VIOLATION ..... DESCRIPTION 
> > > > APPLICATION CODE ERRORCAUSIN ACCES VIOLATION CALLSTACK: 
> > > > MAINWINDOS LAUNCHES (LINE 13) (corresponds to : owin:show()) 
> > > > APP:START LINE 443 START: LINE 6 
> > > this may be difficult to find: a GPF like this is occurring most of 
> > > the time if you are accessing an object that is being destroyed. 
> > > 
> > > Searching for a GPF cause can be really time consuming.... 
> > > 
> > > Wolfgang 
> > > 
> > > 
> > > -- 
> > Good evening Mr. Riedman, and thank you always. 
> > Your conclusion is my conclusion as well. 
> > But the point is that I destroy (with theExit button) the 
> > RequestFiscalCode window and not the mainwindow. I have tried both 
> > Destroy(9 and Endwindow(). And if I don't double click on the 
> > subdatawindow contained in the TaxCodeRequest window everything works 
> > normally. And in any case the procedures activated with the double 
> > click are activated and closed regularly. A question: what does GPF 
> > mean? thanks Aurora Baccio
> --


Mr. Riedman good morning,
going by logic the problem arises only after double click in the subdatawindow

here is the method :
	AAdd(aParam,self:Owner:Server:CodOperato)
  	AAdd(aParam,self:Owner:Server:CodFisc)
	AAdd(aParam,4) // start from double click
  	AAdd(aParam,"")    
  	
	DeleteChildWindow(self:Owner:Caption)
   	self:Owner:Destroy()    
  	
	oMenuDemNew:= 
        oMenuDemNuovo_Maschera{self:Owner:Owner,,,aParam}
  	FabCenterWindow(oMenuDemNew)
  	oMenuDemNew:Show()     
  
the incriminating part should be self:owner:destroy()
the first owner destroys the subdatawindow, the second one the datadialog. am I wrong?
thanks
Aurora Baccio

[toc] | [prev] | [next] | [standalone]


#13348

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2021-06-23 17:12 +0200
Message-ID<ijh1a3Fdg78U1@mid.individual.net>
In reply to#13347
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

-- 

[toc] | [prev] | [next] | [standalone]


#13349

Fromaurora baccio <aurorabaccio@gmail.com>
Date2021-06-24 06:58 -0700
Message-ID<9295928d-94c2-4415-8dc5-2973418f02a9n@googlegroups.com>
In reply to#13348
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

[toc] | [prev] | [next] | [standalone]


#13350

FromJohnMartens <martens@tennishulp.info>
Date2021-06-24 18:32 +0200
Message-ID<sb2c2t$rmk$1@dont-email.me>
In reply to#13349
If you are "ready" with your dialog because you have finished in a 
method what you want to do just call SELF:EndDialog()

John


Op 24-6-2021 om 15:58 schreef aurora baccio:
> 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
> 

[toc] | [prev] | [next] | [standalone]


#13351

Fromaurora baccio <aurorabaccio@gmail.com>
Date2021-06-24 10:12 -0700
Message-ID<afed54d1-b15b-4aca-b52e-db0163ab7990n@googlegroups.com>
In reply to#13350
Il giorno giovedì 24 giugno 2021 alle 18:32:31 UTC+2 JohnMartens ha scritto:
> If you are "ready" with your dialog because you have finished in a 
> method what you want to do just call SELF:EndDialog() 
> 
> John 
> 
> 
> Op 24-6-2021 om 15:58 schreef aurora baccio:
> > 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 
> >
good evening,
I had already tried this solution
here is the answer that I cannot solve
Visual Objects (Version 2.8. Build 3.2838), Version 2.8 SP4b
24-06-2021 19:08:27
Application: c:\Prg28CardioReceipt.DBG
 
Error message:
--------------
Error Code: 13 [ NO EXPORTED METHOD ].
Subsystem: BASE
Function: SEND
Argument: SEND_MASCHERA:ENDDIALOG
CallStack:
SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17)
MAINWINDOW:LAUNCH (Line:13)
APP:START (Line:441)
START (Line:6)

Translated with www.DeepL.com/Translator (free version)

[toc] | [prev] | [next] | [standalone]


#13352

FromJohnMartens <martens@tennishulp.info>
Date2021-06-24 21:35 +0200
Message-ID<sb2mqq$g12$1@dont-email.me>
In reply to#13351
And what is the code in CellDoubleClick so we can see 
SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17) ?

Op 24-6-2021 om 19:12 schreef aurora baccio:
> Il giorno giovedì 24 giugno 2021 alle 18:32:31 UTC+2 JohnMartens ha scritto:
>> If you are "ready" with your dialog because you have finished in a
>> method what you want to do just call SELF:EndDialog()
>>
>> John
>>
>>
>> Op 24-6-2021 om 15:58 schreef aurora baccio:
>>> 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
>>>
> good evening,
> I had already tried this solution
> here is the answer that I cannot solve
> Visual Objects (Version 2.8. Build 3.2838), Version 2.8 SP4b
> 24-06-2021 19:08:27
> Application: c:\Prg28CardioReceipt.DBG
>   
> Error message:
> --------------
> Error Code: 13 [ NO EXPORTED METHOD ].
> Subsystem: BASE
> Function: SEND
> Argument: SEND_MASCHERA:ENDDIALOG
> CallStack:
> SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17)
> MAINWINDOW:LAUNCH (Line:13)
> APP:START (Line:441)
> START (Line:6)
> 
> Translated with www.DeepL.com/Translator (free version)
> 

[toc] | [prev] | [next] | [standalone]


#13353

Fromaurora baccio <aurorabaccio@gmail.com>
Date2021-06-25 05:41 -0700
Message-ID<c27f7d45-5f05-4254-881b-750dadaa8cb7n@googlegroups.com>
In reply to#13352
Il giorno giovedì 24 giugno 2021 alle 21:35:56 UTC+2 JohnMartens ha scritto:
> And what is the code in CellDoubleClick so we can see 
> SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17) ? 
> 
> Op 24-6-2021 om 19:12 schreef aurora baccio:
> > Il giorno giovedì 24 giugno 2021 alle 18:32:31 UTC+2 JohnMartens ha scritto: 
> >> If you are "ready" with your dialog because you have finished in a 
> >> method what you want to do just call SELF:EndDialog() 
> >> 
> >> John 
> >> 
> >> 
> >> Op 24-6-2021 om 15:58 schreef aurora baccio: 
> >>> 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 
> >>> 
> > good evening, 
> > I had already tried this solution 
> > here is the answer that I cannot solve 
> > Visual Objects (Version 2.8. Build 3.2838), Version 2.8 SP4b 
> > 24-06-2021 19:08:27 
> > Application: c:\Prg28CardioReceipt.DBG 
> > 
> > Error message: 
> > -------------- 
> > Error Code: 13 [ NO EXPORTED METHOD ]. 
> > Subsystem: BASE 
> > Function: SEND 
> > Argument: SEND_MASCHERA:ENDDIALOG 
> > CallStack: 
> > SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17) 
> > MAINWINDOW:LAUNCH (Line:13) 
> > APP:START (Line:441) 
> > START (Line:6) 
> > 
> > Translated with www.DeepL.com/Translator (free version) 
> >

AAdd(aParam,self:Owner:Server:CodOperato)
  		AAdd(aParam,self:Owner:Server:CodFisc)
	  	AAdd(aParam,4)    // parte da doppio click
  		AAdd(aParam,self:Owner:Posiz)    
  	
	  	DeleteChildWindow(self:Owner:Caption)
   		self:Owner:Owner:EndDialog()							//Destroy()   
   		
	  	oMenuDemNuovo					:= MenuDemNuovo_Maschera{self:Owner:Owner:Owner,,,aParam}
  		FabCenterWindow(oMenuDemNuovo)
  		oMenuDemNuovo:Show()     

[toc] | [prev] | [next] | [standalone]


#13354

FromJohnMartens <martens@tennishulp.info>
Date2021-06-25 16:49 +0200
Message-ID<1b935e81-8898-175a-6194-805ccdedeb55@tennishulp.info>
In reply to#13353
I'm not a VO guru like Wolfgang but some remarks

I never use DeleteChildWindow(self:Owner:Caption). I always close/end 
the window and let VO clear up the rest

I never close the owner of a window like self:Owner:Owner:EndDialog()
Closing fomr bottom up is what I normaly do. so I use SELF:EndDialog(), 
the you get back to the owner which sould close itself and then back to 
the owner of the owner

Looks like you want to pull away the tablecloth without removing the 
tableware first

John


Op 25-6-2021 om 14:41 schreef aurora baccio:
> Il giorno giovedì 24 giugno 2021 alle 21:35:56 UTC+2 JohnMartens ha scritto:
>> And what is the code in CellDoubleClick so we can see
>> SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17) ?
>>
>> Op 24-6-2021 om 19:12 schreef aurora baccio:
>>> Il giorno giovedì 24 giugno 2021 alle 18:32:31 UTC+2 JohnMartens ha scritto:
>>>> If you are "ready" with your dialog because you have finished in a
>>>> method what you want to do just call SELF:EndDialog()
>>>>
>>>> John
>>>>
>>>>
>>>> Op 24-6-2021 om 15:58 schreef aurora baccio:
>>>>> 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
>>>>>
>>> good evening,
>>> I had already tried this solution
>>> here is the answer that I cannot solve
>>> Visual Objects (Version 2.8. Build 3.2838), Version 2.8 SP4b
>>> 24-06-2021 19:08:27
>>> Application: c:\Prg28CardioReceipt.DBG
>>>
>>> Error message:
>>> --------------
>>> Error Code: 13 [ NO EXPORTED METHOD ].
>>> Subsystem: BASE
>>> Function: SEND
>>> Argument: SEND_MASCHERA:ENDDIALOG
>>> CallStack:
>>> SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17)
>>> MAINWINDOW:LAUNCH (Line:13)
>>> APP:START (Line:441)
>>> START (Line:6)
>>>
>>> Translated with www.DeepL.com/Translator (free version)
>>>
> 
> AAdd(aParam,self:Owner:Server:CodOperato)
>    		AAdd(aParam,self:Owner:Server:CodFisc)
> 	  	AAdd(aParam,4)    // parte da doppio click
>    		AAdd(aParam,self:Owner:Posiz)
>    	
> 	  	DeleteChildWindow(self:Owner:Caption)
>     		self:Owner:Owner:EndDialog()							//Destroy()
>     		
> 	  	oMenuDemNuovo					:= MenuDemNuovo_Maschera{self:Owner:Owner:Owner,,,aParam}
>    		FabCenterWindow(oMenuDemNuovo)
>    		oMenuDemNuovo:Show()
> 

[toc] | [prev] | [next] | [standalone]


#13355

Fromaurora baccio <aurorabaccio@gmail.com>
Date2021-06-25 23:33 -0700
Message-ID<ccb1162f-103b-494d-9251-fa081cc2e333n@googlegroups.com>
In reply to#13354
Il giorno venerdì 25 giugno 2021 alle 16:49:36 UTC+2 JohnMartens ha scritto:
> I'm not a VO guru like Wolfgang but some remarks 
> 
> I never use DeleteChildWindow(self:Owner:Caption). I always close/end 
> the window and let VO clear up the rest 
> 
> I never close the owner of a window like self:Owner:Owner:EndDialog() 
> Closing fomr bottom up is what I normaly do. so I use SELF:EndDialog(), 
> the you get back to the owner which sould close itself and then back to 
> the owner of the owner 
> 
> Looks like you want to pull away the tablecloth without removing the 
> tableware first 
> 
> John 
> 
> 
> Op 25-6-2021 om 14:41 schreef aurora baccio:
> > Il giorno giovedì 24 giugno 2021 alle 21:35:56 UTC+2 JohnMartens ha scritto: 
> >> And what is the code in CellDoubleClick so we can see 
> >> SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17) ? 
> >> 
> >> Op 24-6-2021 om 19:12 schreef aurora baccio: 
> >>> Il giorno giovedì 24 giugno 2021 alle 18:32:31 UTC+2 JohnMartens ha scritto: 
> >>>> If you are "ready" with your dialog because you have finished in a 
> >>>> method what you want to do just call SELF:EndDialog() 
> >>>> 
> >>>> John 
> >>>> 
> >>>> 
> >>>> Op 24-6-2021 om 15:58 schreef aurora baccio: 
> >>>>> 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 
> >>>>> 
> >>> good evening, 
> >>> I had already tried this solution 
> >>> here is the answer that I cannot solve 
> >>> Visual Objects (Version 2.8. Build 3.2838), Version 2.8 SP4b 
> >>> 24-06-2021 19:08:27 
> >>> Application: c:\Prg28CardioReceipt.DBG 
> >>> 
> >>> Error message: 
> >>> -------------- 
> >>> Error Code: 13 [ NO EXPORTED METHOD ]. 
> >>> Subsystem: BASE 
> >>> Function: SEND 
> >>> Argument: SEND_MASCHERA:ENDDIALOG 
> >>> CallStack: 
> >>> SUBMENUDEMNOW:CELLDOUBLECLICK (Line:17) 
> >>> MAINWINDOW:LAUNCH (Line:13) 
> >>> APP:START (Line:441) 
> >>> START (Line:6) 
> >>> 
> >>> Translated with www.DeepL.com/Translator (free version) 
> >>> 
> > 
> > AAdd(aParam,self:Owner:Server:CodOperato) 
> > AAdd(aParam,self:Owner:Server:CodFisc) 
> > AAdd(aParam,4) // parte da doppio click 
> > AAdd(aParam,self:Owner:Posiz) 
> > 
> > DeleteChildWindow(self:Owner:Caption) 
> > self:Owner:Owner:EndDialog() //Destroy() 
> > 
> > oMenuDemNuovo := MenuDemNuovo_Maschera{self:Owner:Owner:Owner,,,aParam} 
> > FabCenterWindow(oMenuDemNuovo) 
> > oMenuDemNuovo:Show() 
> >

good morning Giovanni,
You insist on enddialog, and you are certainly right.
If I write in the double-click method
self:enddialog method, I get a warning at compile time that enddialog is not a method of the submenudemn class.
This means that I have to create an enddialog method
can you give me an example please?
Thank you for your patience.
I searched in help, but this is all I could find

METHOD ButtonClick(oEvent) CLASS MyDialogWindow

 IF oEvent:nControlID == ID_OK

         SELF:EndDialog(1)

 ENDIF

 IF oEvent:nControlID == ID_CANCEL 

         SELF:EndDialog(0)

 ENDIF


Aurora Baccio

[toc] | [prev] | [next] | [standalone]


#13356

FromJohnMartens <martens@tennishulp.info>
Date2021-06-26 08:58 +0200
Message-ID<sb6j77$rbq$1@dont-email.me>
In reply to#13355
Thats easier to solve !!
Probably I understood the wrong type of class you use.

If you type SELf in the code editor and then type the : you will get the 
methods that belong to the class. If tou use a data dialog you will find 
EndWindow() in the list and not EndDialog

John

> 
> good morning Giovanni,
> You insist on enddialog, and you are certainly right.
> If I write in the double-click method
> self:enddialog method, I get a warning at compile time that enddialog is not a method of the submenudemn class.
> This means that I have to create an enddialog method
> can you give me an example please?
> Thank you for your patience.
> I searched in help, but this is all I could find
> 
> METHOD ButtonClick(oEvent) CLASS MyDialogWindow
> 
>   IF oEvent:nControlID == ID_OK
> 
>           SELF:EndDialog(1)
> 
>   ENDIF
> 
>   IF oEvent:nControlID == ID_CANCEL
> 
>           SELF:EndDialog(0)
> 
>   ENDIF
> 
> 
> Aurora Baccio
> 

[toc] | [prev] | [next] | [standalone]


#13357

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2021-06-27 07:16 +0200
Message-ID<ijqft6F7jp6U1@mid.individual.net>
In reply to#13349
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



-- 

[toc] | [prev] | [next] | [standalone]


#13358

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2021-06-27 14:32 +0200
Message-ID<ijr9e3Fca8mU1@mid.individual.net>
In reply to#13349
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



-- 

[toc] | [prev] | [next] | [standalone]


#13360

Fromaurora baccio <aurorabaccio@gmail.com>
Date2021-06-30 06:00 -0700
Message-ID<f104f88f-25e4-4f95-903a-a7a3e105f0abn@googlegroups.com>
In reply to#13358
Il giorno domenica 27 giugno 2021 alle 14:32:05 UTC+2 Wolfgang Riedmann ha scritto:
> 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
> --

Good morning,
I would like to reply to those who are trying to help me.
I would like to say to Mr Martens that I am a girl, and as such I know that before removing the tablecloth, the cutlery must be removed. I would like to say to Mr Riedman that I also know that you have to look for the money in your wallet, and that there is no point in looking if it is not in your purse. And I immediately make it clear that my reply is not that of an offended or resentful person, on the contrary. 
The first line of the code
*DeleteChildWindow(self:Owner:Caption)
is used to delete the caption from the mask control array
*self:Owner:Destroy()   
the second deletes the mask. 
If I use EndWindow or Destroy the result is the same, EndDialog is not recognized as a VO command.
If I remove the owner, the lines of code are identical in all methods of exiting the mask.
I don't know what's going on, but I'm seriously considering abandoning double-click in this case. Either I'm doing something wrong or the output is wrong.
I apologise for bothering you, and I assure you that I am not offended in the slightest by the examples given.
I thank Mr Riedman for having rewritten the whole thing in Italian, but I would like to point out that I use DeepL only so as not to make any mistakes in writing.
thanks
Aurora Baccio

[toc] | [prev] | [next] | [standalone]


#13361

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2021-06-30 17:13 +0200
Message-ID<ik3g0qFu5dmU1@mid.individual.net>
In reply to#13360
Hi Aurora,

I'm really sorry that you don't understand what I mean.

Please look again at your original code (and that is why the error
disappeared when commenting the "self:Owner:Destroy()" line):

self:Owner:Destroy() 

You are destroying the object that is contained in self:Owner

And then in the next line:

oMenuDemNuovo_Maschera{self:Owner:Owner,,,aParam} 

you are accessing the object that is contained in the self:Owner:Owner.

Please remember: you have destroyed self:Owner before, so you cannot
access self:Owner:Owner anymore!!!!

Unfortunately the runtime error caused by this is occurring later, deep
in the GUI classes code, when the GUI classes are using the handle that
is pointing somewhere, but not to a valid window handle.


And it seems you have not understand what John and I both tried to
explain:
if self:Owner is inherited from a DialogWindow, it has a EndDialog
method to close it.
if self:Owner is inherited from a DataWindow or a DataDialog, it has a
EndWindow method to close it.

So, if the VO compiler complains that there is no EndDialog method,
then you have to use the EndWindow method.
Since we don't know not your complete code, it is difficult for us to
understand what kind of object self:Owner is.

Wolfgang

P.S. it seems that you have some talent to misunderstand what we mean

P.P.S. I'm far from undervaluating women in IT: I'm running the company
together with my wife, and she is a very good programmer. Unfortunately
we have much too less women in the IT business....


-- 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web