Jump to content

alogrep

Members
  • Content Count

    192
  • Joined

  • Last visited

Everything posted by alogrep

  1. I found where the problem occurs (see apptached image). However the call stack doesn't go inside the procedure where the problem actually happes. This is the code procedure (g:Tslim; html:string); var c,r: integer; begin C:=0; R:=0; WITH G DO // this is the "slim" component while (HTML <> '') and (html <> ';') and (copy(html,1,5)<>'slim:') DO BEGIN try N:=POS('<col',html); if n>0 then begin if c> colcount-1 then colcount:=c; if alreadytranslated then begin if (g=extras) and (c=0) and (r>0) and (copy(html,1,5) <> _nota) then cells[c,r]:=' '+copy(html,1,n-1) else cells[c,r]:=copy(html,1,n-1); end else if (g=extras) and (c=0) and (r>0) and (copy(html,1,5) <> _nota) then cells[c,r]:=' '+Fromspanish(copy(html,1,n-1)) else cells[c,r]:=FromSpanish(copy(html,1,n-1)); system.delete(html,1,n+3); if (g=extragrid) and (c=0) then begin k:=pos('line-through',html); if (k>0) then begin orderline.disabledrows[r]:=true; system.delete(html,k,12); end; end; n:=pos('color:::',html); if (n=1) then begin if (copy(html,9,4) <> 'null')then begin if copy(html,9,1) ='#' then begin cellcolors[c,r]:=HexcolToTcolor(copy(html,10,6)); system.delete(html,1,15); end else begin cellcolors[c,r]:=HexcolToTcolor(copy(html,9,6)); system.delete(html,1,14); end; end else system.delete(html,n,12); end; k:=pos('<row',html); if k=1 then begin system.delete(html,1,k+3); c:=-1; // inc() below to 0 inc(r); if r> rowcount-1 then rowcount:=rowcount+1; kount:=rowcount; end; inc(c); end else break; EXCEPT showmessage(inttostr(c)+' '+inttostr(r)+' '+sparam); END; end; end;
  2. alogrep

    DsPack for Delphi 11?

    Hi. Does anybody know where to find the Dspack packages for Delphi 11? Thank you in advance.
  3. alogrep

    DsPack for Delphi 11?

    Thanks.
  4. HI. I am totally new to multi platform apps, hence I can't make head or tail of what the error may mean. I hope somebody could give me some help. I downloaded a sample app from Github. When I build it for Windows, it is succesfull. When I bild it for Android I get the error: [PAClient Error] Error: E7688 Unable to execute '"C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\java.exe" -cp "c:\program files (x86)\embarcadero\studio\22.0\bin\Android\r8-3.0.73.jar" com.android.tools.r8.D8 --release --min-api 23 --output "C:\HMXE_A\multi_Platform_samples\01-HelloWorld\Android64\Debug\HelloWorld.classes" @"C:\HMXE_A\multi_Platform_samples\01-HelloWorld\Android64\Debug\dex_list.txt"' (Error 1) Delphi Alexandria.
  5. alogrep

    custom fonts and sizes showmessage()

    HI. Is it possible to change font and button sizes in the showmessage() function? (Delphi 11.2)
  6. alogrep

    custom fonts and sizes showmessage()

    HI dummzeuch. "Changing the standard ShowMessage dialog in any way (different font etc.) will negate these advantages.". I do not want to negate those advantages, but as it is the dialog appears too small in higher resolutions. I would like to resize font size according to the screen resolution so that it would appear the same on any resolution.
  7. I have a pre XE app that for 15 years printed all right. The app prints tickets to Epson printers on a LAN. The printers are set up to auto-cut (they stop printing and cut the page after the last line is printed). I recompiled the app to Delphi 11.2 and all works fine, including the printing. But after a day and ½ of operations (not continually, the network is shut down at night) a strange Outcome came to life: the printer did not cut the paper after the last line printed, but continued up to, presumably, the default page length, leaving a long, long white page empty Anybody would have any idea where to start looking into?
  8. alogrep

    LAN network printer page cutting changes mysteriously.

    Thanks, Stano. But the PC on the LAN did not change. The only thing that changed is the EXE: before was a Delphi 7 compiled EXE, now is a Delphi 11.2 compiled. Do you suspect that the new EXE compiled on a Windows 11 with delphi 11 could have some miscomunication with the pre-existing driver (for Windows 7)? Finally the weird thing is that it worked ok fot a day and 1/2. then the problem arose. I re-installed the old EXE and it printed ok. When I went back to the delphi 11 EXE, it printed ok too (so far).
  9. Hi. I get the subject error on this line of code SetWindowLong(thisform.Handle, GWL_STYLE, WS_POPUP or WS_CLIPSIBLINGS or WS_CLIPCHILDREN or WS_SYSMENU); The peculiar thing is I get it in one application but not in another application (they both use the identical code and "thisform") I traced it with Ctrl+F7 and this is the sequence that produces th error. Any help, please? SetWindowLong(thisform.Handle, GWL_STYLE, WS_POPUP or WS_CLIPSIBLINGS or WS_CLIPCHILDREN or WS_SYSMENU); function TWinControl.GetHandle: HWND; begin HandleNeeded; Result := WindowHandle; end; procedure _BoundErr; {$IFDEF PUREPASCAL} begin ErrorAt(Byte(reRangeError), ReturnAddress); end; {$ELSE !PUREPASCAL} {$IFDEF CPUX86} asm MOV AL,reRangeError JMP Error end; procedure Error(errorCode: TRuntimeError); begin ErrorAt(Byte(errorCode), ReturnAddress); end;
  10. alogrep

    Range check error (10016) on SetWindowLong

    Thanks, Remy. It worked.
  11. HI. Delphi 11.2, windows 10. I tried to build webbrowser.dproj found in C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\Mobile Snippets\WebBrowser but I get that error. I tried to put C:\Program Files (x86)\Common Files\Oracle\Java\javapath (where my java.exe resides) in the path, but had no succes. Could someone help, please?
  12. Hi. Madexcept shows a leak on this part of my code: TBlobField(FieldByname('image')).SavetoStream(Stream); var Stream: TMemoryStream; .... Stream:=TMemoryStream.create; TBlobField(FieldByname('image')).SavetoStream(Stream); if Stream.Size > 0 then begin FindGraphicClass(Stream.Memory^, Stream.Size, GraphicClass); ..... ///// end; Stream.free; end; Anybody knows that is wrong with my code?
  13. Ok this is (a bit modified ) code with dm2,memfloorobjects do begin setit(memfloorobjects,'no'); edit; BlobStream:=TnxBlobStream(memfloorobjects.CreateBlobStream(fieldbyname('image'),bmRead)); try if TnxBlobStream(BlobStream).Size > 0 then begin FindGraphicClass(BlobStream, BlobStream.Size, GraphicClass); TnxBlobStream(BlobStream).Position := 0; b:=Tbitmap.Create; b.LoadFromStream(TnxBlobStream(BlobStream)); //line with leak??? try try Image.Picture.assign(b); except on E:SysUtils.Exception do begin if debughook <> 0 then showmessage(inttostr(picno)+' '+E.message); end; end; finally b.free; end; end; finally TnxBlobStream(BlobStream).free; cancel; end; end; Madexcept says that object created there on thah line with ??? leaked. Why? I did free it.
  14. Thanks. But Madexcept list the line number of TBlobField(FieldByname('image')).SavetoStream(Stream);
  15. alogrep

    2 errors that do not exist?

    Hello. Delphi 11.2 I have 2 "errors" that show in this page (see errors.jpg). Yet the project builds and runs ok. I can not decipher the nature of the (false alarm?) errors. One is this (see error2.jpg) The declaration of nxcheck is this: type Tnxcheck = class(TForm) nxSimpleSession: TnxSimpleSession; nxRemoteServerInfoPlugin: TnxRemoteServerInfoPlugin; l1: TListBox; nxsock: TnxWinsockTransport; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private { Private declarations } public { Public declarations } function ison(s: string): boolean; end; var nxcheck: Tnxcheck; implementation ..... Why create(nil) yields "too many actua parameters"? I have dozenns of create(Nil) in =other places, with no error . The other is shown in error1.jpg. I can't figure what operator is supposed to be missing here. Any help, please?
  16. alogrep

    2 errors that do not exist?

    Thanks to everybody. It all disapperad, by itself. I guess "Error insight" was the culprit.
  17. HI. It appears that Nexusdb fórums treat any question about data replication as if were radioactive. Nobody touches it. I hope some courageous soul would look at this scheme of data replication to another PC (PC2) on the same LAN . Maybe I am way off: if so an answer “Yes, you are way off” would suffice Have 2 identical data modules, DM1 with aliaspath pointing to the working directory, and DM2 with aliaspath pointing to a backup directory on another PC and running on a separate thread. The datasets in both DM's are identical. I also have a unit (Unit0)accessible to both data modules where I store some variables and structures/records. Each table has a field NOT autoinc "DR" wich is a unique number identifying each record, and an index based on it. I put A) a "GlobalBeforePost" on each table in DM! which saves the dataset state (dsEdit or dsInsert), the record buffer and the "DR" value to Unit0, B) a "GlobalAfterPost" on each table in the first data module (DM1) which calls a function in Unit0. The pseudo code in the function in Unit0 is: Retrieve the dataset state and "DR" If state = dsEdit then begin If not Findkey(DR]) then Raise error End else Append Retrieve record buffer and copy it to the corresponding table in DM2 Post. The entire operation is inside a starttransaction /commit/except. If this scheme is somewhat feasible, I have 2 questions: 1. Could there be a conflict if 2 users at the same time attempt to update the same table? 2. How do you Save/Copy a record buffer?
  18. Hi. Has anyone experienced this error trying to access Registerd Users Download "error an existing connection was forcibly closed by the remote host" Is the site down, or there is (suddenly) a problem in my PC? THanks
  19. Thanks. That link did not work for me. But this works: https://my.embarcadero.com/#downloadsPage
  20. alogrep

    Delphi 11.2 and Tpngobject.

    Hi all. I have installed version 11.2 and now I get error at runtime with buttons that have a pngobject. In the Form the image shows. In the object inspector it does show Tpngobject, and a click on it shows the miniature image. but at runtime it shows that the picture graphic is not assigned. Perhaps there is a new Pngcomponents.dpk required for version 11.2> Uwe Raabe. any ideas?
  21. alogrep

    Delphi 11.2 and Tpngobject.

    Thanks again Uwe. (I amd converting a very large project and I need a couple of months more of compatibility betweenXE and legacy Delphi) When I put RegisterOldPngFormat in Conditional defines of the App and I build I get this error: [dcc32 Fatal Error] POS.dpr(1): F1027 Unit not found: 'System' or binary equivalents (.dcu) The .dcu created by pngcomponents package are in C:\hmxe\png\PackagesAlexandria\Win32\Release. I tried to add this directory to the search path, but I get the same error.
  22. alogrep

    Delphi 11.2 and Tpngobject.

    Thanks, Uwe Please, note: I re-downloaded https://codeload.github.com/UweRaabe/PngComponents/zip/refs/heads/master and re-installed and re-build the packages. Design.jpg shows what I see at design time. Formcreate.jpg shows that the picture.graphic "disappeared": NIL Error.jpg show the error I obviously (since graphic "disappeared") get.
  23. alogrep

    Delphi 11.2 and Tpngobject.

    Uwe Raa, hi. I use the PngComponents you suggested to me. the Alexandria package. all worked ok with version 11.15, after I installed ver 11.2 (Delphi) it broke.
  24. alogrep

    Delphi 11.2 and Tpngobject.

    François Piette i get AV b/c the image.picture..graphic is Null. Yet at design yime the image shows ok.
  25. alogrep

    "Home made" data replicaion with Nexusdb

    HI frost.brutal. Do you have the link to "what I read on Firebird forum from a guy that develops universal FB replicator"? Basically what I need is a solution to this scenario. I have a database and the database management server on PC1, connected over the LAN to various PCs. In the LAN there is also a PC101 which has a copy of the database manager server (inactive) and should have in real time the same data that are stored in the database on PC1. If PC1 fails, the administrator would activate the server on PC101 and the clients would automatically change the alias path to that of PC10! so the user can continue to work normally.
×