Archive for May, 2008

Loading org.eclipse.php.core…

Friday, May 2nd, 2008

I use Zend Studio for Eclipse, Version 6.0 for Windows for my coding. This is the first version from Zend in Eclipse. It is a good application but it still have some major bugs. One of the problems is if it crashes to often. Sometimes when I try to restart it after a crash it just hangs on “Loading org.eclipse.php.core”. When you get that problem it doesn’t help to restart the machine. Uninstall and reinstall sometimes works, but not always.

After a while I found out that deleting the org.eclipse.core.resources seems to solve the problem. You can usually find the catalog on
C:\Documents and Settings\\Zend\workspaces\DefaultWorkspace\.metadata\.plugins on a Windows machine. The only thing you need then, is to import your projects again. Actually quite easy solution.

I just found out by accident while I was writing this post that deleting catalog org.eclipse.core.runtime instead also works. But I would not recommend it! The program works fine and I haven’t lost my projects… but I have lost all my settings! So I need to once again set up my Zend with UTF-8 text encoding, unix line delimiter, my custom formatter and more… Much easier to just delete org.eclipse.core.resources!

Hope this advice can help others that are struggling!

weather 0.9

Thursday, May 1st, 2008

Last week I saw a contest on yr.no. Create an application that uses their weather data. They gave away prices for 3 categories; web, desktop and mobile. I had a long time considered making a weather php lib so I decided to join.

First I created a general weather php lib that gathered the weather information from yr.no. Then I had to decide what application I wanted to make. I actually decided to make multiple small applications. One netvibes UWA widget, a facebook application and wordpress widget. I knew I had little time and the other competitors had 5 week head start on me but I wanted at least try.

I started on the UWA widget… and actually never got any time to start on the other applications. It was fun to work with UWA but it have some severe restrictions. To list a few.

  • Not allowed with external css and js files. This was a major problem since I decided to use Google Maps to get the longitude and latitude needed of the weather api I had decided to use.
  • According to netvibes it is not possible to create a auto completion text box in their preferences. Still think there should be possible to find a way to do it… but haven’t found one yet. If this was allowed I could have used it as way to select location instead of Google Maps. I really didn’t want to use the old fashioned post to get the location, it is just to boring!
  • Since you can’t load external js file I was advised to use my Google Maps in an iframe. This would solcethe problem. The only problem was to send the values back from the iframe to the preferences. Since a UWA widget is automatically part of the netvibes.com domain but the iframe is on my domain. There is security restriction that won’t let you access the parent elements functions. This was a major hassle! Thanks to this article I found a solution using javascript and hashes. It work excellent in browsers like Firefox but there are some issues in browsers like IE7. You actually have to change the security settings in IE7 to make it work. And if that wasn’t enough it will not work at all on some browsers if my widget is inside another iframe and thats how netvibes.com add you widget to their page. So on some browsers it works fine in stand alone mode but you have to set the longitude and latitude manually on other browsers.
  • The applications in UWA is supposed to automatically work on lots of other platforms like iGoggle, Windows Vista Gadget, Opera Widget, Yahoo Widgets, Mac and more. I have only tried it on iGoogle so far and it doesn’t work and I can’t see I get any error messages. A bit annoying but haven’t really had the time to debug and figure out what is wrong. I’m guessing since I have problems with iGoogle that is supposed to be one of the easier ones it will probably not work on the others either. I will have to try that some other day!

So these problems took way too much time and is the reason why I didn’t manage to create more application. Since I didn’t even manage to make the UWA widget work perfect in all browsers I don’t think I have any chance of winning. Not that my idea was that creative. Probably someone else that have created something better and more creative since they had 6 times as much time ;-) But it was fun to finally try and create an UWA application.

Take a look at my weather page on http://weather.larsolavtorvik.com/. Not the prettiest page but at least I have some more information there, including a download for the whole source code fort he project.