Re: [Gambas-user] Settings component

2011-02-14 Thread Jussi Lahtinen
OK, I solved this.

I looked these and I didn't get it...
http://gambasdoc.org/help/comp/gb.settings/settings/path?v3
http://gambasdoc.org/help/comp/gb.settings/settings?v3

I tried this:

Dim hS As New Settings
hS.Path = 


Then I looked at source code.
And the answer is this:

Dim hS As New Settings(/my/path/to/configs/myconf.conf)


Maybe this was quite obvious, but I think it would be nice to have mentioned in
at least one those documentation pages...

Jussi



On Mon, Feb 14, 2011 at 00:41, richard terry rte...@pacific.net.au wrote:
 On Monday 14 February 2011 09:12:24 Jussi Lahtinen wrote:
 Hi!
 I think I have missed something... documentation says about Settings:
 If you use this class statically, then the default project
 configuration file will be used.

 And path property is read only.

 So, how can you determine what path and file to use to store settings?

 Jussi

 if your project is called my-project, then your settings file will be in
 /home/your_name/.config/gambas3/my-project.conf

 YOu don't have to worry about path, just do this in your project

 For example to save a split:

 in Form_close or whereever

 Public sub Settings_Save()
     Settings[Whatever_section_you_want_to_call_it/Hsplit1.layout]=
 Hsplit1.layout
 end

 in Form_open or whereever:

 Public sub Settings_Load()
    hsplit1.layout =
 Settings[Whatever_section_you_want_to_call_it/Hsplit1.layout]

 Regards

 richard


 ---
 --- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio
  XE: Pinpoint memory and threading errors before they happen.
 Find and fix more than 250 security defects in the development cycle.
 Locate bottlenecks in serial and parallel code that limit performance.
 http://p.sf.net/sfu/intel-dev2devfeb
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


 --
 The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
 Pinpoint memory and threading errors before they happen.
 Find and fix more than 250 security defects in the development cycle.
 Locate bottlenecks in serial and parallel code that limit performance.
 http://p.sf.net/sfu/intel-dev2devfeb
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Settings component

2011-02-13 Thread richard terry
On Monday 14 February 2011 09:12:24 Jussi Lahtinen wrote:
 Hi!
 I think I have missed something... documentation says about Settings:
 If you use this class statically, then the default project
 configuration file will be used.
 
 And path property is read only.
 
 So, how can you determine what path and file to use to store settings?
 
 Jussi

if your project is called my-project, then your settings file will be in
/home/your_name/.config/gambas3/my-project.conf

YOu don't have to worry about path, just do this in your project

For example to save a split:

in Form_close or whereever

Public sub Settings_Save()
 Settings[Whatever_section_you_want_to_call_it/Hsplit1.layout]= 
Hsplit1.layout
end

in Form_open or whereever:

Public sub Settings_Load()
hsplit1.layout =  
Settings[Whatever_section_you_want_to_call_it/Hsplit1.layout]

Regards

richard

 
 ---
 --- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio
  XE: Pinpoint memory and threading errors before they happen.
 Find and fix more than 250 security defects in the development cycle.
 Locate bottlenecks in serial and parallel code that limit performance.
 http://p.sf.net/sfu/intel-dev2devfeb
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user