Posts by DecSoft

  • d
  • h
  • m
  • s
Show threads by DecSoft
3355 posts found, page 106 of 224

DecSoft (In thread: Change the language direction of the app)

Hello Amin,

Thanks for yor kindly words, Amin, Merry Christmas for you too and Happy New Year creating apps with DecSoft App Builder! :-)


DecSoft (In thread: Utilizar un document.addEventListener)

Hola Jordi,

La app tiene un evento "Ready", que, equivale al "deviceready" que mencionas. Si no pudieras utilizarlo (en dicho evento pueden no estar disponibles algunos controles, por ejemplo), siempre podrías colocar el código que has mencionado en el evento "Show" de una vista, por ejemplo, entre acciones "StartJS" y "EndJS". En todo caso el evento "deviceready" será ejecutado cuando se espera: una vez Cordova y sus plugins estén disponibles.


DecSoft (In thread: Change the language direction of the app)

Hello Amin,

What about to use the "[App.TextDirection]" variable? Are you tried with that?


DecSoft (In thread: Best way to translate our apps, using arrays, etc.)

Hello Amin,

I am right now working in certain app, and, this forum's thread come to my mind. Certainly, we are talking here about Arrays, and the ability to load and parse variables. But we can't forget the ability to deal with JSON. Deal with JSON can be very useful. Supose the below JSON code inside a "config.json" file:

We can load that file with an HttpClient control, and, in their Success event, do something like the below:

After we that, we can access the JSON variables, directly, in this way:

In fact, the usage of the "CopyVar" action is only for our convenience, that is, it's also perfectly possible refer to the above variable, directly, using the HttpClient control's response:

As you can see, we no need (even when it's possible) to use actions like "ObjectGetProp" here, but we can directly use the JSON object's properties/variables. I hope this can be also useful for you and others too, Amin. :-)


DecSoft (In thread: Best way to translate our apps, using arrays, etc.)

Hello Amin,

We can control that. We can control if the current app's view has been already translated, so, we no need to do it again. We can use variables like "flag" to do that. We can control, for example, if the app's view no need to be translated... because the app's language is already the default one, for example.

Place all the strings in one sole file can be attractive... depend on the app, may this can be enough. However, the ability to divide the strings in various files appear to be more easy later, to deal with every specific file/view. On the other hand, probably we are talking about more stuff...

My idea (and I already try it in one specific app) is to prepare a "languages" directory, which is included enterely from the app's Files Manager (we can refer to entire directories, instead to specify files one by one). Then that "languages" directories can have subdirectories.

The first level can be a subdirectory per app's view. Or may we want to have a "views" as the first subdirectory of "languages", and, inside "views", place more subdirectories: one per app's view. Then every app's view directory can have the INI like files that we need, and maybe other stuff, like possible images (that need to be translated too, etc.).

Maybe the "languages" directory, and the "es", "en", subdirectories, then the "views" subdirectory, then the "main", "options", app's views directories, etc., may appear difficult or complex... but in fact we can follow certain rules in order to maintain all of these stuff controlled.

Anyway, as always, depend on the app... maybe one sole file (like you are thinking) can be perfectly enough.

In fact the "Languages" app sample is very simple... may I have a bit of free time in order to prepare another "Languages2" app sample, which try to put in the practice all that I try to explain above.


DecSoft (In thread: Best way to translate our apps, using arrays, etc.)

Hello Amin,

Remember that we can place in the INI like files not only "entire variables", but, also control's variables, so we can perfectly define variables in this way:

When you load and parse that file (depending if you use LoadVariables or ParseVariables), and once loaded or parsed, we get the variable, the Array, but also the "MyButton1" text, placehoder, etc.

And yes; it's possible to place comments in that files, Amin: just start the commented line by a semicolon, for example:

Probably can be a good idea to divide the files at least in app's views, so, we can look for the appropriate "translate view file" automagically using some variable like "[App.CurrentView]". Anyway, as here if you have any further question, Amin.


DecSoft (In thread: Best way to translate our apps, using arrays, etc.)

Hello Amin,

Certainlty, there is no way to use an action like you wanted above. :-( On the other hand, "LoadVariables" and "ParseVariables" support Arrays. So we can define an Array variable inside an INI file like, and then use it with LoadVariables or ParseVariables. Something that may you also can consider is to use Javascript. As you already know, we can use Javascript code anytime, for example, to set certain Array variable: that variable is then accesible from both Javascript and AB code. Please, go ahead if you have any further question, Amin.


DecSoft (In thread: Best way to translate our apps, using arrays, etc.)

Hello Amin,

Before enter in the Array question, can I ask if you already try the Languages sample app? Certainly, in order to translate apps, probably one of the best possible ways is to use the LoadVariables and/or the ParseVariables action. Please, take a look at the Languages sample, made your own test. That sample uses LoadVariables, but, is perfectly possible to use an HTTP Client and the ParseVariables with their response. We can directly set languages/variables for the controls, and, also, these actions support Arrays too.


DecSoft (In thread: New App Builder release 2018.135 (12/16/2018))

Hello to all,

Here is a new DecSoft App Builder release, with the below changes, fixes and enhancements:

Read the entire product's history


DecSoft (In thread: New App Builder release 2018.134 (12/14/2018))

Hello to all,

Here is a new DecSoft App Builder release, with the below changes, fixes and enhancements:

Read the entire product's history


DecSoft (In thread: Best format for setting Date Input value)

Hello Adrian,

The input date is a bit particular. Certainly, we can do what you wanted, just with a code like the below one:

The above code set the date of a date input to 2018-12-14, tomorrow at this time. You can take a look at the "DateInput" sample. Also take a look at the "DateTime" sample.

Not only me (the Mozilla documentation refer it too) prefer to use something like the "DateInput" sample, that is, provide three Select controls for years, months and days, instead of deal with the date input particularities.


DecSoft (In thread: Best format for setting Date Input value)

Hello Adrian,

The point is that I am not sure about what data picker we are talking about, sorry... can you detail it a bit more?


DecSoft (In thread: Best format for setting Date Input value)

Hello again, Adrian,

On the other hand, maybe you need to place in the "[Report1.Query]" variable the date... but not an object. Maybe directly something like this:


DecSoft (In thread: Best format for setting Date Input value)

Hello Adrian,

At a first view, the below is not exactly correct:

We must set the [Report1.Query] variable directly with [Date], using a SetVar action.

Maybe this is not especifically the "problem", but please, try the above, Adrian.


DecSoft (In thread: Send by E-Mail a control Report HTML data)
Yes I will get around to changing that, however I do like the Muppets!

The best reply. :-)

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses cookies only to store your preferences.

Ok! Hide this note More information