Hello
Using isMainSourceFile() we can write code that will be executed if our script is executed as the main program (ring myprogram.ring)
Also, we can write code that will be executed if it's a sub program (load "myprogram.ring")
For example, The Ring Form Designer
Could be executed as standalone tool (ringpm run formdesigner)
Or it could be loaded by Ring Notepad as a dock able window
To achieve this, we use isMainSourceFile() in formdesigner.ring
If the Form Designer is the main program, it will call the QApp Exec() method
If not, then Ring Notepad will call the QApp Exec() method
Greetings,
Mahmoud