Posts by DecSoft

  • d
  • h
  • m
  • s
Show threads by DecSoft
3355 posts found, page 99 of 224

DecSoft (In thread: Some help around certain Javascript syntax)

Hello again!!

Thinking about what you wanted to do... apparently PouchDB can synchronize a database, but, my question is, they can do this in an "authomatic" way? If so, how they can do that? Using HTTP calls in a pool like I suggest above? This part is not clear to me... In other words, if you finally must to call to the synchronize method, why don't call in the same moment to your server, just to get the latest cart's items? Do you understand what I mean with this paragraph Peter? Please, post here if not... maybe I did not explain well!


DecSoft (In thread: Some help around certain Javascript syntax)

Hello again,

Just to mention something... before the WebSockets availability, there a more or less "common approach" to establish a "pool" with the app's server, that is, you can ask to the server if some new cart's items are available... or just that send to the app the existing cart's items..., and, if needed, you can also do it in a "Timer", that is, in certain intervals of time. A WebSocket is more elegant, of course, however, they requires a dedicated hosting, and, not everyone have something like that available to use.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Just about the possible approach using another server's database, maybe more details are needed in order to decide if we can use "just" HTTP Clients (and HTTP calls) or if we need something more like a WebSocket server. This last allows to establish a bidirectional connection between the app and the server, and, allows to the app to receive information in real time, that is, by server demand.

So yes; certainly a WebSocket can do something like that... but I am not talking that there is something easy, maybe can be more easy than appear. On the other hand, a WebSocket server requires a dedicated hosting, and, I don't know if this can be suitable for you or not.

Said that, maybe we can avoid the usage of a WebSocket, just by consider various things, of course. We can start to know that the app's have an "Online" / "Offline" events, thant may we can use. So we can imagine that an user add an item to a shoping cart, and, if they are online, the app can made just an HTTP call to the server sending the cart' items, for example.

Once that is doing, any other app can "request" the cart' items to the server, of course. I feel that I place here just some few words, probably we must consider other things too, but, certainly probably it's possible to use the local storage in combination with a "traditional" server's database (any one, MySQL, PostgreSQL, Oracle or any other, since we made HTTP calls, and receive JSON (for example) the app is completely abstracted about the server's language nor database.

You can try to start with that approach, Peter, and, as now, we can try to help you in some specific problems. On the other hand, this do not mean that we end with PouchDB, that is, the problem right now is that I can see the app that you zipped without errors, so, I can't see what can / must be solved... if possible...


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Don't get frustrated... it's quite normal that the things requires more work that we expected at a first view... I am testing your zip / project, and, there is no errors right now! You told me that I must try the "remoteSync_Find_Report" function, but, finding it in the app they appear not used? So where you want to use that function?

On the other hand, but, not to get you more frustrated... may you can also consider other possible approach... maybe the local storage is enough for your "offline" requirements? Because if so, maybe you can deal directly with the local storage... and prepare some server's script to synchronize the data... I am imagine in another kind of database like MySQL, etc.

Again, this is not to desanimate you, but, maybe we are trying to kill flies with cannon fire? I don't know...


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Since the screenshot shown a similar array than the first example... maybe you need to use the same code? Remember what is the main point: we must assign to the Report.Data variable the "docs" array... in fact, right now I am not sure why we iterate (at least in this last case), that is, maybe something like than the below is enough:

Remember: the Report's Data variable expect an array of objects, that is, the objects that the Report must be shown, as you know, every object in the array is a record in the Report.


DecSoft (In thread: The order of the forum's threads)

Hello Paolo,

Your're welcome! In fact you are completely right... that is, the "updated" order have more sense than the "date" order. At least in the cases that we are talking about!


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Don't worry... maybe I am wrong... (definetively I must go to the bed and tomorrow I can take a look in a better way) but apparently the errors appear just when the "pouchdb.js" and the "pouchdb.find.js" files are added to the HTML document... that's rare... because in principle we don't start to use the stuff of that files... and the errors appear... but anyway, I want to take a look tomorrow morning: maybe I am missing something...


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Please, no apologies! But we have a problem here,... let me to try to explain. If you run the app, and, scroll up the console... you can see a couple of error messages caused in the "pouchdb.js" file ("fetch" are not defined) and the "pouchdb.find.js" file ("Headers" are not defined).

The above errors are fatal, at least one of them... anyway both of them must be solved. Why? Because certainly the app can continue running, however, at some moment (not only in the Notes view) we can see another error... "PouchDB" is not defined... and this last error is probably a consequence of the first ones...

How to solve the errors? Honestly I don't know right now... maybe because it's too late, but, in fact because the errors are caused in Javascript files that, in principle, must no contain any problem... at least just by included it in the HTML document like now...

Maybe you can search a bit from the error messages, around the PouchDB database, something like search in Google "fetch is not defined pouchdb.js"... I will try to continue help you tomorrow, Peter, but, certainly this what I can say right now...

Maybe you need to upgrade PouchDB and the used plugins?


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

The link of the AB file appear wrong... but anyway, what I need is the AB file and the required app's files, that is, the used images, scripts, etc. Just like try the app here in my PC like you in your computer!


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

I can try to take a look at the compiled files, but, I ask you for the project file (the AB file... and the required images, etc.) in order to try it here in AB. If you don't want to share here the link, just send me the files or the link to my E-Mail, Peter.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello again,

On the other hand... are you change the Report's HTML variable? That is, according to the records that the Report must shown... someting like "Record.note" and "Record.title"... if I am not wrong...

Anyway, send to me the project file, Peter, and I will take a look.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

Yes; I am not in my PC right now... but please, sent to me the project file... so I can take a look here as quickly as possible. :-)


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter

Maybe I am blind (due to the hours here...) but the error that the console declares is more or less easy to catch, that is, there is a syntax error: an "}" is expected in the line 2635 - char 33 of the "app.js" file...

Please, look at the App menu and choose the element "App Javascript file", then goto the line and char that the error refer and see if there is a missing "}"... there must be a missing "}" char there, Peter...

P.S. Look at the Menu -> Tools -> Program options -> Editor... and check the "Show caret" option, so you can see the lines in the Javascript editor. If you can't catch the problem... please, send me the "app.js" file and I will try to tell you.


DecSoft (In thread: Some help around certain Javascript syntax)

Hello Peter,

If I am not wrong, what you need is to change the below line:

... to this other line:

Apparently you already have the expected array in "docs", so, you can iterate that variable, and not "rows", which maybe do not exists.

Note that you must also change the item addition, that is, change the below line:

... to this other line:

Please, try it and post here if that works or what!


DecSoft (In thread: Issue with click delay in iOS and Android apps)

Hello Amin,

In principle, AB apps doesn't have the "300ms of delay" problem, that is, we use the appropriate stuff to solve that in the past. Honestly, I don't think that we can do nothing about, except to note somethings, that maybe can enhance the GUI response. Let me to explain a bit.

If we follow the URL that you refer in your post (it's important to do it in avoiding any possible cache, since we can see what I want to explain mainly the first time we visit the URL) we can see a similar delay also in the browsers.

Maybe I am wrong, but, if you click or tap again in the menu items, that is, if you repeat the operation, the items changes faster, that is, more or less as expected. We can see this also in the browsers.

So my suggestion is to take a look at the app's code, and, look if they can be enhanced in some way, for example, if we can change the menu's items colors before the Report's data is trying to load or end to load.

My suggestion, in other words, is to try to change the menu's items before any other thing, seeing if this can do something useful: what we wanted is that the items' colors changes before we try to load the Report or anything else.

Note that do not have any problem to add other possible event or something like that: it's just that honestly I think that AB already does whatever is possible in order to get the best results. Maybe I am wrong and miss something... but this is what I can say right now...

P.D. About the usage of FastClick... I need to investigate it and see if certainly we can avoid their usage or what. However, it's rare that the library interfere in some way if they are not needed... the programmer maybe take this in consideration... but I want to investigate this anyway.

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