Hi Shaughan,

> Is there a way to view the generated html within pilbox?

Yes, though a bit tricky, as this is not built-in.


Get a PTY (pseudo TTY) to the REPL in your PilBox, as described in:

   
https://picolisp-explored.com/mobile-app-development-in-picolisp-v-getting-a-remote-shell-to-your-pc


Then temporarily modify the 'http' function in-memory (without actually
modifying the source code!!):

   : (v http)

Move down to line 49

   (out *HtSock

change it to e.g.

   (out "src.html"

and type

   :w

Now 'http' is modified in-memory. No need to exit Vip yet.


In the PILBox GUI, click on something where you want to see the source. As the
output is written to the file instead of the WebView component, you will see no
reaction at all in the GUI.


Now, in Vip in the PTY REPL, undo the change by typing "u" twice, an exit Vip
with

   :x

Now the PilBox GUI works normally again.


You can look at the generated file with

   : (vi "src.html")


or get it to the shell (Termux or PC) where you started 'pty' from

   : (pbGet "src.html")


This is just a quick shot, a prove of concept. The whole process could probably
be made more convenient.

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to