Search found 15 matches

by Palloy
Sun Sep 02, 2018 8:27 am
Forum: C++ Development
Topic: wxTimer example
Replies: 15
Views: 4405

Re: wxTimer example

... this will probably not lead to a good code. You are right I'm trying to write PHP in C++, that's because I want to avoid C++ as much as possible. I have been coding for 51 years now, in PLAN (ICL machine code), Fortran-4, Algol-68, COBOL, BASIC, Pascal, PHP and probably a few others, and C++ se...
by Palloy
Sat Sep 01, 2018 10:11 pm
Forum: C++ Development
Topic: wxTimer example
Replies: 15
Views: 4405

Re: wxTimer example

In writing a "how to" for wxPHP for beginners , I identified the minimum code necessary to implement the basic controls, and all its actual parameters, and put it in a "snippets" file. The app can then be constructed by copy-pasting the snippets, without wasting any time on the PHP language syntax. ...
by Palloy
Sat Sep 01, 2018 8:09 am
Forum: C++ Development
Topic: wxTimer example
Replies: 15
Views: 4405

Re: wxTimer example

Thanks PB, I can understand that, more or less, although I am surprised the compiler didn't error the use of m_timer on line 22 (and 32) as "not declared in this scope". Also you have semicolons after the } of your classes. I shall have to go back and read all about scope. Now I need a lie down. Cat...
by Palloy
Sat Sep 01, 2018 4:15 am
Forum: C++ Development
Topic: wxTimer example
Replies: 15
Views: 4405

Re: wxTimer example

It's unfortunate that you don't understand it, but IMO you really should. It will be much faster to read the code in the samples (or other examples Google will find for you) than asking here and waiting for someone else to write it for you. Yes, I should really understand it, but I don't, I'm a beg...
by Palloy
Fri Aug 31, 2018 11:03 pm
Forum: C++ Development
Topic: wxTimer example
Replies: 15
Views: 4405

Re: wxTimer example

Can anyone provide a simple wxTimer example please When you want to find examples of use, your first stop should be the samples that come with the wx source. There are 88 folders in /samples/ and 162 *.cpp files within those folders, so this is not very helpful unless there is a /samples/timer/time...
by Palloy
Sat Oct 21, 2017 12:16 am
Forum: General Development
Topic: WebView::GetPageSource() returns original HTML
Replies: 5
Views: 990

Re: WebView::GetPageSource() returns original HTML

I have the control SetEditable() - it didn't work without it.
After each edit I use GetPageText() to see what effect that has had on the source HTML, and there is none, although the webView changes as expected.
Without a way to get at the edited source, editing seems pointless
by Palloy
Fri Oct 20, 2017 2:58 am
Forum: General Development
Topic: WebView::GetPageSource() returns original HTML
Replies: 5
Views: 990

Re: WebView::GetPageSource() returns original HTML

Can anyone just confirm that GetPageSource() returns the HTML of the currently loaded URL and NOT the currently displayed page (as edited)?
by Palloy
Sun Oct 15, 2017 1:21 am
Forum: General Development
Topic: WebView::GetPageSource() returns original HTML
Replies: 5
Views: 990

WebView::GetPageSource() returns original HTML

wxPHP wrapping wxWidgets 3.0.0.2 WebView control instantiated OK, LoadURL() sucessfully completed OK, edited the rendered HTML with Cut()/Copy()/Paste()/DeleteSelection() OK, then GetPageSource() gives me the original HTML source, not the edited HTML source GetPageText() gives me the original HTML's...
by Palloy
Sat Oct 14, 2017 1:33 am
Forum: General Development
Topic: wxWebView::LoadURL() in wxPHP
Replies: 10
Views: 1272

Re: wxWebView::LoadURL() in wxPHP [SOLVED]

OK, finally wrestled the thing into submission. =D> For the record: $html_box = wxWebView::NewMethod(); $html_box->Create($frame, wxID_ANY, "http://palloy.earth", wxDefaultPosition, new wxSize(1024, 600)); $html_box->Connect(wxEVT_WEBVIEW_LOADED, array(wxID_TOP, webpage_loaded)); // ================...
by Palloy
Fri Oct 13, 2017 2:16 pm
Forum: General Development
Topic: wxWebView::LoadURL() in wxPHP
Replies: 10
Views: 1272

Re: wxWebView::LoadURL() in wxPHP

Finally , this works: $html_box = wxWebView::NewMethod(); $html_box->Create($frame, wxID_ANY) ; The frame gets drawn correctly. Then I type my URL into $url_box and press ENTER, which triggers the event wxEVT_TEXT_ENTER, which leads to the LoadURL(). I wasn't happy with this as a solution: while($ht...
by Palloy
Thu Oct 12, 2017 5:50 am
Forum: General Development
Topic: wxWebView::LoadURL() in wxPHP
Replies: 10
Views: 1272

Re: wxWebView::LoadURL() in wxPHP

null seems to be returned if the backend is not available.
So maybe it is not in the build I have?
That will put an end to the project.
by Palloy
Thu Oct 12, 2017 5:24 am
Forum: General Development
Topic: wxWebView::LoadURL() in wxPHP
Replies: 10
Views: 1272

Re: wxWebView::LoadURL() in wxPHP

(A bit like the thousand monkeys typing the works of Shakespeare.) $html_box = wxWebView::NewMethod(wxWEBVIEW_BACKEND_WEBKIT); $html_box->Create($frame, wxID_ANY, "http://palloy.earth", wxDefaultPosition, $html_box_size); produces in Terminal: Fatal error: Call to a member function Create() on null ...
by Palloy
Thu Oct 12, 2017 4:53 am
Forum: General Development
Topic: wxWebView::LoadURL() in wxPHP
Replies: 10
Views: 1272

Re: wxWebView::LoadURL() in wxPHP

When I do: $htmlbox = new wxWebView::NewMethod($frame, wxID_ANY, "http://palloy.earth"); PHP gives a syntax error "unexpected 'NewMethod', expecting variable or $" Changing it to "New", PHP editor highlights it as it does "new", so is not recognising it as a Method, then it errors as before I have n...
by Palloy
Wed Oct 11, 2017 6:53 am
Forum: General Development
Topic: wxWebView::LoadURL() in wxPHP
Replies: 10
Views: 1272

Re: wxWebView::LoadURL() in wxPHP

Doesn't

Code: Select all

$html_box = new wxWebView($frame, wxID_ANY, wxDefaultPosition, new wxSize(1024, 600));
do that?
by Palloy
Wed Oct 11, 2017 3:57 am
Forum: General Development
Topic: wxWebView::LoadURL() in wxPHP
Replies: 10
Views: 1272

wxWebView::LoadURL() in wxPHP

I am using wxPHP (wrappers built for PHP 5.6.39 and wxWidgets 3.0.0.2) on Ubuntu 16.04 (64). I have been using it successfully for a couple of years now. First time using wxWebView control though. I am getting seg faults and this assert error with wxWebView::LoadURL() Is this the correct way of doin...