Original date:2022-01-23 17:12:19 Edited by: petelomax Subject: Re: Phix, and p2js

ChrisB said...
petelomax said...

Can I assume you are ok with debugging on desktop/Phix, running pwa/p2js, and getting it to run in your browser?


Try running pwa/p2js.exw, click on the "Choose File" button, open (say) demo\rosetta\15_puzzle_game_in_3D.exw and then press F5 or click the run button. Does that work/help?

(Aside: You can also/I often use <Ctrl W>, esc, and then switch to/refresh an already-open file:///C:/Program%20Files%20(x86)/Phix/pwa/test.htm tab, instead of F5/run.)
(Aside2: You can also paste/edit in the main screen of pwa/p2js, but be warned there is no save function (<Ctrl S> re-syntax-colours) and no warning whatsoever before it discards any edits.)
(Aside3: There probably will be a save function of some sort (localStorage in a browser, hdd on desktop/Phix) at some stage but all that is quite a long way down on my to-do list.)

ChrisB said...

Do they have to be in specific location
So the package I need to upload, with a directory structure, should look like

Almost, except there is no pwa sub-folder, and a containing p2js folder is entirely optional:

p2js(folder) [optional] 
   builtins (folder) 
       builtin files (files) 
   p2js.js (file) 
   pGUI.js (file) 
   pGUI.css (file) 
   primefib.htm (file) 

ChrisB said...

Kind of lost me at this point.
And then what's the 'someone else' browser pointed too?

All I can tell you is that if you uploaded/renamed to primefib.htm the URL someone else will need will end with that.
The first part of the URL depends on your ISP or other hosting provider, only you and you alone can possibly have any idea what that will be.
In my case it happens to be "", yours will start with either "http://" or "https://", may or may not have the "p2js/" part, and that's the best/only clue I can give you.

PS: While I've gone for a single p2js folder, for projects that you plan to leave up long-term it might make sense to sequester the main htm file and all the specific support files it needs (in the case of primefib.htm that would be 12 of them) in a project-specific subfolder, so that (far) future uploads don't clobber older stuff. Just one possibility, there are equally valid arguments for "latest version and regular testing", and "shared files means cached files means better performance", of course.

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu