[Gambas-user] CVS/.gambas issue and Gambas 1.9.45: _exit() still NOT being called

Christopher Brian Jack brian at ...1334...
Fri Nov 10 22:03:48 CET 2006


_exit() on my class still is NOT being called using 1.9.45 build of gambas
and yes I did a recompile-all after starting up the project after
upgrading, in fact, I went into the .gambas dir and deleted the temp
compiles to make double sure.

BTW: Can the IDE be instructed to leave a CVS directory and .cvsignore
file alone if found in .gambas?  Those file need to be there so that CVS
knows .gambas MUST exist in the repo (or the project fails to load) and
the .cvsignore is there to tell CVS to ignore files in the dir other than
its own (CVS dir and .cvsignore).  CVS ignores only work for the directory
they are defined in so there's no other place in the project dir that will
achieve the same effect.  Alternatively have the IDE recreate the .gambas
dir if not found when starting a project, rather than aborting with an
error.  Then .gambas can be made put in a .cvsignore one level up where
it won't affect current compilation behavior in .gambas and would thus not
need modification.

The console shows the follwing when used with the rest of my project:

myConfig _init(): starting up
myConfig [](r): old=1, new=1


The _exit() sub has a PRINT so it should be indicated on the console.
Here again is the class (myConfig.class):

------------- 8= -----------------------------------------------------
' 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
------------- 8= -----------------------------------------------------

.=================================================.
|  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