Hello to all,
Here is a new DecSoft App Builder with the below changes, fixes and enhancements:
Hello to all,
Here is a new DecSoft App Builder with the below changes, fixes and enhancements:
Hello John,
Glad to know that you got it, sir, and, thanks for sharing your code here!
Hello John,
How did you do it? Because I try to apply my proposed solution... without lucky... (maybe because more information is needed, for example, where you set the local storage option) and I am here struggling with my mind in order to find another possible workaround... :-(
Hello John,
Remember that the app and the web extension content run in different contexts. I am not sure if you can set a local storage option from the app to be accessed from the web extension content and viceversa. You can try it, however, because I am not completely sure in this specific case. Anyway, if that is not possible, you always can communicate from the content to the app, so the app read the local storage and send you back the option's value.
Hello Mario,
Yes; I understand your point of view. I am right now really busy and can't promise a date, but, I will try to add some kind of "direction" option to the Sidebar. I am not sure about the implementation, and, for that reason I suggest to hide the sidebar on both left and right swipes gestures. But I will take a look to see if certainly it's possible to implement some kind of "direction" option to the Sidebar.
Hello John,
The Javascript code placed at the "WebExtContent" app's event is the "content" of the WebExtension, that is, the Javascript code which is executed on every loaded page. So, I think you must use this app's event to do the job. When the user changes to another page, by clicking in a link, for example, the "content" Javascript code is executed, so, you can do whatever you need at that point.
Hello Bryce,
Please, take a look at the "Files" sample app. There is no "readTextFile" because we can use a XMLHttpRequest ("jQuery.get()" for example) without problems in the new generation of DecSoft HTML Compiler. In the referred sample you can see how we read a text file (previously write) with the below Javascript code:
Hello to all,
Here is a new DecSoft npHook NeoPlugin with the below changes, fixes and enhancements:
Hello Mario,
The function that you refer is part of the Cordova File app plugin (exactly is: "getFileBlobFromFileUrl", I am not sure there was renamed from: "getFileBlobFromFileUri")... so be sure that the Cordova File plugin is checked in the app's options -> Apache Cordova -> Plugins.
On the other hand, may you can consider to use a File input (set the "Accept" property to "image/*"). This works in all platforms and can be a very good idea in order to take a photo and upload it to the app's server. You can take a look at the "Http" sample app.
Hola John,
Maybe we can specify a bit more what is needed. Certainly, it's possible to create AB controls at runtime (or any other kind of control, just by providing the right HTML markup and Javascript code), however, I am not sure if this apply to non visual controls like the HTTP control. But the point, in this case, is that we no need to use the HTTP control, that is, we can use the jQuery "post", "get", or even the "ajax" methods, in order to perform HTTP calls and get ready for the "done" and "fail" events.
The creation of AB controls in runtime is not documented, because in fact we rarely need something like that, and, on the other hand, we can create the controls by using the right HTML markup and Javascript code. It's possible to do it, but, maybe not really needed. You can get what is needed in the app's views HTML (once compiled) and the "app.js" objects that every control has. As a sample, you can place the bellow HTML markup in an HTML control in an app's view:
And then you can place the bellow Javascript code, which defines the "dab-push-button":
However, it's also possible to place a button in this way, by providing the right HTML markup and Boostrap CSS, which as you know is the framework used in DecSoft App Builder. Again, you can place the below HTML markup inside an HTML control in an app's view:
And then you can place the below Javascript code in the app's view Show event:
Note the "unbind().bind()" use: this is to avoid to attach twice the "click" event of the button, for example, if we goto another app's view and then go back to the view which attach the event. If we don't "unbind" the event, then the "click" event can be executed twice, which probably is not what we expected. We can also use here a possible global variable in order to avoid a double event attaching.
If this don't answer your, please, John, don't hesitate to post here any further questions.
Hello John,
I am not sure if we can access app's files specifically from the WebExtension: remember that the important point here is that we are running in different contexts. So, what we can do about this specific situation? I can think at least in two possibilities: 1º Use a remote URL, so the WebExtension can directly read it. 2º Use the messages that we can send from the app to the WebExtension and viceversa, in order to get the XML data of the file. So it's the app who read the file, but, pass the XML to the WebExtension when needed.
Hello Jhonson,
I am not completely sure if can understand well, but, are you take a look at the "Html" sample app? Please, take a look at that sample app: I think that can give you some good ideas. Take also a look at the "Timer" sample app. On the other hand, don't hesitate to post here if you have any further questions.
Hello to all,
Here is a new DecSoft HTML Compiler with the below changes, fixes and enhancements:
Hello John,
The point is that the app views and the WebExtensions content and background scripts works in different leagues: you already know that we can communicate both leagues, but, we can't share certain stuff like you wanted here in this post. I think we have at least three possible solutions or workarounds that we can do:
1º Duplicate the "Config.js" file, named one "AppConfig.js" and other "WebExtConfig.js", and use the app's Files Manager to properly add these scripts for the app and for the WebExtension.
2º Copy the contents of the "Config.js" file and place it in a script which are used by the app and by the WebExtension: maybe you can directly copy the contents of the "Config.js" file in the app's Mounted event and some of the WebExtension event... or just leave a file for the WebExtension.
3º Use a web served "Config.js" file, which you can add by his URL using the app's Files Manager, maybe with some different "query", since in other case, that is, using the same URL, probably we can't use it for both the app's views and the WebExtension.
In any case we are not sharing the file, due to the fact that I refer in the first paragraph of this post: we are talking about different contexts that cannot share stuff in this manner. So I think you can chooose one of the above possible approachs. Why I will do? Since apparently what the "Config.js" file establish certain Javascript object to be extended, I think that duplicate the "Config.js" can be enough, in order to provided that base object in both the app's views and the WebExtension contexts.
Hello to all,
Here is a new DecSoft HTML Compiler with the below changes, fixes and enhancements:
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.