#101 mORMot 1 » Trunk does not compile for Android after this commit » 2018-09-27 10:57:37

Leslie7
Replies: 2

GIT: SHA-1: 19ad9ecf7b3f3dfc6ecd0b3676562f407ac6079e

* new TGZRead class to decompress a .gz file into memory or stream/file




For any LAMW project (ARMV7A, FPC trunk):


SynZip.pas(1725,17) Error: Incompatible types: got "PChar" expected "PByte"

There is no problem for Win32 target

#102 Re: mORMot 1 » Latest mORMot.pas does not compile under latest FPC. » 2018-09-25 17:04:18

pvn0 wrote:

Do you guys use fpcupdeluxe? I have never been able to install anything with that, I always do it manually.

You can check out the source and run it from the IDE to see where it goes wrong for you:

https://github.com/newpascal/fpcupdeluxe

#104 Re: mORMot 1 » Latest mORMot.pas does not compile under latest FPC. » 2018-09-22 21:19:52

miab3,

Until FPC is fixed or there is an official mORMot workaround this solves the problem:

ParamName := VMP^.NamePtr;

#105 Re: mORMot 1 » Latest mORMot.pas does not compile under latest FPC. » 2018-09-18 09:23:48

The problem is that FPC trunk - at least in this case. maybe more generally - does not handle  the address operator for a record property with a getter.


This solves the problem and makes sense performance-wise, but directly accessing the underlying pointer may violate a design principle: 

   ParamName := VMP^.NamePtr;

#106 Re: mORMot 1 » Latest mORMot.pas does not compile under latest FPC. » 2018-09-18 06:45:55

ComingNine wrote:

Just curious: do you plan not to fix it ? big_smile

I am waiting for this too.  AB gives the best support to an opensource project I have ever seen.  Usually fixes come very fast. If not there is reason.  Maybe his main job requires more of his time now ...  I think we better trust him on task scheduling.

Also this could be an issue which needs to be fixed by the FPC team.

#108 mORMot 1 » Android compilation fails with the latest trunk FPC&Lazarus & mORMot) » 2018-09-06 08:32:06

Leslie7
Replies: 1

procedure TInterfaceFactoryRTTI.AddMethodsFromTypeInfo(aInterface: PTypeInfo);
...
            ParamName := @VMP^.Name;

mORMot.pas(56264,30) Error: Variable identifier expected

#109 mORMot 1 » Could this approach work with IOS and Android? » 2018-08-18 10:16:53

Leslie7
Replies: 1

I am still looking for a way to use mORMot with a local database in a mobile app.

Delphi supports IOS apps out of the box but from what I have gathered there is no reliable and efficient solution for Lazarus. The problem is that mORMot cannot be compiled with the Delphi ARM compiler.

I am thinking about compiling mORMot into a .so with Lazarus  instead and use that with a Delphi app. Being new to IOS development and short on time to test the idea I could use some advice. 

Has anyone used mORMot
1. for IOS with Lazarus at all?
2. within a dynamic library on a ARM system?

#110 Re: mORMot 1 » Phonegap plugin » 2018-07-28 22:05:38

An other way to make the same functionality available locally is to create a mORMot server which can be installed as a service.  Has anyone ever created an app running a mORMot server on an IOS device or on a Windows phone?

#111 mORMot 1 » Phonegap plugin » 2018-07-28 21:48:08

Leslie7
Replies: 1

I like the fact that mORMot and SQLite can be linked to Android apps created with LAMW for local/offline storage. Beside the built in encryption it insures that the app works with the same version of SQLite everywhere. On the other hand  a HTML5 app with Phonegap is an efficient way to target multiply mobile platforms.  Has anyone ever created a mORMot plugin for Phonegap with Lazarus?

#112 Re: mORMot 1 » Smart Mobile Studio supported or not?? » 2018-07-27 21:42:53

So now that  SMS 3.0 is out ...  will the mORMot support it?

Is this version finally a viable option for web/mobile development in itself, without any other js UI library?

#113 mORMot 1 » Exe security » 2018-07-11 07:57:24

Leslie7
Replies: 0

Hi,

In  a client + local  database setting encrypting  the database makes more sense if its not easy to extract the password from the running process.  Has anyone done some sort of exe protection for a mORMot app?

#115 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 15:54:19

Excellent!
Can you give me  what to change in the code to get it working?

#116 mORMot 1 » TSQLHttpClient on Android » 2018-06-25 13:03:50

Leslie7
Replies: 0

Currently I can only test it with a ~6 month old version of mORMot but it is very unreliable. It connects occasionally, but if the app is restarted it takes quite some time before it succeeds again. Usually the app is terminated while trying connect and Resolve an Interface service. Maybe some network conditions need to be checked before trying to connect?  Is there a chance the  server side  has something to do with it as well?

#117 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 12:55:17

Is there  way to have Android  include a stack trace with the  names of the Pascal calls into the crash report? That would be very useful as well.

#118 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 12:17:42

Well, that was the only way I could find as well.  Very time consuming. sad

I have seen somewhere (maybe in the Lazarus or NewPascal commits ) that there is an effort which seems to be aiming at  debugging IOS apps.
Do you see  a possible way to do the same for Android?

You have probably missed this later addition to my previous post:
Is there a way to prevent android  from terminating the the app when there is an issue? With the usual Try Except  many times it is stopped before reaching the exception handling part.

#119 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 12:02:42

AOG,

Seems you are  close. smile

I am curious, how do you debug an android app?

Is there a way to prevent android  from terminating the the app when there is an issue? With the usual Try Except  many times it is stopped before reaching the exception handling part.

#120 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 11:50:58

Unfortunately on Windows 7  with the latest trunks the problem remains.

But the good news is that I have located the mORMot commit which introduced the problem.
It is probably a compiler issue in the first place, but maybe the changes committed here can be made more friendly to the current FPC trunk and help to create a well pointed bug report for the FPC team.

Revision: c5ad9b1d1f57177a8fe686271370cb12fc29d3d9
Author: Arnaud Bouchez <fakeaddress@synopse.info>
Date: 2018.02.01. 13:34:44
Message:
low-level refactoring, mainly for 64-bit FPC performance


----
Modified: SynCommons.pas
Modified: SynMongoDB.pas
Modified: SynopseCommit.inc

#121 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 10:45:23

AOG,

is the problem solved or it just does not appear on an other machine?

#122 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 06:44:48

I have no idea  which component (Fpc, ...)  causes the issue, but after travelling back in time to 2017.08 it finally works.
I will try to pinpoint at what point it goes wrong.

#123 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 06:31:59

This is really strange. After pulling an older version for  FPC, Lazarus, LAMW, mORMot from a date when it worked for me, the problem remains the same.

#124 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-24 21:30:43

This is probably not a new issue, I have pulled a version from 2018.01 and it does not work either.

#125 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-24 19:16:58

I have installed NewPascal with fpcupdeluxe but the problem is the same.

#126 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-24 18:43:14

I can only see this in the logcat dump:

E/libcontrols.so( 7235): ESynException: Unregistered ptCustom for TJSONRecordTextDefinition.AddItem(Line: TINTEGERDYNARRAY)

Even a freshly created LAMW GUI project with the  3  mentioned units added to uses  terminates with the same error.

#127 mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-24 18:11:35

Leslie7
Replies: 22

Alf,

With latest trunk for FPC  + mORMot + LAMW  all mORMot apps are terminated at startup:

ESynException: Unregistered ptCustom for TJSONRecordTextDefinition.AddItem(Line: TINTEGERDYNARRAY)

To reproduce:

1. Create a new App with LAMW ( ARMV7A + VFPv3)
2. Add  to  uses : SynCommons, mORMot, mORMotHttpClient
3. Run the app
4. Dump with Logcat to see the error

#128 Re: mORMot 1 » PDF electronic signature » 2018-04-30 10:46:13

ab wrote:

Yes, tickets are for bug reports, after discussion in the forum.
They are not the place to discuss.

You can create a PDF with a signature, then save it as PDF/A-1 so that it will be not editable any more.

But to add such a picture to an existing pdf, you will need to read the pdf, which is a feature not available yet with SynPDF.

So SynPDf can be used for electronic signature already. smile
Thanks!

#129 Re: mORMot 1 » PDF electronic signature » 2018-04-30 10:40:01

@anonymous (who created the ticket)

I guess if each page of the original file can be  converted to an image (instead of single PDF) the images can be used for recreating your document with  SynPDF and sign it the way AB suggested. The size probably will be larger though.

displaying the PDF:

AcrobatReader  with OLE

OR

Delphi   - Winsoft PDFium
Lazarus - MuPDF

It is possible that  you can sign a PDF with these as well.

#130 mORMot 1 » PDF electronic signature » 2018-04-29 09:26:56

Leslie7
Replies: 3

AB,

I have seen the closed ticket, just one note:

I am not sure if you have realized that electronic signature differs from digital. It just inserts the scanned signature as a picture, but after the document is saved it is not supposed to be editable any more.  So it may not be very difficult to implement.  smile

#131 Re: mORMot 1 » Backup/Restore inmemory sqlite database to/from Stream or BLOB » 2018-04-15 17:57:25

Edwin,

I took a look at this, but it seemed that it was saving the entire database, index data included, so the size of the result is larger than necessary. For some use cases this could be the desired behavior though.

#132 mORMot 1 » Backup/Restore inmemory sqlite database to/from Stream or BLOB » 2018-04-15 11:30:58

Leslie7
Replies: 4

Hi,

Is there a way to do this without disk usage involved?

#133 mORMot 1 » Partial replication » 2018-04-11 23:15:25

Leslie7
Replies: 0

AB,

It would be nice to have the possibility to filter the records for every slave server. Adding an extra parameter to RecordVersionSynchronizeSlaveStart, RecordVersionSynchronizeSlave and RecordVersionSynchronizeSlaveToBatch  could be one way to do it. Something like this:

function TSQLRestServer.RecordVersionSynchronizeSlaveToBatch(Table: TSQLRecordClass;
  Master: TSQLRest; var RecordVersion: TRecordVersion; MaxRowLimit: integer;
  OnWrite: TOnBatchWrite = nil; WhereClause: RawUTF8 = ''): TSQLRestBatch; 

Of course a couple of lines in the code require  changes as well, but I assume it would not take much time.

#134 Re: mORMot 1 » Is there a XPATH implementation? » 2018-02-14 15:11:51

mdbs99,

This might be useful for you.   You can pick the functionality you need and combine with the mORMot infrastructure.

https://github.com/benibela/internettools

#135 Re: mORMot 1 » Interface callback synchronization » 2017-12-26 23:06:58

There is a simple workaround but it is not optimal:

1. we need a thread safe temporary storage
2. where the messages are stored by the callback method
3. a jTimer instance periodically checks if there are new stored messages and clears the temporary storage after the messages are displayed

Since LAMW does not have message handling on the pascal side probably the only way to do this properly is to go to the Java side  first via JNI  and call back to the pascal side in a synchronized fashion.

#136 Re: mORMot 1 » Interface callback synchronization » 2017-12-26 16:59:09

AOG

I am trying out a few things. I will definitely ask for your help if I cannot get it working.

Thanks smile

#137 Re: mORMot 1 » Interface callback synchronization » 2017-12-26 09:31:35

ab,

wow, you are present on the forum even today ... smile

LAMW is for Lazarus. It creates  a CustomApplication  which uses native controls via JNI to build the GUI.  The pascal code is compiled into ".so",  so anything that works for linux  may be working here as well.

I can see a  few possible general solutions:

1. Creating a thread for the sole purpose of passing the callback messages to the main thread. (eg a synchronized calling of a function of the form) .
2. Creating the websocket client in the context of a thread instead of the main thread.  - Is this a good idea for bidir communication?
3. Msg for the main window proc - not sure, this is a real option with LAMW

#138 mORMot 1 » Interface callback synchronization » 2017-12-25 21:39:34

Leslie7
Replies: 5

Hi,

I have created a LAMW android chat client for testing the websocket connection  with the  Project31 chat server. The websocket part is working well smile, but I could not find any info on how to synchronize my code in NotifyBlaBla with the main thread in a GUI (none console) client.

#139 mORMot 1 » CreateForRemoteLogging - Android » 2017-12-07 20:06:23

Leslie7
Replies: 0

Hi,

I like Synlog remote capabilities a lot, and it would be especially useful with Android. 
The log server accepts the connection, the exception occurs on the client side within ServerRemoteLogStart:

Failed to create OS basic event with name "

I should probably create a proper bug report, just do not know where to start.

#140 Re: mORMot 1 » Interesting - 04 sample compiled with Delphi and running on Linux » 2017-12-07 00:46:55

edwinsn,

On the other hand Lazarus is extendable, plus you have the complete source available if you need to implement something more exotic.
I assume that some (maybe  most) of the functionality of Delphi opensource  plugins can be ported to Lazarus easily.  Usually we do not really need all the bells and whistles just a few really important features, which may not be that  much of an investment to port/implement.

#141 Re: mORMot 1 » Interesting - 04 sample compiled with Delphi and running on Linux » 2017-12-06 00:46:24

Naturally FPC is the best option for Linux, but running a Delphi compiled mORMot server with wine is a viable possibility. 
It can be a temporary solution while the project is ported. But I have found at least one situation where it makes sense on the long run: when he server uses a library which has no viable equivalent for FPC.  In such a case I have found it best to create a Linux server implementing most of the functionality and an other one with Delphi. The main server forwards the requests it cannot handle to the other one which may make some  calls to the main server as well while doing its job.

#142 Re: mORMot 1 » how to query based on Datetime » 2017-10-24 20:40:38

I think it is clear now. Thank you!

#143 Re: mORMot 1 » how to query based on Datetime » 2017-10-23 21:28:37

I am not sure  I follow you.  TDateTime is a pascal type, right ? I need to work with date and time differences within the SQL queries. Eg to select records based on a  field value   within  7 days from a given date or within 10 minutes from a given time.
An example would be very useful.

#144 Re: mORMot 1 » how to query based on Datetime » 2017-10-23 20:23:26

I could not find any info on how to work with TTimeLog fields in SQL queries to calculate differences in days, hours, ...

#145 Re: mORMot 1 » Customize UTF8ILComp » 2017-10-11 14:33:31

That's the plan. smile But I need to create the  collation function for the native language to do that. I hoped that the easiest  and most optimized way would be to start with the current implementation  of UTF8ILComp and customize it. But it is not obvious how to do it. I assumed that this an issue with other locales as well, that is why I have asked for some general advice about tweaking the code.

#146 mORMot 1 » Customize UTF8ILComp » 2017-10-11 11:31:07

Leslie7
Replies: 3

Hi,

the task is to create a none case sensitive custom collation for Hungarian. I thought it would be best  to create  a modified version of an existing function like UTF8ILComp, but looking at the implementation it is not obvious at which points  the extra code can be added.  If this approach is  good, it would probably be useful to document it in the source code.   

There are  two types of problems to solve:

1.Some accented characters like "ú" needs to be ordered after "u" but before "x" .
2. There are a few letters composed of two  or three characters eg "cs" which  needs to be ordered after "cz" and before "d". This requires access to the next two characters before making a decision.

#147 Re: mORMot 1 » any possible that mORMot Framework be acquired by embarcadero someday » 2017-09-08 12:15:33

My two cents: if Delphi was cared for the way AB looks after the mORMot Delphi would be far ahead in quality and functionality by now. There is so much difference in mentality, I do not think  they would be compatible.

#148 mORMot 1 » Epoll under linux » 2017-03-07 01:56:56

Leslie7
Replies: 6

AB,

The latest commits show  that epoll is coming to the mORMot - very exciting!
I assume this will effect the websocket connections  as well at some point ...

You are probably already  aware of this WSAPoll issue, but just in case:

https://curl.haxx.se/mail/lib-2012-10/0038.html

#149 Re: mORMot 1 » FPC new interface RTTI » 2017-02-19 10:41:02

Excellent news, Kudos to Maciej!

FPC has really matured to be a full blown competitor to Delphi even for Windows. For server side programming it makes all the sense in the world.  Dynamic loading of packages is one area where Delphi compiler is still ahead. 

I only wish there was a quality  skinning solution for LCL like AlphaSkin for VCL. The lack of it prevents Lazarus from  being a viable option for  client app development.
The Lazarus IDE is kind of a weaker link as well, CodeTyphon is closer to the Delphi experience.

Board footer

Powered by FluxBB