-
Content Count
569 -
Joined
-
Last visited
-
Days Won
11
Everything posted by corneliusdavid
-
Delphi PAServer arm RPi compilation
corneliusdavid replied to nighthawk2032's topic in Cross-platform
Here's a way to do it without the PAServer: https://learndelphi.org/how-to-develop-applications-for-the-raspberry-pi-with-delphi-11/ More information (a little older) about building apps for various small devices: https://blogs.embarcadero.com/delphi-on-raspberry-pi/ -
Which ones and in what version of Delphi? I looked through IDE plug-ins I have and they're either either fully configurable (GExperts, Parnassus Bookmarks and Navigator) or don't have shortcuts (EurekaLog, CodeSite, UniDAC, etc.). DDevExtensions allows you to disable the Ctrl+D shortcut to start the source code formatter. Plug-ins I use in older versions of Delphi (Castalia and Documentation Insight) also have configurable shortcuts. I don't have CnPack or MMX Code Explorer--perhaps one of those are causing the anguish?
-
The quick and lazy way to handle this is to turn off the Scaled property in all your forms but then all your controls will be really tiny when the Windows scaling is cranked up. What you'll need to do is change several aspects of your forms to gracefully rearrange themselves as heights and widths change. Notice I didn't say "re-design" your forms but it does take some work. Get to know the Align and Anchors properties first. Consider using container components that automatically rearrange components but keep them in their place like the TFlowPanel and TGridPanel. There are many other things you can do--a quick internet search will reveal many blog posts and articles over the years. Here's a good starting point: https://zarko-gajic.iz.hr/writing-and-enabling-delphi-application-to-support-high-dpi-displays-and-4k-screen-resolutions/
-
Newly released book: Delphi Legacy Projects
corneliusdavid replied to Bill Meyer's topic in Tips / Blogs / Tutorials / Videos
I don't buy printed tech books anymore--electronic only. That way I can take my library anywhere I go--like when I go to a meeting or when I'm camping. I never know when I'll need a reference for something and I'm constantly switching projects. And yes, I pay for every one I get. -
Delphi 11.1 Stuck While Opening Project
corneliusdavid replied to stacker_liew's topic in Delphi IDE and APIs
Do you have any IDE plugins that may be hung up? Have you configured a version control tool in Delphi? -
You might consider posting questions about C++Builder in the "C++Builder Questions and Answers" section instead of the Delphi section. The RAD Studio editor takes a different approach to code editing; it doesn't force you to a strict coding standard as you type but lets you write code free-form. Then, as an option and with a single shortcut key, you can format the entire source with formatting rules you've set up.
-
Newly released book: Delphi Legacy Projects
corneliusdavid replied to Bill Meyer's topic in Tips / Blogs / Tutorials / Videos
Is there a PDF version available? Or even Kindle? -
Delphi 11.1 - a month later
corneliusdavid replied to Mike Torrettinni's topic in Delphi IDE and APIs
Yes, I misspoke. I should've said, "I need to use a VirtualImageList to automatically scale images ..." -
Delphi 11.1 - a month later
corneliusdavid replied to Mike Torrettinni's topic in Delphi IDE and APIs
I'm just starting to use Delphi 11 (having been working on a big project in 10.4). This was what I saw at first and just re-read the blog about High-DPI mode and checked the option to use it in the VCL form designer--and now the forms are scaled properly in the IDE! Basically, I was using the unaware mode because of the tiny forms. But now, comparing both aware and unaware modes, I've noticed two things: 1) the bitmaps in the forms are smaller in the High-DPI aware version of Delphi which means I need to use a VirtualImageList and include various sizes of the bitmaps so the app will use the right version as the scale changes; and 2) the code is a little crisper and a few more lines show on the screen using the same font and size. -
Delphi 11.1 - a month later
corneliusdavid replied to Mike Torrettinni's topic in Delphi IDE and APIs
Same here. I use Delphi on a high-DPI monitor and if I use the "aware" version, my forms are so tiny, I can't read them. -
Cant Install App on IOS Err(8000051) Error 0xe8000051: Could not inspect the application package
corneliusdavid replied to rihar's topic in Cross-platform
If you're doing mobile development with Delphi, you have no choice but to upgrade--or better, keep a subscription active. That's not a paid advertisement, it's just reality. -
Cant Install App on IOS Err(8000051) Error 0xe8000051: Could not inspect the application package
corneliusdavid replied to rihar's topic in Cross-platform
You might need to run xcode on your Mac and get it updated. I had problems until I did that and it needed to install some stuff. Then I refreshed the SDK in Delphi and it upgraded to SDK 15.5. I also got the patch for Delphi 11.1. With that combination I was able to compile/deploy a simple test app to my iPad via PAServer 22.0. Any reason you can't upgrade? There are always patches coming out for everything--it's a pain to keep everything up to date, I know. -
macOS where to save downloaded executable?
corneliusdavid replied to softtouch's topic in Cross-platform
You should be able to download and execute them wherever you can write to files--a data directory under a user folder is just fine. Executable files are not restricted to running only from special "Program Files" type of folder. The only caveat is that an anti-virus program may catch it and block saving/launching it if it's not signed and/or well-known. -
I confirm this crashes on my iPad when those 4 lines are commented out. It's not a terribly inelegant work-around but since the same code doesn't crash on Win/MacOS, it does seem like there's a bug in there.
-
How is text being saved to the database?
corneliusdavid replied to PenelopeSkye's topic in Databases
Just an additional tip... You can right+click on an object (or group of objects) and select Hide Element(s) to hide ones you're not interested in. You can also put groups of components into Layers to only show a limited set at a time to make working in the LiveBindings Designer easier to manage. -
DFM file is different between version control and Delphi
corneliusdavid replied to PenelopeSkye's topic in Databases
I guess the idea is that since a DFM is a design tool, you can see and access the components directly without needing to search. Delphi's "Find in Files" only searches the code files (.PAS) and project files (.DPR, .DPK, .DPKW) unless you change the "Where" selection to "Search in Directories." I seldom need to search .DFM files--and then I use an external search tool. -
How is text being saved to the database?
corneliusdavid replied to PenelopeSkye's topic in Databases
By default, the LiveBindings Designer will show all objects, allowing you to hook them up. When you hook them up, lines appear between the connected ones. If there are no connections, your app is not using LiveBindings. In this screenshot, only two components are connected: Hope that helps! -
DFM file is different between version control and Delphi
corneliusdavid replied to PenelopeSkye's topic in Databases
Delphi forms and data modules are comprised of two physical files: 1) .PAS, and 2) .DFM. The .DFM contains all the components and properties set up at design-time in the Delphi IDE; the .PAS file is the "code-behind" or the logic that makes it all work. The queries are stored in the SQL property of query objects, just another text property of a component on the form; thus, they're stored in the .DFM. What you're (likely) seeing in the version control is a difference in the .DFM, not the .PAS file. Your code (.PAS) may not have changed but if a query does, then your .DFM would change. -
Parnassus Bookmarks for Delphi 11 Alexandria?
corneliusdavid replied to PeterPanettone's topic in Delphi IDE and APIs
FWIW, both plugins installed and restarted the IDE without error for me. -
Parnassus Bookmarks for Delphi 11 Alexandria?
corneliusdavid replied to PeterPanettone's topic in Delphi IDE and APIs
That's not similar at all. Ctrl+Shift+C is Class Completion; use Alt+UpArrow or Alt+DownArrow to jump between implementation and interface of a method. Neither of those are what I was describing. -
2022 Stack Overflow Developer Survey
corneliusdavid replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
Done. :-) -
How to separate UI and Code, while maintaining rapid development?
corneliusdavid replied to Incus J's topic in Delphi IDE and APIs
Yes, it does. In one project I did a while back, I separated the functionality into three different data modules, each with a TActionList and the main form used all three data modules. When selecting an action on a control, all actions from all data modules were available, easily identified by <Unit>.<Action>. -
How to separate UI and Code, while maintaining rapid development?
corneliusdavid replied to Incus J's topic in Delphi IDE and APIs
I use actions a lot. In fact, sometimes I group related sets of actions into data modules, then use the data modules in the forms. Instead of double-clicking event handlers and calling procedures to do the work (or Execute methods of actions), just hook the actions directly up to the controls. The caption of the TAction becomes the caption of the menu or button; the Execute event of the TAction becomes the OnClick event handler of the Menu or Button. You can also provide icons for the associated controls right within a TActionList as well. Later, if you decide to change the user interface from using menus to using buttons (for example), you don't have to change the captions or event handlers but just assign the TAction! There are many other ways and probably some more "pure MVC or MVVM" but this has worked really well for me. -
How is text being saved to the database?
corneliusdavid replied to PenelopeSkye's topic in Databases
There's probably an OnChange or OnExit event handler for that DBEdit that is doing the automatic save. DBEdits have a DataSource property so you can reference the underlying data source with that property. DBEdits also have a DataField property which points to the field in the database for which the value is read and written. Delphi's VCL provides DBEdits as a convenience and watches when the focus leaves the control to update the data set held in memory until the entire dataset is posted back to the database. So you could simply add one line to your ButtonClick event to change the focus after the text is set: DBEdit86.SetFocus; assuming there's a DBEdit called DBEdit86. Perhaps just switch focus to the OK button or some other control. (There's also a way to just switch focus to the next control in the window but that escapes me at the moment). But a better way would be to do this programmatically (instead of trying to mimic what the DBEdit has to do), something like this: procedure TfDesignMaster.NoUPCButtonClick(Sender: TObject); begin DBEdit85.DataSource.Edit; DBEdit85.DataSource.FieldByName(DBEdit85.DataField).AsString := 'NO UPC ON ITEM'; DBEdit85.DataSource.Post; end; Now, assuming you know what the DataSource is, you can list it explicitly instead of referencing it with "DBEdit85.DataSource"; same with the FieldName--I just used the information I had here. For example: procedure TfDesignMaster.NoUPCButtonClick(Sender: TObject); begin InventoryTable.Edit; InventoryTable.UPC.AsString := 'NO UPC ON ITEM'; InventoryTable.Post; end; There are a couple of gotchas you need to understand that only you will be able to answer by looking at the code in that form: Is the DataSet already in Edit mode? If so, you don't need to call .Edit. Will other edit controls or application logic expect the DataSet to still be in Edit mode after that button is clicked? If so you don't want to call .Post (or call .Edit again immediately after). There are probably several other considerations but this is a start.