Animated gif pauses when ember.js objects are loading - ember.js

Having a problem with a spinner actually spinning while ember.js is doing it's thing. I have a very generic jsfiddle example that illustrates the issue:
http://jsfiddle.net/h4ZcZ/2/
I assume there has to be a simple way to make this work as expected, but I am not finding it. I have tried using a JavaScript/CSS implementation of a spinner (spin.js) with the same results. I saw some stuff indicating this was typically an IE issue, but that is not the case here. This happens on all browser on Windows and i have tested on Mac Safari as well.

The problem is your for loop--you're basically locking up the thread. I would use timeouts and chunk up the work to be done to give other processing needs on the page the ability to execute.

As far as root cause, #ChristopherSwasey is correct. I asked a few other Ember developers about this. No solution, but two interesting thoughts that might help:
1) One developer reported that he has run into this problem and gotten around it by making sure the animated gif started before the long javascript execution.
2) Another developer suggested that using a virtualized list is the right path, so that only visible nodes are rendered. However, I'm afraid I don't know of an open source Ember virtualized list class yet.
Hope that helps.

Related

Search box not working as expected in Ember tutorial app

I just worked my way through the Ember tutorial app. The only thing that does not work as expected is the search box. It happens from time to time that not all data is displayed if I hit backspace multiple times to clear the search box.
After pressing Backspace all data is than displayed again.
BTW: The final tutorial app from GitHub (https://github.com/ember-learn/super-rentals) shows the same problem.
The behavior you are seeing is a known issue reflected in https://github.com/emberjs/guides/issues/1572
That tutorial code for autocomplete needs to be improved upon to better handle the asynchronous behavior.

Emberjs: strange bug on iPhone

I have an Ember app that works very well on desktop (all major browsers), but it exhibits a strange bug on iPhone (and maybe Android as well, I am not sure).
It happens completely randomly, and even "worse": for some reason I can't replicate it when I connect my iPhone to my computer to use the Web Inspector. So basically I have no idea what's happening.
The app loads fine, but the bug occurs when the user transitions from one page to the other. This transition involves a bit of javascript and ajax (but not a super heavy script), and probably uses a bit of memory.
I apologize I know it is a long shot considering the little amount of info I have, but I was wondering whether someone has been confronted to something like that already? Or do you have any tips on how to track down a problem like this?
Thanks
PJ

Getting d3.js to work with raphael.js

I have recently implemented some data visualisation using d3.js, I'm now trying to get this to work for Internet Explorer browser versions 7 and above. The common suggestion to get this to work, is to combine d3.js with raphael.js, which is a cross browser graphics library.
There already seem to be some implementations of such libraries such as
r2d3.js :
d34raphael.js :
I'm trying to understand if these existing implementation already have d3's capability of data binding and the physics implementation of the force layout to implement something as simple as this d3 example : http://bl.ocks.org/1095795
I have been looking into this too and a number of options came up.
Chrome Frame - A browser plug-in that actually uses chrome underneath, meaning SVG just works. This is great if you're able to deploy plugins to the browser, for a real commercial environment however this may not be possible.
SVG Web - The aim is it bring SVG to all browsers. It looks like a fairly large project, one that's had Google's input. This doesn't however work out of the box with D3 though I don't know much about the issues.
D34Raphael - You've mentioned this one, I found again it doesn't work out of the box. Check the project out on GitHub, there hasn't been any commit activity in months and there's some pull requests "first pass on trying to get support for .on() required for event binding". If it doesn't support events, is that an issue to you? I'd generally keep away from this one.
R2D3 - Again another one you mentioned. I took the Sankey example from the D3 website and had to make a few changes to get it working. The main things I couldn't get working (Drag Events, Groups - though can use an alternative). It took about a day of effort to get the example working in IE8 and I believe is in a useable state. The project on GitHub is also much more active, the developer is committing, pulling work in and is very active on discussions etc. This gets my vote.

integrating wmd editor with a django site

this is probably a really dumb question but im struggling to integrate it. im playing with a reusable app called brookie that uses wmd-editor.
in the install instructions it states to "Link admin_wmdeditor/media/admin-wmdeditor in your MEDIA_ROOT as admin-wmdeditor"
im assuming this is a symlink?
I've tried to create a symlink to point at the wmd folder in lib/python2.6/site-packages/wmd but i don't think it worked. i say that, as i cant see any symlink created in my folder.
so 1st question, is there a simple way to list symlinks so i can see if i've really created one? i know this is a noob question, im not a mac genius. i also know this should be covered by a quick google but do me a favour and do it, i can only find noise.
if anyone has some slightly more explicit instructions other than the ones on django-adminwmd_editors github page i'd love to see them. i can normally work this stuff out, but i've got an hour in just trying to hook this stuff up and its a wind up.
I'm not a Mac crack, but usually (on Linux) you can see a symlink, when you list the directory content.
I've played around with the brookie app some time ago and if I remember it right I have had some trouble with wmd also, after researching stackoverflow I changed to Markitup, which works fine.
Have a look here: WMD in Django Admin?
in the end i just commented out the lines referring to wmd and removed the class reference to it, forced it back to a std modeladmin.
will be adding tiny mce in if it needs it, nice n simple. not sure why this single text box needed something as complicated as wmdeditor.

Multiple Internet Explorer versions side-by-side in one application

in the MFC application I am working on, I need to have an Internet Explorer (we are using the component CHtmlView) displayed, currently we are able to change the rendering mode the IE works in by using the FEATURE_BROWSER_EMULATION registry keys. However that only allows us to change the rendering mode of all the CHtmlView instances in the application, plus to apply that change, we must restart the application.
The problem is, we would like to have more than one version of the IE displayed side-by-side in our application. I know that it is possible to get multiple IE versions on one computer, but I'm not sure, how to get them all in one application.
We have some ideas, how to solve this problem, but they are not really a trivial solutions, so I want to ask for your ideas. Anyway, here is what we've come up with:
Download the source code of the page, add the document compatibility tag, change all the addresses in the document to the absolute ones, and save this page to the disk. Then reload the page from the disc with the IE. This solution works only partially, because although it makes IE to use the correct rendering mode, the page fails to load some of the resources, because it is in the different location than the original - the addresses we had changed works well, but for example the JavaScript generated ones doesn't. And this solution is generally very messy, so we had dropped that.
Use multiple processes - each IE version would have it's own executable/dll library, we use the browser emulation feature on each executable, and then somehow glue this into one application (I admit, I have no idea how, as I've never used multiple processes with windows/MFC). But I don't know, if that solution would even work...
Create a proxy for our application, that will change the downloaded source code in a similar way as the solution 1 presents - it will add the document compatibility tag, to force the IE into the desired mode, but it can leave the addresses intact, as the IE would see the source as coming from the original location. This solution seems to me like the safest one, but like with the 2. solution, I don't know how to make a proxy layer for our application, and more importantly, how much time would it take.
So do you have any ideas on how else could this be solved? If the solution uses something other than CHtmlView, so be it, we can always change that.
As for the IE versions, we would like to have, it would be nice to support IE6, but it is not necessary, the lowest required version is IE7.
Thanks ahead for your time, any ideas would be appreciated.
In the end I have solved this by using
our own proxy server (implemented using boost asio), and modifying the http request/response headers to force IE into the correct compatibility mode.
several executables with unique names, with the compatibility mode set in the registry. Each browser version ran in a separate process.
As it turned out, the proxy server solution didn't always work as expected. The multi-process solution did work as intended, but in the end, the emulated browsers didn't always work as the real browsers, and the whole solution wasn't 100% reliable.
I hope this will help someone in the future.