-
Content Count
57 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Alberto Fornés
-
Subscribe to a topic with TIcsMQTTClient
Alberto Fornés posted a topic in ICS - Internet Component Suite
Hi, I have a Mosquitto server that publishes messages and I can subscribe to it using programs like MQTT Explorer. By testing with TIcsMQTTClient, I can connect to the host and port (it also uses a username and password) and it validates. I subscribe to a topic, but I don't receive any messages like I see in MQTT Explorer. Is there anything I should check that could be causing me to not receive the messages? -
Subscribe to a topic with TIcsMQTTClient
Alberto Fornés replied to Alberto Fornés's topic in ICS - Internet Component Suite
Problem solved. I set the subscription to reading/boxes/+, and the correct option was reading/boxes/#. Thanks to those who responded and tried to help.👍 -
Subscribe to a topic with TIcsMQTTClient
Alberto Fornés replied to Alberto Fornés's topic in ICS - Internet Component Suite
I don't receive any message in the event: MQTTClientMsg(Sender: TObject; aTopic: UTF8String; aMessage: AnsiString; aQos : TMQTTQOSType; aRetained : boolean) -
Subscribe to a topic with TIcsMQTTClient
Alberto Fornés replied to Alberto Fornés's topic in ICS - Internet Component Suite
Yes, it appears as the last message when I log in and subscribe -
Subscribe to a topic with TIcsMQTTClient
Alberto Fornés replied to Alberto Fornés's topic in ICS - Internet Component Suite
This is the Mosquito log when connect to server: -
PLABEL VCL Labelling, FlowChart and Technical Drawing editor
Alberto Fornés posted a topic in Delphi Third-Party
Version 3.0 of the PLABEL VCL components has been released, this is a version written from scratch and using the Skia library to render graphics. The previous version was used to add a label editor to our applications: text, paragraph, images, barcodes, etc. In this new version, the possibility of editing flowcharts and technical drawings (layers, dimension measurement, operations with lines, scale, etc.) has been added. Drawings can be printed or saved as pdf, png, jpeg, gif or svg. Saving as SVG can be interesting for web projects, or if you need to show technical drawings in documents such as quotes and orders. At https://www.mesurasoft.com/Plabel/Gallery , you can see several examples of created documents, some of them as SVG. The appearance and functionality of the property inspector has been changed, now it is better organized and more compact. In labelling mode you can rotate left or right the label. Link label elements to data: TDataset descendant, csv or json. Table element to print records from detail tables. Inplace editing text, align positions vertical and horizontal. Set background rounded rectangle. Symbols can be created by code and saved in categories and libraries, to then be inserted in a certain position, scale and angle of rotation. Symbols can have one or more connection points, to link to other elements in the drawing. You can organize the elements of the drawing in layers, which you can hide or print as needed. You can add dimensions and measurements to the drawing, their appearance can be modified using dimension styles. In technical drawings, apart from the units, you can define a scale greater than one, which will be taken into account when placing the dimensions and measurements New elements: nutriscore display, level, rank, show box sizes At https://www.mesurasoft.com/Plabel you can find downloadable demos of the three editors: labels, flowcharts and technical drawings, an example of generating a dynamic SVG from a browser with webbroker, as well as a pdf document where the editor's functionalities are explained for the end user. Here https://www.youtube.com/@MESURASOFT are some videos showing funcionalities It is available in versions Delphi 10 (Seattle) to Delphi 12.0 (Athens) Previous users who purchased the PLABEL VCL 2.8 license of the components have a special access price to this version. There is a 20% discount coupon [ PLABEL ] until September 4. -
PLABEL VCL Labelling, FlowChart and Technical Drawing editor
Alberto Fornés replied to Alberto Fornés's topic in Delphi Third-Party
Ok, I understand your requirement, I will add in next release. -
PLABEL VCL Labelling, FlowChart and Technical Drawing editor
Alberto Fornés replied to Alberto Fornés's topic in Delphi Third-Party
Hello Omnibrain, about your questions: 1.- The Demos seem to be a bit messed up pathwise. Difficult to describe, I think it's best if you do a clean install and open a Demo in Delphi yourself and then start it from within Delphi. I will check it, path installation is different from development and maybe something is broken. 2.- You have SaveSVG and ExportDoc procedures. Both save to files. Is there a reason there is no option to save to a stream to continue processing the generated label directly in a program? Or am I overlooking something? Yes, there are to methods to save and load from a stream: procedure TMPLabel.SaveToStream(aStream: TStream); procedure TMPLabel.LoadFromStream(aStream: TStream); 3.- I managed to hide almost all control elements of the editor component. But not the scrollbars. Am I overlooking something? Scrollbars are enabled or disabled depending of label dimensions and zoom. No option to hide it. Maybe I add in next update, something like fitToAll and disabled zoom option. 4.- I see that you can use a CSV file or JSON as Data Source. But is it also possible to use a TDataSet? Yes you can assign any descendent from TDataSet, See TMPLabel.Data.DataSets from object inspector. I'm working in a new release fixing some bugs and adding new features. Also in a version with FMX library. -
PLABEL VCL Labelling, FlowChart and Technical Drawing editor
Alberto Fornés replied to Alberto Fornés's topic in Delphi Third-Party
If anyone has tried to download and got an error, I have reviewed the link for the Labelling demo program and reviewed the installer for the SVG label generation program. -
PLABEL VCL Labelling, FlowChart and Technical Drawing editor
Alberto Fornés replied to Alberto Fornés's topic in Delphi Third-Party
Yes, next week I will start with the version for FMX, the RTL base and the drawing with Skia is the same, the changes are the writing of the editor component. -
Good Job¡, and very nice scroll movement. I like it¡
-
Programs with embedded P4D only run on my own PC, not on any other
Alberto Fornés replied to JGMS's topic in Python4Delphi
I don't know about Python, but if I understand correctly : is it possible to make an isolated installation of Python including libraries like matplotlib, pandas, etc and using it from Delphi?. Is it needed any user installation?. Thanks -
I am rewriting an editor where I am looking to display some text on the screen, to which I can zoom and therefore increase or decrease its size, and ensure that what I display on the screen corresponds to what I get when printing what has been drawn. From what I've been reading, GDI doesn't always respect these relationships in terms of text sizes, although when printing it can display the result well. As I show in tests I've done where I want to draw a 10mm high text, when I double the height to 20mm, the width of the text is not equal to double, as seen in the image. Is there a way to get the ratio to hold and equal to what we get in print, thanks. I use this code to draw the text: procedure TForm3.Button4Click(Sender: TObject); var h: integer; TextOutSize: TSize; NewFont, OldFont: HFont; // holds the old and new fonts begin bmp:= TBitmap.Create(Image1.Width,Image1.Height); bmp.PixelFormat:= pf32bit; try bmp.Canvas.Brush.Color:= clWhite; bmp.Canvas.Brush.Style:= bsSolid; bmp.Canvas.FillRect(Rect(0,0,Image1.Width,Image1.Height)); bmp.Canvas.Pen.Color:= clSilver; d:= 0; h:= 0; while d<= Image1.Width do begin if (h = 5) then begin bmp.Canvas.Pen.Color:= clGray; h:= 0; end else bmp.Canvas.Pen.Color:= clSilver; bmp.Canvas.MoveTo(d,0); bmp.Canvas.LineTo(d,Image1.Height); Inc(d,10); Inc(h); end; d:= 0; h:= 0; while d<= Image1.Height do begin if (h = 5) then begin bmp.Canvas.Pen.Color:= clGray; h:= 0; end else bmp.Canvas.Pen.Color:= clSilver; bmp.Canvas.MoveTo(0,d); bmp.Canvas.LineTo(Image1.Width,d); Inc(d,10); Inc(h); end; bmp.Canvas.Brush.Style:= bsClear; bmp.Canvas.Font.Color:= clBlack; SetMapMode(bmp.Canvas.Handle,MM_ISOTROPIC); SetViewportExtEx(bmp.Canvas.Handle,Image1.Width,Image1.Height,0); SetWindowExtEx(bmp.Canvas.Handle,Round(Image1.Width * 25.4 / GetDeviceCaps(bmp.Canvas.Handle, LOGPIXELSX)),Round(Image1.Height * 25.4 / GetDeviceCaps(bmp.Canvas.Handle, LOGPIXELSY)),0); // Create a 10 mm font NewFont:= CreateFont(10, 0, 0, 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH or FF_DONTCARE, 'Arial'); OldFont := SelectObject(bmp.Canvas.Handle, NewFont); bmp.Canvas.Pen.Width:= 0; bmp.Canvas.Pen.Color:= clBlue; TextOut(bmp.Canvas.Handle,0,10,txt, Length(txt)); MoveToEx(bmp.Canvas.Handle,0,10,nil); LineTo(bmp.Canvas.Handle,230,10); MoveToEx(bmp.Canvas.Handle,0,20,nil); LineTo(bmp.Canvas.Handle,230,20); GetTextExtentPoint32(bmp.Canvas.Handle, PWideChar(txt), Length(txt), TextOutSize); TextOut(bmp.Canvas.Handle,230,10,PWideChar('Width: ' + TextOutSize.cx.ToString), Length('Width: ' + TextOutSize.cx.ToString)); SelectObject(bmp.Canvas.Handle, OldFont); DeleteObject(NewFont); // Create a 20 mm font NewFont:= CreateFont(20, 0, 0, 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH or FF_DONTCARE, 'Arial'); OldFont := SelectObject(bmp.Canvas.Handle, NewFont); bmp.Canvas.Pen.Width:= 0; bmp.Canvas.Pen.Color:= clBlue; TextOut(bmp.Canvas.Handle,0,30,txt, Length(txt)); MoveToEx(bmp.Canvas.Handle,0,30,nil); LineTo(bmp.Canvas.Handle,230,30); MoveToEx(bmp.Canvas.Handle,0,50,nil); LineTo(bmp.Canvas.Handle,230,50); GetTextExtentPoint32(bmp.Canvas.Handle, PWideChar(txt), Length(txt), TextOutSize); TextOut(bmp.Canvas.Handle,230,30,PWideChar('Width: ' + TextOutSize.cx.ToString), Length('Width: ' + TextOutSize.cx.ToString)); SelectObject(bmp.Canvas.Handle, OldFont); DeleteObject(NewFont); Image1.Picture.Assign(bmp); finally FreeAndNil(bmp); end; end;
-
Thanks Peter, I will investigate in that direction. Do you have experience about the speed performance to calculate widths and drawing character individually?
-
Hello, some time ago I thought of making a program that could be used by young programmers and students who need to write a project document and show them the possibilities of programs they could develop with Delphi. I have recently published the program and it is called TICdoc. The program also has a diagram editor and a code editor for saving code snippets that can be tagged for further searches. A project document is generated by uniting various types of sections (functional requirements, table of contents, Gantt charts, use cases, etc). Some of these sections have their own editor and the editable sections have a text editor (html) to which styles (css) can be applied. The program uses a SQLite database. It is free and does not have any usage restrictions. It is signed with an OV certificate, which I know shows some warning when downloading it in the browser. You can see it at TICdoc , there is also a youtube channel (currently only in spanish) where you can watch short videos of program features Small task editor at intro page: Code editor to save snippets (SynEdit component): Diagram editor (TMS Diagram Studio), you can insert this diagrams into project document: Document editor (HTML component library): In the editable section you can insert images, formulas, tables, data-bound tables, editor diagrams or PlantUML diagrams: By clicking on the active language in the lower bar we can change the language (it is in a json file, so it can be translated into other languages, it is currently in Spanish and English)
-
Yes, rapid development is not always the best solution for big projects.
-
Is asked ChatGPT: What is Internet Component Suite for Delphi?
Alberto Fornés replied to FPiette's topic in ICS - Internet Component Suite
If ChatGPT do taht, we can say that it is the closest thing to human intelligence that we have seen so far. -
Send message frmo VCL app to another machine in lan
Alberto Fornés replied to mikak's topic in General Help
Maybe Tethering also can be used in that scenario. -
Hello, I have started working with Python4Delphi. I have installed Python 11, and in environment variables is set the path to the python exe folder and the scripts folder. I have installed with pip the modules of the examples of the webminar II of the tutorials (python4delphi/Tutorials/Webinar II at master · pyscripter/python4delphi · GitHub). I can't get to run the scripts without getting errors like: "no module named _ctypes", it's a required module for Pandas. I have also got this error with the unicodedata module, I installed with pip unicodedata2, but it doesn't work either. Any suggestions for things to check?
-
Hello, and thanks for your reply. The python DLL 3.11 can be loaded because I can run basic scripts, but when try to execute scripts that imports modules like matplotlib, numpy, pandas, etc raises that errors. I confirm that 3.10.9 runs ok without that errors.
-
I have an application developed with Delphi 10.4 where I use the Diamond vcl style. The app shows up fine, but when I run the same code with Delphi Alexandria it shows a strange result. The main window when the application starts (the same with Delphi 10.4 and Delpgi Alexandria): If I open a second form created by code. The result with Delphi 10.4 is this: But when open with Delphi Alexandria it shows wrong rendering: As you can see the border icons have disappeared, after closing the window, the main screen is also displayed wrong with Alexandria: Any suggestions of things to check?, thanks
-
Hello, I have a Firebird table (ORDEN) where I need to have a unique numbering in a field depending on the date. In the before insert of the table I define a trigger that basically does this: SELECT MAX(NUMBER) FROM ORDEN WHERE FECHAINT >= :FECHA INTO :NUM; IF (:NUM IS NULL) THEN NUM = 0; NUM = :NUM + 1; NEW.NUMBER = :NUM; Sometimes numbers are repeated in this table, so I deduce that something is wrong in the handling of transactions to cause this error. I work with Firedac, what are the properties of the connection or the write and read transactions supposed to be to avoid this problem?, thanks
-
Really is that there was no reason not to use it, finally it is what I have done and as Anders suggested it solves the problem. Thanks In this case the date did not work because I need also assign a code from that number. Thanks Anders, now works without repetitions using a generator.
-
delphimvcframework global variable
Alberto Fornés replied to borni69's topic in Network, Cloud and Web
No , this datamodule should be created at start, and always alive, you reference it from your controller (add datamodule unit to controller), and access it through TMultiReadExclusiveWriteSynchronizer. -
delphimvcframework global variable
Alberto Fornés replied to borni69's topic in Network, Cloud and Web
Yes, you can use this in delphimvcframework. I declare such dictionary in the service unit (it's a windows service), or you can put it in a datamodule and create it at program start and destroy at the end. Webmodule can be created and destroyed several times during program execution.