#102 mORMot 1 » FishShop demo not working with FPC on Windows » 2019-04-12 07:07:42

AOG
Replies: 3

Hi Ab,

I cannot get the server of the FishShop demo to run with FPC trunk (win32) on Windows.
It errors out on : "interface not registered".

I tried to debug, but unsuccessful. Would you mind having a look if you are able to reproduce ?
Thanks.

#103 Re: mORMot 1 » ORM and date queries[Solved] » 2019-04-06 06:21:12

AOG

In my sqlite-databases, a datetime looks like:

2017-10-26T15:47:14

In your case, its just a float (double). So DateTimeToSQL will not work. Try:

Baby := TSQLBaby.CreateAndFillPrepare( aClient, 'BirthDate>=? and BirthDate<=?',[Double(StartOfTheDay(dt)),Double(EndOfTheDay(dt))]);

#104 Re: mORMot 1 » ORM and date queries[Solved] » 2019-04-05 16:16:51

AOG

There you go [replace > with >= and < with <= ... I hope this will work]:

Baby := TSQLBaby.CreateAndFillPrepare( aClient, 'BirthDate>=? and BirthDate<=?',[DateTimeToSQL(StartOfTheDay(dt)),DateTimeToSQL(EndOfTheDay(dt))]);

#105 Re: mORMot 1 » ORM and date queries[Solved] » 2019-04-05 12:40:10

AOG

If you use sqlitebrowser, what does the BirthDate column data show ?

https://sqlitebrowser.org/

#106 Re: mORMot 1 » ORM and date queries[Solved] » 2019-04-05 07:06:02

AOG

You could try this:

Baby := TSQLBaby.CreateAndFillPrepare( aClient, 'BirthDate>? and BirthDate<?',[DateTimeToSQL(StartOfTheDay(dt)),DateTimeToSQL(EndOfTheDay(dt))]);

#107 Re: mORMot 1 » Linux Lazarus mORMot linking error » 2019-01-30 11:04:52

AOG

Perhaps the below will help.
Add this into your lpr file:

uses
  {$IFDEF UNIX}
  cthreads,
  {$ENDIF}
  .....

#108 Re: mORMot 1 » Happy New Year » 2019-01-06 08:15:27

AOG

As the servers were running fine, no mORMot code updates were needed.
New features would require a restart naturally, but no new features were needed for these servers.
The servers were collecting climate data (temperature, RH, ...) in buildings.

#109 mORMot 1 » Happy New Year » 2019-01-02 11:51:53

AOG
Replies: 5

Hello to all,

I wish all mORMot-coders a happy New Year !

And to support this wish:
We had a power surge on our servers (ARM hardware) last night. UPS got exhausted later.
But until this time, two mORMot-servers had run for 4 years, 129 days and 5 minutes continuously without any hick up !!
So, happy mORMot-coding ... you can have much faith in AB's work !

Greetings, Alfred.

#111 Re: mORMot 1 » Error 403 using TSQLRestServerAuthenticationDefault » 2018-12-23 17:40:29

AOG

I have made some changes to your source, to be able to compile with Delphi and FPC under win32.
Result: I can fully reproduce your problem !
Delphi: 100% success.
FPC: your reported failure.
Will investigate

#112 Re: mORMot 1 » SynFPCTypInfo.pas(92,26) Error: Identifier not found "PRecInitData" » 2018-12-15 07:30:06

AOG

With a fresh trunk (installed with fpcupdeluxe), the mORMot (TestSQL3.lpi) compiles and runs fine on my system (win10, 32bit).

#113 Re: mORMot 1 » WebSockets and existing Lazarus GUI Application » 2018-07-06 04:45:28

AOG

You should do the following two thing:
1: change the port to something below 1000 ... eg 888
2: run the server as administrator

#114 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-26 18:00:08

AOG

Your latest commit works out-of-the-box on Android.
Thanks !

#115 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-26 17:03:53

AOG

Hi Ab,

Your new code does not work either.
But the good news is ... I found out whats wrong : its a compiler error !

The inlining of this function does not work on Android.
If inlining is disabled, both the old code (from yesterday) as well as the new code works.

Strange aspect: the really old code (see post above, from 4 month go) does work with inlining ?!

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

AOG

Just replace the code inside the function with this code (the old code):

function IdemPropNameUSameLen(P1,P2: PUTF8Char; P1P2Len: PtrInt): boolean;
{$ifdef PUREPASCAL}
var i,j: integer;
begin
  result := false;
  j := 0;
  for i := 1 to P1P2Len shr 2 do
    if (PCardinal(PtrInt(P1)+j)^ xor PCardinal(@P2[j])^) and $dfdfdfdf<>0 then
      exit else
      inc(j,4);
  for i := j to P1P2Len-1 do
    if (PByteArray(P1)^[i] xor ord(P2[i])) and $df<>0 then
      exit;
  result := true;
end;

Works for me 100%. I hope also for you !

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

AOG

First part of problem found: IdemPropNameUSameLen
Thanks to your research !

If reverted, first part of my Android app works again !

Is there a way to prevent android  from terminating the the app

Nope. Android 8 is even worse: no permission = failure without warning.

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

AOG

The (very) hard way ... ;-)
E.g.:
    ndx := GlobalJSONCustomParsers.RecordSearch(aCustomRecordTypeName);
    __android_log_write(ANDROID_LOG_DEBUG,'mORMot CreateFromTypeName ndx: ',PChar(InttoString(ndx)));

So, adding lines that are visible in ADB.

Normally, I make a custom ShowError function that directs this inserted debug-info to a place where I can easily study it.
Than, I am able to easily compare CPU-OS systems. So, I compare expected output on working systems with non-working systems.
As I said, the hard way ... especially on Android !

#119 Re: mORMot 1 » Android Apps fail to start with the latest trunks » 2018-06-25 11:51:32

AOG

Still debugging. But perhaps Ab can help at this stage !

This function (inside TJSONCustomParserRTTI.CreateFromTypeName):
ndx := GlobalJSONCustomParsers.RecordSearch(aCustomRecordTypeName);

For a TINTEGERDYNARRAY, ndx is -1 !
So, the whole function (CreateFromTypeName) returns nil !!

Edit:
Just saw the new post. Perhaps the reports are related !?

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

AOG

With latest FPC, mORMot, LAMW, I experience exactly the same error !!

Edit:
With latest FPC, mORMot, LAMW, on arm linux (RPI3) , all goes well !!
So, no alignment issue as it seems.

#121 Re: mORMot 1 » Status of Wince support of the Cross-platform clients? » 2018-06-23 14:38:48

AOG

There is no newer version yet. So this version is still the only version that will patch Lazarus !

#122 Re: mORMot 1 » Status of Wince support of the Cross-platform clients? » 2018-06-23 13:36:24

AOG

You have to use 1.6.1c to install/update Lazarus !!
Only 1.6.1c will patch Lazarus to be suitable for wince.

#123 Re: mORMot 1 » Status of Wince support of the Cross-platform clients? » 2018-06-23 11:11:33

AOG

Strange.
I just did a clean install with fpcupdeluxe 1.6.1c of trunk/trunk.
Installed an arm-wince cross-compiler.
Choose target arm and wince. Selected wince widgetset.
Compile. All works out-of-the-box !

#124 Re: mORMot 1 » Status of Wince support of the Cross-platform clients? » 2018-06-22 14:24:40

AOG

Yep.
I guess there is little change that this patch will make it into Lazarus.
And, due to the reaction, I am not going after it.

However.
https://github.com/newpascal/fpcupdelux … ag/v1.6.1c
This release will patch Lazarus to enable building for wince.
(I do not know if you are on windows, but I can prepare other releases as well ... let me know if you are interested)

#125 Re: mORMot 1 » Status of Wince support of the Cross-platform clients? » 2018-06-22 08:43:04

AOG

I just checked.
Sample 27 : lclclient compiles for arm-wince and produces an exe file !

Due to wince problem, I used a custom setup for WinCE: FPC 3.0.4 and Lazarus 1.6.4, setup with fpcupdeluxe

#126 Re: mORMot 1 » [SOLVED] Lazarus + Cross-compiling to Linux + SynSQLite3Static » 2018-05-23 06:34:56

AOG

I just did (few minutes ago) a brand new trunk install, with x86_64 cross-compiler for Linux and mORMot on Win10 with fpcupdeluxe-x86_64-win64 V1.6.0q
I could not reproduce your problem.

What happens if you try to compile mORMot Sample 02 for both Windows as well as for Linux 64bit ?

#127 Re: mORMot 1 » NewPascal 1.9 cannot compile mORMot programs » 2018-05-07 08:58:06

AOG

Source: mORMot latest from GitHub.
Compiles with FPC trunk and NewPascal trunk.

FillDescriptionFromSource(fDescriptions,format('%s%s.pas',[fSourcePath[i], aUnitName]));

#128 Re: mORMot 1 » NewPascal 1.9 cannot compile mORMot programs » 2018-05-07 06:30:49

AOG

NewPascal got updated few hours ago.
I just did an install (NewPascal + mORMot) through GIT (with fpcupdeluxe) and all works out of the box.

#129 Re: mORMot 1 » Smart Mobile Studio supported or not?? » 2018-05-02 12:44:59

AOG

> Sorry if I'm the one who's misunderstanding the conversation here.
I think I misunderstood (also) !
But thanks for clearing things up !!

> what's lacking is a UI widgets library similar to the TMS ones based on pas2js.
This should be done in full cooperation with the pas2js team, to prevent any future problems.

#130 Re: mORMot 1 » Smart Mobile Studio supported or not?? » 2018-05-02 11:52:20

AOG

@warleyalex

>I'm not a lawyer, but for my taste this is far too near a
>copyright violation. Using this as a base for a library would definitely
>give bad publicity.

The above sounds bad.
Pas2js has been sponsored work AND has been open sourced. So, care is needed.

But I think that Lazarus integration is a very logical (and very much needed) next step.
And, as Ab already stated, pas2js + Lazarus + mORMot will be groundbreaking !

It would therefor be good to have full cooperation of Mattias and co already beforehand.
Would you mind asking him/them how he/they see a future integration of pas2js into Lazarus.

About your code.
As I do not have TMS, I cannot judge any potential copyright violation.
But again, we should not cause a fight about this. Much better to have a good start in full agreement with the pas2js team !!

My 2 cents.

#131 Re: mORMot 1 » Smart Mobile Studio supported or not?? » 2018-05-02 04:56:07

AOG

@warleyalex
I might have enough time to help you with your efforts.
But important: could you give some more details about the opinion of the Pas2JS team on this. Are they opposed or have reserves ?

#132 Re: mORMot 1 » Embed SQLite C object files into application » 2018-03-12 16:04:30

AOG

Hi Ab,

This is a very welcome and very important feature !
This feature would also validate an announcement on the official Lazarus forum I think !!

For me, using a non-encrypted database has always been very tricky in case of client apps.

#133 Re: mORMot 1 » Interface callback synchronization » 2017-12-26 10:21:00

AOG

If you are able to share your code somewhere, I can have a look also.

#134 Re: Free Pascal Compiler » mORMot on Android » 2017-12-23 06:28:53

AOG

To prevent a long conversation and long posts, I would like to suggest that you share your code somewhere.
And also the output (or screen-dumps) of your compile-efforts.
That would make life easier (for me), and increases the changes that we can help you !

#135 Re: Free Pascal Compiler » mORMot on Android » 2017-12-21 07:00:19

AOG

I have looked at your error.
It is generated by this code inside FPC compiler sources:

Assign(outfile,owner.AsmFileName);
{$push} {$I-}
Rewrite(outfile,1);
{$pop}
if ioresult<>0 then
begin
    fioerror:=true;
    Message1(exec_d_cant_create_asmfile,owner.AsmFileName);
end;

This seems clear: the file cannot be created ... access permissions ?
https://www.freepascal.org/docs-html/user/userse66.html

#136 Re: Free Pascal Compiler » mORMot on Android » 2017-12-20 14:58:59

AOG

@triguinhu

Again, I need more info to be able to help you !
What Lazarus and FPC version. How did you install FPC/Lazarus/LAMW. What Android version is your target. What Android SDK/NDK/Ant are you using.

#137 Re: Free Pascal Compiler » [Solved] TSQLModel.GetTableIndex: Props is garbage under fpc 3.0.4 » 2017-12-18 07:28:15

AOG

@gothbert

I just checked with FPC 3.0.4/Laz 1.8.0 on win64 with win64 executables, and they run perfect !
I do not know how you used the dpr files to build the projects with Lazarus, but here's is how I make it work:

In Lazarus, select open project and open the dpr-file. Select "simple project" when Lazarus asks you to create a project.
In project options (compiler options / parsing), set mode to Delphi.

#138 Re: Free Pascal Compiler » mORMot on Android » 2017-12-04 07:12:12

AOG
rtokyolivier wrote:

Hi, I've tried to compile this demo but I can't. There are many errors. Can you share here wich source of mMormot have been used?

You take your time ... ;-)

But serious: you must give me more info (about the errors encountered) to allow me to be able to help you.

#139 Re: mORMot 1 » Lazarus can no longer create SQLite3 databases using TSQLRestServerDB » 2017-10-05 06:36:30

AOG

About OpenUI5.
A bit abandoned by me. Its so heavy. Takes ages to load. And it has the looks of the 60's. Which is ok for me, because I am from the 60's, but not really suitable for modern times.

Having said that.

I would be very interested in a ongoing discussion about java frameworks to be used with the mORMot.
It could even be a separate forum topic, due to its importance IMHO.

#140 Re: Free Pascal Compiler » mORMot on Android » 2017-10-04 04:35:45

AOG

Hint:
Use fpcupdeluxe to install FPC trunk and Lazarus.
(mORMot needs recent FPC trunk)
Use fpcupdeluxe to install cross-compiler for Android.
Install LAMW. You could also use fpcupdeluxe for that: install module LAMW.
Of you go !!

#141 Re: mORMot 1 » Lazarus can no longer create SQLite3 databases using TSQLRestServerDB » 2017-10-04 04:32:31

AOG

Fpcupdeluxe presents you two mORMots:
the original one: mORMot
a special one: mORMotFPC

The latter was made to be able to use the mORMot during a period of heavy changes of FPC and the mORMot itself.
It has not been updates for a long time now: the original mORMot works flawless now with FPC on many systems.

So, just use the original mORMot.

#142 Re: mORMot 1 » TSQLRest.Delete seems to delete everything. » 2017-06-27 05:15:49

AOG

FCreatedAt: TModTime; ---> FCreatedAt: TCreateTime;

#143 Re: mORMot 1 » Number of threads constantly incrementing » 2017-06-24 05:16:03

AOG

Have you seen this ?
https://synopse.info/forum/viewtopic.php?id=3905
https://synopse.info/fossil/info/d0c1512d051ef958

So, would you mind trying a mORMot >= 1.18.3690
Dunno if this will help, buts its worth a try.

#144 Re: mORMot 1 » GUI CRUD examples » 2017-06-23 08:41:29

AOG

What you ask for is not that easy ... ;-)
A good master-detail design with decoupling of logic and (Grid-)GUI (MVC) asks for considerable effort, even for an expert.

mORMot has a MVC example.
And a Grid.

#145 Re: mORMot 1 » Raspberry Pi - Lazarus 1.8.0RC2 - mORMot » 2017-06-19 18:32:27

AOG

You will need FPC trunk for working interfaces !
Raspberry (arm-linux) is fully supported.

#146 Re: mORMot 1 » Lazarus 3.0.0 on win64 install » 2017-03-10 06:49:15

AOG

Good !
Please be confident: much work has been done and will be done to keep FPC and the mORMot a perfect combo !

#147 Re: Free Pascal Compiler » mORMot and FPC 3.0/3.1.1 » 2017-03-09 07:20:30

AOG

@vonH
The trunk changes can be found here: http://wiki.freepascal.org/User_Changes_Trunk
I leave it to hnb to explain more about NewPascal, but in general, NewPascal is a very recent trunk without the dangers of trunk.

#148 Re: Free Pascal Compiler » Suggestion of make fpcupdeluxe docker image » 2017-03-08 15:50:54

AOG

Well, at the moment, I have 0% knowledge of Docker, other than heard of it and a website visit.

However, there is always a way out with fpcupdeluxe:
a: first get the FPC/Laz-sources in a way convenient for you.
b: point fpcupdeluxe towards these sources and let it do its job.

http://forum.lazarus.freepascal.org/ind … 39133.html

#150 Re: mORMot 1 » mORMot and current FPC trunk doesn't work » 2017-01-31 16:15:11

AOG

You can use fpcupdeluxe to install only NewPascal FPC.
Then point CT towards this FPC.

Board footer

Powered by FluxBB