Hello John,
I think that this other reply can be useful for you for this thread too.
Hello John,
I think that this other reply can be useful for you for this thread too.
Hello John,
Various things to consider here. The concept of "Download" is not something affordable for HTML apps. HTML apps can't download nor deal with the user's file system, which is reasonable, because, in other way, supose that an webpage can access to your file system... not very good, don't you?
If we have some JSON file in a server... we can just read it using an HttpClient control. If we want to save something in the client side, we can use cookies or the app's local storage, and we have actions to do this already included in App Builder like "SetOption" and "GetOption".
So we can't download files? If our app are compiled with Apache Cordova, yes, we can download files. We have actions like "FileWrite" and an specific action "FileDownload", that we can use. This actions relies in the File and File Transfer Apache Cordova plugins.
There are samples for all of these actions, so you can take a look at it, but, remember that these actions requires that our app must be compiled with Apache Cordova in order to properly work: in other words, that actions can't work in a browser without Apache Cordova.Hello John,
Parsing XML is possible, but there is not something out of the box to do it, except the included jQuery library (from a few releases ago included by default), which can parse XML, but using pure Javascript. If you can provide JSON files instead, can be better, since we can deal with JSON files in the same way than with Arrays and Objects variables, something possible and easy than using XML, IMHO.
Hello to all,
Hi David, Thanks for that. It is exactly what I was looking for. Best Wishes JohnGood. However, remember that we are not limited to a kind of header. We can always use buttons or other controls to prepare it, for example. So the Navbar controls is just another possible way to get our desired results.
Hello John,
Sorry for the delay: I just miss this thread... You can take a look at the program options dialog and the Plugins tab. You can see there the Template plugin, and, an Explore button which allow you to open the plugin's directory. You can also pick it from the "AppBuilder" folder inside your User documents folder, which contains the program's Javascript plugins, config files, etc.
Hola Jordi,
Lo siento, pero, sería precisa más información. "AB no lo reconoce" no explica nada en absoluto. Y, por otro lado, algo que funciona en HTML... ¿por qué no iba a funcionar en AB, si se trata también de HTML?
Luego debes obtener algún mensaje de error o algo: prueba a ejecutar la app en Firefox y usa la consola de desarrollador (si la consola de AB no te indica nada). De lo contrario es imposible saber qué puede estar pasando.
También dices del código que "si lo meto en AB no funciona"... pero, habría que ver cómo lo estás "metiendo"... si es como lo tienes que hacer, etc. De momento, como he dicho, es menester partir al menos de un mensaje de error.Hola Jordi,
No conozco el API que enlazas, pero, supongo que tendrás que estudiarla. Seguramente, lo que necesitas es acceder al elemento que añades en el control HTMl, es decir, usando el identificador que des al Iframe. Esto puedes hacerlo de varias formas, por ejemplo, usando Javascript:
Lo que tengas que hacer con "elementoVideo" dependerá ya del API en cuestión, que, como digo, tendrás que estudiar.
Hello John,
The new Navbar control of App Builder may can be of your interest.
Upgrade your AB copy now and take a look at the new Navbar and Navbar2 samples.
Hello Romeo,
I use the Apache Cordova push plugin in certain app and they works as expected. May I can take a look at the specific sample when have some time. Can you please be a little more specific about the errors that you found? Are that errors related with App Builder or with Apache Cordova and the Push plugin or maybe other Apache Cordova plugins?
Please, note that I remove the link that you place in the above entry. That link is certainly more or less public, but, I think may are not good for the forum.
Hello John,
There are some samples like the "HeaderMenu" and the "Footer" ones that may you want to take a look. Anyway, there are just that: samples. In general, anything we put in the footer or in the header (for example, some buttons or a Container with some buttons) are placed in the footer or the header.
One important thing in AB when we develop for small screens (mobiles for example) is the size in which develop the app. By default, AB create new apps with an 320x480 size. This size is probably the best to "start". Then, we can set the app's Scale option to "True", and our app can look well in smaller screens (320x480) and also in more larger screens.
In other words, is not a good idea to start to develop an app with a size of 800x600, for example. Depend on our app, but, the point is that we can scale from 320x480 to 800x600, but, not viceversa.
About the nav bar of this website, certainly, since AB uses right now Bootstrap CSS 4 (the same used in this website right now), we can use an HTML control to place the code of an navbar, and place the HTML control in the app's views header:
https://getbootstrap.com/docs/4.0/components/navbar/
However, this requires more or less knowledge of the used HTML and probably is not something easy to do right now. Additionally, AB did not include by default the Bootstrap 4 Javascript nor jQuery, which is required in order to deal with that kind of navigation bar.
In fact there is an "Navbar" sample which already implement the above stuff, however, I want to take a look (when possible!) to a possible easy integration of the Boostrap CSS 4 navbar into our apps.
Hello John,
After take a look at the publication sample that you send to me, I can see that you set the "body" CSS of the app to the color "#ffffff" (white). Note that the "body" background is also white. Since CSS works in a cascade style, the Label control inherits the "white" color for their text... and that's the reason for what you can't see the Label text: both text and background have the same color: white.
Hello John,
Maybe something related with the app's dimensions... but without a bit more of information is difficult to figure can happen, John. Can you please send to me an E-Mail with an sample app in which I can see the problem?
Hello John,
Basically I want to create Custom Functions inside the view that can only be used by that view and no other view. I also want to create variables inside the view that are only accessible by that view and no other view. Is this possible and if so how ?
Technically is possible to have functions only for an view, but, that is not how AB works, that is, the app's functions that you can prepare from the IDE, are functions availables for all the views. But probably is enough to use it or not... may depending on the "current view" ([App.CurrentView]), I don't know... may depend on the app that we are talking about.
I had a look at the "External Javascript tutorial of the App Builder's help." but couldn't see how I can use it to change the value of a UI component (for example, the text of a label).
You are right, that is, the tutorial is for other possible external Javascript usage. Again, commonly we no need to use Javascript code to set an app's var or an control's text, however, yes, is possible to do using the "window.App.RootScope", for example:
This action:
Is the equivalent to this other code:
Hello John,
Why not? :-)
Hello John,
Many questions in the same thread. I will try to reply to all of them.
Hi All, I am new to using AppBuilder and as such I have a few questions. Please excuse me if they seem simple or trivial.
Any question is trivial! :-)
Implementing MVC in App Builder. 1. I use MVC in my Java Applications. How can I take the approach I use for MVC in Java (as demonstrated by this example http://www.austintek.com/mvc/) and implement it in AppBuilder ?
The App Builder apps follows the MVC pattern, since it's implemented by certain Javascript core component (Angular JS) used by App Builder. In fact, you can think in your app's variables and other source of data (like HTTP Clients, etc.) as the model. The view part is the app's view, which automatically reflect possible changes in the model and viceversa.
Every view have also an controller, which is composed by the view's events, view's controls events, etc. With this the controller you can control the model, and, the app's view reflect automatically the possible changes on the model by the controller.
The above basically means that you no need to do anything special, since the App Builder produces apps are based in an MVC pattern.
Using Custom JavaScript 1. I know I can use custom JavaScript by using the StartJS and EndJS Markers. However, how do I access the properties of UI Components using Javascript?
Maybe you want to take a look at the External Javascript tutorial of the App Builder's help.
2. If I create an external Javascript File where should I store the file to ensure ease of deployment when the app is finished ?
Probably the best is that every app have at least one root folder, for example, "MyApp". Inside this folder you can place more folders like "Javascript", then you can place inside your JS files and include it by the app's files manager. Doing that App Builder play with the Javascript files as "local files", that is, you can, for example, move your "MyApp" to another computer, and everything continue working.
Views and the App 1. Can I treat views as Classes (as I would in Java) ?
The app's views have certainly an variable in the app's scope and that variable is an Javascript object variable, with some possible useful properties. But you must explain a little more what you means by "treat views as classes" John.
2. Can I add Variables that are Global to the view ? 3. Can I add Variables that are Global for the whole App ?
All App Builder's apps variables are globals, in the sense that you can, for example, change the text of a button that is not in the current app's view. You can change the text... but the button's text is not shown... until the view who contain it is shown.
4. Can I create Custom Functions for a View?
Using pure Javascript, certainly you can do it, for example, in the app's view's Show event. You can place some functions inside the app's view's variable or in other place in the view's controller. However, commonly what you do is to create app's functions, using both App Builder actions and / or Javascript code, and then use that functions from one view or another.
Please, John, go ahead if you have any further questions.
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.