webui-dev / nim-webui

Use any web browser as GUI, with Nim in the backend and HTML5 in the frontend.
https://webui.me
MIT License
130 stars 9 forks source link

Update webui.nim #34

Closed wwderw closed 2 months ago

wwderw commented 2 months ago

Allowing setting kiosk mode

neroist commented 2 months ago

Why was this change made? Is there an issue with the setter syntax of the function?

wwderw commented 2 months ago

I was getting an error when trying to compile a project.

"Attempting to call undeclared routine"

neroist commented 2 months ago

Thats odd, can I see the function call?

hassandraga commented 2 months ago

Thank you @wwderw for the PR, we appreciate it. Please, when you have free time, provide us some example code to reproduce the issue, this will help us to make sur that the actual code needs to be updated.

wwderw commented 2 months ago

mainWindow.setKiosk(true) was the one that I had tried.

neroist commented 2 months ago

@wwderw

You must call the function like so:

mainWindow.kiosk = true

See https://nim-lang.org/docs/manual.html#procedures-method-call-syntax

wwderw commented 2 months ago

Good ole skill issue. Thanks!

hassandraga commented 2 months ago

Sorry @wwderw, the WebUI 2.5 documentation will be available soon, and it will have more details and all APIs. We are working on it.

Thank you again.

wwderw commented 2 months ago

@hassandraga No worries at all. I had enough smarts to look at the nim file like I would a header, but I wasn't good enough to correctly extrapolate.

Thanks again!