My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Older

  • Nov 22, 2009
    issue 4 (changes to support packed repeated fields) reported by josh.t.burdick   -   What steps will reproduce the problem? Attached hacked version of protobuf-js seems to correctly read simple things with "packed repeated" fields, which r11 didn't seem to do. What version of the product are you using? On what operating system? based on protobuf-js, r11, Ubuntu x86, testing in Firefox Please provide any additional information below. Unfortunately this isn't quite a patch, and is poorly tested, but seems to work on simple examples.
    What steps will reproduce the problem? Attached hacked version of protobuf-js seems to correctly read simple things with "packed repeated" fields, which r11 didn't seem to do. What version of the product are you using? On what operating system? based on protobuf-js, r11, Ubuntu x86, testing in Firefox Please provide any additional information below. Unfortunately this isn't quite a patch, and is poorly tested, but seems to work on simple examples.
  • Jun 23, 2009
    issue 3 (Version that work in InternetExplorer) commented on by paul.dovbush   -   Here is the version with prototype.js dependences removed. (fix XMLHttpRequest for IE; $A() -> []; $ -> document.getElementById)
    Here is the version with prototype.js dependences removed. (fix XMLHttpRequest for IE; $A() -> []; $ -> document.getElementById)
  • Jun 23, 2009
    issue 3 (Version that work in InternetExplorer) reported by paul.dovbush   -   Revision 12 have following problems in IE: 1. Four trailing commas in object literals; 2. IE does not implement overrideMimeType() If you comment out overrideMimeType (to remove error) data will be transfered in bad encoding in IE. I fix it at server-side in bin/ start_server.rb. I don't know Ruby, so the easiest way I found is http:// microjet.ath.cx/webrickguide/html/Overriding_Default_MIME_Typ.html Solution is not perfect because you have to correct the path of mime.types in your system. system_mime_table = WEBrick::HTTPUtils::load_mime_types('/usr/local/etc/ apache22/mime.types')
    Revision 12 have following problems in IE: 1. Four trailing commas in object literals; 2. IE does not implement overrideMimeType() If you comment out overrideMimeType (to remove error) data will be transfered in bad encoding in IE. I fix it at server-side in bin/ start_server.rb. I don't know Ruby, so the easiest way I found is http:// microjet.ath.cx/webrickguide/html/Overriding_Default_MIME_Typ.html Solution is not perfect because you have to correct the path of mime.types in your system. system_mime_table = WEBrick::HTTPUtils::load_mime_types('/usr/local/etc/ apache22/mime.types')
  • Dec 01, 2008
    issue 2 (var Protobuf = $H(); produces a 'syntax error' in IE7) commented on by kennerly.banks   -   It turns out that the call to 'overrideMimeType' may not even be necessary, so I commented it out and the example still works in Firefox, and I get past this routine in IE7, but run into the next error.... [type, tag] = this.readKey(); Cannot assign to '[object]' I guess IE does not like this syntax for returning an associative array. I'll look for an alternative....
    It turns out that the call to 'overrideMimeType' may not even be necessary, so I commented it out and the example still works in Firefox, and I get past this routine in IE7, but run into the next error.... [type, tag] = this.readKey(); Cannot assign to '[object]' I guess IE does not like this syntax for returning an associative array. I'll look for an alternative....
  • Dec 01, 2008
    issue 2 (var Protobuf = $H(); produces a 'syntax error' in IE7) commented on by kennerly.banks   -   Ahh! That gets us a little bit further. :) Now we run into this error... req.overrideMimeType('text/plain; charset=x-user-defined'); Object doesn't support this property or method (line 28) (protobuf.js) That line is the third line within this routine. readUrl: function(url) { var req = new XMLHttpRequest(); req.open('GET', url, false); req.overrideMimeType('text/plain; charset=x-user-defined'); req.send(null); if (req.status != 200) throw '[' + req.status + ']' + req.statusText; this.stream = req.responseText; var bytes = $A(); for (i = 0; i < this.stream.length; i++) { bytes[i] = this.stream.charCodeAt(i) & 0xff; } return bytes; },
    Ahh! That gets us a little bit further. :) Now we run into this error... req.overrideMimeType('text/plain; charset=x-user-defined'); Object doesn't support this property or method (line 28) (protobuf.js) That line is the third line within this routine. readUrl: function(url) { var req = new XMLHttpRequest(); req.open('GET', url, false); req.overrideMimeType('text/plain; charset=x-user-defined'); req.send(null); if (req.status != 200) throw '[' + req.status + ']' + req.statusText; this.stream = req.responseText; var bytes = $A(); for (i = 0; i < this.stream.length; i++) { bytes[i] = this.stream.charCodeAt(i) & 0xff; } return bytes; },
  • Dec 01, 2008
    issue 2 (var Protobuf = $H(); produces a 'syntax error' in IE7) commented on by andyjpn   -   How about this? Protobuf.WireType = { VARINT : 0, BIT64 : 1, LENGTH_DELIMITED : 2, START_GROUP : 3, END_GROUP : 4, BIT32 : 5 <--- comma removed };
    How about this? Protobuf.WireType = { VARINT : 0, BIT64 : 1, LENGTH_DELIMITED : 2, START_GROUP : 3, END_GROUP : 4, BIT32 : 5 <--- comma removed };
  • Nov 24, 2008
    issue 2 (var Protobuf = $H(); produces a 'syntax error' in IE7) commented on by kennerly.banks   -   Thanks, Andy. Yes, I am including prototype.js I've used the prototype.js that you include with the example, and also a later version '1.6.0.3'. They both work identically as far as I can tell. That is Firefox never complains, but IE just doesn't get it. I have tried these three different alternatives (below), but still get a syntax error in IE on this declaration... First... var Protobuf = $H(); Then tried this instead... var Protobuf = new Hash(); And finally this... var Protobuf = { first: 10, second: 20, third: 30 }; These all worked wonderfully in Firefox. But none work for me in IE. Thanks for a response. And thanks for putting this code up for people to use!
    Thanks, Andy. Yes, I am including prototype.js I've used the prototype.js that you include with the example, and also a later version '1.6.0.3'. They both work identically as far as I can tell. That is Firefox never complains, but IE just doesn't get it. I have tried these three different alternatives (below), but still get a syntax error in IE on this declaration... First... var Protobuf = $H(); Then tried this instead... var Protobuf = new Hash(); And finally this... var Protobuf = { first: 10, second: 20, third: 30 }; These all worked wonderfully in Firefox. But none work for me in IE. Thanks for a response. And thanks for putting this code up for people to use!
  • Nov 23, 2008
    issue 2 (var Protobuf = $H(); produces a 'syntax error' in IE7) commented on by andyjpn   -   $H function is defined by prototype.js. I don't think it's a syntax error... Anyways, could you try `var Protobuf = {};' and tell me the result? I'm a mac user, so that I cannot try by myself. Thanks.
    $H function is defined by prototype.js. I don't think it's a syntax error... Anyways, could you try `var Protobuf = {};' and tell me the result? I'm a mac user, so that I cannot try by myself. Thanks.
  • Nov 23, 2008
    issue 2 (var Protobuf = $H(); produces a 'syntax error' in IE7) commented on by kennerly.banks   -   Oh, one more edit... There is also a trailing comma after the last element 'email' in 'var description' inside the index.html that needs to be removed. IE7 is very delicate and picky about this. :( var description = { 1: {name: 'name', type: 'string', rule: 'required'}, 2: {name: 'id', type: 'int32', rule: 'required'}, 3: {name: 'email', type: 'string', rule: 'optional'} <--- comma removed };
    Oh, one more edit... There is also a trailing comma after the last element 'email' in 'var description' inside the index.html that needs to be removed. IE7 is very delicate and picky about this. :( var description = { 1: {name: 'name', type: 'string', rule: 'required'}, 2: {name: 'id', type: 'int32', rule: 'required'}, 3: {name: 'email', type: 'string', rule: 'optional'} <--- comma removed };
  • Nov 22, 2008
    issue 2 (var Protobuf = $H(); produces a 'syntax error' in IE7) reported by kennerly.banks   -   What steps will reproduce the problem? 1. First you need to make two edits to protobuf.js for IE not to choke right away. This involves removing the trailing coma(',') following the } of the last method called toBinaryString. Then the 'decode' Method must define the vars [type, tag] independently at the beginning of the function instead of on-the-fly with the call to this.readKey(). 2. Now IE7 doesn't flag the above items, and FireFox still works fine with these changes. 3. I can't get IE7 past the syntax error with the initial call to $H(). What is the expected output? What do you see instead? I expect to see the same output after clciking the "Decode" button that this page gives me in Firefox which is... name:ando id:999 email:ando@example.com but instead IE7, does nothing. Using Companion.JS.v0.4.1, I see there is a syntax error on ... line 1: var Protobuf = $H(); Subsequent clicking of the "Decode" button produce this error... 'Protobuf' is undefined on line 28: $('result').innerHTML = inspect(new Protobuf.Decoder(description).decode(url)); I really would like for my PBI implementation to be browser agnostic, so any help you can throw my way to get this working in IE7 would be greatly appreciated. Thanks, Ken Banks What version of the product are you using? On what operating system? Please provide any additional information below.
    What steps will reproduce the problem? 1. First you need to make two edits to protobuf.js for IE not to choke right away. This involves removing the trailing coma(',') following the } of the last method called toBinaryString. Then the 'decode' Method must define the vars [type, tag] independently at the beginning of the function instead of on-the-fly with the call to this.readKey(). 2. Now IE7 doesn't flag the above items, and FireFox still works fine with these changes. 3. I can't get IE7 past the syntax error with the initial call to $H(). What is the expected output? What do you see instead? I expect to see the same output after clciking the "Decode" button that this page gives me in Firefox which is... name:ando id:999 email:ando@example.com but instead IE7, does nothing. Using Companion.JS.v0.4.1, I see there is a syntax error on ... line 1: var Protobuf = $H(); Subsequent clicking of the "Decode" button produce this error... 'Protobuf' is undefined on line 28: $('result').innerHTML = inspect(new Protobuf.Decoder(description).decode(url)); I really would like for my PBI implementation to be browser agnostic, so any help you can throw my way to get this working in IE7 would be greatly appreciated. Thanks, Ken Banks What version of the product are you using? On what operating system? Please provide any additional information below.
  • Oct 06, 2008
    CodeSample (Sample codes) Wiki page edited by andyjpn
  • Oct 06, 2008
    CodeSample (Sample codes) Wiki page edited by andyjpn
  • Oct 06, 2008
    r12 (comsmetics) committed by andyjpn   -   comsmetics
    comsmetics
  • Oct 06, 2008
    r11 (repeated fields) committed by andyjpn   -   repeated fields
    repeated fields
  • Oct 06, 2008
    CodeSample (Sample codes) Wiki page edited by andyjpn
  • Oct 06, 2008
    CodeSample (Codes) Wiki page edited by andyjpn
  • Oct 06, 2008
    CodeSample (Codes) Wiki page edited by andyjpn
  • Oct 06, 2008
    CodeSample (Codes) Wiki page edited by andyjpn
  • Oct 06, 2008
    CodeSample (Codes) Wiki page edited by andyjpn
  • Oct 06, 2008
    CodeSample (Codes) Wiki page added by andyjpn
  • Oct 06, 2008
    r4 (embedded message) committed by andyjpn   -   embedded message
    embedded message
  • Oct 04, 2008
    issue 1 ([PATCH] Syntax error in Safari 3.1.2) changed by andyjpn   -   Done. Thanks.
    Status: Fixed
    Owner: andyjpn
    Done. Thanks.
    Status: Fixed
    Owner: andyjpn
  • Oct 04, 2008
    r3 ([Fixed] Issue 1: [PATCH] Syntax error in Safari 3.1.2) committed by andyjpn   -   [Fixed] Issue 1 : [PATCH] Syntax error in Safari 3.1.2
    [Fixed] Issue 1 : [PATCH] Syntax error in Safari 3.1.2
  • Oct 02, 2008
    issue 1 ([PATCH] Syntax error in Safari 3.1.2) reported by takanori.ishikawa   -   How to reproduce the issue: 1. Start server ruby ./bin/start_server.rb 2. Open http://localhost:10080/ in Safari 3.1.4 3. Open "Error Console", you can see SyntaxError: Parse error (line 27) protobuf.js line 27: var [type, tag] = this.readKey(); Safari does not support Destructuring assignment (New in JavaScript 1.7). The attached patch removes it.
    How to reproduce the issue: 1. Start server ruby ./bin/start_server.rb 2. Open http://localhost:10080/ in Safari 3.1.4 3. Open "Error Console", you can see SyntaxError: Parse error (line 27) protobuf.js line 27: var [type, tag] = this.readKey(); Safari does not support Destructuring assignment (New in JavaScript 1.7). The attached patch removes it.
  • Oct 02, 2008
    r2 (import) committed by andyjpn   -   import
    import
  • Oct 01, 2008
    Project protobuf-js created by andyjpn   -   Protocol Buffers for JavaScript
    Protocol Buffers for JavaScript
 
Hosted by Google Code