Posts by DecSoft

Show threads by DecSoft
3403 posts found, page 126 of 227

DecSoft (In thread: No devuelve cadena fraccionada)

Hola Jordi,

Está bien. Veo un poco raro mostrar elementos así en un MultiSelect, pero, en todo caso, no parece haber problema para procesarlos. Es decir, una vez ejecutado el siguiente código:

Lo que al final tenemos en la variable "[ResultArray]" es eso, un Array, con los elementos de la cadena "idJWCAAwa5I|1.8781431220703124|2.6482900019073488|Xu Xin|sin efecto|anotacion".

Observa que primero obtenemos un elemento del control MultiSelect. Es a dicho elemento al que le aplicamos la acción "SplitStr", de modo que la variable [Result] contiene la cadena referida antes, y, [ResultArray], es un Array con los elementos de dicha cadena "ya separados".


DecSoft (In thread: No devuelve cadena fraccionada)

Hola Jordi,

¿Estás diciendo que quieres mostrar en un MultiSelect elementos tal que "idJWCAAwa5I|1.8781431220703124|2.6482900019073488|Xu Xin|sin efecto|anotacion"?


DecSoft (In thread: No devuelve cadena fraccionada)

Hola Jordi,

La variable [Select3.SelItems] es un Array, no una cadena de caracteres. Esto es, que, podrías usar "ArrayGetItem", directamente, con dicha variable Array.


DecSoft (In thread: Introducir Items en un MultiSelect desde Archivo)

Hola Jordi,

El control MultiSelect es distinto al control Select.  Hay ejemplos "Select" y "Multiselect". Como puedes ver en este último ejemplo, y, como se refiere en la ayuda del control MultiSelect, este control nos proporciona la variable "SelItems", que, contendrá los elementos seleccionados en el control. Este control no cuenta con la variable "ItemIndex", como el control Select, pues, en el control MultiSelect podemos seleccionar uno o más elementos.


DecSoft (In thread: Introducir Items en un MultiSelect desde Archivo)

Hola Jordi,

Respecto de cómo hacer lo que dices, realmente es mucho más sencillo, y, en cuanto veas lo que es necesario, entenderás el porqué.

El archivo que contiene los elementos debe especificar la variable de este modo:

Esto es, directamente, estamos indicando la variable en que queremos cargar los elementos. Por otro lado, con dicho archivo preparado, lo único que tenemos que hacer es usar la acción "LoadVariables".

Y eso sería todo. Por otro lado, no es posible usar la acción "ParseVariables" justo a continuación de "LoadVariables", esto es, esperando tener ya el resultado de "LoadVariables", pues, esta última acción no es síncrona.

Respecto del editor del foro, te pido disculpas. Ciertamente, no funciona del todo bien. Sobre todo cuando queremos usar las etiquetas "code". Lo que yo hago es tratar con el HTML directamente... por otro lado, si usamos la etiqueta "code", es necesario hacer esto último, tal como se indica en las instrucciones de debajo del editor. Dicho de otro modo, no se puede editar el "code" insertado sino es editando el propio HTML, no usando el editor "WYSYWYG".


DecSoft (In thread: API Youtube en AB)

Hola Jordi,

Eso está bien, hombre. :-)


DecSoft (In thread: Cambiar contenido del control HTMLContent)

Hola Julio,

Eso es, exactamente. Si lo que queremos es cambiar el contenido de un control HTML mediante una o más variables (porque es posible usar más de una variable, en un momento dado) debemos hacerlo sin referirnos al control, propiamente, sino a las variables que usemos "dentro" del control.

Puede echar un vistazo a varios ejemplos también, por ejemplo, el "DynamicControls", que, muestra cómo también es posible añadir contenido utilizando el DOM, ahora sí, refiriéndonos al control por su identificador, que, en el caso de AB, también es el nombre del control.


DecSoft (In thread: Cambiar contenido del control HTMLContent)

Hola Julio,

Si no me equivoco, en lugar de hacer algo así:

... la variable "[MyHTML]" debería estar dentro del HTML del control HTML Content, es decir, el contenido de dicho control podría ser, simplemente, [MyHTML], de modo que, ya podrías trabajar con dicha variable.

Otra posibilidad sería trabajar con el DOM, es decir, "HtmlContent1" es un elemento HTML, al que podemos añadir lo que queramos vía Javascript. Sin embargo, creo que con la variable puede acaso ser suficiente en tu caso particular.


DecSoft (In thread: How to set image in dropdown button to center?)

Hello to all,

Please, ugprade your AB copy Tin, I try to solve the above issue and this new one from the scratch, so, you no need to use any CSS code for these.


DecSoft (In thread: Implementing a Count Down System)

Hello John,

No problem. You can use the "[CountDown]" variable, for example, to be placed in an HTML control (to be shown to the user) in all the app's views. The Timer's Interval is executed in the background even if you are in other view, until you stop it with the "TimerStop" action.


DecSoft (In thread: Implementing a Count Down System)

Hello John,

Probably you must look for the Timer control. You can set an "[CountDown]" variable in the app's Ready event. You can set this variable to certain number of seconds, for example, 60.

You can place an Timer control in the first app's view and start the timer when you need. In the Timer's Interval event you can do whatever you wanted with the "[CountDown]" variable.

For example, you can decrement (using the "Dec" action) the refered variable, and, additionally check if the variable reached the zero value: this means the count down "ends", to say like that.

Can the above help you in some way?


DecSoft (In thread: Questions regarding Views)

Hello John,

The above code can't work... if you did not place the Javascript code between the StartJS and EndJS actions. But you did not shown these actions in the shown code.

1. When I execute ReplaceView "View1" will all of the variables with this view be wiped from memory?

No. The variables stil in memory except if you manually assign a value of null to them, for example.

2. What would be the easiest way to clear the values in window.App.View2.MyTestClassInstance when the view is closed?

Probably this is enough:

3. Can I pass a view to a Javascript Function?

Yes; You can pass the "window.App.View2" for example.


DecSoft (In thread: Using Javascript in AppBuilder)

Hello John,

1. Are all views automatically created when the app starts running ?

Not exactly. The HTML part of the views are loaded when needed, so, if you did not load an view, their HTML part is not loaded at all. Some stuff of the views are available from the scratch, for example, some variables, but, certainly other stuff cannot be available into the view is shown.

2. Can views be dynamically created (e.g. when I click a button a view is dynamically created) or do you just show the view (e.g. using ReplaceView "NewView2") ?

You can't create views dinamically. You must create it at designtime and then use actions like ShowView, ReplaceView and ShowDialog in order to show the appropriate view.

... and that these would allow me to use AB Actions too.

Only if you set an app's variable can use later AB actions to deal with that variable. Only if you place the variable in the app's root scope like in:

But the point is what you need, John. Commonly we no need to use thirdparty Javascript, or, just a few Javascript code in certain situations. If you plain to use thirdparty Javascript, then you must know about how to use that Javascript, and, in fact the AB context is more or less important, since finally we are talking about HTML apps, then, you must use the Javascript in a similar way that if you use it in any other HTML app.

I am just wonderiang where I would place these variable creation statements? 1. Would I place them in the "Ready" event on of the View (Master or normal view) ? 2. Would I place them in a Button that shows the view ? e.g.

That's is what I am saying. You must create your Javascript... when and where you need it... If you need it from the scratch, then you can use the app's Ready event. If you need it when an app's view HTML is ready, you must use the view's Show event. If you only need in certain location, may you can create it in an control's Click event, for example, etc.

3. Is there any way to refer to the current view without specifying its whole path (e.g. with something like this.View1) ?

Maybe in some places, yes, but, since some other places can require the whole path, probably is good to always refer to the whole part. IMHO.


DecSoft (In thread: Using Javascript in AppBuilder)

Hello John,

Yes; you must use the file's manager in order to include Javascript and Styles (CSS files) in your apps, because, App Builder not only copy these files into the app's "_Compiled" folder, but also link it into the app's "index.html" file, so their stuff are available to use in the app. Note that the file's manager rows establish the order for Javascript and Style files, that is, the order to follow later when link that files in the "index.html".

About where to place the variables, in fact you can use app's variables or not, depend on what you wanted. For example, is completely possible to write some Javascript like the below one:

In the above case we are create an variable in the "window" scope, which is not merelly an app's variable, but, since we always can use Javascript, we can reach that variable without problem when needed.

If you want to create an variable in the app's scope, you can also do it using a code similar than the below one:

The above means basically that you can reach the "MyTestClassInstance" variable using AB actions too. We can go ahead and place an variable in some specific app's view: if you need that, you can do it too, since all app's views have an object variable:

Please, ask here if you have any further questions or if I miss something.


DecSoft (In thread: How to set image in dropdown button to center?)

Hello Tin,

Try with the below CSS in your app's Inline CSS option:

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