Re: [Vala] Handling strings

2017-04-19 Thread Evan Nemerson
On Wed, 2017-04-19 at 13:43 +0200, Sascha Manns wrote: > Hello list, > > actually i'm trying to use some strings in my vala app: > > private string entity_file_suffix = ".ent"; > private string directory_separator_char = "/"; > private string entity_file_local = publication_title + >

Re: [Vala] Handling strings

2017-04-19 Thread Al Thomas via vala-list
> From: Sascha Manns <sascha.ma...@mailbox.org> > Sent: Wednesday, 19 April 2017, 15:10 > Subject: Re: [Vala] Handling strings > I tried it out: > private string _filename; > private string _path; > private string entity_file_suffix = ".ent"; &

Re: [Vala] Handling strings

2017-04-19 Thread Sascha Manns
Hi Al, On 19.04.2017 15:04, Al Thomas wrote: > > You've added 'const'. It should be: > > private string ENTITY_FILE_LOCAL = {get {_filename = > publication_title + ENTITY_FILE_SUFFIX; return _filename;}} > > Constants do not change during the running of the program. They can, however, > be

Re: [Vala] Handling strings

2017-04-19 Thread Al Thomas via vala-list
> From: Sascha Manns <sascha.ma...@mailbox.org> > Sent: Wednesday, 19 April 2017, 13:42 > Subject: Re: [Vala] Handling strings > I tried it out in that way: > // Constants used by create_publication_core > private string _filename; > private string _path;

Re: [Vala] Handling strings

2017-04-19 Thread Sascha Manns
Hi Al, On 19.04.2017 14:17, Al Thomas wrote: > Concatenation of variables is done at run time, so you either need to > make the strings constant or use properties to allow the concatenation to > occur at run time: > > void main () { > var a = new Test (); > print (@"Extension:

Re: [Vala] Handling strings

2017-04-19 Thread Al Thomas via vala-list
> From: Sascha Manns <sascha.ma...@mailbox.org> > Sent: Wednesday, 19 April 2017, 12:43 > Subject: [Vala] Handling strings > I'm getting the information that the access to instance member is denied. > How can i concat strings in Vala? Concatenation of variables is don

[Vala] Handling strings

2017-04-19 Thread Sascha Manns
Hello list, actually i'm trying to use some strings in my vala app: private string entity_file_suffix = ".ent"; private string directory_separator_char = "/"; private string entity_file_local = publication_title + entity_file_suffix; private string project_dir = target_dir +