Hi George!
Thanks for your reply.
Perhaps I was not really clear.
- I want to write a component
- This component needs to read some settings from a config file
- Because of the fact, that the functions of the component are called
directly, doing something like this:
Private hCFG As New Settings(
I'm not sure what is the problem you mean
PUBLIC SUB WriteSettings()
hCFG["General/Color"] = 666
hCFG.Save
END
PUBLIC SUB ReadSettings()
DIM aa AS Integer
PRINT hCFG["General/Color"] 'Print content to IDE console.
aa = hCFG["General/Color"] 'Put content to aa (in this case integer).
P
Sorry,
hCFG["General/Color"] = something to write under General/Color
hCFG.Save
Of course
On Wed, Dec 10, 2008 at 7:33 PM, Jussi Lahtinen
<[EMAIL PROTECTED]> wrote:
> @ http://gambasdoc.org/help/comp/gb.settings/settings
>
> There is example of usage. I think you need code something like
Am Mittwoch 10. Dezember 2008 18:05:45 schrieb [EMAIL PROTECTED]:
> Hi List,
>
> This in the module area works.
> Private hCFG As New Settings("/Path/To/cfg")
Try this:
Private hCFG As New Settings("/Path/To/cfg") AS "hCFG"
>
> Because I'm writing a component, now I have to do this in the module
@ http://gambasdoc.org/help/comp/gb.settings/settings
There is example of usage. I think you need code something like this:
hCFG[General/Color] = something to write under General/Color
hCFG.Save
Ok?
Jussi
On Wed, Dec 10, 2008 at 7:05 PM, <[EMAIL PROTECTED]> wrote:
> Hi List,
>
> This in th
Hi List,
This in the module area works.
Private hCFG As New Settings("/Path/To/cfg")
Because I'm writing a component, now I have to do this in the module area:
Private hCFG As Settings
And something like this in the _init-Sub
hCFG = New Settings("/Path/To/cfg")
'Just for testing
Print hCFG["Gene