Git Product home page Git Product logo

pascal-webui's People

Contributors

delphius avatar fibodevy avatar hassandraga avatar neroist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pascal-webui's Issues

How to use WebUi as replacement for Microsoft Webview2 ?

You did not try to use webui as a replacement for webview in order to serve an interface that already exists as a separate website?
I have used Microsoft edge webview2 and compare the webui capabilities with it.
So far it seems that something is missing, what do you say?

events not working with pascal

hello , thank you for the work u did , i tried the do button click and show message but doesnt work ,please check the below code

program project1; {$mode objfpc}{$H+} uses {$IFDEF UNIX} cthreads, {$ENDIF} Classes,WebUI,Dialogs,Interfaces { you can add units after this }; var window: size_t; procedure EventHandler(e: Pwebui_event_t); begin //writeln('Received callback: ', e^.data); ShowMessage('hello'); end; begin window := webui_new_window; webui_show(window, '1.html'); webui_bind(window, 'myid', @EventHandler); webui_wait; end.

MacOS test on a real machine

Since I dont have any Mac, Im asking for help to check if Pascal WebUI wrapper is working fine there, in real world. I only tested on VirtualBox.

Branch with MacOS support:

https://github.com/webui-dev/pascal-webui/tree/MacOS

I suggest to check if text editor example from examples/Lazarus directory works. Install Lazarus, open text_editor.lpi, compile, run. webui-2.dylib is required and it has to be in the same folder where the compiled executable is.

Any Mac owner can test. WebUI binaries for MacOS are available here: v2.4.0.


Lazarus installation with fpcupdeluxe

Download the tool (I used fpcupdeluxe-x86_64-darwin-cocoa.zip):
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.4.0a

Open, click Trunk in the left bottom corner, it will install latest Lazarus + FPC, thats all you need.


eLFobEZ0f5

webui_interface_set_response

In the this example, we used webui_interface_set_response(), I guess we should use instead webui_return_string().

The function webui_interface_set_response() works fine, but all functions starting with webui_interface_xxx are designed to be used by the wrappers, like Pascal-Wraper.

The best solution is to make the examples use 100% Pascal code style by doing this:

[Pascal Example] -> [webui.pas] -> [WebUILib]
[WebUILib] -> [webui.pas events listener] -> [Pascal Example Callback]

Delphi not working

I adapted webui.pas for Delphi, generated the JS file and and compiled a console project without error or warning.
Nevertheless nothing happened when running the program - in an Paralles VM with Windows 11 ARM on a Macbook M1 Pro.
Tried same on a PC again nothing happened.

Have no idea where to start searching for the problem.
Maybe you can give me a hint?

type no defined

lazarus and free pascal trunk

...
webui.pas(52,12) Error: Identifier not found "ULONG_PTR"
webui.pas(52,21) Error: Error in type definition
webui.pas(58,13) Error: Illegal expression
webui.pas(59,17) Error: Illegal expression
webui.pas(61,19) Error: Illegal expression
webui.pas(62,14) Error: Illegal expression
webui.pas(68,60) Error: Type "size_t" is not completely defined
.....
webui.pas(162,48) Verbose: There were 50 errors compiling module, stopping
Verbose: Compilation aborted
Verbose: /home/nouzi/dev/trunk/fpc/bin/x86_64-linux/ppcx64 returned an error exitcode

webui-2.dll

hello,
i get this error when i run it.
image

how can i get the dll file ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.