piranna / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Rebind with F5 no longer works #115

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setup code with a binded external PY file
2. change Code in external PY file
3. press F5

What is the expected output? What do you see instead?
It skips the re-binding process.  So any changes to the external PY file are 
not applied.  I would have to close the app, and relaunch every time the Python 
code changes.

What version of the product are you using? On what operating system?
cefpython1-27.0-win32-portable, running on Windows 7

Please provide any additional information below.
This used to work in version: cefpython1_v0.51_windows_32bit
A simple test is to modify the included "cefadvanced.py"
1) put a print statement at the start of JavascriptRebindings.Bind and 
JavascriptRebindings.Rebind
2) run the script and hit F5
You will see that it refreshes the HTML page, but not the code.  Bind only gets 
called at the start, and Rebind never gets called.

Original issue reported on code.google.com by rich...@gmail.com on 2 Feb 2014 at 10:37

GoogleCodeExporter commented 9 years ago
This code:

    if hasattr(browser, "javascriptRebindings"):
        browser.GetUserData("javascriptRebindings").Rebind()

Should become:

    if browser.GetUserData("javascriptRebindings"):
        browser.GetUserData("javascriptRebindings").Rebind()

Let me know if that fixes the issue and I will update the example.

Original comment by czarek.t...@gmail.com on 2 Feb 2014 at 10:45

GoogleCodeExporter commented 9 years ago
Yes.  Thanks, this fixed the problem.

Original comment by rich...@gmail.com on 2 Feb 2014 at 10:53

GoogleCodeExporter commented 9 years ago
Fixed in revision dfff7897665f.

Original comment by czarek.t...@gmail.com on 2 Feb 2014 at 10:57