Convert to xojoscript

I have created an app using drag and drop in xojo. Now I want xojoscript or source code. How can I get it?

sorry, that won’t work.

XojoScript is not generated from a project.

ok

What would like to do, may be there is some other way to achieve your goal ?

and I don’t recall any drag and drop methods inside xojoscript also…

Is the question that you have used the IDE layout editor to add controls to windows (with drag and drop), and now you want to add code to those controls to handle events? Or you want to see the code that has been generated by the IDE?

He wanted to see the full source code of what he created. A code initializing things, creating objects, windows, buttons, events, etc. Something that people used to others environments and GIT expect.

That said, there are systems that have a feature called round-trip coding, where you change from visual to code and back when you desire, and can make changes to the code, like changing the background color of something green to blue like objX1.backgroundColor = enumColors.blue, or fine-tuning some position that that had a top = 201 and you rewrite as 200, or even erasing the entire definition of another button, return to visual, and see the changes you did reflect back, at design time, not running. Also great when you want to write things like 3 small interdependent methods at once. When you return to visual, or everything returns ok and you can continue your drag-and-drop construction, or a message shows up telling you that you messed something up and that it needs fixing, like a mistype some non existent value enumColors.bluek, etc. Once fixed, maybe by a Control-Z, and another proper change, it will return to visual mode.

Oh Man! That would be a PRO feature for Xojo. But it demands so many changes from what we have now that I can’t see it in a 10 years horizon.

All this from a one liner opaque question ?
Whaooo…

Or he only want to have all his code ina doculment.

Hey dude, select the project in the Navigation pane and print to pdf to get ll your code source in a simple document.

You cant compile that PDF as an app Emile, nor share it in a git account for your partners to enhance that code.

Of course, but the op does not ask for compile in his dark question.

No need if you get, based on experience, why is he probably asking such question?

Your guess as good (or better) as/vs mine… :grinning:

What “full source code”? He said he created an app by drag/drop in Xojo. He doesn’t mention writing any code himself. So: what app? What source code?

That’s your opinion, I don’t share it.

The title is “convert to xojoscript”, not print or see the “xojoscript”.

Later he says

“I want xojoscript or source code. How can I get it?”

Again, he express he wants “the source code”, not only see the code. He thought that he could “convert” what he produced visually to code (and probably later, load it again)

The nearest thing to that is saving the project as .xojo_project and opening the files in a code editor as VSCode for inspection.

1 Like

You are right.