Path: news.daimi.aau.dk!sbrandt From: sbrandt@daimi.aau.dk (S|ren Brandt) Newsgroups: comp.lang.beta Subject: Re: Global Variables Date: 9 May 1996 15:36:09 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 27 Message-ID: <4mt3d9$n28@gjallar.daimi.aau.dk> References: <318F2E76.41C6@idefix.physik.tu-berlin.de> NNTP-Posting-Host: fraxinus.daimi.aau.dk Thus spake knaut@schroeder (Claus-Peter Knaut): >We want to use the persistent store to save tuples of a >relation on a disk. But to use a global variable in tuple, tuple.bet >has to have its ORIGIN in a global database slot. To save the tuple, >the pattern has to be declared in betaenv.bet, best in lib:attributes >SLOT. >But then i can not access the global variable, because i can not >declare it in betaenv.bet. Have a look at the "registerSpecialObject" and "registerSpecialInstance" methods in the persistentstore interface. These allow you to save your tuples without saving the object containing the globals. Notice however, that this solution means that the object containing the globals will never be saved. Strictly speaking, this solution therefore only makes sense if the globals are not supposed to survive a session. Hope this helps. -- Soren Soren Brandt, Computer Science Department, Aarhus University Ny Munkegade 116, DK-8000 Aarhus C, Denmark. E-mail: sbrandt@daimi.aau.dk, Phone: +45 89 42 32 57, Fax: +45 89 42 32 55