Posts by DecSoft

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

DecSoft (In thread: ReloadView and Master view)

Hello Amin,

Hi David,

Thanks for your assistance, could sort that out with [App.CurrentView], kept the dropdown in the MasterView and refreshed proper HttpClients based on the activeview response any time the master button is hit.

Thanks a mill,

Añways thanks you for your support. Probably you already know it... but we have another maybe interesting app's event: ViewChange· Maybe not useful in your specific case here, but, who know, maybe can be useful in the future.


DecSoft (In thread: ReloadView and Master view)

Hello Amin,

Sure David, I understand that and I know I can call the HttpClients by other events and not just the show. The point is that I have near 20 Https clients, in 8 views. Refreshing the view, or triggering view's show event, by dropdown itemclick event, could simply fix the problem. Now I need to go page by page and call each HttpClient at its own view. Tried to bypass it but seems like there is no escape from reproducing it all.

What if you place the code of the Show view event in an app's function? Then you can call to the app's function in the Show view event and also in other places too. But anyway, supose that in the Show event you prepare certain HTTP call, depending on certain variables, etc. In principle, you can also prepare another HTTP call with other dependencies, new argument values, etc., in other possible place. Anyway, maybe in your case it's possible to use one app's function and then call to it in the Show view event and other possible places.

Out of curiosity now, is it possible to read what view is active? So lets say if I keep the button in the MasterView is there a way that I know from what view it has been clicked? so in the ItemClick event of the dropdown, I will know in what view click has taken place and so what HttpClient should be recalled?

About to know the current view, we have the [App.CurrentView] global app variable, which may can be useful.


DecSoft (In thread: ReloadView and Master view)

Hello Amin,

Maybe I can explain a bit more about the "reload" view... the point is that, maybe, in the Database sample, you see the HTTP call in the Show event of the views... but this is just the way in which someone (me) decide to construct the Database sample.

What matter here is that the HTTP call to feed the Report's Data variables can be executed in any time, not only in the Show event of the views, or when the view is loaded. We can made any HTTP call, any time we need and without reload any view.


DecSoft (In thread: ReloadView and Master view)

Hello Amin,

About the first issue, I don't think that you need to reload the view at all. In other words, if you want to perform another HTTP call or just play with the Report's Data variable, the Report control must reflect the changes. In my opinion you must not deal with the view load or reload, but, just made the right HTTP calls or change the Report's Data variable when needed. You can do it in the same view various times without problems. So you can change the subject that you need to "query", and then perform the right HTTP call to feed the Report's Data variable with the new data.

About the Master view, certainly, there is just one right now. Can be useful, but, if we use it "as is", expecting that all the controls placed in the Master view are placed in all the views in which the Master view is used. I want to think around this, Amin, since another customers told me about this before too. I am not quite sure about how I can implement it, nor when I have the required time to put my hands on, so I can't promise nothing, but I will try.

About the Undo, I think you refer to the designer Undo, not the code editor Undo. The code editor Undo and Redo works more or less as expected in an common code editor. The designer Undo don't work like that, Amin. They try to be useful, but, certainly not all the times we get the same results that we can expect in an code editor, in fact, we only have an Undo in the designer, and not an Redo. Something else to be improved when possible, yes.

Please, try to modify the Report's Data variable by made HTTP calls (to receive the data to place in the Data variable) or just to change the Data variable (which is an Array variable after all), in one word, try to do what you wanted forgetting the "reload" of the view. You must look in this way... and then please, post here if you need some particular help or something else about this question. I will try to help you when possible!

DecSoft (In thread: ReloadView and Master view)

Hello Amin,

Certainly, the error is clear (this time): we try to access to an "Hidden" propery of an variable which is not the expected one, because is undefined or null. I think that the problem is caused with the ReloadView action, because, this is an little special action, that must be use with caution.

So what happen? In fact, the ReloadView action causes that the entire app is are loaded again. This behaviour (which is the expected, on the other hand), can cause problems like you describe, Amin. The solution, in your cause, may it's try to avoid the ReloadView usage.

Please, try it and don't hesitate to post here if you think that I can help in something.

About the various master views... certainly something like that is not possible. It's an interesting concept, and I will try to take a look at that. Maybe I can add something like that, must be study when possible and look for some possible way to do it.

Of course, depending on what you wanted, maybe we can also find another possible approach too, so, if you think that can detail a little more exactly what you wanted... maybe I can help in something.


DecSoft (In thread: Return en función javascript)

Hola Julio,

Bueno, el tutorial lo enlacé pensando más que nada en que se muestra cómo usar una función de la app desde Javascript, y, creo que también cómo acceder a variables de la app. Por lo demás, las acciones StartJS y EndJS están para usarlas, por supuesto: como todas las acciones de AB terminan traduciéndose al correspondiente código Javascript, al final, todo será código Javascript. :-)


DecSoft (In thread: Return en función javascript)

Hola Julio,

Si habláramos de funciones de AB, existe una acción Return, que, podría utilizarse, como puede verse en la app de ejemplo del mismo nombre: "Return". Si hablamos de funciones Javascript, entonces deberemos usar nosotros mismos el "return" de Javascript.

Ahora bien, en cualquier caso, para acceder al resultado de la función necesitaremos llamar a dicha función desde Javascript, es decir, entre las acciones "StartJS" y "EndJS". Haciéndolo así ya podremos guardar el valor retornado en una variable, por ejemplo:

Este pequeño tutorial de la ayuda de AB puede resultar también de su interés, Julio.

Otra posibilidad sería llamar a la función y que esta establezca su resultado en una variable de la aplicación: entonces, después de llamar a dicha función, podríamos hacer uso de la variable en cuestión.


DecSoft (In thread: desktop app example)

Hello Paolo,

I am not completely sure if can understand exactly what you wanted, so, please, if my reply do not satisfied you, reply to this post trying to explain a bit more what you wanted. In principle, modal views do not fit all the screen size, but are shown more or less in the same aspect ration in all devices.

Again, I am not quite sure about exactly what you needed, because, for example, maybe we can try to use some CSS code in order to made what you wanted. However, if what you wanted is an view that fit all the screen, maybe the question is why to use a modal view... why not use a normal view... which already fit all the screen if you wanted...


DecSoft (In thread: Create an Array of objects using AB code)

Hello Paolo,

So you want to create an JSON like the above using AB code? If so, take a look and try the below code:


DecSoft (In thread: Posicionamiento normal de report)

Hola Antonio,

Es otra posibilidad. Más "manual" y avanzada, por decirlo así, pero, puesto que nuestras apps se componen de HTML, CSS y Javascript, ciertamente, si dominamos estos, podemos hacer, prácticamente, lo que queramos... y se pueda hacer usando HTML, CSS y Javascript. :-)


DecSoft (In thread: Error cambiando vista tras reproducir con MediaPlayer)

Hola Julio,

Gracias por informar del error. Por favor, actualice su copia de App Builder, puesto que acabo de solucionar dicho error y otro que también se producía relacionado con el control MediaPlayer.

2018.89 (05/30/2018)

* Prevent to fire the Complete and Update events of the MediaPlayer control if we change the view on the Complete event of that control, for example. This avoid certain errors when try to access non existing properties of the MediaPlayer control. Thanks Julio for the report!


DecSoft (In thread: Posicionamiento normal de report)

Hola Antonio,

Es que, precisamente, por eso le he puesto el texto que también le envié al correo en su momento: cómo posiciona AB los controles tiene que ver con que las aplicaciones puedan escalar como se espera, por ejemplo, además de, como dice, ser de este modo como "funciona" el diseñador.

App Builder no está enfocado a sitios web, sino a aplicaciones, que, pueden parecer lo mismo, pero, no lo son en absoluto. Está en el usuario averiguar si App Builder puede serle útil o si le sería mejor utilizar otra herramienta. Y, si se decide a usar esta herramienta, entonces conviene que siga algunas reglas, como las explicadas arriba en el texto que refiero.

Por otro lado, App Builder está enfocado a ofrecer cierta facilidad de uso, por ejemplo, para personas que no dominen el lenguaje Javascript y que puedan, por lo tanto, simplemente, hacer uso de las acciones "visuales" que le ofrece el programa, además del resto de características, como su integración con Apache Cordova, etc.

Con todo esto, Antonio, no quiero decir que el diseñador y el resultado final no pudieran ser otros, por ejemplo, podría acaso pensarse un diseñador que situara los controles de forma relativa, empero, con esto estaríamos hablando ya de "futuribles", y, no de lo que AB puede ofrecer ahora mismo.


DecSoft (In thread: Posicionamiento normal de report)

Hola Antonio,

Puede echar un vistazo al ejemplo "InputsScroll2", a ver si le da una idea. En efecto, es posible añadir controles "más allá" de la altura de nuestra app en el diseñador. Haciendo esto conseguimos que la vista de la app cuente con su propio "scroll", por decirlo así: podemos ver los controles que en diseño estén más allá de la altura de la app.

Dicho lo de arriba (que puedes ver en el ejemplo "InputsScroll2" y aun en otros), la cosa está en determinar el "alto" de los controles Report. Si puedes determinar su alto, o, si quieres darle algún alto en concreto, ya sabes que la acción "SetStyle" te permite hacerlo. Creo que sí que podrías lograrlo, Antonio, haciendo ciertos cálculos.

Primero, cargas los Reports. Después, con la acción "GetStyle" obtienes el alto ("height") de los Reports. Y, después, con "SetStyle" tendrás que situar dichos "Reports" donde correspondan, creo yo, cambiando únicamente su propiedad CSS "top" con la acción "SetStyle". Ya digo, creo que es posible hacerlo, y que, mediante "GetStyle" y "SetStyle", debería poder hacerse.


DecSoft (In thread: Posicionamiento normal de report)

Hola Antonio,

¿Ha probado el ejemplo que le he enlazado en mi anterior "post"? Ahí pueden verse cómo dos controles "Report" "no se montan", por decirlo así. ¿No es algo así lo que necesita?


DecSoft (In thread: Posicionamiento normal de report)

Hola Antonio,

Si no me equivoco, ya me planteó esta misma cuestión por correo, e, incluso le respondí con un ejemplo. ¿No lo recibió Antonio?  ¿O tal vez ahora se refiere a otra cosa? En todo caso le copio abajo la respuesta que le envié a su correo:

Habría que ver a qué tamaño está diseñando su aplicación, y, si está usando la opción "auto escalar".

Si usted diseña su aplicación en el tamaño por defecto (recomendado) sería de 320x360.

Con la opción "auto escalar" de la aplicación, los controles se verán como se esperan tanto en dicho tamaño como en tamaños superiores.

Dicho de otra forma, lo que puede ocurrirle es que esté diseñando la app, digamos que a 800x600. Entonces, los controles aparecerán bien en esa resolución y superiores, pero, no en resoluciones más pequeñas.

Eche un vistazo a este ejemplo modificado con dos Reports:

https://www.decsoftutils.com/emt-malaga/sample-reports.zip

Dicho lo anterior, mediante la acción SetStyle, o bien mediante CSS, o bien mediante Javascript, es posible situar los controles que quiera en la posición en que lo precise.

Sin embargo, esto último no es lo mejor, es decir, lo mejor es diseñar la app en el tamaño recomendado, y usar la opción "auto escalar" de la app.

Después hay otras posibles técnicas, como limitar el tamaño de la app, para que no escale a todo lo largo de la pantalla, si esta es "grande", en el ejemplo Calculator puede verse esto:

https://www.decsoftutils.com/calculator/

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