Posts by DecSoft

Show threads by DecSoft
3341 posts found, page 217 of 223

DecSoft (In thread: NeoPlugins - npEncodeDateTime not working?)

Hello Nelson,

Don't worry. In fact we can use the npEncodeDateTime action to prepare certain value (a "Delphi" datetime string, stored in the result variable) in order to do later two possible things: just use the value like you do above, for example, to show the datetime in an alertbox, or, more commonly, to be use it with other plugin related actions, in order to compare dates, increment days, get number of between days, etc.

The npWeeksBetween action, for example, offer us a sample of the npEncodeDateTime use.


DecSoft (In thread: NeoPlugins - npEncodeDateTime not working?)

Hello Nelson,

What's wrong to you?


DecSoft (In thread: Checkboxes in Google Chrome, Z-Index and no-cache meta tag)

Always thanks you Walter!


DecSoft (In thread: Checkboxes in Google Chrome, Z-Index and no-cache meta tag)

Hello,

Yes; if we wanted to show the checkbox over an image, then we need to play with the "z-index". In my test the checkbox appear over the image if assign a "z-index=9999" in both designtime (using the object inspector) or in runtime (using the SetStyle action). Try to assign a value like "9999" to the checkbox "z-index" Walter.

About the "no cache" meta tag, finally I add a new HTML tab into the app options dialog. From this new tab we can specify if App Builder must automatically add app information and prevent browsers cache using the index.html metadata, and, we can also specify custom metatags to be added into the refered index.html file.


DecSoft (In thread: Checkboxes in Google Chrome, Z-Index and no-cache meta tag)

Hello Walter,

This works to me in all browsers I test, including Chrome:

Then take care about "[myObject_Y]" and "[myObject_X]" variables. Also take care about "[myObject]" variable. This cannot be the same name than the Checkbox control. You can always specify the name of the control if you like:

About the "no-cache" meta tag, please, let me sometime in order to investigate it.


DecSoft (In thread: Problem with setting variables from JavaScript Callback)

Hello again,

Just to say that the current available release of App Builder have a new Barcode control (based in the same Adobe Phonegap plugin you use), a new BarcodeScan action and a new Barcode app sample. Take a look if you like Jürgen and hope everyone found this new control useful! www.getappbuilder.com


DecSoft (In thread: Problem with setting variables from JavaScript Callback)

Hello Jürgen,

Don't worry at all. Yes; in these scenarios we can use the ApplyModel action, in order to tell the GUI that some of our model variables changes. Use this action in your "BarcodeReaded" app function, after you set the "barcode result" variable.


DecSoft (In thread: Problem with setting variables from JavaScript Callback)

Hello Jürgen,

Always thanks you and thanks to tell me you finally got it!

Hello David,

the solution with:

is really cool. Works really great.

Thanks for helping me.

Best regards
Jürgen


DecSoft (In thread: Problem with setting variables from JavaScript Callback)

Hello again,

Please, update (if you like) your App Builder copy: I add the new External app sample, which show us how we can set an app variable and call an app function from external app Javascript code: www.getappbuilder.com


DecSoft (In thread: Problem with setting variables from JavaScript Callback)

Hello Jürgen,

My latest post solution must works like expected, however, I forget than "window.App.RootScope" variable dot not give us access to app functions, which made the solution unuseful.

I made the appropiate changes right now in order to allow us to get access to app variables and app functions too. However, note that I rename "window.App.RootScope" to "window.App.Scope" to maintain some internal coherence.

You need to update your App Builder copy to get this changes ready! www.getappbuilder.com

And remember:

1º Call an app function when the barcode is ready:

Or:

If you need more help please tell me. If you finally got it please tell me too.


DecSoft (In thread: Problem with setting variables from JavaScript Callback)

Hello Jürgen,

Certainly the problem is that "scanresult" function is executed asynchronously. If I am not wrong "ScanBarcode" is an app function which is called in order to retrieve a barcode. however, such function launch the Barcode "picker" (correct?), and, until the user really scan the barcode the, the "scanresult" nor "scanerror" are executed.

Then we can't use the variable "Barcode" just after call the "ScanBarcode" app function, because such variable is not available at all until the user scan the barcode. What is solution? The solution is to react when the "scanresult" function are executed. My suggestion is to prepare an app function, say "BarcodeReaded", and write something like this in the "scanresult" function:

We can also add a "Text" argument to the "BarcodeReaded" function, then we can simply write something like this:

This is the way in which this kind of things works, not only for the barcode plugin. For example, the we can't write something like that using an Http client control:

The above "AlertBox" can't show the Http client response, because they are not available until the Http client Success event is executed. If in the future I implement the Barcode plugin in App Builder, they must have an "Success" and "Error" events too, in order to be ready when the user scan a barcode.

Hope you can understand this Jürgen, when not, don't hesitate to continue posting.

** Please carefully read the next post **


DecSoft (In thread: Problem with setting variables from JavaScript Callback)

Hello Jürgen,

The problem here is that "scanresult" function is executed asynchronously, then what we assign to "window.App.RootScope.Barcode" is the first defined "barcode" variable value, that is, "HELLO".

Once "scanresult" is executed, what you do is to assign the "result.text" to the "barcode" variable, not to "window.App.RootScope.Barcode". Then the solution is to assign the "result.text" to this variable:


DecSoft (In thread: KeyDown event? Checking user's inputs on keyboard (and mouse click))

Hello Walter,

The above code look well except for the "document.getElementById('action')", which maybe cause an error if the element "action" doesn't exists. On the other hand, try to leave the "index.html" without changes, since this file is generated automatically by the program in every debug/build operation. Then you can use a separated Javascript to do something like that.

Update your App Builder copy because I update it in order to add the KeyUp and KeyDown events for all Input controls, Textarea and Typeahead controls. You can use such events like others in App Builder, and remember the variable "Event" of the control contains the information about the event, then in the case of the KeyUp and KeyDown events, for example:


DecSoft (In thread: No more messages in Console)

Hello Walter,

Oh yes... I am very worry Walter. The Console action support now a second argument (with the kind of console message) and therefore the action are not recognized with only one argument... you need to add such second argument to the Console action calls:

Please sorry for the inconveniences.


DecSoft (In thread: Modify the Report Sample App to include functions (Add, Edit, Delete)?)

Hello CIS,

I think your PHP do not look what we can expect. For example, your PHP scripts produce HTML code, which is something that your app do not expect. Your app provide all the required HTML, you no need to worry about it in the PHP scripts. These scripts must "act" when are requested and must responde with the appropiate data. No more.

You no need an HTML form to send information to your PHP scripts: you must use the Input controls what you need and then use the Http client control to perform the appropiate HTTP POST request. On the same way, you no need to list your database data by output it from PHP scripts. Your scripts must return JSON data that the Report control can parse and show automatically for you.

I am very sorry because this app sample are not trivial at all, probably take me several hours, and currently I am very busy with other project areas. Again, try to understand what you need and ask here for help when you needed. I am very sorry but I can't say other thing at this time. Just remember:

1º add.php - Need to receive POST data and their response can be, for example, just an "OK" or "Fail", in order to understand from our app the data has been added.

2º edit.php - Need to receive POST data and their response can be, again, just an "OK" or "Fail", in order to understand from our app the data has been updated or not.

3º list.php - Only need to return the appropiate data as a JSON object. This script must be very similar to the "data.php" you can found in the current app samples. That JSON object is parsed and show by the Report control.

4º delete.php - Need to receive POST data and their response can be the same than "add.php" and "edit.php".

On the other hand, remember we need to enable "CORS" requests in our PHP scripts. You can view how by read the "data.php" refered above and included into the Report app sample. This may are not needed for the local web served files (probably not) but "CORS" must be enabled for our PHP scripts when use a remote server.

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.