[Windows Mobile Software Development] Dunc001:
So here are a few little things I have gathered over the last few months which I have found useful.

The ManilaHash.txt contains two lines of text for you to cut and paste into Manila Hash which you need to generate the correct manila filenames for your widget scripts and qtc image files. Just open Manila Hash, open the txt, copy and paste the relevant line into MH and alter the last bit to your image/script name. Then click Get Manila and you'll have your unique manila filename. Then highlight the hashed name, right click and copy. If it is the name for your widget script you are generating you then need to use this in the two bat files (Deploy to device in dev mode/Generate files for cab) before you run either bat - right click and Edit and you'll see something like this:

@echo off
pushd tools

luatool /c -o ..\deploy\7D241726_manila ..\Workspace\_lua\chtwidgetdev.lua
luatool /c -o ..\deploy\3DFA729F_manila ..\Workspace\_lua\dunchexclock.lua

copy ..\Workspace\mode9\*.* ..\deploy >nul
copy ..\Workspace\qtc\*.* ..\deploy >nul
copy ..\Workspace\png\*.* ..\deploy >nul
copy ..\Workspace\locales\*.* ..\deploy >nul
copy ..\Workspace\CHTS\*.* ..\deploy >nul

rapicopy -d -e -s ..\deploy \windows

rapistart restartmanila.exe

del /q /s ..\deploy\*.* >nul

pause

NB - The bat files included in the widget kitchen contain notation by co0kie but the code above shows the actual active parts of the bat.

The line you need to change is this one:

luatool /c -o ..\deploy\3DFA729F_manila ..\Workspace\_lua\dunchexclock.lua

Change the manila name to the one you just generated for the script (highlight/paste from MH) and change the script name to whatever name you are giving your widget script. BTW confusing as it may seem the hashed name is generated using .luac and the bat refers to it as .lua - this is correct!

Also for reference you should also edit the first line in your widget script to show the correct script name and hashed manila filename. Incidentally you'll notice this line in the script has -- at the start. This basically 'disables' the line so it becomes for reference only. This is handy during testing because you can remove elements from use without actually removing the text from the script, so they are easy to add back in later. If you are using Notepad2 which is in the tools folder (and I strongly recommend you do because it is specifically formatted for editing these scripts) you'll see that lines beginning with -- appear in green so you can easily identify inactive lines.

If you have generated a hashed name for a qtc file then simply copy the name, right click on your qtc file and Rename, highlight current filename and paste.

Widget mode9 Filenames.txt contains the hashed filenames for the mode9 files of each widget depending on which widget slot it is installed into. The mode9 and WidgetDev.lua filenames are generated during install depending on the slot number so you will need these if you are going to edit the mode9 after you have actually installed a widget (not relevant if you are still working on it in dev mode). You can also use this list to locate the mode9 file for any widgets you already have installed but which you may want to take a look at for reference or edit.

LUA Ref v5.1.pdf is a really useful quick reference guide for lua syntax, but before you get in a spin trying to get your head around lua for the first time I would strongly recommend reading this BEGINNERS GUIDE. There are many online references including the main LUA Reference Manual (there's a link to it in the site I've just linked to) but this one gives an easy to follow guide to the basics so read it first!

rat_2665's CHTAddon Dev Mode Switch - adds a new toggle switch in the CHT Toggle Switches list. Works like every other toggle to activate/deactivate Dev Mode rather than having to do it manually with a registry editor. Just toggle on/off and soft reset after each change to enter/leave Dev Mode. I'm sure rat won't mind me posting this here - it's all his work so all credit to him for this one :cool: - but it really is a timesaver when you are developing!

One final word of advice/experience - when you are first starting out on developing widgets it can be very VERY frustrating, especially if like me you have absolutely no previous experience of coding. However we are all here to help -that's what this community is all about. If you have a problem just ask. And be prepared for many many Sense crashes and resets! But hey, that's what dev mode is there for - another of co0kies little flashes of genius!

Right, that's just to give you all a hand with some basics! We are now open for business - ASK AWAY :cool: