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

StringsBox and NamedStringsBox

Post by samsam598 »

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

Re: StringsBox and NamedStringsBox

Post by jerome »

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

Re: StringsBox and NamedStringsBox

Post by samsam598 »

Hi Jerome,

Thanks for the reply.

Btw,I am here always.

Regards,
Sam
jerome
Site Admin
Posts: 608
Joined: Sat Jan 16, 2010 11:16 pm

Re: StringsBox and NamedStringsBox

Post by jerome »

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

Re: StringsBox and NamedStringsBox

Post by samsam598 »

Hi Jerome,

Sorry,no.I am still learning the language.

Regards,
Sam
Post Reply