Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/10/21 in Posts

  1. FPiette

    Using the New Edge browser control

    Maybe create a new message thread with a clear question?
  2. Anders Melander

    DUnitX: How can I load HTML files within unit test?

    If the logic that does the HTTP request, extract the HTML and scrapes the HTML are all nicely separated then I don't see why you'd need a mock (personally I try to avoid them as they just become one more piece of code to maintain). For example if your scraper reads from a stream, then just have the unit test pass it a TFileStream and Bob's your uncle/aunt/non-binary auncle.
  3. lklende

    TLocationSensor on Android 12

    A workaround is provided by Marc Schwarzkopf at https://quality.embarcadero.com/browse/RSP-35804 For Delphi 10.4 you find Androidapi.JNI.Location.pas in the directory C:\Program Files (x86)\Embarcadero\Studio\21.0\source\rtl\android System.Android.Sensors.pas in the directory C:\Program Files (x86)\Embarcadero\Studio\21.0\source\rtl\common Remember to build and check that both modified files are compiled into the following directories: C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\android\debug C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\android\release C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\android64\debug C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\android64\release If not, you can copy the sourcefiles into those directories, which I had to do, and it works for me on Android 12 too.
  4. JamieR

    Long term availability of Community Edition

    You can't compare Visual Studio and RAD Studio. They solve different problems. The later is an Object Pascal IDE (with C++ support for RTL, VCL etc). I don't use RAD Studio for C++ so can't comment there. I use Visual Studio for C++ projects. Why are people so intent on sticking to free? If you want to learn object pascal you don't need RAD Studio. If want to use VCL, Firemoney and their RTL then of course you pay for this if you're making money from their tools. They give you a free version that you can make up to $5,000 with. Folks, that's really not difficult to make that money when you become more skilled. I sell software, and I can fully appreciate Embarcadero's business model. I don't think the hate towards Embarcadero is very fair. The obvious alternative is Lazurus, which is also great. Just to also reiterate, why would Embarcadero kill a model that generates new paying users? It would be silly to kill free. They will not do that.
  5. Anders Melander

    UsesCleaner Issue...

    How would the pre-commit hook distinguish my manual changes from the automatic changes made by the IDE?
  6. PeterBelow

    Long term availability of Community Edition

    Perhaps, but keep in mind that for MS developer tools are not the major part of their business by far, so the comparison is a bit unfair.
  7. Sherlock

    Long term availability of Community Edition

    When you compare Embarcaderos product portfolio with Microsofts you should notice some ridiculous differences as well. You just can't make that much money on selling IDEs or developer tools alone. Please get real. Office Suites alone generate a much higher income, add an OS to that and giving away an IDE for practically nothing seems to barely make a dent in the profits.
  8. Anders Melander

    Datamodule with ImageCollection of PNGs loading with packages

    That's not how you use coInitialize/coUninitialize. First of all check the return value of coInitialize and don't call coUnititialize unless the return status indicated that it succeeded. Read the documentation. And don't call coUninitialize until you are sure that everything using the thread apartment is done with it. Since you're doing this in the main thread and you don't know what else is using it you are best of doing it just before the final end. Normally this is something that would be done in the initialization and finalization sections of a unit. Finally, use coInitializeEx instead.
  9. David Heffernan

    Long term availability of Community Edition

    If anybody can tell us about the long term availability of the community edition would they also be so kind as to tell me about the long term availability of me.
  10. Fr0sT.Brutal

    UsesCleaner Issue...

    {$IF CompilerVersion >= 14}Variants,{$ENDIF}
  11. Serge_G

    Custom ListBox Layout in fmx

    You mean how to assign event? Ok, let me show you 2 methods in the same code private { Private declarations } procedure ItemApplyStyleLookup(Sender: TObject); procedure ItembuttonClick(Sender : TObject); procedure ItemSpeedButtonClick(Sender : TObject); public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} uses System.Rtti; procedure TForm1.AddItembtnClick(Sender: TObject); Var ListBoxItem: TListBoxItem; begin // First, we create an empty ListBoxItem with no parent ListBoxItem := TListBoxItem.Create(self); // now, we set a parent for this item ListBoxItem.BeginUpdate; ListBoxItem.Parent := ListBox1; ListBoxItem.Height := 113; ListBoxItem.Width := 336; ListBoxItem.StyleLookup := 'NewList'; ListboxItem.StylesData['txt']:='Data hello'; ListboxItem.StylesData['button.text']:='Data btn'; ListboxItem.StylesData['speedbtn.text']:='speed btn'; // First Method, using onApplyStyleLookup ListBoxItem.OnApplyStyleLookup:=ItemApplyStyleLookup; ListBoxItem.StylesData['button.tag'] := ListBox1.Items.Count-1; // to get itemindex // Second method, direct with StylesData ListBoxItem.StylesData['speedbtn.tag'] := ListBox1.Items.Count-1; // to get itemindex ListBoxItem.StylesData['speedbtn.OnClick'] := TValue.From<TNotifyEvent>(ItemSpeedButtonClick); ListBoxItem.ItemData.Bitmap.LoadFromFile('D:\XE8\icons8-planète-terre-48.png'); ListBoxItem.EndUpdate; end; procedure TForm1.ItemApplyStyleLookup(Sender: TObject); var CustButton : TCustomButton; img : Timage; circle : TCircle; begin custButton:=TListboxItem(Sender).FindStyleResource('button') as TCustomButton; if assigned(custbutton) then custButton.OnClick:=ItembuttonClick; end; procedure TForm1.ItembuttonClick(Sender: TObject); begin ShowMessage('Click on Button '+TCustomButton(Sender).Tag.ToString); end; procedure TForm1.ItemSpeedButtonClick(Sender: TObject); begin ShowMessage('Click on SpeedButton '+TCustomButton(Sender).Tag.ToString); end; Still working on image, thinking about a mask But, consider changing your mind. Instead of a TListBox and style you can use a VerticalScrollBox and Frame
×