Thursday, May 13, 2010

Microsoft Surface - Accessing Usercontrol in WpfUserControlLibrary

The .dll file of the WpfUserControlLibrary should be added to Surface main window, to be able to make an instances of the user controls inside the project.

Microsoft Surface - Inconsistent accessibility error

I used to get this error, when I was trying to make an object instance for a class that I already created. So by recheck the class, I found out that it was missing the access modifier which is public.


Monday, May 3, 2010

$GOBIN is not a directory or doesn't exist

Proceeding with the google go tutorial, write the following commands:
cd $GOROOT/src --> this should show that you are inside the folder go/src
./all.bash ..> if this command display the following message:
$GOBIN is not a directory or doesn't exist

Then, go to the go/src folder and create a new folder and name it bin, as previously in the environment variable, we set the GOBIN=/home/dinahelmy/go/bin, and the bin folder is not there, then just create it and write again ./all.bash command once more. If it works fine, we will get something like that at the end: 3 known bugs; 0 unexpected bugs


Setting Google Go Environment Variables Permanently on Ubuntu

If you are intending to use google go frequently, then it is better to set the environment variables once and for all, because if you followed google go tutorial which is avaliable at: http://golang.org/doc/install.html, once you close your terminal, you have to reset all the environment variables again as they are gone.

Here is how you can do that just type this in your terminal: sudo gedit ~/.bashrc, this command allow editing in the bashrc file. Because of the way Ubuntu currently sets up the various script files by default, this may be the easiest place to set variables in. The default configuration nearly guarantees that this file will be executed in each and every invocation of bash as well as while logging in to the graphical environment. However, performance-wise this may not be the best thing to do since it will cause values to be unnecessarily set many times.

So at the end of bashrc type these commands and save the file:

#GLOBAL ENV_VAR
export GOROOT=$HOME/go
export GOARCH=386
export GOOS=linux
export GOBIN=$HOME/go/bin
export PATH=$PATH:$GOBIN
export PATH=$PATH:$HOME/go/src/cmd/8g


After that restart your computer to allow changes to take place. In order to make sure that the environment variable are really set, type this in your terminal after the restart: env | grep '^GO'. If it works you will see the environment variables list as that:

GOBIN=/home/dinahelmy/go/bin
GOARCH=386
GOROOT=/home/dinahelmy/go
GOOS=linux