Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is dynamic class loading possible in delphi

I have a environment and I want to know that if I write code in this environment is it possible to save>compile and use that code?

whats is more is that I want the environment to be able to call function in this code and for the code to be able to call function in the environment..

I think there was something called class loaders in java that allows you to do this.. can I do this is Delphi and what is the best way to go about doing this?

(just in case anyone says about putting it in there to start with its for a game for kids, they will just write a section of the code dealing with simple logic and variables and have calls to methods that are in the environment that move a virtual robot)

like image 771
Arthur Avatar asked Jun 03 '26 10:06

Arthur


1 Answers

Delphi doesn't have any facilities for compiling code at runtime, but there are a fair number of scripting languages that do. Take a look at PascalScript from RemObjects, for example. It can do most of what you're looking for, though it doesn't have any facility for creating new classes. I don't think any script engine does. But it can import existing ones from Delphi and create new Pascal functions and procedures for your program to interact with.

like image 58
Mason Wheeler Avatar answered Jun 08 '26 00:06

Mason Wheeler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!