-
Content Count
136 -
Joined
-
Last visited
-
Days Won
1
Posts posted by microtronx
-
-
Hi All,
If we have a XML element in an XML-file with more than 32k size, we got a RangeError in delphi. I tried to write a issuereport on https://github.com/kattunga/NativeXml/issues/9 but it seems that this page is not active.
has someone a better solution than following lines:
function TsdBufferWriter.Write(const Buffer; Count: Integer): Longint; var Idx, Siz: integer; begin // index in the source buffer Idx := 0; // remaining size Siz := Count; while FRawPosition + Siz >= FChunkSize do begin Move(TByteArray(Buffer)[Idx], FRawBuffer[FRawPosition], FChunkSize - FRawPosition); WriteChunk(FChunkSize); dec(Siz, FChunkSize - FRawPosition); inc(Idx, FChunkSize - FRawPosition); FRawPosition := 0; end; // copy the raw buffer Move(TByteArray(Buffer)[Idx], FRawBuffer[FRawPosition], Siz); inc(FRawPosition, Siz); Result := Count; end;
It seems that this works only for a speficic datasize. Any ideas / hints to make it better?
-
Wohoo - crazy stuff ...
-
We have been utilizing ReportBuilder for over a decade and have never encountered any insurmountable issues.
The support provided is commendable, and we have successfully developed numerous additional features for their "RAP" - the runtime scripting engine to create functionalities for our special needs.
-
Your ChatGPT extension is working very very good. Thanks Igor.
- 1
-
Hi John,
is any discount for us / Delphi users available?
-
16 hours ago, Remy Lebeau said:In that case, you could just get rid of the offending StrToInt() altogether:
procedure TFormSimpleVariable.ButtonShowValueClick(Sender: TObject); begin //x := StrToInt('x'); LabelResult.Caption := 'The value of x is ' + IntToStr(x); end;
But that doesn't jive with what @357mag is asking for in the first place.
Yes I know, but I was unable to fully comprehend the question.
-
On 4/28/2023 at 7:10 PM, 357mag said:I've got a program that asks the user to enter a value (in an Edit box) and then when he clicks on the Show Value button, the Label should say "The value of x is " plus whatever value he entered in the Edit box.
But Delphi is complaining saying "x is not a valid integer value."
I don't know what's wrong with my code but here is what I've got:
var FormSimpleVariable: TFormSimpleVariable; x : integer; implementation {$R *.dfm} procedure TFormSimpleVariable.ButtonQuitClick(Sender: TObject); begin Application.Terminate; end; procedure TFormSimpleVariable.ButtonShowValueClick(Sender: TObject); begin x := StrToInt('x'); LabelResult.Caption := 'The value of x is ' + IntToStr(x); end; end.
simply change your line from
x := StrToInt('x');
to
x := StrToInt(inttostr(x));
crazy, but will work. But I do not understand why someone would do this
-
4 hours ago, PiedSoftware said:Thanks, microtronix. Are you saying that from Delphi you can open a web page with cookies set in the code, and those cookies are not stored on the filesystem of the client?
Yes, look at tidHTTP and its CookieManager property (tidCookieManager). I think there are some examples out there.
-
Normally Sessiondata is stored in cookies and yes you can handle them with delphi
-
1. try: Updated with Webinstall ... started doing something, uninstalled getit packages and delphi, installed delphi and registered some dlls + closed setup ...
Starting Delphi does not show anything.
2. try: Same with ISO-install
3. uninstalled manually everything, deleted everything from delphi from install-path and started ISO install again ... now successful
-
1 hour ago, Ian Branch said:Hi Team,
Philosophical discussion. Bit like which word processor is best.
Is it better to have all the Database related components TEngine, TSession, TConnection, TTables, TQuerys, etc, in a datamodule or scattered around the forms..
Pros & Cons - Ready... Go!!
Hi Ian,
on our mainapp we have one tDataModule with tEngine, tSession but we create all other tTables and tQuery etc. in runtime on each form.
This is different when we have threads: for each thread, we create a seperate tSession
-
If your entries can be saved within a varchar field, I would use a table with at least these fields:
id - autoinctype - varchar
name - varchar
With such a table, you can filter by type ... use this list/lookup in different areas and add / delete entries as needed. Adding i.e. a field "sorted" (integer) would makes it possible to order them in your list as needed.
-
8 hours ago, Angus Robertson said:The Magenta TMagRas component will connect to any VPNs created by Windows, although I stopped testing it several years ago when the last public dial-up internet service in the UK closed, despite what the web page says, source code is now free from my download page.
Angus
Hi Angus,
there is no possibility to download the tMagRas component sources ... or I was not able to find that page 😉
-
1 hour ago, programmerdelphi2k said:maybe be better review your "query" parameters to avoid excessive records on cxGrid, or send it in "batch" to screen! cxGrid can define how much records can be loaded by time!
Yes cxgrid can be configured, but if you need the grid in GridMode=FALSE to use special functionality (filtering, grouping, sorting, etc) the grid needs to load all data ... and this makes it harder for us.
thanks for you suggestion.
-
On 12/2/2022 at 8:07 PM, Dave Nottage said:What is it that you think this will achieve?
Main reason is to have multiple forms not "blocking the whole app" i.e. when the cxgrid refreshes data ... This cannot be done in a background thread and we're working with a lot of tables / rows at the same time from different forms.
-
@all Thanks for your clarifications. Now I accept "No."
-
19 minutes ago, Dalija Prasnikar said:No.
Since we're all crazy programmers ... is "No" acceptable? Any explanation of why No?
-
Hi Folks,
is it possible to have multiple MainThreads with multiple tApplication instances within one application? Something like this:
procedure TForm2.bNewApplicationFormClick(Sender: TObject); var vapplication:tApplication; vNewForm:tForm2; begin IsMultiThread:=true; vApplication:=tApplication.Create(nil); vapplication.Initialize; vapplication.MainFormOnTaskbar := True; vapplication.CreateForm(TForm2, vnewform); vapplication.Run; end;
I'm searching for a way, having multiple forms with different MainThreads in runtime instead of having multiple application-instances (exe files) started.
-
I would open both files with notepad++ and save them / convert them to "windows CR LF" and "ANSI" and try it again with delphi.
-
On my side the IDE 11.2 with latest patch hangs minimum 1-2 times per day, without the possibility to save changes.
That means, all changes since last saving are lost! This is crazy because Delphi was not for free.
I try to click to "Save All" every x minutes but mostly if I forgot this for some minutes because of a big project ... work of >30 minutes gets lost and I have to start from scratch.
-
I don't like "with" and do try to avoid it all the time!
-
43 minutes ago, Der schöne Günther said:WebView2 (used by TEdgeBrowser) can directly print to PDF, just saying.
Yes, but with thtdocument you do not have any dependencies to other libs/dll's ...
-
Hi folks,
after searching a lot for different possibilities, Alexander remembered me that we can use his components (https://delphihtmlcomponents.com/) to create very simply pdf files on the fly.
If you search for a component to create PDF files without much code from HTML (incl. using images files) use this code:
thtdocument.HTMLtoPDFFile(ahtmlstring:string; aPDFfile:string);
Thanks to @Alexander Sviridenkov for his wonderfull components.
- 2
-
@Dave Nottage Do I need to create any registry-Keys on my client machine to get that demo work?
Answer: YES, see: https://docs.microsoft.com/en-us/windows/win32/termserv/virtual-channel-client-registration
- 1
NativeXML and tsdBufferWrite problems with 32k
in VCL
Posted
It seems one of the declared variables as :integer was the problem. Changing all "integer" vars to "longint" and the problem is gone somehow