Property ClassName

Started by Fred Tomke, September 22, 2008, 02:05:54 AM

Previous topic - Next topic

Fred Tomke

Hello,

before adding my wish as a feature request I want to ask if there's already a solution.
When I get all the controls from (dcl_form_getcontrols myform) I also want to get the not localized control's class name: tree, textbutton, calendar and so on. Why the not localized name? When our company's product turns to international release I must know the control's class name in a common language.

For instance:

(dcl_control_getClassName mycontrol) = "tree"

For those who need a localized name

(dcl_control_getLocalClassName mycontrol) = "Baumstruktur"

Is there already a chance to get the class name?

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

There is no concept of a localized class name in the OpenDCL code, but I suppose one could be concocted from the localized resources. How would you use it?
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

Hm, my question was not very understandable. Sorry for that. I try it this way:

We are forced to change our application that it could be sold worldwide. So it must be translated into English (whenever I shall do that). The captions of all controls, listview and grid contents, trees and so on are located in a database. There are 2 problems where I need NOT LOCALIZED controls class names:

1. Searching the existing odcl projects for controls with captions, tooltip texts and tooltip titles. I wanted to do it this way:
   (foreach oControl (dcl_form_getcontrols oForm) (if (= (dcl_control_getclassname oControl) "textbutton") (write_caption_to_database oControl))

2. If a control is a textbutton or something with a caption, the caption shall be loaded from the database and set while the oninitialize-event.

I'm afraid of performance delay to do that, but it's the way I was wanted to.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

Fred, every control has a "type", which is an enumerated value in the code. For searching and comparisons, an integer would be more efficient than a string, so I propose to add a (dcl_Control_GetType) function that returns an integer identifying the control type. The types would of course need to be indentified in the documentation, but in the meantime you can look at ControlTypes.h in the source code.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

Hi Owen,

that's absolutely great. That's why I wrote:
QuoteI want to ask if there's already a solution.
And that's a very good solution!

Thanks Owen!

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]