Ecere SDK/eC Forums
http://ec-lang.org/community/
Print view

StringsBox and NamedStringsBox
http://ec-lang.org/community/viewtopic.php?f=5&t=234
Page 1 of 1
Author:  samsam598 [ Mon Jul 16, 2012 1:26 am ]
Post subject:  StringsBox and NamedStringsBox

Greetings!

How to use the subjected two controls?I can't refer to it even I include the source path into the project settings.I think I should have missed something important,but don't know exactly what it is.Could you please figure out?A couple of examples should be much appreciated.

Regards,
Sam
Author:  jerome [ Mon Jul 16, 2012 4:27 am ]
Post subject:  Re: StringsBox and NamedStringsBox

Hi Sam! Good to hear from you again :)

The StringsBox/NamedStringsBox are utilities used internally in the IDE, placed in the extras/ folder to ensure the code gets reused if something similar is required elsewhere.

The NamedStringsBox is used to edit the environment variables in the global and workspace settings (GlobalSettingsDialog.ec , WorkspaceSettings.ec)

The StringsBox is used to edit the pre/post-build commands in the project settings.

To make use of the StringsBox or NamedStringsBox, you will need to add extras/gui/controls/StringsBox.ec to your project. Then you need to import "StringsBox".

The StringsBox API is mainly its Array<String> strings property. Please note that the value set by the strings property is not kept by the StringsBox class, and it is the caller's responsibility to free the String Array value retrieved from a 'get'. The NamedStringsBox has an array of NamedString instead of String, which is essentially a pair of 2 Strings, but otherwise works the same way.

Please take a look at sdk/ide/src/ProjectSettings for example of a StringsBox (though the code for this one is a bit tricky, with automatic editor based on projection types), and sdk/ide/dialogs/GlobalSettingsDialog.ec or WorkspaceSettings.ec if you want to see example usage of a NamedStringsBox.

Hope this helps!

Regards,

-Jerome
Author:  samsam598 [ Mon Jul 16, 2012 4:35 am ]
Post subject:  Re: StringsBox and NamedStringsBox

Hi Jerome,

Thanks for the reply.

Btw,I am here always.

Regards,
Sam
Author:  jerome [ Mon Jul 16, 2012 1:23 pm ]
Post subject:  Re: StringsBox and NamedStringsBox

Good to know Sam! :)
Are you working on any specific project(s) with Ecere?
I am very curious to know! If you are, there's a (sadly empty!) section on the forums where to share with others in the community what you're working on!

There's also a section on the wiki to mention the projects built with Ecere if you have a web site for them somewhere.

Regards,

Jerome
Author:  samsam598 [ Mon Jul 16, 2012 7:42 pm ]
Post subject:  Re: StringsBox and NamedStringsBox

Hi Jerome,

Sorry,no.I am still learning the language.

Regards,
Sam
All times are UTC-05:00 Page 1 of 1