Q: Is there a way for me to Cut/Paste Design-Time Components and include the events too?

Q: Is there a way for me to Cut/Paste Design-Time Components and include the events too?

I'm transitioning some UI elements away from the main-form and into TFrames. Currently, I'm using Cut/Paste in the IDE to move the component from one to another; however, it doesn't bring over the code for the events (OnClick, OnExit, etc). 

Is there a method for using Cut/Paste and have it bring over the code assigned to the events for the component?

This would save a lot of work. Currently I have a text-dump of the *.DFM and I'm using it as a reference for the procedures that are linked to the events for the object. Then one-by-one, I go through the text-dump and search them in the IDE, then cut/paste the code into the new event in the frame. It's really error prone.

Comments

  1. Dobrin Petkov  Many years ago I wrote a client/server remote form creation tool called DynaForms.  It allowed the server to send a dynamic Delphi form to a client app and set all the editors to the proper initial values. The Delphi client app would then display the form. The server specified the editor types, labels, component positions, colors, Etc. The end user could then edit the values and send them back to the server.  Is this similar to what you are doing?

    ReplyDelete
  2. Kevin McCoy My goals are different from the described from you cases. We make devices which are managed with communication under RS232 or bluetooth. Our expert system generate all needed SDKs and the documentation for them. Now I think about automatic generation of the test programs (and protocols for them too), the programs for our service engineers and so on. Before my intervention (and automatisation) - the process of the development for any new device was a time consuming.  I talk about all needed libraries, COM Servers, sample source codes and programs. Sometimes it is hard to skip the human factor in this cases. Now the describing process in the database consume a few days and we haven't need of the special knowledge for this (which decreases the price). After that the process of generation of the SDK source codes is performed for 1-2 minutes. Maybe another 5 minutes for compilation in Delphi, distribution in the project management system and sending to our source control system. Probably the next step for me is to add to our system the production module where I hope the programs and plugins will be generated too.

    ReplyDelete
  3. MMX, GExperts or CnPack should have implemented this...

    ReplyDelete

Post a Comment