Archive for January, 2008

30th Jan 2008

VensterCE: Hello World

In keeping with tradition, lets start off with a simple “hello world”

from venster.ce import *
msg = MessageBox(None,u"Hello World",u"Venster Says",MB_OK);

First line:

from venster.ce import *

This merely includes the basic functions and classes from the venster library. We will use this in every program.

msg = MessageBox(None,u"Hello World",u"Venster Says",MB_OK);

Here create a simple messagebox and store the return value in the variable “msg”. The function definition for MessageBox is MessageBox(window,message,title,buttons). Here the parent window is None, as we haven’t created one (It’s ok, windows can handle that). Next are the Message and Title strings, but make sure you keep them unicode (bad things can happen if you dont). The “buttons” variable is combination of flags. A few popular ones are MB_OK, MB_OKCANCEL, and MB_HELP for buttons, and MB_ICONWARNING and MB_ICONINFORMATION for the icon. For a full reference of the different flags, go Here.

Posted in axim, c, how-to, pocketpc, ubuntu, windows mobile | No Comments »

24th Jan 2008

VensterCE: installation

To use the vensterce library you first need python, so (If you haven’t already) go ahead to the PythonCE Download Page and get either the installer or the CAB file (you choose :). Then you can fetch VensterCE zip archive from here. Inside that zip file you will find several things:

  • “venster”: this folder is the actual library. Copy it into your python library (Usually \Program Files\Python25\Lib\
  • “tutorial”: here is contained 5 “tutorial” files along with an html page describing them, although I’ve found this “tutorial” to be more of a quick-start for those already proficient with C++ win32 programming
  • the contents of the “shared” folder need to be copied into the \Windows directory on your device.
  • “pyceide”: this is an advanced python IDE, built in VensterCE. All you need to do is double-click on the “pyceide.pyw” file and it will run.

That should be all that’s necessary. From now on you can “import venster”.

Posted in how-to, pocketpc, python, windows mobile | No Comments »

22nd Jan 2008

VensterCE: Native Win32 Api for PythonCE

VensterCE is an open source wrapper of the native win32 controls on a windows mobile device (i believe its also available for regular windows…but its not as good as the win32api module). Its a cool project, but the tutorials provided give a good idea of what it can do, but don’t actually help you understand how to make your own. This can be a big challenge for those win32 noobs out there (hey, i was one too…about a month ago ;), so i decided to start a tutorial series to help out, and teach myself something in the process.

Posted in axim, pocketpc, python, windows mobile | No Comments »

21st Jan 2008

Ubuntu Locked Folders

The quick and simple way to “unlock” a locked folder in (k)ubuntu and probably most *nix.

$ sudo chown yourusername: /path/to/locked/folder

If the folder isn’t locked by root, i believe this will work:

$ su owneruname chown yourusername: /path/to/locked/folder

(source: http://ubuntu-utah.ubuntuforums.org/showthread.php?t=642406)

Posted in how-to, ubuntu | No Comments »

21st Jan 2008

Kubuntu Gutsy mount error

I finally got around to installing Gutsy on my PC, and was aghast that it gave me errors while trying to mount an external drive! I thought, how could an os exist that couldnt mount drives? The error I got was “hal-storage-fixed-mount refused uid 999″. After poking about online a bit, however, I found how to fix it:
go to System Settings>advanced tab>Disks and Filesystems
There you can find the offending drives, and click modify (you need to to be in ‘administrator mode’). There, give it a mount point (just make up a name, eg /dev/myhdd), make sure “writeable” and “enable at startup” are checked, and select “anyone may enable/disable at anytime”. Then you’re done!
http://languor.us/hal-storage-fixed-mount-refused-uid-1000

Posted in how-to, ubuntu | No Comments »