Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/30/20 in all areas

  1. Uwe Raabe

    TButtonItem does not have a TAG property

    Shouldn't that read case TComponent(Sender).Tag of TAG_FOO : DoFoo; TAG_BAR : DoBar; ... end;
  2. Dalija Prasnikar

    TButtonItem does not have a TAG property

    Sorry, but I don't see how if Sender is FooButton then DoFoo else if Sender is BarButton then DoBar .... Is preferable to case TComponent(Sender).Tag of TAG_FOO : DoFoo; TAG_BAR : DoBar; ... end; It also gets worse if you have several Senders that perform same task - for instance, button and menu (I know that you can have actions, but actions share same caption - not always preferable, especially in non-English environments) I am aware that you can also add dictionary and map actions that way, but then you need to maintain dictionary, its lifetime, mappings and on top of that you don't have spelled out logic in place where action happens - following code through dictionary is debugging nightmare. Mappings are mappings... you can always use wrong mapping being it integer based or not.
  3. Anders Melander

    Translations of the exception notification dialog text

    For Delphi 10.4 The dialog is TEXCEPTIONNOTIFICATIONDLG in dbkdebugide270.* (bpl, de, fr, ja). The string is resourcestring 65448 in the same file. I don't know the name of the resourcestring since I don't have the .drc file. I can send you a translation project with all four languages if you like - Or I can just explain how to get them yourself. English: "Project %s raised exception class %s with message '%s'." German: "Im Projekt %s ist eine Exception der Klasse %s mit der Meldung '%s' aufgetreten." French: "Le projet %s a déclenché la classe d'exception %s avec le message '%s'." Japanese: "プロジェクト %s は例外クラス %s (メッセージ '%s')を送出しました。" I was briefly tempted to replace the Japanese with something amusing 😈
  4. We are excited to announce to the community that the new Deleaker 2020.16 with full RAD Studio 10.4 Sydney is available to download. Deleaker is a famous tool to find leaks, leaked objects and memory, GDI resources, and handles. This is a good addition to a favorite IDE for everyone who wants to explore resource usage and fix leaks without leaving RAD Studio. For those who prefer to watch, we've recorded a video to show how it works: Happy coding!
  5. StyleControls VCL v. 4.71 released! http://www.almdev.com StyleControls VCL is a powerful, stable package of components, which uses Classic drawing, system Themes, GDI+ and VCL Styles. This package contains the unique solutions to extend standard VCL controls and also has many unique, advanced controls to create applications with Fluent UI design. Also with this package you can really improve applying and using of VCL Styles in your application.
  6. David Schwartz

    tiny computer for Delphi apps

    I started my professional career working with embedded systems for nearly a decade, so I guess that's why hardware like this catches my eye. This isn't particularly useful for ordinary office tasks or testing or anything like that. But it would be great for a standalone kiosk, or some kind of dedicated application. For years you needed to use an embedded OS and special tools to build stuff that ran on specially-designed hardware. Today you can get a Raspberry Pi for under $50, sure, but you can't build stuff that runs on it with all versions of Delphi. Lazarus and FreePascal perhaps, but those are a lot more limited than a standard Delphi release. This little box includes Win 10, and for the price, the hardware is practically free -- most of the cost is likely going to Microsoft for the Windows license. While that does not excite me, the fact that it's possible to use the same toolchain to build an app for a simple embedded application that runs on an otherwise standard Win 10 platform is far more inviting than the prospect of having to use a whole separate toolchain instead. I can't tell you how many projects I worked on where Management would order special hardware and compilers for builds, but then try to "save money" by not buying the debugger, so we had to use link maps and assembly output from the compiler for debugging off-line. I've always had this vision of little functional building blocks, like "smart" Lego blocks, that perform specific functions and can be plugged into a network and used to solve specific problems. A great example of this is being able to plug your phone into your car and access stuff on it like media, email, messaging, and calls, as if it's built-in. Most vehicles come with something provided by the auto company that built the car, and you're stuck with whatever they want to provide. It's a huge expensive effort for them to add, and it ends up being a political and economic decision for them because they want to retain control. I have a 2017 Toyota Prius Prime and one of the biggest complaints on a forum where Prime (and Prius) owners hang out is Toyota's adamant refusal to add this ability to their vehicles. They offer a horrid UI design and the same crappy mapping that auto manufacturers have used for 15 years. The stuff on our phones seems like it's light-years ahead. When I bought the car, the sales guys bragged "It has Google Maps now!" I don't know what part of their mapping is from Google, but the overall experience is the same crappy mapping I had in my 2012 Prius and in a Garmin GPS from 2005. I hear that Toyota has finally broken down and will be adding support for Apple's car interface to a couple of (non-Prius) models for 2021, but everybody else is out-of-luck. Why is this such a problem for them? Because 100% of their computing platform is dependent on a proprietary hardware design, proprietary embedded OS, proprietary interfaces, and a desire to keep total control of the user's experience. Why? Risk. It's pretty absurd when my iPad Mini has more computing power than the stupid crap they include at the factory and want you to believe is "the best available technology". Yeah, right. They just don't want to get sued by some problem your phone might have caused while you were driving. Look how long it took car manufacturers just to offer a common 1/8" stereo AUX-IN jack to allow people to plug-in their iPods! As far as risks go, I can get why a brand new 787 jet employs CPUs on it that are equivalent to what Apple used in 1990 -- they want stuff that is absolutely rock-solid and has millions of hours of flight time and testing time on it. But I don't need that level of reliability simply to select the tunes I want to listen to while I'm driving, or to display maps. Alexa is another example of an embedded system, but it's an approach that scares me in terms of its ability to expose everybody to unethical and even illegal purposes. But that's a discussion for another day. 🙂 That's how I think of embedded systems that affect consumers -- standalone functional building blocks that use standardized software and interfaces to allow developers like us to offer customized features they just can't get any other way. I started my career in 1979, and this kind of utilitarian application of small standalone computers seemed "just around the corner" in the mid-80's. Here it is 2020 and in spite of a huge proliferation of fully programmable portable computers (a la mobile devices) and almost unlimited access to connectivity to everything, we don't seem any closer to this than we were in the 80's.
  7. Rollo62

    tiny computer for Delphi apps

    @aehimself Right, and regarding consideration for an app like NAS, Smarthome, IoT broker/server or many others. There are so many perfect ARM based, Linux based solutions out there, that Delphi never could catch up IMHO. Take a simple, basic Synology NAS, which comes with all apps from NAS, PHP to Node.js even on the smallest footprint. I'm so sorry to say, but this Tiny PC's are not Delphi's strengths at all, so I would not consider them for anything which is not veeery special. Maybe this can change with the Linux option one day, but surely we will never see such many perfect, rich apps like in the PHP and Node.js world.
  8. Vandrovnik

    FastReport 5 vs 6: PDF export

    They have changed bitmap exports, in my opinion it scales bitmap up when not necessary, which takes time and memory (and sometimes results in Out of memory). I had a discussion and tested export ot bitmap (height = 3508) with following results: - PrintOptimized=true, PictureDPI=300 --- Out of memory, TempBitmap.Height=10528 px - PrintOptimized=false, PictureDPI=300 --- works, TempBitmap.Height=3509 px - OLD_STYLE --- works, TempBitmap.Height=3508 px
  9. aehimself

    tiny computer for Delphi apps

    I am fond of mini PCs. Love them. But - as always - it always comes down to the basics. - What do I want to do with them? Use as a server? NAS? Replace my noisy and hot running PC? - What kind of processing power it has and is it enough for my needs described in point 1? Two years later if the room gets too tight, what are my options? Complete replacement, or simple expansion? - Power consumption, especially at 24/7 devices - Pricetag? I'm not going to spend a month worth of salary for something that is just "good to have". I own a HP ProLiant MicroServer G6 running ESXi, hosting my test environment. I have (severely underpowered) VMs running major Windows releases since 2000 and I am testing my apps on these. 24/7 availability is needed, as sometimes I code at 3 AM, sometimes at 8 PM depending on my mood and I don't want to wait for the system to start up. This machine is with me for about 6-7 years, and was only turned off when I expanded the memory, cleaned out the interior or swapped the power supply out with a PicoPSU. Price is ridiculously low (especially now, when Gen10 is the latest and greatest), processing power is acceptable, with the power consumption of 50 watts peak; averaging around 30 with 1 SSD and 2 HDDs. If I'd have to buy something like this again, I'd look in this area; not something what a startup company is attempting to crowdfund. It's usually the other way around for me. I write an app which fulfills a job I want it to, and then install it on the machine where the job is done. I'm not writing something because I have a dedicated platform and I want to make use of it 🙂
  10. German is OK as well I would always use indexed format specifiers though.
  11. Dalija Prasnikar

    TButtonItem does not have a TAG property

    Just to make it clear, I am not dismissing using dictionary mapping where it fits better (if you don't have up front defined set of actions at call site), I am merely objecting to the notion that using integer tags is toy programming.
  12. Kyle Miller

    MARS & Delphi 10.2

    Never mind. Removed a reference to an Delphi MVC Framework installation I wasn't using. It was the source of conflict.
  13. Anders Melander

    TButtonItem does not have a TAG property

    Use the TButtonItem.Data property instead - or TButtonItem.Action.Tag?
  14. Remy Lebeau

    When did Pos become PosEx?

    In D2007, there is no Offset parameter in Pos(), only in PosEx(). Here are the declarations from D2007: System.pas function Pos(const substr, str: AnsiString): Integer; overload; function Pos(const substr, str: WideString): Integer; overload; StrUtils.pas function PosEx(const SubStr, S: string; Offset: Integer = 1): Integer; For comparison, here are the declarations from XE2, before the Offset parameter was added to Pos(): System.pas function Pos(const SubStr, Str: ShortString): Integer; overload; function Pos(const SubStr, Str: UnicodeString): Integer; overload; function Pos(const SubStr, Str: WideString): Integer; overload; function Pos(const SubStr, Str: RawByteString): Integer; overload; System.StrUtils.pas function PosEx(const SubStr, S: string; Offset: Integer = 1): Integer; overload; System.AnsiStrings.pas function PosEx(const SubStr, S: AnsiString; Offset: Integer = 1): Integer; overload; And here are the declarations from XE3, when the Offset parameter was added to Pos(): System.pas function Pos(const SubStr, Str: _ShortStr; Offset: Integer = 1): Integer; overload; function Pos(const SubStr, Str: UnicodeString; Offset: Integer = 1): Integer; overload; function Pos(const SubStr, Str: _WideStr; Offset: Integer = 1): Integer; overload; function Pos(const SubStr, Str: _RawByteStr; Offset: Integer = 1): Integer; overload; System.StrUtils.pas function PosEx(const SubStr, S: string; Offset: Integer = 1): Integer; inline; overload; System.AnsiStrings.pas function PosEx(const SubStr, S: AnsiString; Offset: Integer = 1): Integer; inline; overload;
  15. Anders Melander

    TButtonItem does not have a TAG property

    I mostly agree; Tag is often the mark of poor workmanship. When used at design-time you have to assign magic numbers with "hidden meaning" and it can very easily become a nightmare to maintain. The same goes for the GroupIndex property. For run-time though I'm not that concerned with it as long as the use is very limited. Sometimes you just want to get on with the the task at hand and using a dictionary to associate a handful of controls to some context can seem like overkill. That said, use of Tag definitely goes against my primary rule of development: Don't be lazy
×