Brython on I Programmer

95 views
Skip to first unread message

Pierre Quentel

unread,
May 9, 2013, 9:50:12 AM5/9/13
to bry...@googlegroups.com

Billy Earney

unread,
May 9, 2013, 10:15:29 AM5/9/13
to bry...@googlegroups.com
Awesome article, and a good intro to brython.


On Thu, May 9, 2013 at 8:50 AM, Pierre Quentel <pierre....@gmail.com> wrote:

- Pierre

--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/brython/-/8LS5NpeG2esJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gnarlodious

unread,
May 9, 2013, 10:56:46 AM5/9/13
to bry...@googlegroups.com
What is supposed to happen on I load page http://www.brython.info/gallery/clock.html ? I see nothing and Console says:

WebKit message: line 531: TypeError: 'undefined' is not an object (evaluating 'window.IDBObjectStore.prototype')
WebKit message: line 5618: ReferenceError: Can't find variable: list

-- Gnarlie

Billy Earney

unread,
May 9, 2013, 11:09:26 AM5/9/13
to bry...@googlegroups.com
Gnarlodious,

what browser are you using, and what version?

Thanks!

billy


--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/brython/-/VUIAn6VkTvgJ.

Gnarlodious

unread,
May 9, 2013, 11:59:40 AM5/9/13
to bry...@googlegroups.com
This is iCab 5.0.5, a Webkit browser. But the same occurs in Safari and also Chrome. I am running OSX  build 12E47, in case it matters.

-- Gnarlie

Gnarlodious

unread,
May 9, 2013, 12:02:38 PM5/9/13
to bry...@googlegroups.com
More info, Chrome reports:

  1. Uncaught TypeError: Cannot read property 'prototype' of undefined /src/brython.js:531
    1. (anonymous function)/src/brython.js:531
  1. Uncaught ReferenceError: list is not defined

-- Gnarlie


On Thursday, May 9, 2013 9:09:26 AM UTC-6, Billy Earney wrote:

Billy Earney

unread,
May 9, 2013, 12:09:30 PM5/9/13
to bry...@googlegroups.com
I'm not currently at my brython development machine, but I  think I know how to fix it..

py_util.js   line 596   (change to look like below): 

if (window.IDBObjectStore !== undefined) {
  window.IDBObjectStore.prototype._put=window.IDBObjectStore.prototype.put
  window.IDBObjectStore.prototype.put=function(obj, key) {
   var myobj=pyobject2jsobject(obj);
   return window.IDBObjectStore.prototype._put.apply(this, [myobj, key]);
  }

  window.IDBObjectStore.prototype._add=window.IDBObjectStore.prototype.add
  window.IDBObjectStore.prototype.add=function(obj, key) {
   var myobj=pyobject2jsobject(obj);
   return window.IDBObjectStore.prototype._add.apply(this, [myobj, key]);
  }
}


Probably the same needs to be done for the window.IDBRequest function (which is just below the above code:

if (window.IDBRequest !== undefined) {
  window.IDBRequest.prototype.pyresult=function() {
   return jsobject2pyobject(this.result);
  }
}


Just in case someone wants to fix it in the repo ASAP.

I can do it later (in about 5 hours) if it isn't pushed by then.

Billy

To view this discussion on the web visit https://groups.google.com/d/msg/brython/-/1_IsAZDSl8sJ.

Pierre Quentel

unread,
May 9, 2013, 12:45:51 PM5/9/13
to bry...@googlegroups.com
Thanks for the report. There was no problem with Chrome on my Windows XP machine

I have commited the fix suggested by Bill and uploaded it to brython.info. Is the problem solved now ?


2013/5/9 Billy Earney <billy....@gmail.com>

Gnarlodious

unread,
May 9, 2013, 12:57:36 PM5/9/13
to bry...@googlegroups.com
No change, not in Chrome nor Safari.

-- Gnarlie

Pierre Quentel

unread,
May 9, 2013, 1:15:28 PM5/9/13
to bry...@googlegroups.com
Oops ! upload error... should be better now


2013/5/9 Gnarlodious <gnarl...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/brython/-/BZVVpNcdDhUJ.

Gnarlodious

unread,
May 9, 2013, 6:31:14 PM5/9/13
to bry...@googlegroups.com
That fixed it!

-- Gnarlie
Reply all
Reply to author
Forward
0 new messages