Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

VMS is like a nightmare about RXS-11M.


devel / comp.lang.clipper.visual-objects / help

SubjectAuthor
* helpaurora baccio
`* Re: helpWolfgang Riedmann
 `* Re: helpaurora baccio
  +- Re: helpJohnMartens
  `- Re: helpWolfgang Riedmann

1
help

<4c7b6927-d9f3-45ec-8421-20f57891c17dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=824&group=comp.lang.clipper.visual-objects#824

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a05:622a:100e:: with SMTP id d14mr11392883qte.254.1623566328702;
Sat, 12 Jun 2021 23:38:48 -0700 (PDT)
X-Received: by 2002:ac8:6686:: with SMTP id d6mr9835607qtp.51.1623566328456;
Sat, 12 Jun 2021 23:38:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Sat, 12 Jun 2021 23:38:48 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=93.65.242.158; posting-account=mGyhkgoAAACGngz8cxCfTmITiU5OjECD
NNTP-Posting-Host: 93.65.242.158
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4c7b6927-d9f3-45ec-8421-20f57891c17dn@googlegroups.com>
Subject: help
From: aurorabaccio@gmail.com (aurora baccio)
Injection-Date: Sun, 13 Jun 2021 06:38:48 +0000
Content-Type: text/plain; charset="UTF-8"
 by: aurora baccio - Sun, 13 Jun 2021 06:38 UTC

Good morning and good Sunday
I cannot close an archive (ProvPres.dbf) .
For other archives I use :
oInError := InError{,false}
........
oInError:Close()

end of the procedure

oIrror := InError{,false}
oInError:Zap()
oInError:Close()

The Archive that I can't close feeds a subdatawindow contained in a datadialog and all the data that the user has to check arrives. If everything is correct it proceeds and then :
oProvPres{}:Close()
..........
..ProvPres := oProvPres{,false}
oProvPres:Zap()
oProvPres:Close()

self:Destroy()
I restart the activity assuming that the ProvPres.dbf archive has been reset.
I notice that this procedure does not work, the archive remains open with the data of the previous operation.
I ask for help.
Thanks
Aurora Baccio

Re: help

<iiqq42F4kpbU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=825&group=comp.lang.clipper.visual-objects#825

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: wriedmann@gmail.com (Wolfgang Riedmann)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: help
Date: Tue, 15 Jun 2021 06:54:24 +0200
Lines: 47
Message-ID: <iiqq42F4kpbU1@mid.individual.net>
References: <4c7b6927-d9f3-45ec-8421-20f57891c17dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-Trace: individual.net 1Y+RICihkI+QXNTHehHNAQ6piGnmZszzCZZ94Qp+x8OJT3MrI=
Cancel-Lock: sha1:SjQHRvq6qzoMPJBfL2tjI6koc9Y=
User-Agent: XanaNews/1.18.1.6
 by: Wolfgang Riedmann - Tue, 15 Jun 2021 04:54 UTC

Buon giorno Aurora,

AFAIK you need to open a DBF in exclusive mode do execute the Zap()
method.
I suspect that there is another instance open that does not permit to
execute thzap operation.

You should make sure that the SubDataWindow is closed and cleaned up.
More than using a :Destroy() call on it I would null it out and issue a
CollectForced() call.

Wolfgang

aurora baccio wrote:

> Good morning and good Sunday
> I cannot close an archive (ProvPres.dbf) .
> For other archives I use :
> oInError := InError{,false}
> .......
> oInError:Close()
>
> end of the procedure
>
> oIrror := InError{,false}
> oInError:Zap()
> oInError:Close()
>
> The Archive that I can't close feeds a subdatawindow contained in a
> datadialog and all the data that the user has to check arrives. If
> everything is correct it proceeds and then : oProvPres{}:Close()
> ......... .ProvPres := oProvPres{,false}
> oProvPres:Zap()
> oProvPres:Close()
>
> self:Destroy()
> I restart the activity assuming that the ProvPres.dbf archive has
> been reset. I notice that this procedure does not work, the archive
> remains open with the data of the previous operation. I ask for help.
> Thanks
> Aurora Baccio

--

Re: help

<786e0eff-66b2-4531-9aff-01e5e16c7183n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=826&group=comp.lang.clipper.visual-objects#826

  copy link   Newsgroups: comp.lang.clipper.visual-objects
X-Received: by 2002:a37:8d82:: with SMTP id p124mr1195844qkd.212.1623783977549;
Tue, 15 Jun 2021 12:06:17 -0700 (PDT)
X-Received: by 2002:a05:620a:35c:: with SMTP id t28mr1219920qkm.10.1623783977337;
Tue, 15 Jun 2021 12:06:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.clipper.visual-objects
Date: Tue, 15 Jun 2021 12:06:16 -0700 (PDT)
In-Reply-To: <iiqq42F4kpbU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=109.116.207.151; posting-account=mGyhkgoAAACGngz8cxCfTmITiU5OjECD
NNTP-Posting-Host: 109.116.207.151
References: <4c7b6927-d9f3-45ec-8421-20f57891c17dn@googlegroups.com> <iiqq42F4kpbU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <786e0eff-66b2-4531-9aff-01e5e16c7183n@googlegroups.com>
Subject: Re: help
From: aurorabaccio@gmail.com (aurora baccio)
Injection-Date: Tue, 15 Jun 2021 19:06:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: aurora baccio - Tue, 15 Jun 2021 19:06 UTC

Il giorno martedì 15 giugno 2021 alle 06:54:27 UTC+2 Wolfgang Riedmann ha scritto:
> Buon giorno Aurora,
>
> AFAIK you need to open a DBF in exclusive mode do execute the Zap()
> method.
> I suspect that there is another instance open that does not permit to
> execute thzap operation.
>
> You should make sure that the SubDataWindow is closed and cleaned up.
> More than using a :Destroy() call on it I would null it out and issue a
> CollectForced() call.
>
> Wolfgang
> aurora baccio wrote:
>
> > Good morning and good Sunday
> > I cannot close an archive (ProvPres.dbf) .
> > For other archives I use :
> > oInError := InError{,false}
> > .......
> > oInError:Close()
> >
> > end of the procedure
> >
> > oIrror := InError{,false}
> > oInError:Zap()
> > oInError:Close()
> >
> > The Archive that I can't close feeds a subdatawindow contained in a
> > datadialog and all the data that the user has to check arrives. If
> > everything is correct it proceeds and then : oProvPres{}:Close()
> > ......... .ProvPres := oProvPres{,false}
> > oProvPres:Zap()
> > oProvPres:Close()
> >
> > self:Destroy()
> > I restart the activity assuming that the ProvPres.dbf archive has
> > been reset. I notice that this procedure does not work, the archive
> > remains open with the data of the previous operation. I ask for help.
> > Thanks
> > Aurora Baccio
> --

Good evening Mr. Riedman and welcome back.
I am reasonably sure that the sub date is closed.
At the end of the procedure I close with oProvPres:Close() the archive in question.
After several attempts I inserted a close databases
I didn't understand why, since all the archives had to be closed but since then the archive zap works.
To be sure of what I do:
oProvPres := ProvPres{,false}
oProvPres:Zap()
oProvPres:Close()
from here on starts the whole procedure of building the recipe delivery.
When the recipe is registered and archived

I close the datadialog
self:Destroy()

I close the archive.

oProvPres:Close()
close databases
CollectForced()

From what I understand you suggest not to use destroy().
How do I use collectForced ?
Exactly I read that collectforced() skips the garbage collection but honestly I still don't understand why it didn't work before and now it does.
I know one of the rules of computer science is to never ask why, but I remain curious.
thanks
Aurora Baccio

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

Re: help

<sab12b$jl2$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=827&group=comp.lang.clipper.visual-objects#827

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: martens@tennishulp.info (JohnMartens)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: help
Date: Tue, 15 Jun 2021 22:03:23 +0200
Organization: A noiseless patient Spider
Lines: 168
Message-ID: <sab12b$jl2$1@dont-email.me>
References: <4c7b6927-d9f3-45ec-8421-20f57891c17dn@googlegroups.com>
<iiqq42F4kpbU1@mid.individual.net>
<786e0eff-66b2-4531-9aff-01e5e16c7183n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 15 Jun 2021 20:03:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a632562de8b672490b4d49361bfc9569";
logging-data="20130"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1999MAeUNWgEdbJ8Ozk94h70H1aE6SGU0M="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:/lei9X4ky2AnA0SAd0QpTf5/dKU=
In-Reply-To: <786e0eff-66b2-4531-9aff-01e5e16c7183n@googlegroups.com>
Content-Language: nl
 by: JohnMartens - Tue, 15 Jun 2021 20:03 UTC

Hi Aurora,

Several comments on your issue.

Zap only works if the DBF is only used in exclusive mode that should be
set bij SetExclusive(TRUE). It should not be open in other parts of your
app. I think the DBF was open in parts of your app that you are not
aware of and therefore you cannot zap it.

You can use this code to see what DBF's are open

cMsg := ''
FOR wAlias := 1 UPTO 1024
cAlias := ALIAS(wAlias)
IF .NOT. ( cAlias == NULL_STRING )
dwMethresult += 1
cMsg += NTrim(wAlias)+' workarea<.>'
cMsg += '<9>Alias<9><9>'+cAlias+'<.>'
cMsg += '<9>File name<9><9>'+ (cAlias)->(DBINFO(DBI_FULLPATH))+'<.>'
cMsg += '<9>Locked records<9>'+
NTrim((cAlias)->(DBINFO(DBI_LOCKCOUNT)))+'<.>'
ENDIF
NEXT

Put the code in a funtion that you call when debugging your app to see
what DBF's are open en check wether these are the ones that you expect
to be open.
I'm sure that somewhere you did not close a DBF and thyerefore you
cannot ZAP it

I'm having a DBF where lots of changes take place. To prvent the DBF
growing by adding records and deleting them without being able to ZAP
it. I'm using special delete and apend methods of the DBF

METHOD DeleteToReuse() CLASS MySpecialDbf
lResult := SUPER:Delete()
IF lResult
SELF:Filed1 := ""
SELF:Field2 := ""
ENDIF
RETURN lResult

When appending

METHOD AppendReuse() CLASS MySpecialDbf
LOCAL lMethResult AS LOGIC
LOCAL lDeleted AS LOGIC
LOCAL dwRecNr := 0 AS DWORD

lDeleted := SetDeleted()
SetDeleted(FALSE)

DO CASE
CASE ! SELF:Seek(Space(10)) // Seek on first empty field that can
only be empty when deleted
CASE ! SELF:Recall()
* Message that deleted record cannot be recalled
OTHERWISE
dwRecNr := SELF:RecNo
lMethResult := TRUE
ENDCASE

SetDeleted(lDeleted)

IF dwRecNr = 0
* no old record found that could be recalled
lMethResult := SUPER:Append()
ELSE
* empty record recalled
SELF:GoTo(dwRecNr)
ENDIF
RETURN lMethResult

In this way your DBF will not be for ever growing and there is no need
to have a EXCLUSIVE access to the DBF

CollectForced() is normaly not needed unless you do not clean all memory
by ending resources.

When debugging I put this in my shellwindow
METHOD Timer() CLASS MyShellWindow
SELF:StatusBar:SetText(NTrim(Memory(MEMORY_REGISTERAXIT)),#MemoryAxit)
RETURN NIL
If the memory keeps on growing then you hev and issue with nog ending
windows of window parameters neatly.
I you close it down in the right way there is no need to use Destroy()

Hope this can help you

Cheers,
John

Op 15-6-2021 om 21:06 schreef aurora baccio:
> Il giorno martedì 15 giugno 2021 alle 06:54:27 UTC+2 Wolfgang Riedmann ha scritto:
>> Buon giorno Aurora,
>>
>> AFAIK you need to open a DBF in exclusive mode do execute the Zap()
>> method.
>> I suspect that there is another instance open that does not permit to
>> execute thzap operation.
>>
>> You should make sure that the SubDataWindow is closed and cleaned up.
>> More than using a :Destroy() call on it I would null it out and issue a
>> CollectForced() call.
>>
>> Wolfgang
>> aurora baccio wrote:
>>
>>> Good morning and good Sunday
>>> I cannot close an archive (ProvPres.dbf) .
>>> For other archives I use :
>>> oInError := InError{,false}
>>> .......
>>> oInError:Close()
>>>
>>> end of the procedure
>>>
>>> oIrror := InError{,false}
>>> oInError:Zap()
>>> oInError:Close()
>>>
>>> The Archive that I can't close feeds a subdatawindow contained in a
>>> datadialog and all the data that the user has to check arrives. If
>>> everything is correct it proceeds and then : oProvPres{}:Close()
>>> ......... .ProvPres := oProvPres{,false}
>>> oProvPres:Zap()
>>> oProvPres:Close()
>>>
>>> self:Destroy()
>>> I restart the activity assuming that the ProvPres.dbf archive has
>>> been reset. I notice that this procedure does not work, the archive
>>> remains open with the data of the previous operation. I ask for help.
>>> Thanks
>>> Aurora Baccio
>> --
>
> Good evening Mr. Riedman and welcome back.
> I am reasonably sure that the sub date is closed.
> At the end of the procedure I close with oProvPres:Close() the archive in question.
> After several attempts I inserted a close databases
> I didn't understand why, since all the archives had to be closed but since then the archive zap works.
> To be sure of what I do:
> oProvPres := ProvPres{,false}
> oProvPres:Zap()
> oProvPres:Close()
> from here on starts the whole procedure of building the recipe delivery.
> When the recipe is registered and archived
>
> I close the datadialog
> self:Destroy()
>
> I close the archive.
>
> oProvPres:Close()
> close databases
> CollectForced()
>
> From what I understand you suggest not to use destroy().
> How do I use collectForced ?
> Exactly I read that collectforced() skips the garbage collection but honestly I still don't understand why it didn't work before and now it does.
> I know one of the rules of computer science is to never ask why, but I remain curious.
> thanks
> Aurora Baccio
>
>
> Translated with www.DeepL.com/Translator (free version)
>

Re: help

<iitmbeFlndnU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=828&group=comp.lang.clipper.visual-objects#828

  copy link   Newsgroups: comp.lang.clipper.visual-objects
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: wriedmann@gmail.com (Wolfgang Riedmann)
Newsgroups: comp.lang.clipper.visual-objects
Subject: Re: help
Date: Wed, 16 Jun 2021 09:08:29 +0200
Lines: 100
Message-ID: <iitmbeFlndnU1@mid.individual.net>
References: <4c7b6927-d9f3-45ec-8421-20f57891c17dn@googlegroups.com> <iiqq42F4kpbU1@mid.individual.net> <786e0eff-66b2-4531-9aff-01e5e16c7183n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net HBmjo25RVTnNa2X1/dbW6AD0PbCacGA1xViFpP/nvX0qu1468=
Cancel-Lock: sha1:cdxlXgUvsdMP2YPgis9uT0dowzg=
User-Agent: XanaNews/1.18.1.6
 by: Wolfgang Riedmann - Wed, 16 Jun 2021 07:08 UTC

Buon giorno Aurora,

the Destroy() method only cleans up ressources used by the window.
Therefore the DBF used by the subdatawindow may not be closed when the
Destroy() method of the owning DataDialog is called.

CollectForced() triggers a call of the garbage collector, and this call
cleans up all unused ressources, regardless where in the program they
were used.

The garbage collector in the VO runtime is a complicated but very
important piece of software, and for some more advanced tasks it is
important to understand how it works. I also had examples where a
CollectForced() call leaded to GPFs in the program, but that was always
the programmers ( = my ) fault.

Wolfgang

aurora baccio wrote:

> Il giorno martedì 15 giugno 2021 alle 06:54:27 UTC+2 Wolfgang
> Riedmann ha scritto:
> > Buon giorno Aurora,
> >
> > AFAIK you need to open a DBF in exclusive mode do execute the Zap()
> > method.
> > I suspect that there is another instance open that does not permit
> > to execute thzap operation.
> >
> > You should make sure that the SubDataWindow is closed and cleaned
> > up. More than using a :Destroy() call on it I would null it out
> > and issue a CollectForced() call.
> >
> > Wolfgang
> > aurora baccio wrote:
> >
> > > Good morning and good Sunday
> > > I cannot close an archive (ProvPres.dbf) .
> > > For other archives I use :
> > > oInError := InError{,false}
> > > .......
> > > oInError:Close()
> > >
> > > end of the procedure
> > >
> > > oIrror := InError{,false}
> > > oInError:Zap()
> > > oInError:Close()
> > >
> > > The Archive that I can't close feeds a subdatawindow contained in
> > > a datadialog and all the data that the user has to check arrives.
> > > If everything is correct it proceeds and then :
> > > oProvPres{}:Close() ......... .ProvPres := oProvPres{,false}
> > > oProvPres:Zap()
> > > oProvPres:Close()
> > >
> > > self:Destroy()
> > > I restart the activity assuming that the ProvPres.dbf archive has
> > > been reset. I notice that this procedure does not work, the
> > > archive remains open with the data of the previous operation. I
> > > ask for help. Thanks
> > > Aurora Baccio
> > --
>
> Good evening Mr. Riedman and welcome back.
> I am reasonably sure that the sub date is closed.
> At the end of the procedure I close with oProvPres:Close() the
> archive in question. After several attempts I inserted a close
> databases I didn't understand why, since all the archives had to be
> closed but since then the archive zap works. To be sure of what I do:
> oProvPres := ProvPres{,false}
> oProvPres:Zap()
> oProvPres:Close()
> from here on starts the whole procedure of building the recipe
> delivery. When the recipe is registered and archived
>
> I close the datadialog
> self:Destroy()
>
> I close the archive.
>
> oProvPres:Close()
> close databases
> CollectForced()
>
> From what I understand you suggest not to use destroy().
> How do I use collectForced ?
> Exactly I read that collectforced() skips the garbage collection but
> honestly I still don't understand why it didn't work before and now
> it does. I know one of the rules of computer science is to never ask
> why, but I remain curious. thanks Aurora Baccio
>
>
> Translated with www.DeepL.com/Translator (free version)

--

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor