I quickly tested using my mini-editor to edit source code and this is a mistake. The idea in this case is that you write a statement block – a small script in PScript that execute a small operation – this is intended for assign operations, but you can write a full PScript program if you want. It looks ok – you can switch between showing the actual code or just description, but the editor was bad – very bad in this case. It will kind-of work, but I need a better solution here.
One idea is to let the user double-click and open a full editor, but in this case we need a proper source code editor. I have two of these components – Assign was intended for a more Table/Tree like list of actions, while “Source Code” was intended for the example shown above. I am very unsure about the table/tree alike concept as I need to convince myself that it will add something – I think I will focus on getting sniplets of source code directly in for now – and here is the upside – I can actually let the user enter whatever source code he/she wants to use.
PScript (or Plain) is target generic and a good starting point. This will go hand in hand with PLD, but why not let the user input Python, C/C++, C#, Java or whatever is needed? Yes it add some difficulty because I need to cover usage of multiple target languages on a target, but it is doable. Python is a simple example as we can just run Python scripts from just about anywhere, but I need to add a Python API – it will be a bit of work. I think letting the user choose between PScript, Python or target language will be ok – target language for the platform and PScript is a minimum and then adding Python to those targets supporting it?
PScript is more forward because the compiler will convert PScript to target language – I don’t actually plan to use a PScript Engine.
But, editors – I need to integrate a proper source code editor… I will return to the API needed for target languages later…