Jump to content

Davide Visconti

Members
  • Content Count

    21
  • Joined

  • Last visited

Everything posted by Davide Visconti

  1. Davide Visconti

    Project Configuration Manager

    Does anybody suggest me how to develop an IDE tool to support the developers when they start a new project? ...I will try to explain what I mean. We have a framework that usually is a starting point for the new applications, I'd like to develop an "IDE Wizard" where the developers can choose the group of units that they want to use. Eg: VISION.Graphics.ImageView VISION.Graphics.Roi VISION.Credential.User VISION.Camera.Matrix.Vimba VISION.Input VISION.Plc.Siemens These "IDE Wizard" build a new project with all the necessary units. Thanks for any suggestions, documentation, code snippet, how to, ...
  2. Davide Visconti

    Project Configuration Manager

    Thanks to everybody.
  3. Davide Visconti

    Project Configuration Manager

    Thanks Peter for the suggestion but the applications could use different units, for example: Application 1 use these units: VISION.Camera.Matrix.Vimba VISION.Plc.Siemens Application 2 use these units: VISION.Camera.Matrix.Dalsa VISION.Plc.Beckhoff Application 3 use these units: VISION.Camera.Matrix.Vimba VISION.Plc.Beckhoff As you see, the the combinations can be very different, so IMHO the repo wouldn't be the right way. Thanks for the suggestion about the Tool menu.
  4. Davide Visconti

    best practise sharing : 2 buttons with mrOK on a form

    I don't understand correctly your question... but usually on a dialog form you have 2 buttons with different results. mrOk / mrCancel or mrYes / mrNo. if AForm.ShowModal = mrOk then begin // Ok button pressed // do some stuff... end else begin // Cancel button pressed // do other stuff... end; Anyway, if you have to (for any strange reason) set 2 buttons with the same result values... you must store in a variable the user choise, button A or button B. TMyDialogForm = class(TForm) private FSelectedButton : Integer; public property SelectedButton : Integer read FSelectedButton; end; //... procedure TMyDialogForm.BtnAClick(Sender: TObject); begin // Store the button pressed inside the FSelectedButton variable FSelectedButton := 1; ModalResult := mrOk; end; procedure TMyDialogForm.BtnBClick(Sender: TObject); begin // Store the button pressed inside the FSelectedButton variable FSelectedButton := 2; ModalResult := mrOk; end; I hope it helps you.
  5. Davide Visconti

    How to identify problem remotely

    Hello @ertank is it possible that on that machine are presents different parameters or configuration files that may cause the problem? How many times the problem appear? Becasue, in my experience, if the problem is on the RAM module you should get a lot of problems... and not only on your application. Anyway, get any linux distro and test the RAM or get this one (https://www.memtest86.com/)
  6. Davide Visconti

    Version Control System

    We use Mercurial and TortoiseHg. It'sworks very well in Windows environment.
  7. Davide Visconti

    dwg import

    Yes, I used it in the past (Delphi 7) and it worked well.
  8. Davide Visconti

    Web dashboard application

    Hi, I state that I have no skills on the argument, so bear with me. I have read a lot since last week but the argument is really a jungle and I'd like to read your very useful suggestions. I try to explain what we have to do. At the moment we have a win32 application developed in VCL Delphi Tokyo. This app read/write on localhost Firebird DB. Now, we have to realize a web application, like a dashboard , wich the users can utilize to see some values, some charts, execute some predefined queries and change some parameters on DB, the VCL app get some notifications when this happened (event alert) to update the in memory parameters. This web app should run on computer and android mobile too, like this forum 🙂 The number of clients connected are very few, maximum 5. Now, according to you, what library, framework, we have to use for the front-end...? For the back end? I have to use a REST service like @Andrea Magni's MARS Curiosity? Finally, can you give me some guide or how-to that you've found useful to begin please? THANKS A LOT for any suggestions.
  9. Davide Visconti

    Web dashboard application

    Thank you so much for any suggestion. Since the web applications is not our core business and because we don't have a lot of time to learn any other languages, we choosed the UniGui framework to speed up the development process. In this first months we get a good impression of UniGui, yes there is some "memory leak", but overall, the results obtained so far are enough. I would like them to improve customer support because IMHO isn't enough. Thanks again.
  10. Davide Visconti

    Import .NET Assembly

    Hi, I've upgrade a library to the new version, we usually import this library as Type Library (COM object) in Delphi (since "yesterday"). Now, in this new version the COM object are no longer supported, so I'm looking around. The new library support the C# .NET, C++ (unmanaged), C++ (managed) and C. I know that I can use the C .dll with a Delphi wrapper but... Just out of curiosity I tried to import the .NET Assembly. I never use the .NET Assembly before, and honestly I don't know very well what is the .NET Assembly. I'm searching on google and I found some documentations, but before start reading I ask you if you know a good start point "Delphi and .NET Assembly". Do you have experience with that? After the import I get the wrapper with a lot of class/interface but they are all empty. Eg: // *********************************************************************// // Interface: _HObject // Flags: (4432) Hidden Dual OleAutomation Dispatchable // GUID: {8E90512D-E586-352A-A70F-C7F1518E667D} // *********************************************************************// _HObject = interface(IDispatch) ['{8E90512D-E586-352A-A70F-C7F1518E667D}'] end; // *********************************************************************// // Interface: _HImage // Flags: (4432) Hidden Dual OleAutomation Dispatchable // GUID: {2D195846-332C-32E4-A6A3-8B089435BB54} // *********************************************************************// _HImage = interface(IDispatch) ['{2D195846-332C-32E4-A6A3-8B089435BB54}'] end; Any suggestion will be appreciate. Thank you, as always, for your time.
  11. Davide Visconti

    Import .NET Assembly

    Thanks David, if I have to write a wrapper in C# to expose the COM.... I definitely prefer write a Delphi wrapper over C dll, that's what usually we do (.h --> .pas). Thank you anyway for the suggestion.
  12. You can write the new length of the string inside the AText[0] I never try that and IMHO isn't an elegant solution but it should works... Fast enough.
  13. Davide Visconti

    Block windows access

    Hi all, I'm searching a way to intercept, in Windows 10, some classic windows shortcuts like the Windows key, Ctrl+alt+canc, Ctrl+esc, Alt+tab, etc... My goal is to limit the user access to my application and let the windows access at some other users with high privilege. Do you know something like that? Thanks.
  14. Davide Visconti

    Block windows access

    @David Heffernan what do you mean? @Uwe Raabe I never hear that before! Sound good! I'll try it.
  15. type TMyClass = class public procedure Run; end; TMyTool = class public MyClass: TMyClass; constructor Create; end; ... var MyTool: TMyTool; procedure TFrmMain.FormCreate(Sender: TObject); begin MyTool := TMyTool.Create; end; procedure TFrmMain.Btn1Click(Sender: TObject); var LCtx : TRttiContext; LType1 : TRttiType; LField1 : TRttiField; LNestedType1 : TRttiType; LRttiInstanceType: TRttiInstanceType; LMeth : TRttiMethod; begin LCtx := TRttiContext.Create; LType1 := LCtx.GetType(MyTool.ClassType); LField1 := LType1.GetField('MyClass'); LNestedType1 := LCtx.GetType(LField1.FieldType.Handle); LMeth := LNestedType1.GetMethod('Run'); // LMeth.Invoke(MyTool.MyClass, []); // <-- ok LMeth.Invoke(LNestedType1.AsInstance, []); // <-- fail end; I get "invalid class typecast" I understand where is the problem but I don't know how to resolve it. I have to call the method "MyClass.Run" through RTTI. Can you help me please? Any suggestion will be appreciated. Thank you.
  16. Davide Visconti

    RttiMethod Invoke (invalid class typecast)

    Yes of course. Thanks @Kryvich
  17. Davide Visconti

    RttiMethod Invoke (invalid class typecast)

    This work. Do you have any suggestions? procedure TFrmMain.Btn1Click(Sender: TObject); var LCtx : TRttiContext; LType1 : TRttiType; LField1 : TRttiField; LNestedType1 : TRttiType; LRttiInstanceType: TRttiInstanceType; LMeth : TRttiMethod; LObj : TObject; begin LCtx := TRttiContext.Create; LType1 := LCtx.GetType(MyTool.ClassType); LField1 := LType1.GetField('MyClass'); LObj := LField1.GetValue(MyTool).AsObject; LNestedType1 := LCtx.GetType(LField1.FieldType.Handle); LMeth := LNestedType1.GetMethod('Run'); // LMeth.Invoke(MyTool.MyClass, []); // ok // LMeth.Invoke(LNestedType1.AsInstance.ClassInfo, []); // fail LMeth.Invoke(LObj, []); end;
  18. Wow! Very powerful. I'll try it ASAP because I'm searching a serialize/deserialize library. Thanks for sharing.
  19. Davide Visconti

    Web dashboard application

    @Mohammed Nasman @ByteJuggler I'm luky... I'm trying UniGui but I found some problems. In base of your experience is it a stable platform? What do you think about the support? http://forums.unigui.com/index.php?/topic/9143-missing-rtti-information/ http://forums.unigui.com/index.php?/topic/11499-uniimagepictureloadfromfile-trouble/ Thank you in advance.
  20. Davide Visconti

    Web dashboard application

    Thank you so much to everyone. I'll try with UniGui framework.
×