You are not logged in.
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
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:
Erick,
do you have any results?
miab3,
Until FPC is fixed or there is an official mORMot workaround this solves the problem:
ParamName := VMP^.NamePtr;
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;
Just curious: do you plan not to fix it ?
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.
procedure TInterfaceFactoryRTTI.AddMethodsFromTypeInfo(aInterface: PTypeInfo);
...
ParamName := @VMP^.Name;
mORMot.pas(56264,30) Error: Variable identifier expected
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?
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?
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?
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?
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?
Yes it does!
Thank you!
Excellent!
Can you give me what to change in the code to get it working?
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?
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.
Well, that was the only way I could find as well. Very time consuming. ![]()
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.
AOG,
Seems you are close. ![]()
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.
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
AOG,
is the problem solved or it just does not appear on an other machine?
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.
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.
This is probably not a new issue, I have pulled a version from 2018.01 and it does not work either.
I have installed NewPascal with fpcupdeluxe but the problem is the same.
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.
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
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. ![]()
Thanks!
@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.
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. ![]()
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.
Hi,
Is there a way to do this without disk usage involved?
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.
mdbs99,
This might be useful for you. You can pick the functionality you need and combine with the mORMot infrastructure.
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.
AOG
I am trying out a few things. I will definitely ask for your help if I cannot get it working.
Thanks ![]()
ab,
wow, you are present on the forum even today ... ![]()
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
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
, 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.
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.
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.
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.
I think it is clear now. Thank you!
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.
I could not find any info on how to work with TTimeLog fields in SQL queries to calculate differences in days, hours, ...
That's the plan.
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.
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.
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.
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:
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.
Hi ab,
https://github.com/graemeg/freepascal/c … f34643497c
Is this a step to the right direction for mORMot?