Posts by DecSoft

Show threads by DecSoft
3348 posts found, page 47 of 224

DecSoft (In thread: Poner fecha en objeto Date)

Hola Jordi,

¿Estás seguro de eso? Yo estoy pensando en algunos entornos como Delphi, y, la fecha de un control Date es la actual... cuando sitúas el control en el formulario, pero, no estoy seguro de que siempre sea la fecha actual... en todo caso, yo creo que no cabe discusión, Jordi: se trata de ejecutar las dos líneas de código de arriba para poner la fecha actual, si así lo quieres, o cualquier otra fecha. Poner la fecha actual "siempre"... me suena a "forzar" dicha fecha actual... no sé... es posible... pero no lo veo tan claro, y, teniendo en cuenta que hablamos de un par de líneas de código para poner la fecha actual, pues...


DecSoft (In thread: Poner fecha en objeto Date)

Hola Jordi,

Pues, llevas razón, no había caído en eso. Sin embargo, no estoy muy seguro de que el control Date deba mostrar siempre la fecha actual. La fecha actual se muestra en el momento en que sitúas el control en la app, pero, no creo que debiera mostrar la fecha actual en todo caso: es dudable, esto, al menos. Por lo demás, poner la fecha actual en el control es tan sencillo como ejecutar el código que he puesto más arriba.


DecSoft (In thread: Búsqueda compuesta en un control Report)

Hola Jordi,

En primer lugar, si quieres hacer una búsqueda más avanzada, no debes usar el Query. Entonces, situando otro control Input, uno que no use el Query del Report, permitirás al usuario buscar por cierto texto. Ahora bien, la variable Data es un Array de objetos, que, tú puedes iterar, como cualquier otro Array. Puedes preparar un Array temporal, e ir iterando la variable Data, rellenando el Array temporal, si lo que el usuario busca se encuentra en alguna de las propiedades del objeto iterado: si esto es así, añades el registro al Array temporal, y, finalmente, cuando la iteración acabe, asignas el Array temporal, el cual contendría los registros filtrados / buscados, a la variable Data del Report.

Lo anterior es hablando de filtrar la variable Data en el cliente. En el servidor sería aún más sencillo, pues, lo que tú retornas de un script del servidor es una variable Data (un Array de objetos) lista para usar, de modo que puedes conformarla como tú lo precises, filtrando, buscando, para conformar la variable Data que deba mostrar la app en el control Report.


DecSoft (In thread: Poner fecha en objeto Date)

Hola Jordi,

Respecto de tu primera cuestión, no sé si lo entiendo bien, pues, es el comportamiento por defecto: el control mostrará la fecha actual.

Respecto de tu segunda cuestión, es posible usar la acción "DateToJSDate", es decir, suponiendo que has puesto un nuevo control Date y has cambiado su fecha, el siguiente código pondría su valor a la fecha actual:


DecSoft (In thread: Búsqueda compuesta en un control Report)

Hola Jordi,

No estoy de acuerdo contigo en absoluto. El Query del report es una forma sencilla de buscar en el report, y, puesto que es sencilla, permite sólo la búsqueda "sencilla". Pero, el report atiende a su variable Data, y, esta variable Data la conformamos nosotros. No es para nada imposible saber qué se busca, y, en definitiva, conformar la variable Data en consecuencia: esto se puede hacer tanto en el cliente como en el servidor, de hecho yo lo hago en algunas aplicaciones sin problemas.

Por ejemplo, dices que "es imposible saber lo que busca el usuario", pero, ¿cómo es eso? Una simple casilla de texto daría al usuario a escribir o que quisiese buscar... de modo que ya sabrías lo que está buscando el usuario... para mí es tan sencillo como eso... no veo dónde puedes encontrar dificultad en eso.


DecSoft (In thread: Búsqueda compuesta en un control Report)

Hola Jordi,

No es posible hacer búsquedas "compuestas" utilizando la propiedad "Query" del Report. La forma de hacerlo es trabajando sobre la propiedad "Data" del report, bien en el servidor, bien en el cliente: recuerda que la propiedad "Data" determina lo que se muestra en el Report, de modo que, la búsqueda deberías hacerla sobre dicha propiedad, o bien antes de "alimentar" dicha propiedad, realizando el filtrado que estimases oportuno.


DecSoft (In thread: Cambiar el color de las filas en Report)

Hola Jordi,

La forma más sencilla, si se trata de un Report "table", sería añadir la clase "table-hover" en la propiedad "Classes" del Report. Si quieres ir un poco más allá, por ejemplo, para especificar un color en concreto, puedes incluir en la propiedad "Inline CSS" de la app algo como esto:

Si se trata de un Report "grid", no es posible usar la clase "table-hover", pero, sí que el siguiente código CSS en el "Inlince CSS" de la app funcionaría:


DecSoft (In thread: Version Control)

Hello John,

It's not an easy question for sure. I am not a user of any version control program, except GIT, which I use sometimes for some projects, basically, with Github and the Github desktop program. I am not sure if the integration of any version control can help, since we can directly use any version control program that we wanted, maintaining the programs separated. For example, I can imagine to use Github for desktop for certain app: so we have the best of AB, and, the best of Github for desktop.

The previous generation of AB save some "history" of the changes, but using our own method, to say like that. I did not implement something similar in AB2, maybe because in AB we are talking about a single file, and, AB2 uses various files to store the app and the app's views stuff, so may I consider more difficult (in terms of the time that saving something twice can take) than in the previous AB generation.

Maybe I can try to save a similar "history" of changes in AB2, even if we deal now with various files and not a single one. But again, I am not sure about... finally, we can decide to made backups manually (with the help of some BAT file, for example, maybe the Build programs options in the app can help here, since can invoke some programs before and after build the app), or may using an external program like Github for desktop.

I think this can be the best... probably the integration of GIT is not suitable for use for a majority of users of AB (included me...)... and the integration can be for sure less nice than if we use directly something like Github for desktop. So why not to maintain the things separated? Why to try to emulate something like Github for desktop? We already have such program... and can use it for free... and probably I never can reach that kind of integration in AB, so...

Please, let me know what you think about. Certainly maybe implement something like the "history" of changes which we have previously in the previous generation of AB can be good, maybe enhancing it in some way, since in the previous generation of AB we can see the "history" of changes saved in the disk, but, that's all,... we can't restore a previous version from AB, for example. But again... my bet is to made the possible backups in our own ways... backups are good for sure, and, maybe just copy the app directory can be good, or may using something like Github for desktop or a similar program.


DecSoft (In thread: Screen dimensions for a Desktop Application)

Hello John,

Depend if we are talking about an app that must in mobile (smaller) screens or not. If the app is intended to run in mobile devices and also in more larger screens, then we must design the app (design size) in a mobile screen size, like the default one (320x360) and then we may can use app's options like MaxWidth and MaxHeight, so, we see the app scaling well until larger screen, in which we can see it running at a maximum size, avoiding too much scale of it.

However, if the app is intended to be run as a desktop app, then maybe we can consider to go beyond the default 320x360 designed size, supose something like 800x600 or 1024x768, and then, let the app to scale for the case of more larger screens. The point is that AB apps can scale to the greater, but not to the smaller (see this help topic), so, if we use a 800x600 design size, we can't see it very well in smaller screens, but, if this is not the case (we don't target that smaller screens), then that design size or may a bit greater can be fine.

You may also can consider to use the fixed style instead the scaled one: for example, if you want the app running with Cordova Electron, it's possible to decide a maximum size for the app window, and, the option to not maximize it by the user, so, a fixed size can be good here. But probably the scale style is good too, and, anyway, we can change from that styles also at runtime if needed.

So please made some tests: try with various design sizes and don't hesitate to ask here (or in a new forum's thread) if you think that I can help you in some specific questions.

P.S. Remember that the HTML control is quite powerful, in the sense that we can use HTML markup and the CSS style from the Boostrap CSS framework, so, it's possible to use the Bootstrap CSS grid system, for example, helping us also in the app scalation.


DecSoft (In thread: New App Builder 2020.70)

Hello to all,

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

Read the entire product's history


DecSoft (In thread: Broswer Plugin - Sending message from Content to the Plugin)

Hello John,

Certainly, you touch a good point... you are right, the "sendMessage" don't work as expected, well, as you can see it working in the WebExtension sample app, for example. I think this can be caused because the "sendMessage" used in the WebExtension sample app is called after an action (a button click) in the same app, and not an event from the extension content script.

Let me to take a look, John, maybe I can find some possible alternative or finally find what can happen in this situation.


DecSoft (In thread: Determine when an application or browser plugin is closed)

Hello John,

Unfortunately, if I am not wrong, we don't have something like that in the JavaScript / Web world. I take a look specifically talking about the Web Extensions, but nothing what I try finally can get something working as expected. I think the best is to try to search for a possible workaround here, John, so, maybe you can refer here exactly what you wanted, and, then, we can try to imagine some possible way to do the same, without rely in something like a "closed event", which in fact do not exists.


DecSoft (In thread: Menu Bars for Applications)

Hello John,

I am not too much friend to incorporate some specific interface design from one platforms to another, that is, the above it's called "Ribbon" interface, and, it's an artifact of Microsoft for Windows apps. The web is another thing, and, therefore, maybe it's good to have his own ways to do the things.

However, if you perform a search by "Ribbon JavaScript", that is, if you include the magic "Ribbon" word in your search, your problem will be to choose one of the many available alternatives to get something like that interface model working in HTML / JavaScript apps, so, you can try these alternatives... and see what is the best for you.

Then post here if you have some specific doubt or question about the implementation of your choosed library / (jQuery) plugin in your app, but, basically we are must talking about the use of the right HTML markup, JavaScript and CSS style.


DecSoft (In thread: Variables in Apps and Browser Plugins)

Hello John,

Please, take a look at the "app.setVar()" method help, which can establish "global reactive variables" and also told you about this "reactive" variables and the ability to use just "global variables" using the "window" one as the parent for it.

There is no variables "only for views", however, it's possible to establish it if we wanted and in two possible ways. Supose we are talking about the "Show" event of an app view, then, we can define a variable like the below one:

Declaring a variable like the above, means that that variable is available only for the app view Show event, and, not out of that event. But, taking the example of the "non reactive global variables" (as you can see in the above link), we can think in the declaration of variables like below:

Doing that, what you get is a variable placed in a specific container, to say like that, so, you can know that that variable refers to some specific app "myView" variables. So there is not something "out of the box", but, we have the freedom to establish variables in "containers" like the above, who can provide some context for that variables.

About the variables defined in the app and the variables defined in the context of a a Web Extension, we must remember that that contexts are completely separated, so, we can't define app variables to be accessed from the context of the Web Extension and viceversa. This applies also to the local storage: if I am not wrong, the local storage that we can use in the Web Extension context are not the same than the app local storage.

Fortunately we can pass messages from the Web Extension context and the app context and viceversa, so, it's possible to send a message to the app which inform to the app that must save some value in certain app local storage using the "app.setOption" method, for example. So what we must take in consideration is that the contexts are different, and we can't directly accesss the contexts in a "direct way", but, using the communication / messages mechanism.

Please, go ahead and post here if you have some doubts or any further questions around these points.


DecSoft (In thread: Tabs on Form Designer)

Hello John,

I think I understand your point. There is someting called "layouts" in AB1, maybe you remember it. That "layouts" is something that must be implemented in AB2. The point is that it's not an easy thing... even no possible... the last time I try it. But I will try again with that, John, I know that layouts, have different layouts, it's something good, so, I must work on it. For now... you must pin / close it everytime... but I hope in the future the layouts are supported in AB2 like are supported in AB1.

P.S. If I don't understand your question, please, post your comments here and I will try to help!

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 some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.