Posts by DecSoft

  • d
  • h
  • m
  • s
Show threads by DecSoft
3352 posts found, page 223 of 224

DecSoft (In thread: examples how to use SetStyle action)

Hello Walter,

Take a look at the bellow code, which change the top, left, width and height of a Textarea control.

As you can see we need to specify a measure, in this case "pixels". If you plain to establish lot of CSS properties maybe another possible approach is to use a Cascading Style Sheet file, a CSS file which you can include in the app files/styles, and which are included and linked by App Builder automatically. The SetStyle action expect a CSS property name, just like if you defined it in a CSS file, and the appropiate value, including a measure when needed.

Just take in count that every app control have an ID, which is the same that their name. Then, for example, to establish a CSS properties for a "Textarea1" control, we must use the ID "#Textarea1" in our CSS file. Maybe you can take a look at the Responsive apps tutorial included in the program help. Such tutorial indicates various ways to use CSS styles, and how we can get beneficts defining CSS "media queries" in our CSS styles.

About the "If" action's editor error, can you explain a little more? Just yesterday I fix an error which cause that the operator description are added to the action argument, but I don't know if you refer to this problem or another one.


DecSoft (In thread: load array with LoadVariables action ?)

Hello Walter,

The "ParseVariables" action doesn't expect an URL, but a text ready to be parsed, for example, we can write something like this:

The "LoadVariables" action yes, expect an URL, but we cannot write something like this:

The point is that "LoadVariables" is executed asynchronously and then requires some time in order to made the appropiate HTTP request, wait for the response, and then parse the received response text.

If we want to use the loaded variables inside an "Html" control this is not a problem, because in literally milliseconds the variables are loaded an appear into the "Html" control like we can expected.

If we want to play with the loaded variables from our app code, we need a way to assert that the variables are already loaded. In this case the recomendation is the use of the "ParseVariables" action.

However, and since "ParseVariables" expect a text to be parsed, we need the help of the "HttpClient" control. The "HttpClient" made the config URL request and inform to us when they are ready.

In few words Walter, we need to use the "HttpClient" control because they can retrieve our config file text, but, most important, because they inform us when the response text is ready.

Once the "HttpClient" control retrieve the config file text, then yes, we can use the "ParseVariables" action and just after their execution we can play with the defined variables without the previous "problems".

I recommend you to review the "ParseVars" app sample. As you can see, in that sample we use an "HttpClient" control to retrieve the variables definition file (our config file) and then wait for the "Success" event.

Is in the "HttpClient" "Success" event when we use the "ParseVariables" action. After that point the variables are availables to be used; before that point the variables are not availables or "undefined".

Hope you understand the points, but don't hesitate to post here your questions.


DecSoft (In thread: Cam API - how to use getusermedia ()?)

Hello,

One more thing. Maybe the File input it's not all good in all situations, I talking about the design of our apps. If the input is placed along with other inputs in a "form" like, probably the File input is good. But if we wanted to ask the user for a picture (or photo) maybe this input appareance it's not perfect.

A possible way to solve this can be the use of a "label" HTML tag refered to the File input. Once doing this we simply can hide the File input control, and, when the "label" HTML element is clicked, the file picker dialog or photo dialog or camera appear like expected. I add a new sample "ImagePick2" that show this trick.


DecSoft (In thread: loop action with number variables possible?)

Hello Walter,

The code you show its a bit "rare", because by set the image source in a loop probably we only see the last image. Said this, the below code works for me, that is, we can use variables in the "Loop" action and also use variables between an string, like when set the "Image1" source:


DecSoft (In thread: load array with LoadVariables action ?)

Hello again,

Finally I add a new "SplitStr" action which we can use to split an string into substrings in an Array variable.

That is, we can do something like this:

The "[Result]" variable is an Array which contains the elements: "Red", "Green" and "Blue" in this case.

We can use the separator what we wanted, then the bellow code works too:

Also, the "LoadVariables" and "ParseVariables" actions support now Array variable definitions. What we can do it's something like this:

In the above case the "[d]" variable is loaded as an Array with the elements "Red", "Green" and "Blue".

The separator "|" is now mandatory and, as we can see, the variable value must start with the same char: "|".

Then you can prepare a file like this Walter:

However, note one thing more. If you want to access programaticaly to the "[lcodes]" variable, you need to use the "ParseVariables" action and not "LoadVariables".

In fact we can use "LoadVariables" too, but, since these actions are executed asynchronously, only "ParseVariables" (we already have the file contents) can allow us to access the variables right after the action is executed.

Remember the two includes app samples: "LoadVars" and "ParseVars" and note the differences.


DecSoft (In thread: load array with LoadVariables action ?)

Hello Walter,

"LoadVariables" currently not support Arrays, sorry, but it's a good idea. Stay tunned Walter.


DecSoft (In thread: Cam API - how to use getusermedia ()?)

Hello,

Always thanks you Walter. Please, before anything, try with the added "ImagePick" sample. It's my intention, however, to prepare a non visual control to work with the Phonegap plugin. They don't work in browsers, of course, but works in almost all supported Phonegap platforms, including Android.


DecSoft (In thread: Cam API - how to use getusermedia ()?)

Hello Walter,

The problem is "getUserMedia" it's not very well supported at this time. In particular Internet Explorer doesn't support "getUserMedia", and for that cause you cannot go working in App Builder, because they use Internet Explorer for their debugger.

I investigate about this in the past and the problem is to choice the right API in order to provide a way to "make a photo", for example, in almost all platforms. The problem of course is this "perfect API" doesn't exists at this time.

A possible solution is to use the Phonegap Camera plugin, however, if we use this in some control or action in App Builder, there is the first time that a control or action can works ONLY in certain platforms, and not in all.

Even when this can represent a problem, probably we need to take this solution until a pure Javascript API are supported by all the mobile and desktop browsers, but, until this plugin can be easily used from App Builder, what we can do?

I am updated App Builder right now to enhance the File input control in order to allow us to use the Capture attribute and the Accept attribute. Then I add the Capture, the Accept and also I add a new Url variable to the Input control.

The Capture attribute is not perfect because they do not work at this time in all platforms, but in the Android version of the Chrome browser, for example, they allow us to take a photo in a very similar way than the Phonegap Camera plugin, even better.

I add a new app sample named "ImagePick" that show how to use these new variables, for example, how to use the new Url variable in order to show the user selected (or taken) image into an Image control.

So until the Phonegap Camera plugin can be integrated in App Builder, take a look at the refered sample, Walter, because probably this can work more or less that you wanted. If you have Phonegap installed (I hope yes) try to compile an try this sample.

In fact I can't try the sample in my Android device, because, my specific Android version doesn't allow Input files at all... a controversial change in Android 4.4.2 that the community report as a bug and apparently Google fix in later Android versions...

Welcome to the world of cross browser and cross platforms development! :)


DecSoft (In thread: How to use filename.json query results)

Hello Walter,

Thanks very much. Right now I add two new actions into the Math category: "Random" and "RandomEx". The first one provide us with a random number from zero to 1^10 inclusives. The second one provide us with a random number from the specified min and max numbers inclusives.


DecSoft (In thread: How to use filename.json query results)

Hello again,

I want to continue with our possible JSON interaction, however, if you update App Builder, you can view two new actions: "LoadVariables" and "ParseVariables". This action can be used to load variables from app or remote files in an easy way. Take a look at the action's help and don't forget to play with the new "LoadVars" and "ParseVars" app samples.

Probably you can achieve what you wanted using one of these actions Walter.


DecSoft (In thread: How to use filename.json query results)

Hello Walter,


Hello David,

I want to use a filename.json as a kind of INI file, means I want to set certain default variabels out of the database. Now my questions are:

1.
If I set a query, how can I get the unique result of this query into a local variabel. I.e I want to set a new var with the single [Record.Name] I get out of my query? With Setvar "[NewVar]" "[Record.Name]" "String" I get an error ... undefined

This is an interesting question. Currently the only way to parse a JSON file is to use the Report control, which in fact do more because visualice the JSON data in an HTML table. However, currently is not possible to parse a JSON string and retrieve it using App Builder available actions.

Definetively I need to think on this because it's very interesting. Of course if you use pure Javascript (with the StartJS and EndJS actions) probably you can do it, but my intention is to made it easy by using some kind of App Builder action or actions. Currently we can get the content of a file using "SimpleGet" action or the HttpClient control, but these are not thinked specifically for JSON files.

Currently I am a little sick, Walter, but I promise you I take a look at this question asa quickly as possible.

2.
My database.json has the fields Name and Value. After a query with only 1 result/record I want to use the following Syntax:
Setvar "[[Record.Name]]" "[Record.Value]" "String" - possible or a similar solution?

Anidated variables is something not available and probably it's not a thing which we can implement more or less easily, to be honest. However, we have actions like "Loop" or "While" and with the help of these actions and other possible actions to deal with JSON of course we must access individual JSON fields or iterate over records. Not currently, but probably in a near App Builder release.

3.
Do you think abaout a RANDOM control/function ?

Do you refer to a Random action which provide us a random number? Yes; of course some random related actions can be useful and probably you can count with something like that in a near release of the program. If I am wrong and you refer to other thing, please, tell me.


DecSoft (In thread: SetOption, GetOption, where are these files stored)

Hello Walter,

Thanks for posting. The SetOption and GetOption actions do not use files but the LocalStorage HTML5 API.


DecSoft (In thread: Any attempt so far on Windows Phone?)

Hello,

Interesting information Nelson. Yesterday I try installing Visual Studio in order to get the SDK and other software ready to use with my Adobe Phonegap installation, however, maybe due to the options I choose during the installation, the build file start adding the platform and create some files, but terminates with some "requeriments" error.

I will try to do more test about that. Do not forget that Phonegap provide at least three ways for Microsoft platforms: Windows, which means our apps can be deployed to Windows 8.1 and Windows Phone 8.1; Windows Phone 7, suposelly to get our app ready to deploy in that version of Windows Phone; and also Windows Phone 8, to be used in order to deploy in this Windows Phone version.

I want to try with the first option, since a phone with the Windows 8.1 operating system have a more or less affordable price. Anyway remember that, at least at the current App Builder stage, we can try EVERYTHING in a browser, that is, using the App Builder included debugger. Or open our app in a browser using the HTTP served that AB incorporate. Maybe a couple of "Open in browser buttons" are a good idea.

This is the primary intention in App Builder: everything must run in a browser or must be emulated in a browser. An example can be the Vibrate and Beep actions. These actions relies on certain Phonegap plugins, Vibration and Dialogs, however, if they are not exists, the both actions works like we can expected by vibrating the screen (with a CSS animation) or play a beep sound. This primary intention, however, can be break by certain specific actions in the future.

When such time come, certainly, we need to think in how to emulate an Android device, for example, or how to connect a device in our computer in order to debug the compiled APK app. I have a better experience doing this instead of use an emulator, since the speed of the emulators are not too fast, at least in my computer.

Following with the Windows Phone or Windows platforms, maybe can be a good idea, at least to try, to using the Adobe Phonegap Build online service. I prefer the Adobe Phonegap CLI flavour, because the results appear better and also we do not get with the limitations of the free service of Adobe. I want to get an environment ready to deploy Windows and Windows Phone apps using the Phonegap CLI and the required Microsoft Windows software stuff, SDK's, etc.


DecSoft (In thread: Any attempt so far on Windows Phone?)

Hello Nelson,

To be honest until today I am mainly focused in web browsers and Android platforms. Since I prefer that I am right now downloading the required software for the Windows and Windows Phone 8 platforms: http://short.cz/2N

As you can say we can expect the things currently works well, not only by the nature of HTML5 apps, but also by the nature of the App Builder itself, intented to work in almost platforms as possible, starting with the web browsers.

But certainly I am interested to try in some possible Windows Phonen emulator and even I am thinkin in buy a more or less cheap Windows phone in order to test my own apps. Maybe another mate made some efforts on this platform and can help us.


DecSoft (In thread: Congratulated)

Thanks Eric. Hopefully we can create useful apps with App Builder. :)

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 cookies only to store your preferences.

Ok! Hide this note More information