I want to add my own functions to the run time library. Is t

Display a window. Automatically run code. Prevent an application from being closed.

I want to add my own functions to the run time library. Is t

Postby uberdroid on Wed Jan 14, 2009 10:12 pm

Yes. The simplest way of doing this is to edit the System class which is automatically included by every class. If you add a public function to the System class, it will be available to all other classes. The disadvantage is if you introduce errors into System, you will not be able to compile other classes until System compiles properly again. Also if you reinstall the software, your changes will be overwritten by the new installation. The best method is to write your own class and store it in the run time library folder (the 'libs' subfolder), and to include it in the USES clause of your classes. Any other class may use your library class. When doing this, it is still important to remember to save a copy of your class, so you can restore it if the software is reinstalled.
uberdroid
PostRobot
 
Posts: 38
Joined: Wed Jan 14, 2009 4:36 am

Return to Applications and Classes

Who is online

Users browsing this forum: No registered users and 1 guest

cron