-
Content Count
2084 -
Joined
-
Last visited
-
Days Won
29
Everything posted by Attila Kovacs
-
Am I the only one annoyed that the function 'Close all other pages' (Shift + Ctrl + F4) also closes the welcome page? How much time have you spent in the past 30 years reopening the welcome page?
-
Close all othr pages in the IDE
Attila Kovacs replied to Attila Kovacs's topic in Delphi IDE and APIs
Ok, once I find an acceptable release, I may decide to buy it again. After reinstalling the wizard, the tthread version stopped working, so I had to switch to using a timer instead. The only way it would work was if it was loaded at startup. Fortunately, it's becoming more stable now. The annoying undocked wizard windows are now history, at least I'm testing this code and it looks ok: procedure TClipboardWizard.ToggleLayout; var ctx: TRttiContext; AppBuilder: TComponent; AppBuilderType: TRTTIType; cbDesktopKeyPress: TRTTIMethod; Key: Char; begin ctx := TRttiContext.Create; try AppBuilder := Application.FindComponent('AppBuilder'); if AppBuilder <> nil then begin AppBuilderType := ctx.GetType(AppBuilder.ClassType); cbDesktopKeyPress := AppBuilderType.GetMethod('cbDesktopKeyPress'); Key := Chr(VK_RETURN); if cbDesktopKeyPress <> nil then cbDesktopKeyPress.Invoke(AppBuilder, [AppBuilder, TValue.From(Key)]); // cbDesktopKeyPress(Sender: TObject; var Key: Char); end; finally ctx.Free; end; end; Thank you for the input and the ideas. -
Close all othr pages in the IDE
Attila Kovacs replied to Attila Kovacs's topic in Delphi IDE and APIs
@Uwe Raabe ok, looks like postponing the open/close helped (got AV on closing opening wp from OTA FileNotification events) https://stackoverflow.com/questions/38997386/queue-procedure-call-on-same-main-thread still your solution 😄 by the way, is it possible to auto-dock the wizard's DockableForm's after compiling/instlaling the ota wizard? or should I imitate a layout-combo-enter after loading the dll -
Create Class at run time with an AncestorClass and a ClassName
Attila Kovacs replied to Robert Gilland's topic in RTL and Delphi Object Pascal
so you are trying to cache the incoming stream to gain performance why don't you just feed the form from a local reader instead of downloading it when the version matches? using the same method I don't think any other solution would pay off in the long run -
Delphi says "x is not a valid integer value"
Attila Kovacs replied to 357mag's topic in General Help
In c++, you are also assigning it after the "begin". -
Delphi says "x is not a valid integer value"
Attila Kovacs replied to 357mag's topic in General Help
where do you assign it in c++/pick one ? before the "{"/pick one ? -
Delphi says "x is not a valid integer value"
Attila Kovacs replied to 357mag's topic in General Help
Are you Roman? What do you expect from "StrToInt('x')" ? 10 ? -
Close all othr pages in the IDE
Attila Kovacs replied to Attila Kovacs's topic in Delphi IDE and APIs
Okay, It's a good idea, I can steal that. -
*changed my mind*
-
in System.SysUtils.ScanTime() (Berlin U2) there is a line if ScanChar(S, Pos, AFormatSettings.DecimalSeparator) then is this nonse still the same in recent Delphi versions?
-
I'm sure we could find a workaround but why not just fix Delphi?
-
Not really. I can't modify the DAC source, neither do I want to. 😕
-
or just scanning for both
-
https://learn.microsoft.com/en-us/sql/t-sql/data-types/time-transact-sql?view=sql-server-ver16#supported-string-literal-formats-for-time ISO 8601 hh:mm[:ss][.fractional seconds] It seems that Microsoft did not fully comply with the ISO 8601 standard, which allows for either a dot or a comma as the fractional seconds separator, as seen in RFC 3339. This has resulted in issues with the DAC, and simply changing the decimal separator will not resolve the problem. Microsoft's SQL Server consistently uses a dot as the fractional seconds separator. But using a hardcoded dot as the fractional seconds separator in the time format could cause issues when integrating with other sources that use a comma. Therefore, the best solution may be to introduce a new separator specifically for the time fraction, which can be left open or limited to either comma or dot. So we are there where we started.
-
@Uwe Raabe I found that in RFC3339, this separator it's called "time-fraction" and restricted to comma or dot. However, we do not have here an RFC3339 implementation as we can set anything to decimalseparator. The question is, is it necessary to separate the two or not. If not, it should be decimalseparator for both directions, indeed. However, I'm still not comfortable with combining the two and it gives less freedom.
-
So what? There is no ms separator in the "operating system" and you will define it as a dot? Who gives you the right to do so?
-
/ Displays the date separator character given by the DateSeparator global variable. : Displays the time separator character given by the TimeSeparator global variable. Great! Let's keep the pattern! . Displays the proposed separator character given by the ProposedSeparator global variable. Why would you restrict it for . or decimalseparator? I just can't get it, why would you prefer a hardcoded version (which would be implemented in the same way by the way) by your flavour against an universal version. All the other separators can have any value, even an emoji. What makes this ms separator so unique that we are spending hours to discuss it?
-
It doesn't matter what it's containing by default, righ now. If you can set it for *ToStr then you have to be able to set it to StrTo* too. And for this reason are the other separators there. There is no string magic needed to try to figure out what would be the time separator in the format string and change it to the decimal searator. Nonsense. It's not even mandatory to look both the same. Without a setting for that separator it's just a mess. Format strings are used for *ToStr and DateSeparator/TimeSpearator/Proposed are used for StrToI*. Why even do we debate over this? It's clear as day. Are you both bored?
-
Very funny. What about LongTimeFormat then?
-
I'm not parsng anything. Where did you get the information that I'm parsing anything? Could you cite it please?
-
Done. Thank you Uwe.
-
With FormatSettings.LongTimeFormat I can set anything I want, like 'hh:mm:ss,zzz'. Where did you see the hardcoded dot?
-
No it's not true. It's in the DAC and it fetches with point and converts with decimalseparator. I don't know who to blame, but it's obvious that it would be easy to solve with an extra field in the formatsettings. Thank you. Now you understand my question slowly. Before I'm reporting this, I wanted to ask if it's still the same because I'm also bored reporting things doesn't exists anymore.
-
So you mean it should be "08:00:00,00000000" in a german environment? And what about a mixed environment? Where I'm getting the values with "." from the database and I do not want to change the decimalseparator of the application?