[Gambas-user] _exit not being called
Christopher Brian Jack
brian at ...1334...
Thu Nov 9 22:16:13 CET 2006
On Thu, 9 Nov 2006, Benoit Minisini wrote:
1.9.44
Is there a workaround?
> Date: Thu, 9 Nov 2006 22:13:19 +0100
> From: Benoit Minisini <gambas at ...1...>
> Reply-To: mailing list for gambas users
> <gambas-user at lists.sourceforge.net>
> To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
> Subject: Re: [Gambas-user] _exit not being called
>
> On Thursday 09 November 2006 22:06, Christopher Brian Jack wrote:
> > The class shown is not having it's _exit() method called. The class is
> > basically a wrapper that synchronizes a possibly empty default
> > configuration to one containing the default values. Note the comment in
> > the initializer about a contradiction to a Wiki example and what is needed
> > for an error free behavior. Is _exit() not being called a bug or a
> > feature?
> >
> > ' Gambas class file
> >
> > '
> > ' File: myConfig.class
> > '
> > ' Synopsis: Settings wrapper with default hidden
> > ' instance creation and (supposed to have)
> > ' automatic saving of the settings.
> > '
> >
> > STATIC PRIVATE appCfg AS Settings
> >
> > STATIC PUBLIC SUB Save()
> >
> > appCfg.Save()
> >
> > END
> >
> > STATIC PUBLIC FUNCTION _get(key AS String, OPTIONAL deflt AS Variant =
> > NULL) AS Variant
> > DIM cur AS Variant
> > DIM data AS Variant
> >
> > cur = appCfg[key, NULL]
> > data = appCfg[key, deflt]
> > IF (cur <> data) THEN
> > PRINT "myConfig[] (r): storing default value"
> > appCfg[key] = data
> > END IF
> > PRINT "myConfig [](r): old="; cur; ", new="; data
> > RETURN data
> >
> > END
> >
> > STATIC PUBLIC SUB _put(data AS Variant, key AS String)
> > DIM cur AS Variant
> >
> > cur = appCfg[key, NULL]
> > appCfg[key] = data
> > PRINT "myConfig [](w): old="; cur; ", new="; data
> >
> > END
> >
> > STATIC PUBLIC SUB _init()
> >
> > PRINT "myConfig _init(): starting up"
> > 'NEW required or "Null Object" error(s) occur
> > 'The example in the Wiki uses: DIM hSettings AS Settings
> > 'and subsequently attempts to use hSettings. This results
> > 'in a "Null Object" error
> > appCfg = NEW Settings
> >
> > END
> >
> > STATIC PUBLIC SUB _exit()
> >
> > PRINT "myConfig _exit(): committing settings to disk"
> > appCfg.Save()
> >
> > END
> >
>
> This has been fixed in 1.9.45. Which version do you use?
>
> --
> Benoit Minisini
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
.=================================================.
| Christopher BRIAN Jack aka "Gau of the Veldt" |
+================================================='
| oevna at ...1544...
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
Hi Humans, my email address uses rot13 cipher
More information about the User
mailing list