-
Content Count
966 -
Joined
-
Last visited
-
Days Won
61
Everything posted by pyscripter
-
I believe they do among other styles. (see images in the home page) @Carlo Barazzetta Can you enlighten us on this?
-
Good alternative styled Task Dialog implementation: EtheaDev/StyledComponents: Components similar to Delphi VCL Buttons, Toolbar, DbNavigator, BindNavigator, ButtonGroup and CategoryButtons with Custom Graphic Styles, and an advanced, full-customizable TaskDialog, also with animations!
-
[RSP-41990] Style the Windows Task dialog (Vcl) - Embarcadero Technologies
-
xaml island Ask if Embarcadero will integrate UWP & WinUI in comming Version of Radstudio
pyscripter replied to bravesofts's topic in Windows API
Not quite. See for instance Ohh...WinUI3 is really dead! - When can we expect the announcement? · microsoft/microsoft-ui-xaml · Discussion #9417 The Microsoft strategy for GUI App development is utterly messed up: WinForms WPF Xamarin Forms UWP WinUI3 MAUI And there is no longer a GUI designer. You have to develop XAML in a text editor. Discussion: WinUI 3.0 XAML Designer · Issue #5917 · microsoft/microsoft-ui-xaml -
FWIW, the latest version of GExperts from Experimental GExperts Version – twm's blog installs and works fine here with Delphi 12.3.
-
VCL Forms with Border Style as bsDialog increase their width and height from Delphi 10.4 to Delphi 12
pyscripter replied to Oscar Hernández's topic in VCL
Yes I do notice the difference. However I do not have 10.4 installed to compere. Delphi 12 behaves the same as Delphi 11 though. -
VCL Forms with Border Style as bsDialog increase their width and height from Delphi 10.4 to Delphi 12
pyscripter replied to Oscar Hernández's topic in VCL
Are you using Vcl? Are you using styles? I can see that in your images the form title bars are styled differently. I don't see that in a simple dialog: Delphi 11: Client width 269, Width 285 Delphi 12: Same. -
Four of my reported issues were fixed in 12.3: TStackPanel spacing property is not DPI scaled - RAD Studio Service - Jira Service Management Unnecessary painting of styled scrollbars on mouse move - RAD Studio Service - Jira Service Management Memory leak when you use Vcl.IMouse - RAD Studio Service - Jira Service Management The Panning Window is not DPI scaled - RAD Studio Service - Jira Service Management Four are still open.
-
This is the 64 bit IDE. My problem was that the Win64 platform was not available. After trying many things, I had to do a full uninstall/install to get the platform available again.
-
After upgrading to 12.3 I do not get the Win64 platform. Only Win32. Anyone has the same issue? Any ideas how to fix it?
-
Of course it does. What you are doing is like running the following python script: exec("a = 1; print(a)") exec("b = 1; print(a)") a is created in the first statement and still exists when the second statement is executed. but if you do exec("a = 1; print(a)", {}, {}) exec("b = 1; print(a)", {}, {}) then the second statement raises an error. ExecFile has the following signature: procedure ExecFile(const FileName: string; locals: PPyObject = nil; globals: PPyObject = nil); If you provide no arguments for locals and globals, the code is executed in the namespace of the __main__ module. If you do not want this to happen then you should provide empty dictionaries as arguments for the locals and globals parameters (or just the locals). But then MainModule.VALUE will raise an error. Example code (not tested): var Py := GetPythonEngine; var NewDict := NewPythonDict; Py.ExecFile('python1.py', ExtractPythonObjectFrom(NewDict)); var val := NewDict.GetItem("VALUE"); NewDict := NewPythonDict; Py.ExecFile('python2.py', ExtractPythonObject(NewDict)); val := NewDict.GetItem("VALUE"); // will raise an error since VALUE does not exist VarClear(NewDict);
-
Indeed. Python variables are reference counted. As long as you keep a reference the python object it refers to is kept alive. When you have a statement like: var s:Variant :=MainModule.MYVALUE s is a custom variant that stores the python reference. The variable will be dereferenced, when s goes out of scope or you explicitly clear s (VarClear(s)).
-
The following will not compile (error: class property accessor can be a class field or a static class method) : TTest = class private class function GetName: string; virtual; abstract; public class property Name: string read GetName; end; whilst the following does: TTest = class private class function GetName: string; virtual; abstract; public property Name: string read GetName; end; My question is that since you can have virtual class methods, why not properties that behave accordingly? In SmallTalk, the first object oriented language, you have a distinction between: instance variables (aka properties) class variables (aka class properties - one per class including subclasses) class instance variables (one per class, subclasses can change the value)
-
Virtual class methods and properties
pyscripter replied to pyscripter's topic in RTL and Delphi Object Pascal
The issue was closed within minutes... Explanation: -
Virtual class methods and properties
pyscripter replied to pyscripter's topic in RTL and Delphi Object Pascal
Issue submitted: https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-2959 -
Virtual class methods and properties
pyscripter replied to pyscripter's topic in RTL and Delphi Object Pascal
I was really asking whether you see any technical reason that I am missing. Because, otherwise it is such an obvious omission. -
Virtual class methods and properties
pyscripter replied to pyscripter's topic in RTL and Delphi Object Pascal
@Uwe Raabe Sure but why can't you have a class property that has virtual class method accessor. It is just "syntactic sugar". You call the virtual class method to get the value. -
SynEdit now has annotated Scrollbars. In this screenshot you can see in the scrollbar: the position of the multiple carets (full blueish line) lines with errors (full red line) the position of the bookmarks (mini bluish marks on the left) line modification info (on the right side) alpha-blended slider This feature is on the multicaret branch. Zoom In/Out/Reset functionality has also been implemented. You can still vote on this poll to influence future development. See the technical details. See also SynEdit now supports mulit-caret, multi-selection editing - I made this - Delphi-PRAXiS [en].
-
A new powerful highlighter called Omni (for omnipotent) has been added to SynEdit. Importantly, this highlighter allows the saving/loading of highlighter settings to/from ini files. The project now includes 189 new ini-based highlighters in addition to the 75 ones that were already included. Sample using the PowerShell ini-based highlighter. Notice that code-folding is automatically supported. Structure highlighting is also supported: A component editor has also been added that can be used at both design and run-time. See this discussion for details. This is based on a significant code contribution by Jan Fiala, the author of PSPad. Kudos to Jan!
-
Talking about capitalization, the Delphi Style Guide: is quite clear about: using "Pascal casing" (e.g. MyData) across the board (variables, parameters etc..) fields starting with a capital F. avoiding prefixes such as lData for local variables or aFileName for parameters. The Delphi RTL mostly complies with the above recommendations, but much of the Delphi code around does not. There is also a lot of variation regarding the use of prefixes in control names inside Forms. Spring4D in particular uses camelCasing for parameters and local variables, small f for fields and uses Pascal casing for function/procedure names and properties. @Stefan Glienke Is this just a matter of taste? I can see some advantages in the following convention (a hybrid of the DSG and the spring4d conventions): Properties/function/procedure names use Pascal casing - Inside the class use the field name instead of the corresponding property name. Function/procedure parameters use camelCasing Fields start with F Local variables follow Pascal casing Global variables (just avoid using). In this way you could immediately tell if any variable is a parameter, a local variable or a field without littering the code with ugly prefixes and the like (except for the now established F for fields). And if you follow the rule about properties and avoid with statements, then you would almost always refer to properties using the dot notation. I am not actually using this currently, trying to stick to the Delphi Style Guide. Any thoughts? What is you preferred convention and why? @Joshua Gardner Does the "opinionated" pasfmt take a view on capitalization?
-
As well as python's black.
-
And incidentally, for whoever has not tried it, Delphilint from the same group, really rocks.
-
Looking for containskey when processing data
pyscripter replied to JIMSMITH's topic in Network, Cloud and Web
There is also TryGetValue<T>. -
The IDE docking is based on TDockTabSet, which was introduced in Delphi 2005. It has received some attention later including Vcl styling. The only demo I could find is an old one by Jeremy North, but the source code is not available. Jeremy also seemed to have expanded this component in his QualityCentral client (look at the images at the end of the article), the source code of which is also not available. It is not the sleekest implementation, but apparently it works OK in the IDE. Agree in general, but it depends on the application. All the IDEs I know of, including Visual Studio, use docking extensively. Same is true for VS Code for example (but no floating forms though). In PyScripter I use a heavily modified version of JvDocking (part of the JVCL library), but I am still looking for a better open source library. I may have to create one.
-
I have created a new Delphi application called ChatLLM for chatting with Large Language Models (LLMs). Its primary purpose is to act as a coding assistant. Features: Supports both cloud based LLM models (ChatGPT) and local models using Ollama. Supports both the legacy completions and the chat/completions endpoints. The chat is organized around multiple topics. Can save and restore the chat history and settings. Streamlined user interface. Syntax highlighting of code (python and pascal). High-DPI awareness. The application uses standard HTTP client and JSON components from the Delphi RTL and can be easily integrated in other Delphi applications. You do not need an API key to use Ollama models and usage is free. It provides access to a large number of LLM models such as codegemma from Google and codelllama from Meta. The downside is that it may take a long time to get answers, depending on the question, the size of the model and the power of your CPU and GPU. Chat topics The chat is organized around topics. You can create new topics and move back and forth between the topics using the next/previous buttons on the toolbar. When you save the chat all topics are soved and then restored when you next start the application. Questions within a topic are asked in the context of the previous questions and answers of that topic. Screenshots: Settings using gpt-3.5-turbo, which is cheaper and faster than gpt-4: UI: Further prompting: The code is not actually correct (Serialize returns a string) but it is close. If you want to test ChatLLM you can download the executable.