The new Waters/Elements/Oxygene system

The new Water/Elements/Oxygene is proving too difficult for me. The initial structure auto-created for my new “Web Module w/ CodeBehind (Web Assembly)” project, Test0 is

Test0

        Settings

        Folder: References

        Folder: Files

                    Folder: Web

                                favicon.ico

                                index.html

                                            index.html.pas

I am not able to add an img folder containing the background image (& other images) so that index.html can find it. I would prefer the “img” folder with its images to be in the Web folder. When Run Test0 cannot find the background image.

I would also like to add a “Program” folder containing “.pas” files in the “files folder” but have not tried cuz I can’t even get the damn thing to find an image in the img file, which by the way, the Project says it is part of the image.

1. Please provide a step-by-step how to add an img folder with images the index.html & my .pas programs can find. And the URL link in index.html like background-image: url(“./Files/Web/img/BG.png”);

2. Please provide a step by-step how to add a Program folder in the Files folder & how to link to its “method Main;”

This new stuff may be great but much harder & undocumented how to do what was easy under the previous Water/Elements/Oxygene system where “Add file” in the menu WORKED every time.

As a backup plan, how do I delete the new system & download & reinstall the simple to use previous system?

Thank you.

I have found out how to add a Program folder containing .pas files & linking to them, But I cannot find out how or where to add an image folder “img” folder containing images (png files) and link index.html to it to access the background image. It always says background.png “not found.”

Anything you put into Web will be served, and should be accessible via relative paths from index.html, e.g.

Folder: Web
favicon.ico
index.html
Folder images
foo.gif

would let you use <img src="./images/foo.gif">

This WebAssembly project type is designed to be close to classic ASP.NET, with the CodeBehind files & all.

You can add as menu folders (hysical ot virtual) as you like, and put your code files into any structure you prefer…

Right-click on the “Files” node and choose “New Physical Folder”. Right-click on that and select “New File…”.

Do note that the WebAssembly with CodeBehind template that you are using does not use a Main method, but a CodeBehind file per HTML file (again, much like ASP.NET). Of course, you can add additional files to the project for more code.

The regular WebAssembly project template has a more “traditional” structure where the index.html file invokes Main(). But CodeBehind will be better suited for any non-trivial project, especially with more than one HTML.

The WebAssembly template should have already created the Main method for you.

I’m not quite sure what you mean by “this new stuff”, as this is how WebAssembly has always worked. In what way is “Add New File…” not working for you – what error do you get?

thanx,
marc

Can you send me the projetc as you have it now, so i can have a look to see what mayb be wrong?