Skip to main content

Posts

Showing posts from 2012

Finally Android version 4

Thank you Samsung! My Samsung Galaxy Tab finally got upgraded to Android 4 (4.0.4). For too long I have lived with version 3 which in my opinion was a major mistake from Google. The tab feels a lot quicker in graphics and responsiveness. But I still don't understand why there is a need for a screen-dump-button in the lower button menu. How often do you need to take a screen dump?

Changing development environment

Due to a couple of reasons, but mainly because my computer has been reinstalled, I had to setup a new development environment for my LegLogger web application. My choice was to either continue using myeclipse , or to install a plain eclipse. My choice fell on plain eclipse because it’s free and I don’t get too many functions I won’t use. The setup of my different Android projects was no problem but the web application were more troublesome.   I realized that creating a web application with myeclipse (as I did some years ago when I first created the LegLogger web) is very easy and the environment do have some nice features that are missing from the plain eclipse. However, and this is the main problem I think, you don’t get the full control of which jar packages are needed and used by the application. Sure, it’s nice to click “Use Hibernate” and everything just works, but then you don’t know which packages are required for Hibernate to work.   So I had to spend a couple of hours fig

REST

I have just started to look at REST and how to use it in future projects. The list below are just some of the sites I have visited and found interesting: Building Web Services the REST Way How-to: REST Web services demystified

Windows touch command

If you like the unix command touch and want to to something similar in Windows, i.e. change the time stamp of a file, then there is not built-in command for that. Instead use the copy command like this: copy /b foo.txt +,, If you really want a touch command, then place it in a batch file called touch...

Show tooltip on disabled control

By default are tooltips not showing on disabled controls, but sometimes you want to inform the user about why the control is disabled. Simple add ToolTipService.ShowOnDisabled="true" to the control and the tooltip will always be visible. Example: <Button Content="Example" ToolTipService.ShowOnDisabled="True" /> See more at Microsoft MSDN .

File organization of a WPF project

A few months ago I started with a new project at work. The goal is to create a design tool for warehouses and the application will be running on the Windows platform. After the design choice landed on WPF I started to think about the project’s file structure. This is my first Windows application that is not build on Windows Forms but on WPF. The design tool is not that big of an application, so I think my tips in this article will suit small to medium sized applications well. First of all, how should the application be organized on the highest level? Does the application consist of only one executable file, or one executable file and several assemblies (e.g. DLL files)? For instance, the design tool has an output functionality that formats the warehouse data to a specific protocol and then uploads it to an embedded computer. The output functionality could well be located in a separate project (i.e. an assembly) that is referenced in the main application’s project. How should the m

Visual Studio crashes when trying to adding/edit a macro

Some days ago I wanted to add a macro to my new installation of MS Visual Studio 2010 and I received the following error message: Cannot find one or more components. Please reinstall the application. The installation of Visual Studion seems corrupt. After some digging I found the solution and only needed to repair the installation, and not to do a complete re-installation. Follow the instructions at this site  if you experience the same problem. If the link is broken, this is what to do: Delete the following file: * On a 64-bit operating system: "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\Common7\IDE\1033\Microsoft.VSDesignerUI.dll" * On a 32-bit operating system: "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\1033\Microsoft.VSDesignerUI.dll" On the Add or Remove programs page, select Uninstall/Change Visual Studio 2010 and then click Next. Select Add or Remove features. Clear and then re-select any of the features in the list. This caus

Problem updating the Android SDK in Eclipse

When updating the Android SDK from the Android SDK Manager in Eclipse you may encounter an error with the following message: -= warning! =- A folder failed to be renamed or moved. On Windows this typically means that a program Is using that Folder (for example Windows Explorer or your anti-virus software.) Please momentarily deactivate your anti-virus software. Please also close any running programs that may be accessing the directory 'C:\opt\android-sdk-windows-1.5_r3\tools'. When ready, press YES to try again. Many forums suggests to disable the antivirus software and retry, but that didn't work for me. The solution turned out to be very simple. Close Eclipse, open a command prompt and navigate to the tools folder of your Android SDK, in my case C:\opt\android-sdk-windows-1.5_r3\tools. Then give the command: android update sdk The environment will now be updated.

How to update a database

Keeping a database's structure up to date can be a rather complicated task. If one is maintaining a web server then it's at first sight a simple task of updating the database when the server is updated. But what to do when the web server is the actual product delivered to customers? Another problem is perhaps more obvious, the product is an application that gets regular updates with bug fixes or new features. Read my full article at The Code Project .

A WPF book I recommended

I have just started to develop a new application together with my customer and we are going to use the Windows Presentation Framework (WPF) and .NET 4. Since this is new to me I needed some literature in the subject. One book I have used is WPF 4 Unleashed by Adam Nathan (ISBN 978-0-672-33119-0). I can very much recommend this book. The reader must be familiar with the .NET framework and C#; no time is spent in describing .NET or programming in general. Together with Google this book will help you when developing WPF applications.