Posts by DecSoft

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

DecSoft (In thread: Program flow and SplitStr)

Hello,

What is your Windows version ?

It is Windows 8.1 Pro 64 bits.

If you need an example, I would be glad to provide one based on the one of this morning.

Thanks for the information Samuel. Maybe the exception appear in Win64: I only try here in Win32. Anyway, App Builder is now updated and we can use Arrays variables with the Log action. If you like try it and tell me if they also work in your Windows version Samuel.


DecSoft (In thread: Program flow and SplitStr)

Hello Samuel,

What I need to investigate is how to deal with objects and also arrays when log to the program console. Certainly we can log an Array without problems in the Firefox console, for example. But for some reason the App Builder debugger console do not output correctly Arrays nor objects, just strings.

But in my case the program do not produce any exception, just that we log some "rare" characters to the console, but not an exception.

What is your Windows version Samuel? On the other hand, I think that output Arrays and objects cannot be too much complex, then I want to try right now for with a possible way.


DecSoft (In thread: Program flow and SplitStr)

Hello again,

Follow the rabbit I found the same problem in other actions like "SubStr", "StrLen" and some others (the program history refer it all) and then I fix the problem and upload an updated release of App Builder. Thanks for the report Samuel, because this problem neccesary appear sooner or later.


DecSoft (In thread: Program flow and SplitStr)

Hello Samuel,

I due you a lot of tapas and beers too ;)

Thanks! But I need to apologize because something is wrong in my above explanation of the problem. Certainly the order in which the variables are set matter, however, this is not the case of our issue Samuel. So what happend here? Certainly the translation of the "SplitStr" action is not like we expect when the "Retour" variable is not set, however, and, since the "split" is not executed until we click the button, the produced Javascript code can work.

What happend? Taking a more deep view, I can want to try how the "split" Javascript function respond if we want to write something like this code:

By my surprise the "[Result]" variable store "false" here too. And the problem is the same that you found in your code. Apparently the "split" Javascript function cannot deal with a Javascript like this:

Or this other:

Certainly I cannot understand why the above code is not valid, because cannot view something wrong. But the truth is the code do not work and I can fix the problem by change how the "SplitStr" action is translated into Javascript. Now you can see that your app sample (even if you do not set the "Retour" variable before call the user function) work like you expected, and the same for my above code, also works like we expected.

Then maybe I deserves a cold beer, but not for my other first answer... but for this one. You can now update your App Builder copy now Samuel. Sorry for waste your time, but my first impression is more or less logic, because I expect the "split" function is working properly.

The order in which we set the app variables certainly can affect, but not in this particular case.

Thanks for your patience Samuel!


DecSoft (In thread: Program flow and SplitStr)

Hello Samuel,

In fact we play with global variables anyway: the problem here is the order in which the variable "Retour" are set. Since the user functions are compiled after the app views/controls, when App Builder translate the "split" action to the appropiate Javascript code, they don't know nothing about the "Retour" variable and the final Javascript code do not produce our expected results.

By set the "Retour" variable before call the user function (no matter if we set the variable in the "Ready" app event, or the "Show" app view event, or just before call the user function) when App Builder translate the "split" action can view that the "Retour" variable exists, and then the final Javascript code produced our expected results. We can view the differences in the below codes:

This is the final "split" function Javascript code if we do not set the "Retour" variable before call the user function:

This is the final "split" function Javascript code if we set the "Retour" variable before call the user function:

We can see that, because App Builder do not recognize the "Retour" variable when translate the "split" action, they take the variable as an string, and this do not produce our desired results. On the contrary, the second code show to us how we deal directly with the variable "Retour" as a variable, not an string, and in this case the "split" function produces the expected results.


DecSoft (In thread: Program flow and SplitStr)

Hello Samuel,

Thanks very much for the sample. Certainly the problem is related with how App Builder compile the app code. The program compile first the app views/controls, then the app events, and then the user functions. Since the app views/controls are compiled before the user functions, then the variable "Retour" do not exists for the app views/controls and this cause the problem in our specific case.

What we can do is to set the "Retour" variable before call the user function which use it:

Try it and post here whatever question Samuel.


DecSoft (In thread: Program flow and SplitStr)

Hello Samuel,

Trying to reproduce the error I can't do it, because I do not understand very well what you mean when talking about "App Builder function which return an string", then I only can try the "button click way", and this apparently works like expected (see the code below). So please Samuel, if you can provide me with a little app sample I really appreciate it and I will investigate the problem.


DecSoft (In thread: Could we use HTC with AB?)

Hello,

In fact I am the first interested in a possible combination of App Builder and HTML Compiler, and it's something I plain when start to develop App Builder, however, I asume that this combination is not possible since the refered issues. However I still perservere in App Builder development, and also HTML compiler, because both programs meet their promises, even when they can't work together.

Maybe the most problematic issues exists in the HTML Compiler part, because the use of the "special protocol". But HTML Compiler cannot renounce this way since in fact they are what allow us to meet the HTML Compiler promise: never extract files to the user computer. This is because I never announce HTML Compiler as a "website compiler" or something else.

What HTML Compiler expect is HTML apps writen mostly from the scratch and which take in count the possible limitation of the HTML Compiler environment. Doing this we can be sure our HTML files never be extracted to the user computer, even when we can do this optionally. The conclusion is I prefer to say "this is not possible" than "maybe" or "yes, but not enterelly".


DecSoft (In thread: Could we use HTC with AB?)

Hello Samuel,

The problem is that the WebBrowser control (and also Internet Explorer), in which HTML Compiler is based, do not support "ajax" for local files in the same way than Mozilla Firefox or Google Chrome does. Also some other features like local storage cannot work for local files in Internet Explorer. For this reasons App Builder debugger is based in an internal HTTP server as you can see.

On the other hand, HTML Compiler relies in the WebBrowser control and certain proprietary Microsoft Internet Explorer protocol, which in fact allow us to do what we wanted with HTML Compiler: never extract any file to the user computer, if we do not wanted this. So with minor or no changes App Builder apps cannot works in HTML Compiler, which can be something good to me too.

We can try using AngularJS script tags instead of individual app HTML files per every app views. This is not the recomended way for more or less larger apps, however, maybe we can do it in order to get ready for HTML Compiler. But the problems just starts here, since other features like local storage cannot works like we expected.

I prepare for you the Calculator sample using script tags instead HTML files per the app views. Download this sample from here. As you can see they can work as an HTML Compiler project, however, some things do not works properly like the themes select control. Most of them are related with the refered local storage problem.

The other problem I can note is that the icons doesn't works too. The problem this time is that HTML Compiler cannot deal with the font files which include the icons. This time the limitation is in HTML Compiler, but we can expect some limitations like that in a program like this, at least all programs which use the same Microsoft Internet Explorer protocol used by HTML Compiler. The refered protocol support almost everything than local files support, but not everything.

Then the conclusion is that maybe we can adapt some specific apps to be used in HTML Compiler, but, currently is not something available for every apps and definetively is not an easy thing to do: I mean we cannot do it using a few clicks.


DecSoft (In thread: How to use CSS files and classes)

Hello Walter,

In fact they are a mistake of mine. Yes I try to set the backdround in other than the current view, which is something that do not work, and have some sense. But by mistake I leave the "NewView2" and the action in the button.


DecSoft (In thread: How to use CSS files and classes)

Hello Walter,

Yes; is possible to use the SetStyle action just like you suggest.

Just assert you use an URL or a previously added app image file.

Take a look at this app sample.


DecSoft (In thread: php/MySQL and AppBuilder)

Hello Nelson,

The problem is that access SQLite from the HTML5 API appear to be droped in the future and is currently not supported by IE, for example. Currently you can use plain text, JSON files and local storage in order to store and retrieve app data. And also can use HTTP calls in order to update or add new information from the app.

How the HTTP calls are made depends completely on the app, because many different servers/languages can be used for this purpose. Probably you no need to send SQL queries along internet, because you can prepare end points for your app calls in order to retrieve or set database information.

Unfortunatelly we can wait an entire life for view a SQLite support in web browsers Nelson...


DecSoft (In thread: MultiSelect control - index of SelItem(s))

Hello Walter,

In a Multiselect control we do not have an "ItemIndex" variable like in the Select control. What we have is an "Items" variable and an "SelItems" variable. Since "SelItems" variable contains the selected items, if a user choose one item, then the "SelItems" variable contains one element with the selected item value.

From that value we can use the ArrayIndexOf action over the select items array in order to get the selected item index. Take a look at the bellow code, which you can put in a "Change" event of a Multiselect control (which contains a few items):

Note that in the above code we also check the user select more than one item. If so, we take the first of the selected items and omit all others. If you have any other doubt do not hesitate to post here Walter.


DecSoft (In thread: php/MySQL and AppBuilder)

Hello Walter,

Testing with the SamplePost app sample I can write something like this:

And works like expected, in the sense that I can get the into the "sql" POST variable the text "SELECT * FROM test";.

Maybe the problem is how you try to use the "sql" POST variable in PHP. First of all assert you receive such variable by simple "echo" it. Secondly assert you can use the content of such variable in the context you wanted to use. For example, maybe the quotes of the text cause the problem. Try something like this instead:


DecSoft (In thread: php/MySQL and AppBuilder)

Hello Walter,

Connect PHP and JS sound a little confuse, since PHP is a server language and JS is a client language, then by definition their have different scenarios. Depend on what you wanted the answer can vary. Make HTTP request to a server in order to be processed by PHP is very simple by using actions like SimpleGet, SimplePost or the HttpClient control.

What data we can receive from a server and how to deal with it depend on every app. Take a look at the Report app sample, for example. This sample show us how we can parse JSON data into an HTML table. The JSON of the app sample is loaded directly from a file (included with the sample) but the sample also incorporates a "data.php" file, which show us how we can create (in a server) the JSON to be received and processed by the app.

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.