/* .DS_Store file in “res” directory */
Yesterday, I wanted to see the list of internal icon resources of Android SDK, so I put a dummy ImageView widget to a screen in Graphical Layout and it opens the dialog named “Resource Chooser”. But it causes crash and freeze of Eclipse IDE suddenly. Why? When I previously used Resource Chooser dialog, it works perfect without any error.
In short: The cause is .DS_Store file in “res” directory (incl. all sub directories)
ADT plugin tries to read something from .DS_Store file in “res” directory (especially “drawable” directory) and causes crash. Okay, so I just remove it using Finder… WAIT! If you remove .DS_Store file using Finder, Finder will generate .DS_Store file again. Really scare infinite-loop.
Use Terminal. Remove them using “rm” command from Terminal application. While you’re using Resource Chooser dialog, don’t touch the Finder app which shows “res” directory or its children.
/* BroadcastReceiver */
I wanted to send and receive my own broadcast intent, so I defined MyBroadcastReceiver class in MyAndroidActivity class which is the main activity class launched by Android. Since Java language doesn’t allow to define two or more public classes in same Java source file, I declared MyBroadcastReceiver class with no modifier (package-private). As a result, I got cryptic exception “IllegalAccessException”:
DalvikVM[localhost:8600] Thread [<1> main] (Suspended (exception RuntimeException)) ActivityThread.handleReceiver(ActivityThread$ReceiverData) line: 1773 ActivityThread.access$2400(ActivityThread, ActivityThread$ReceiverData) line: 117 ActivityThread$H.handleMessage(Message) line: 981 ActivityThread$H(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 130 ActivityThread.main(String) line: 3683 Method.invokeNative(Object, Object, Class, Class, Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 507 ZygoteInit$MethodAndArgsCaller.run() line: 839 ZygoteInit.main(String) line: 597 NativeStart.main(String) line: not available [native method] Thread [<8> Binder Thread #2] (Running) Thread [<7> Binder Thread #1] (Running)
After a bit struggling, I found out the answer: subclass of BroadcastReceiver must be declared with public modifier
A subclass of BroadcastReceiver is called from Android system, so I had to define it with public modifier. This means you can’t define it in same Java source file. I tried to define it as public inner class of MyAndroidActivity but failed.
/* OMG… */
I have been bothering that Adobe Illustrator always crashes on both Windows XP and 7 when I save the file with AI (Adobe Illustrator) extension to the local disk. Finally, I dug up the way to resolve that annoying problem; just enable Print Spooler service! I can’t believe this… but it’s true. You can enable that service from: Control Panel -> Administrative Tools -> Services, then change “Startup Type” of Print Spooler service to “Automatic”. Of course, you should enable it manually right now!
Thanks for great tip: http://forums.majorgeeks.com/showthread.php?p=1346117
/* Integrate with Issue Tracker */
Unfortunately, TortoiseHg doesn’t have the feature that integrates with an external issue tracker now. That feature was filed long before, but Bitbucket supports the integration of a repository and an issue tracker, so most developers couldn’t have strong motivation.
To implement functionality of issue tracker integration is hard for us, so one developer introduced “Commit Message Parsing” feature to Repository Explorer for TortoiseHg 1.0, which makes issue IDs clickable URLs.
Yeah, this feature is written in the manual, but most users didn’t know it since we didn’t provide friendly user interfaces for it. So I’d like to describe how to configure and use this in here.
/* Well done… */
I didn’t know Clone dialog of TortoiseHg 1.0 can be used to checkout Subversion repository without any hack. Did you know?
Anyway, this is a blog entry, not a tweet of Twitter, so I’ll put some explanation how to setup hgsubversion and TortoiseHg on Windows.
/* Why? */
I’d like to introduce i18n (internationalization) framework to TortoiseHg website. So I looked around a template system for Python, then found Django’s template system and i18n framework. In the process, I got interested in Lazy-Loading of Django’s i18n framework.
I don’t know whether this entry helps someone, but anyway I try to explain it with a little sample code. Welcome any comment! I’m Django newbie
/* Why? */
/* MQ support: Newly introduced in 0.9 */
A while ago, TortoiseHg 0.9.2 was released and I’m focusing the development for 0.10. It’s too late, but I would like to explain about MQ support on TortoiseHg. We already supported a part of MQ features, but you know it’s not enough to use MQ for daily work. So I had to open command prompt.
TotoiseHg Manual is well written documentation expected MQ features since I didn’t describe it… I hope you learn MQ support of TortoriseHg with this article.
/* Introduction */
This series is a tutorial for greasemonkey script Flickr Fav Set introduced in previous blog entry. In this tutorial, I’d like to explain about the overview of user interface, creating new FavSet and add your favorites to FavSet.
If you didn’t installed the script yet or don’t know about Flickr Fav Set, please see this entry first.
/* How does it work ? */
Using this greasemonkey script, you can manage your favorites with “FavSet” (likes “Set” or “Category”) on Flickr.
In Flickr, the user can put star mark “Favorite” on a photo taken by other peoples. However, it’s difficult to look for favorite one since we have a lot of favorite photos. So I created this.