Ecere SDK/eC Forums • View topic - StringsBox and NamedStringsBox




Ecere SDK/eC Forums

Ecere Developers Community

StringsBox and NamedStringsBox

General help with the Ecere Cross Platform GUI toolkit: Window, common controls, events, etc.
Help with the 2D Graphics library: Surface, Display, Bitmap, Font and others.

StringsBox and NamedStringsBox

Postby samsam598 » Mon Jul 16, 2012 1:26 am

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
samsam598
 
Posts: 208
Joined: Thu Apr 14, 2011 9:44 pm

Re: StringsBox and NamedStringsBox

Postby jerome » Mon Jul 16, 2012 4:27 am

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
jerome
Site Admin
 
Posts: 622
Joined: Sat Jan 16, 2010 11:16 pm

Re: StringsBox and NamedStringsBox

Postby samsam598 » Mon Jul 16, 2012 4:35 am

Hi Jerome,

Thanks for the reply.

Btw,I am here always.

Regards,
Sam
samsam598
 
Posts: 208
Joined: Thu Apr 14, 2011 9:44 pm

Re: StringsBox and NamedStringsBox

Postby jerome » Mon Jul 16, 2012 1:23 pm

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
jerome
Site Admin
 
Posts: 622
Joined: Sat Jan 16, 2010 11:16 pm

Re: StringsBox and NamedStringsBox

Postby samsam598 » Mon Jul 16, 2012 7:42 pm

Hi Jerome,

Sorry,no.I am still learning the language.

Regards,
Sam
samsam598
 
Posts: 208
Joined: Thu Apr 14, 2011 9:44 pm


Return to GUI Toolkit & 2D Graphics

Who is online

Users browsing this forum: No registered users and 1 guest