Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Access violation when opening Tools/Options
« Last post by Чебурашка on Today at 12:27:34 pm »
Hello,
I noticed that with the lazarus shipped by debian 12 (lazarus 2.2.6) when I do Tools/Options I get an Access Violation, that seems related to the parsing of the jedi code formatter settings.

Once I encountered this issue, I tried to download from https://www.lazarus-ide.org/ the debian packages available there, in this case I tried with lazarus 3.2.2, but seems I get the same error.

Does anybody have the same problem?
2
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by paule32 on Today at 12:14:25 pm »
UPDATE  ;D

since the DLL work, I found a very nice tool called objcopy.
With this tool, you can re-define the symbols of an .o bject file.

On my test's, this shrinks my FPC_RTL.DLL from 11.000 Bytes to 9.000 Bytes.
The TEST1.EXE is in size by 6.500 Bytes.

I saved 2.000 Bytes on the DLL.
When I run upx.exe over the EXE, I end up with a 4.096 Byte sized EXE binary image.

So, I end up with this on with  16.500 Bytes (6.400 Bytes zipped file) for the DLL + EXE.
Or: 13.000 Bytes in total (with upx.exe).

Please, don't bite me - the file size values there are rounded, because I am to lazy to calculate the differnt differences  :D
3
Databases / Re: Database standards OR Am I doing this right?
« Last post by egsuh on Today at 12:02:06 pm »
Quote
@egsuh: Generally, it should be the case that a record should have a semaphore set to inform other users that it is being edited.
But without information about the specific case, it is difficult to say anything.

@paweld:

Thank you very much for kind advice. I'm not a full-time programmer and do not know much about these basic facts^^. Just from logical reasoning. Are the semaphores done somehow by the DB server or should users prepare them?
4
Databases / Re: Step-into the field setter
« Last post by Martin_fr on Today at 11:31:48 am »
It works.
Other problem, however, it fails step into with a standard tfield (i.e., that of the standard LCL "fields.inc"). I have compiled Lazarus in Debug IDE but it does not work F7 and breakpoint. Should I do something else?

You mean TField in unit "DB" in folder fcl-db? => That is part of fpc. You need to rebuild fpc, using the make files. Or using fpcupdeluxe.
5
Thanks!,
I was trying to keep down the posting size, but I have attached the entire demonstration project below.

The call stack shows that the failure occurs in IBCONNECTION but it might be good to know that the problem doesn't happen with other databases.

This is indeed a tiny fraction of a fairly complex program that uses parameterised queries in many places (It's a monitoring system for semiconductors undergoing environmental testing). Changing databases would be a huge problem! We need to be able to change the parameters to queries, and the official way to do this is to close the query, change parameters, and re-open as in the attached example. This worked fine with our previous (out of date) copy of Lazarus. Is there an archive of old versions somewhere? I couldn't find it on the site. Then we could go back to the old version (not the best solution) if we really have to.

I can't believe that I'm the first person to find this problem.
6
Hello Joao Paulo,

I am very happy that you continue to develop CAI!!

B->
7
Networking and Web Programming / Re: Who is Indy mattias?
« Last post by jollytall on Today at 11:01:45 am »
The error messages are as said above. I made a screenshot of the first errors:

What I also tried is another project that compiles just OK (and does not use any networking, indy or other). Then I add in the Project Inspector the freshly downloaded indylaz to the Required Packages (no unit mentioned explicitly) and I get the 73 error pairs like the ones on the screenshot and obviously a 74th error "Error while linking". If I remove it as a required package then my project (the one without networking) compiles again.
In my networking project, I cannot remove the required package because then the units are not found.
8
Android / Re: dwindows for Android
« Last post by PierceNg on Today at 10:54:44 am »
Coming back to this after a (long) break, I've now built a demo/exercise app using a webview widget for the user interface, with bidirectional Javascript-Pascal in-process RPC.

The main body of the code loads in-app static content, then binds the names 'HostSayHello' and 'HostExit' for callback to Pascal code from Javascript. Said Pascal code in turns invokes Javascript to manipulate the DOM.

Code: Pascal  [Select][+][-]
  1.   webwidget := dw_html_new(1001); // 1001 is an identifier
  2.   if webwidget <> nil then
  3.     begin
  4.       dw_box_pack_start(mainwindow, webwidget, 0, 0, DW_TRUE, DW_TRUE, 0);
  5.       dw_html_url(webwidget, 'file:///android_asset/index.html');
  6.       dw_html_javascript_add(webwidget, 'HostSayHello');
  7.       dw_html_javascript_add(webwidget, 'HostExit');
  8.       dw_signal_connect(webwidget, DW_SIGNAL_HTML_MESSAGE, @html_message_callback, nil);
  9.     end;

Screenshot of the app running in Android emulator attached.
9
FPC development / Re: create system unit from scratch
« Last post by Laksen on Today at 10:53:57 am »
jmp_buf is a record used to store the state of the CPU for the setjmp and longjmp procedures. This functionality is used for exception handling. They are already implemented for MIPS in rtl/mips/setjump*.inc which is included by systemh.inc

TExceptAddr is as the name hints also used for exception handling and implemented in a generic way shared by all the targets in excepth.inc included by systemh.inc
TGuid stores a GUID. The compiler needs to point to it during compilation when GUIDs are needed. Also implemented in a generic manner in objpash.inc included by systemh.inc


The key to implementing a systems unit is to get the proper defines, paths and system specific dummy functionality (usually residese in sys*/tthread/check.inc files) implemented. There's no documentation but you should see how other system units are structured
10
Beginners / Re: how to get class and method name from inside the method
« Last post by cdbc on Today at 10:52:22 am »
Hi
Try playing with:
Code: Pascal  [Select][+][-]
  1. lptr:= MethodAddress(Classname+.+{$I %CURRENTROUTINE%});
  2.  
Note: When you have this pointer, you can also use 'MethodName();' with it...
edit: I dunno if the 'ClassName'-part is necessary   %)
Regards Benny
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018