-
Content Count
83 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Fritzew
-
-
14 minutes ago, dummzeuch said:I don't see how assigning the field as the last operation in the constructor would solve the problem of duplicate destruction. Yes, if there is an exception, the class' destructor won't free SomeInstance and leave that for the finally block. But what if there is no exception? Then the try..finally around the construction will free SomeInstance and leave a stale pointer to an invalid instance inside the class.
Why using a finally here and not an except block?
Then you will only free it if there is a Exception.- 1
-
Yes, it was one of the best moves we have done. The Layout-Control is a amazing component. We have refactored a big application to it (around 300 Forms) and it that has solved all of the problems with High-DPI. But the best, all of the translations problems, length of text's in label's etc are gone now. We supporting 7 languages.
-
Hello all,
is the a working actual modbus tcp implementation around?Got a new project to work on for a cnc. To be honest I have never used modbus myself so I'm don't know
-
Wow, i was playing with this tool now for an hour or so, using a large c++ project. Amazing work
-
There could be done a lot in the language:
In Elements:case myControl of Button: writeln("Looks like a button!"); CheckBox: writeln("This one's a checkbox"); else writeLn("No ide what this is!?"); end;
or something like:
var i: Integer; var s := case i of 0: 'none'; 1: 'one'; 2: 'two'; 3..5 : 'a few'; else 'many'; end;
I like it.
If somebody is interested in what can be done look athttps://docs.elementscompiler.com/Oxygene/Language/
Using Elements a lot these days, it is always a shock come back to Delphi....
Not speaking about Lambdas.....Delphi:
for item in List.Where( function(part : TPart): boolean begin result := part.isVisible; end ) do;
Elements:
for each item in List.Where(part -> part.isVisible) do;
- 1
-
Yes, please!
proper namespacing like in Remobjects.Elements would be ...........- 2
-
It is in the master since sept 03 2018.
Maybe you should update your clone? -
For Devexpress it will work.....
But if you want to go sure just use their installer and recompile
-
You are right and I
I need a break for sure.....
int32max := Int64(MaxInt) + 1; // will work
Shame on me
-
Delphi 10.3.2
This code will not compile!
Stripped down from a TestSuite for our codebase.
Can't believe it.
program Project17; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; Procedure Test; var int32max: Int64; begin int32max := MaxInt + 1; //Error here writeLn(Format('Integer %20d', [int32max])); writeLn(Format('Integer %20u', [-int32max])); end; begin try Test; readln; except on E: Exception do writeLn(E.ClassName, ': ', E.Message); end; end.
Error (in German)
[dcc32 Fehler] Project17.dpr(13): E2099 Überlauf bei Konvertierung oder arithmetischer Operation
-
3 hours ago, Rollo62 said:So probably I have to c heck what happens with Spring4D in my Macos64 tests ...
How can I switch S4D to Macos64 in the right way ?
There is a commit from yesterday on Bitbucket, so I think you should update......
-
Yes this look like a nightmare, if you want to parse the source and not only create a AST
-
12 hours ago, stijnsanders said:Guys, are all of you missing this? Due to the Pascal calling convention, the first (plain!) argument of a function maps into the same register(s), so in fact this is valid and correct code. Though strictly I agree it looks weird and like as if in 'normal' cases the Value members aren't assigned to Result members. Bit in fact, they're already there! So what is actually needed is a 'type size limiting' cast, which is exactly what Result.x:=SmallInt(Result.x); is.
You are completely wrong here....
It will never work......
procedure TestSmall; var lPoint : TPoint; sPoint : TSmallPoint; begin sPoint := default(TSmallPoint); lpoint.x := 255; lpoint.y := 255; writeln('lPoint.x: '+lPoint.x.ToString+ ' lPoint.y: '+lPoint.y.ToString); sPoint := TSmallPoint(lpoint); writeln('sPoint.x: '+sPoint.x.ToString+ ' sPoint.y: '+sPoint.y.ToString); end;
Compile and run.......
-
20 minutes ago, Remy Lebeau said:Thanks Remy, not only for this also of your work over all the years now
- 5
-
Found today in System.Types........
class operator TPoint.Explicit(Value: TPoint): TSmallPoint; begin if Value.x < Low(SmallInt) then Result.x := Low(SmallInt) else if Value.x > High(SmallInt) then Result.x := High(SmallInt) else Result.x := SmallInt(Result.x); if Value.y < Low(SmallInt) then Result.y := Low(SmallInt) else if Value.y > High(SmallInt) then Result.y := High(SmallInt) else Result.y := SmallInt(Result.y); end;
Useless and wrong Code...
- 1
- 1
-
40 minutes ago, Stefan Glienke said:It still baffles me that DXScene or VGScene were usable given the years it took FMX to properly work.
The funny thing is, there was a OpenGl Layer for Windows working really well at this time. (I'm also a lifetime customer, my "lifetime" was 4 or 5 month.....). After the purchase the OpenGl part was dropped, not longer usable, and older Delphi not more supported. It was one of the worth purchase i have ever done.
- 1
-
4 minutes ago, PeterPanettone said:That would be like Christmas, Easter and birthday together.
But all on the same day........
-
If this is true, then Embarcadero is not anymore a Partner you can trust.
- 6
-
Hey, it is the decision from Embarcadero. And to be honest I can understand. I'm not "happy" about it, but.......
-
Hey, they need to earn money somewhere? Do you work for nothing?
-
4 minutes ago, Dalija Prasnikar said:Without going into deep discussion about compatibility and other technical issues... AFAIK Marc Hoffman would rather drop dead than sell anything to Embarcadero...
Yes that is for sure........
Remobjects shows what can be done with LLVM,
working a lot with Elements these days. It is amazing what they have done with the language! -
At least they are honest🤓
-
There is FPC, spend your time to help there. Then you will have your compiler
- 4
-
2 hours ago, Dany Marmur said:There are several prjects/tools out there for that, mostly pricey stuff built on other stuff. Also check with TJoe when it comes to PDF handling.
I Would also tend to @tjoe if it comes to Pdf Questions. I don't think you will find a more competent person if it comes to Delphi and PDF
https://uberpdf.org- 1
Exception in constructor of class taking ownership of an object instance
in Algorithms, Data Structures and Class Design
Posted
yes that was my thinking