Registration disabled at the moment Read more...
×
All Activity
This stream auto-updates
- Today
-
...depending on your definition of "soon" 🙂
-
Libreoffice integration struggles
limelect replied to Pierre le Riche's topic in RTL and Delphi Object Pascal
Tried the above source, and those lines did nothing LoadWriterDocumentFromBytes(BytesOf(TXTData)); // LoadWriterDocumentFromBytes(BytesOf(HTMLData),'HTML Document (Writer)'); // missing something may be // LoadWriterDocumentFromBytes(BytesOf(RTFData),'Rich Text'); // also LoadWriterDocumentFromBytes(BytesOf(CSVData), 'Text - txt - csv (StarCalc)', CSVFilterOption); // for some reason 'csv' is not enough -
Libreoffice integration struggles
limelect replied to Pierre le Riche's topic in RTL and Delphi Object Pascal
This worked for me a while ago (* // query the XComponentLoader interface from the desktop XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface( XComponentLoader.class, desktop); // create empty array of PropertyValue structs, needed for loadComponentFromURL PropertyValue[] loadProps = new PropertyValue[0]; // load new calc file XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL( "private:factory/scalc", "_blank", 0, loadProps); // query its XSpreadsheetDocument interface, we want to use getSheets() XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)UnoRuntime.queryInterface( XSpreadsheetDocument.class, xSpreadsheetComponent); // use getSheets to get spreadsheets container XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets(); //insert new sheet at position 0 and get it by name, then query its XSpreadsheet interface xSpreadsheets.insertNewByName("MySheet", (short)0); Object sheet = xSpreadsheets.getByName("MySheet"); XSpreadsheet xSpreadsheet = (XSpreadsheet)UnoRuntime.queryInterface( XSpreadsheet.class, sheet); // use XSpreadsheet interface to get the cell A1 at position 0,0 and enter 21 as value XCell xCell = xSpreadsheet.getCellByPosition(0, 0); xCell.setValue(21); // enter another value into the cell A2 at position 0,1 xCell = xSpreadsheet.getCellByPosition(0, 1); xCell.setValue(21); // sum up the two cells xCell = xSpreadsheet.getCellByPosition(0, 2); xCell.setFormula("=sum(A1:A2)"); // we want to access the cell property CellStyle, so query the cell's XPropertySet interface XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, xCell); // assign the cell style "Result" to our formula, which is available out of the box xCellProps.setPropertyValue("CellStyle", "Result"); // we want to make our new sheet the current sheet, so we need to ask the model // for the controller: first query the XModel interface from our spreadsheet component XModel xSpreadsheetModel = (XModel)UnoRuntime.queryInterface( XModel.class, xSpreadsheetComponent); // then get the current controller from the model XController xSpreadsheetController = xSpreadsheetModel.getCurrentController(); // get the XSpreadsheetView interface from the controller, we want to call its method // setActiveSheet XSpreadsheetView xSpreadsheetView = (XSpreadsheetView)UnoRuntime.queryInterface( XSpreadsheetView.class, xSpreadsheetController); // make our newly inserted sheet the active sheet using setActiveSheet xSpreadsheetView.setActiveSheet(xSpreadsheet); } catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1 xRemoteContext = null; throw e; } *) unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls; type TForm1 = class(TForm) Panel1: TPanel; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} uses System.Win.ComObj; procedure TForm1.Button1Click(Sender: TObject); var xSpreadsheet,sheet,xCell,xSpreadsheets ,args,objDocument,objDesktop,Excel, Book: OleVariant; RowNumber: integer; ColNumber: integer; const xlCellTypeLastCell = $0000000B; // ExcelXP begin //excel := CreateOleObject('Excel.Application'); excel := CreateOleObject('com.sun.star.ServiceManager'); objDesktop:=excel.createInstance('com.sun.star.frame.Desktop'); args := VarArrayCreate([0,1], varVariant); // objDocument:=objDesktop.loadComponentFromURL('private:factory/swriter','_blank', 0, args) ; //load empty documemt // objDocument:=objDesktop.loadComponentFromURL('private:factory/swriter','G:\Delphi Projects\engineertips\Excel Row and Column Count\world_gps_map_database.xls', 0, args) ; objDocument:=objDesktop.loadComponentFromURL('private:factory/scalc','_blank', 0, args) ; //load new excel xSpreadsheets:= objDocument.getSheets; xSpreadsheets.insertNewByName('MySheet', 0); sheet := xSpreadsheets.getByName('MySheet'); // xSpreadsheet := (XSpreadsheets).queryInterface( XSpreadsheet.class, sheet); //xCell := xSpreadsheets.getCellByPosition(0, 0); xCell := sheet.getCellByPosition(0, 0); xCell.setValue(21); xCell := sheet.getCellByPosition(1, 0); xCell.setValue(521); // RowNumber := Sheet.UsedRange.EntireRow.Count; (* excel.Workbooks.Open( 'G:\Delphi Projects\engineertips\Excel Row and Column Count\world_gps_map_database.xls' ); // Sheet := excel.ActiveWorkbook.Worksheets[SheetName]; Book := Excel.Workbooks.Open('G:\Delphi Projects\engineertips\Excel Row and Column Count\world_gps_map_database.xls', False, // ConfirmConversions True ); // ReadOnly Sheet := Book.Worksheets[1]; //RowNumber := Sheet.UsedRange.EntireRow.Count; // May be wrong! //ColNumber := Sheet.UsedRange.EntireColumn.Count; // May be wrong! RowNumber := Sheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row; ColNumber := Sheet.UsedRange.SpecialCells(xlCellTypeLastCell).Column; *) end; end. -
Wow, as it turns out, that matrix is correct. My big mistake was seeing the penguin icon for New Project, Other, Console app and believing I could run such an app on Linux. But when I tried to add that target under Project Manager, I could not do it. Furthermore, I uninstalled RAD Studio and when starting the online installer, I could not select Linux. So I guess I'm going to start learning Eclipse or Lazarus/FreePascal or something else. Thanks, Uwe.
-
sdfdsfds joined the community
-
Not according to the feature matrix:
-
Remy, sorry, I did not make it clear, yes I know those are one in the same offering. Uwe, Professional can target Linux but only as a console app. I'm attempting to find a way to develop GUI apps for Linux hence the post. I am aware that FMXLinux is bundled with Enterprise and Architect along with the little problem of the feature being temporally missing from RAD Studio. What I did not offer initially was my hope for a "back door" solution. And a much cheaper one than buying the next tier offering from Embarcadero, to whit, buying the product offering directly from the company. Yes, it does have a fee. I'm willing to pay for it especially if it is a life time license, and, it is much, much less expensive than what EMBT is demanding. My understanding is that EMBT has acquired the rights to bundle and distribute FMX Linux as a part of the 2 editions already mentioned but at the same time, the original company is still able to sell the product. Acquiring FMX Linux directly from the original source seems to be perfectly legitimate solution to my goal. But if not, as has also been posted, there are other non EMBT solutions to writing GUI apps in a variant of Pascal. If any one from EMBT reads this, offering FMX Linux as a part of Pro (but not community) would be really appreciated. But if that is not possible (or desirable), why not come up with an enhancement to the Pro license where some additional features like FMX Linux would be available for an additional but reasonable fee -- call it Pro basic license fee plus.
-
wuppdi Welcome Page for Delphi 11 Alexandria?
ringli replied to PeterPanettone's topic in Delphi IDE and APIs
Unfortunately, the black icons are not very easy to see on a dark IDE. Would it be possible to create an alternative icon set for dark mode? -
TeeBI new free demo: One Billion cells in your laptop
david berneda posted a topic in Delphi Third-Party
https://github.com/Steema/TeeBI/blob/master/demos/experiments/bigdata/OneBillion/readme.md This demo shows TeeBI capabilities with big quantities of data, rows and cells. It first creates a default dummy database of One Billion cells (thousand millions). Data is saved to a disk file in your TEMP folder: "big_data.bi" (4.5GB) in aprox 4 seconds. Once data has been created it can be loaded again from disk in aprox 2.5 seconds. The "Query and Visualize" form uses this big data to do some visualizations. (Queries traversing so many millions of rows are not immediate, of course !) But you can run them in a normal laptop. // Sum the amount of Sales year by year, all rows: BIQuery1.Measures.Add(BigData['Sales']['Total'], TAggregate.Sum); BIQuery1.Dimensions.Add(BigData['Sales']['Date']).DatePart := TDateTimePart.Year; BIComposer1.Data := BIQuery1.Calculate; -
The reason why FMX Linux is only available for Enterprise and Architect is, that those are the versions targeting Linux as a target platform. With a Professional version you can't compile code for Linux.
-
How do I avoid the error message 'is not a valid date.' ?
JohnLM replied to JohnLM's topic in Databases
TryStrToDate() is Resolved !! Again, sorry for the confusion. I am no database guru. The memo I was referring to are like this: #1. The first one is the originating source, the one from the ms access .mdb file, which contains the Data Type: Memo #2. The second memo type is from the Delphi app, which is a TDBMemo. I am using FireDAC, dbgrid, tfdconnect, tfdquery and dbsource to open/use/edit the ms access database. Anyway, I have resolved the TryStrToDate() issue in the #3 app (where the issue was). I had defined the dbDate as TDate (as you pointed out earlier). And when I changed it to TDateTime, it compiled, and the routine works successfully now. Thank you! -
Quartex Pascal is an entire new IDE independent from Delphi and it will be released soon.
-
As far as I know, FMXLinux requires RAD Studio Enterprise or Architect to work. It doesn't work in RAD Studio Pro, If you need native applications consider using Lazarus or create web applications using any of the frameworks available for Delphi : D2Bridge (open source) Unigui VirtualUI TMS WebCore Quartex Pascal There are more frameworks to create web applications. I just listed a few that I can remember right now.
-
They are the same product. The original author passed away. Embarcadero had to renegotiate a new deal with his estate in order to continue providing the product. So any emails should be directed to Embarcadero. Embarcadero will continue developing and providing FMXLinux as an option, but only for Enterprise and Architect with Active subscription, AFAIK.
-
That's a little overkill just for loading an ini file. And you'd still need startup code to start the thread.
-
Issue with basic TCP server and ICS 9.4
Angus Robertson replied to TristanC's topic in ICS - Internet Component Suite
I can only suggest logging in the various server events, as the TIcsIpStrmLog component does so you can track the problem. It is unlikely to be with the ICS code. Angus -
There have been some discussion here and in the German DP, but best of all, there is an official announcment. https://blogs.embarcadero.com/fmx-linux-for-delphi-12-3-is-now-available/ https://www.delphipraxis.net/216783-fmx-linux-kennt-jemand-den-aktuellen-stand.html#post1546803 https://en.delphipraxis.net/topic/12288-fmxlinux-missing/?tab=comments#comment-102324 It should be available in summer, as arnof reported from the 12.3 introduction.
-
Or you can create a Thread, where you can run every code you need without UI interactions. https://docwiki.embarcadero.com/Libraries/Athens/en/System.Classes.TThread
-
Yes, they are "alive". And they are working on, but FMX Linux means "FireMonkey X Linux" ... so ...
-
Random thought: could Cloudflare be mucking things up for this one instance of the app?
-
Issue with basic TCP server and ICS 9.4
TristanC replied to TristanC's topic in ICS - Internet Component Suite
I have tried to connect to my original server using the RemoteSocket component. However I have the same issue that I had originally, the connection event is detected but the client appears not to be initialized. As a result, I don't receive any of the data I send from my server, getting this error on the server side : -
Background: I have a number of systems running Windows 10 on platforms which do not meet MSFT's requirements for Windows 11. Not a problem since I can switch to running some instance of Linux. I am exploring solutions to create GUI apps for the Linux. I am aware of Fire Monkey for Linux, however, as an individual the Enterprise and Architect are not affordable or justifiable. The Professional edition of RAD Studio does not include that feature. One part of my research has discovered FMX Linux (https://www.fmxlinux.com/index.html) but emails have gone unanswered. Does any have any recent dealings with FMX Linux? Is is still a going entity after the passing of the founder? .
-
Let's assume you are asking about Windows and a GUI app. One place to start looking is the form OnCreate method, see: https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.Forms.TForm.OnCreate
-
If you need to run code that is related to your UI, you can use your MainForm's OnCreate event. If you need to run code sooner than that, then you can add code in your project's .dpr file before Application.Run() is called. Or, you can put code in the initialization section of any .pas file in your project.
-
Is there any way of running code at program start up. right now it looks like code only runs when you click on a control on the form. Is there any way of running code before you get to that point Example ap creates and Ini.file that records where you were at in the last time you used it. is it possible to read the ini file without having to click on something in the form when the form appears?? If so, where do you place that code? Does it need to be a procedure? Does it have to have a 'special' name?
-
Libreoffice integration struggles
Kas Ob. replied to Pierre le Riche's topic in RTL and Delphi Object Pascal
Here is the output of what seems working capture of all the events/actions from LB, though tested in one instance with text file Document loaded successfully Global event listener registered Document loaded. Press Enter to exit. Event: OnLayoutFinished Other event: OnLayoutFinished Event: OnTitleChanged Other event: OnTitleChanged Event: OnModifyChanged Other event: OnModifyChanged Event: OnLayoutFinished Other event: OnLayoutFinished Event: OnSave Save event detected! Event: OnCopyTo Other event: OnCopyTo Event: OnCopyToDone Other event: OnCopyToDone Captured data: Hi From Delphi !.1 Event: OnSaveFailed SaveFailed event detected! Event: OnModeChanged Other event: OnModeChanged Event: DialogExecute Other event: DialogExecute Event: OnModeChanged Other event: OnModeChanged Event: DialogClosed Other event: DialogClosed Event: OnLayoutFinished Other event: OnLayoutFinished Event: OnSave Save event detected! Event: OnCopyTo Other event: OnCopyTo Event: OnCopyToDone Other event: OnCopyToDone Captured data: Hi From Delphi !.13 Event: OnSaveFailed SaveFailed event detected! Event: OnModeChanged Other event: OnModeChanged Event: DialogExecute Other event: DialogExecute Event: OnModeChanged Other event: OnModeChanged Event: DialogClosed Other event: DialogClosed Event: OnPrepareViewClosing Other event: OnPrepareViewClosing Event: OnPrepareUnload Other event: OnPrepareUnload Event: OnModeChanged Other event: OnModeChanged Event: DialogExecute Other event: DialogExecute Event: OnModeChanged Other event: OnModeChanged Event: DialogClosed Other event: DialogClosed Event: OnViewClosed Other event: OnViewClosed Event: OnUnload Other event: OnUnload Event: OnUnfocus Other event: OnUnfocus Event: OnCloseApp Other event: OnCloseApp @Pierre le Riche i am DM my work, and can't guarantee it to be error/mistake free, yet it looks working and didn't dig more in the dialog handling, (like how to stop them ) and i expected the pipe for saving (output) is for one use.