[Gambas-user] Strange behaviour using gb.settings in a component

Doriano Blengino doriano.blengino at ...1909...
Wed Dec 24 13:24:05 CET 2008


gambas at ...1938... ha scritto:
> Hi List,
>
> perhaps a silly question, but here it is:
> In my component I do:
> ' Gambas module file
> Export
> Private hCFG As Settings
>
> Public Sub _init()
>   hCFG = New Settings(User.Home &/ "projekte/gambas/xyz.cfg")
> End
>
> After that I have defined my public functions.
> xyz.cfg holds some connection parameters which are only used by the component 
> itself.
>
> When I execute my component directly, everything is fine!!!!!
> When calling a function of this component from my application like this:
> ' Gambas module file
> Private ABC As New Modxyz
>
> Public Sub Main()
>   Print ABC.SomeFunction
> End
>
> and executiong the app in the IDE, I get:
> Syntax error in settings file at line #6: Connot load class 'Main'. Unable to 
> load class file.
>   
Could be the real application has not the "gb.settings" checked in 
project properties? While the test application has?
Anyway the error message is a little misguiding...

Regards,

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."





More information about the User mailing list