Giter VIP home page Giter VIP logo

Comments (11)

AlbertoElias avatar AlbertoElias commented on August 16, 2024

I saw your last commit about compatibility issues and update to 0.0.16, but it still isn't working on webkit :S I'm also getting an error in compat.js:

TypeError: 'undefined' is not a function (near '...}).bind(Object);...') in line 55.

from atomize-client.

msackman avatar msackman commented on August 16, 2024

Hi Alberto.

Sorry, for some reason this didn't pop up in my notifications - hence the delay in replying.

The compatibility issues are due to needing JavaScript Proxies.

  • Recent Firefoxes just have Proxies turned on by default so they will work without the translation tool
  • Chrome has Proxies built in, but you need to launch chrome with --js-flags="--harmony" to enable them
  • If you don't want to start Chrome with Proxies enabled or for any other browser, you'll need to use the translation tool to prepare versions of your JS that don't need Proxies http://atomizejs.github.com/translate.html

Internet Explorer currently has a daft security setting which seems to prevent it running JS if the mime-type of the file is set to text/plain which is what github does on raw URLs. I'll do some testing this afternoon and see what I can do.

Please let me know how you get on or if any of this is unclear.

from atomize-client.

msackman avatar msackman commented on August 16, 2024

Ok, I found some bugs. With 0.0.18 I can make eg bomberman work in IE, Safari, Chrome and FF with and without: a) the browser's harmony extensions; b) node's harmony extensions.

Please let me know how you get on.

from atomize-client.

AlbertoElias avatar AlbertoElias commented on August 16, 2024

Thanks for replying! I thought about the translation problem, but I couldn't find how to use the tool. It doesn't come with atomize-client, nor can I npm install it directly. And I don't really understand correctly when to use said tool. Right now, an app done using atomize without this tool, on which browsers with default settings would it run on? And with the tool?

I'll check soon to see if with the new upgrades it's working for me. Thanks a lot!

from atomize-client.

msackman avatar msackman commented on August 16, 2024

The translation tool does come with the client. If you npm install atomize-client then you should find node_modules/.bin/atomize-translate. If not, please let me know - I might be doing something wrong with the package.json.

The documentation is probably not very clear, but essentially, it should be fine to use it very plainly

atomize-translate inputFile outputFile atomizeVar

should be enough to get started.

However, if you want to avoid using the translation tool then just using an up to date firefox would be fine, or use chrome, but you have to start chrome with some command line arguments, specifically, --js-flags="--harmony"

Let me know how you get on.

from atomize-client.

AlbertoElias avatar AlbertoElias commented on August 16, 2024

Hi, sorry for the long delay, I've been travelling quite a lot and working on other stuff, but I'm finally able to continue with this.

I update everything atomize related to the latest version but I'm getting an error on atomize.js saying that undefined is not a function when evaluation this line:

            dest[fields[i]] = src[fields[i]].bind(src);

atomize.js:122TypeError: 'undefined' is not a function (evaluating 'src[fields[i]].bind(src)')

It's line 122 in the result.lift function and I'm running webkit on Qt. And on my js file that uses atomize, the atomize variable is established as undefined. I used the translation tool and tried the translated file and I got another error on the console.log that tells me that the atomize variable is undefined.

Thanks a lot!

from atomize-client.

msackman avatar msackman commented on August 16, 2024

Ok, a recent webkit should be fine, but could you check that your JS environment supports 'bind' please? I'm pretty sure it's a standard ECMAScript 5 feature. If it's not there there are various shim libraries that can sometimes be used to work around missing features.

One other possible cause that I've seen with, eg IE, is that you sometimes have to convince the browser that your HTML etc is version 4 strict or better to convince the JS engine to turn on certain features. I don't know whether you can find out how your browser is interpreting the page.

Have you been able to get any of the basic tutorials or "hello-world"-style examples to work in your environment? I'd certainly suggest starting there if you've not already.

Best wishes.

from atomize-client.

AlbertoElias avatar AlbertoElias commented on August 16, 2024

So, I've been checking a few things out. First, I think the atomize-server for the bomberman example isn't compatible with Express 3, I don't think this fix will be too big. I've been trying out your examples (http://atomizejs.github.com/getting_started.html) on both Firefox and Chrome and found another quick fix. In your website, in the first client example you have this line:

atomize.root.x = Date.toString();

Should be changed to something like:

atomize.root.x = (new Date()).toString();

So, these examples are working perfectly on Firefox, but still not on Chrome. In Firefox I get the Wrote, Read when it should, while on Chrome it's always Wrote. I suppose it's because I haven't used the translation tool, but I can't find the binary neither.

Update: Just tried to execute Chrome with Harmony and it worked, so yeah, I need to make use of the translation tool but I can't find it.

Update 2: I managed to get the Bomberman example working with Express 3, very few changes to be made:

var app = express();
var http = require('http');

var server = http.createServer(app);
var atomizeServer = atomize.create(server, '[/]atomize');

And this IS working in Chrome withouth Harmony using bomberman-compat.js so I guess that all I need is the translation tool and finish getting the hang out of atomize :)

Cheers

from atomize-client.

msackman avatar msackman commented on August 16, 2024

Hi Alberto. Thanks for digging in to this. I've made the changes to the Date example. I'll work through the changes to the app.js for Express 3 as soon as I get a chance.

It's very odd that you're not finding the translation tool.

If you just do an npm install atomize-client, you should then find the atomize-client folder in a node_modules folder either in your current directory, or some parent. In that very same node_modules folder, there should be a .bin folder (note the leading .) which contains the atomize-translate script.

Or, a locate atomize-translate command should show you where it is - though I don't know what platform you're on so it may not have locate.

from atomize-client.

msackman avatar msackman commented on August 16, 2024

Yup, I've also incorporated the express3 changes. I also spotted in -server that I was referencing a very old version of sockjs, so I've bumped that too. Do let me know how you get on.

from atomize-client.

AlbertoElias avatar AlbertoElias commented on August 16, 2024

I hadn't checked in that .bin folder, but I just did and I don't even have that folder. I also searched atomize-translate and it's nowhere to be found =/

from atomize-client.

Related Issues (2)

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.