Posts by decsoft

Show threads by decsoft
3295 posts found, page 192 of 220

decsoft (In thread: sqlite javascript)

Hello,

Please, take care about your forum's posts: use the "code" tag when possible, so your messages can be readed in a better way. I am not sure if your Javascript code contains some problem or something like that, because it's difficult to read.

About your question, the next App Builder releases includes a new "External2" app sample, which show us how to use Javascript functions declared in Javascript files. You can download such "External2" from here

As you can see, we get the result of certain Javascript function in an app's variable.


decsoft (In thread: sqlite javascript)

Hello,

Please, take a look at the External app sample: you can see here how to change app's variables from "pure" Javascript. I don't know if any other problems can be, but, for example, in your code:

... "value" must be "Value" (case sensitive).


decsoft (In thread: sqlite javascript)

Hello,

Use a Javascript external function is not complicated. Supose we have a Javascript file with the below code:

Then, if we include such file using the app's file's manager, we can call to "MyCuteFunction", just by include the function's call between the StartJS and EndJS actions, just like in the below code:

About the "sql.js" we have the complete documentation here and also various samples in the project's page here. Currently App Buidler do not recognize external Javascript files in order to extract form such files their "reusable" stuff, honestly I don't know if this feature can be added in the future.


decsoft (In thread: App not resize image)

Hello,

Again, we can use certain App Builder actions or maybe a bit of CSS code. For this last case, we can center the image using these CSS rules:


decsoft (In thread: App not resize image)

Hello,

I forget to mention various app samples that can be useful here. For example, the "Scaled" app sample can be useful. And also the "Calculator" sample. Take a look at the "About" view of the "Calculator" sample in both "portrait" and "landscape" orientations:

In the above case we don't use any app's event nor action, but just certain CSS media query into the app's "Inline CSS" option:

The above CSS code is applied only when the orientation is "landscape", and, in this case put the about image at the 50%, reducing in that way the image is scaled and obtaining a better apparence (subject to opinion).


decsoft (In thread: App not resize image)

Hello andynhoo,

There is not a unique way to achieve this kind of "scale" issues. We can, for example, use the app's "Orientation" event, and the "[App.Orientation]" variable, in order to react when the "landscape" mode enter in action. We can then set another image's sizes using actions like "SetStyle".

We can also use something like above but also can use CSS media queries, the "[App.InnerWidth]" and "[App.InnerHeight]" variables with the "Resize" app's event, etc. Remember we can also use actions like "SetViewSize", "SetAppScaled", etc. Instead of resizing the image we can use other image, etc.

About the "back button", take a look at this forum's thread and also to the "ConfirmExit" application sample. If you have any further question, please, don't hesitate to post it here or open a new forum's thread if the topic is not related with this one.


decsoft (In thread: enter JavaScript)

Hello,

Take a look at these app samples: "External" and "QrCode". In this last one we can see how to use a thirdparty Javascript (qrcode.min.js) and then how to use that Javascript stuff from our application, in this case, to generates a QR Code image.


decsoft (In thread: sqlite javascript)

Hello,

Database... we can use the local storage for our application's data: options, preferences, etc. Since the local storage wanted for strings (to be saved) and we can serialize JSON objects to strings... then we can save JSON data into the app's local storage, which is something useful. But we can also saved the information in another possible way, using the same local storage.

Certainly, client side databases is not widely supported, then, if we need real databases, probably we want to use server side ones, then no matter if we want to use MySQL or any other database engine, since our client applications are abstracted of that.


decsoft (In thread: Use vars in Strlen or ArrayIndexOf)

That is the question! :)


decsoft (In thread: sqlite javascript)

Hello,

because uses local memory, you can not even create its own JSON files in a directory eg files app?

Browsers don't allow a web application to save their data in the system file system. Some technologies may appear in the future, but currently they are not wide supported by the browser's vendor. If we plain to use the application in a mobile environment, then we can use the Apache Cordova's "Files" plugin (take a look at the "Files" app sample) and then we can store the JSON text in to files without problems.


decsoft (In thread: sqlite javascript)

Hello,

I test new sample "Agenda" app sample.Where the path json file save? thanks

There is no path at all, tin, but the application uses their local storage to save the JSON data.


decsoft (In thread: Use vars in Strlen or ArrayIndexOf)

Hello,

Please, Walter, sorry any inconvenience and, when you can, send me an application in which I can reproduce the problem. Then I will take a look in order to fix it as quickly as possible.


decsoft (In thread: sqlite javascript)

Hello to all,

Update your AB copies and take a look at the new "Agenda" app sample:

Add the new Agenda app sample, which simulates an small agenda to save our contact's names, mobile numbers and notes. The point of this application is they use JSON to store the contacts' data, uses a Report control to shown the contacts information and finally uses the app's local storage to maintain the data between application executions.

Hope they can help anybody about JSON, the Report control and the app's local storage.


decsoft (In thread: Use vars in Strlen or ArrayIndexOf)

Hello Walter,

Yes; certainly could be the problem, maybe SelItems contains more than one item, and, on the other hand, what happend if no items are selected? Anyway may you can test it by place an "Alert" in your code, something like this:

This can be a quick way to look into the "[searchme]" variable contents...


decsoft (In thread: {Solved} Missing Generated *.bat Files)

Hello,

Waiting for the error capture, which probably can help here. Certainly the "Build" button must creates the BAT files, and, in fact they works like expected here: there is no reason (I can imagine right now) to work in one case and not in other...

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.