[Windows Mobile Software Development] poyensa:
I have made the following changes:

* In file 30182CB6_manila (mode9) i have changed the name of the variables CHTWNotes1_Graphic1 & CHTWNotes1_Text1. I also have changed CHTWNotes1_Component - CHTWNotes1_Group - CHTWNotes1_ResizeLayer

* In file chtwidgetdev.lua I have then substitute every PoyTEST by CHTWNotes1 to match with the variables previously created. It is very interesting the use of the function find & replace in Notepad2 Also i have replaced CHWNotes1_Graphic1 & CHTWNotes1_Text1 where it was the previous variables.

* In ChtWidgetDev.lua - line 64 I have changed the name of the file:

require("Home\\Scripts\\Home\\CHTWNotes1")

Thats is going to be the new name for the file PoyTEST.lua, where the behaviour of the widget will be defined. Also got the Hash name:

* Working now on PoyTEST.lua lets change also every PoyTEST by CHTWNotes1 (*), and also lets chage the variables PoyText1 & PoyGraphic1 by CHTWNotes1_Text1 & CHTWNotes1_Graphic1 respectively. Again 'find & replace' function of notepad2 is very useful.

(*) No need to change line 25, we are keeping the qtc file 1F88A376_manila, even its not very nice ...

Just for reference we will change line 1 with the new names of this file (you can see it in green color so its not activated for the widget, just reminder)

* Save as CHTWNotes1.lua

* Now have to edit the file _Deploy_to_device_in_dev_mode.bat & _Generate_files_for_cab.bat with the new names 56752DB4_manila & CHTWNotes1.lua

* Lets try the widget CHTWNotes1. It should work as PoyTEST because nothing has changed just renamed. Activate DevMode, restart sense, run _Deploy_to_device_in_dev_mode.bat and activate the widget in edit mode-add new widget

* If sense crashed then check that all the variables are correctly written, in all files.

* If everything is OK lets going to add some useful functions to this widget, working now on the CHTWNotes1.lua file. The idea -you have guessed allready- is to make a Note-Widget for CHT.

* Lines 27-29 about translation is not useful for this widget so deactivate with -- at the begining of the line so green coloured. Delete file PoyTESTtranslation.lua if you haven't done yet. Everytime you make a change, run the file _Deploy_to_device_in_dev_mode.bat (do not forget to save the changes in CHTWNotes1.lua previously) thats the quickest way to advance, step-by-step. Its good idea also to frequently save the full kitchen as baseline.

* variable CHTWNotes1_graphic1 will be always the same (users can change it later by editing the qtc file 1F88A376_manila with CFC_GUI) so can the texture can be defined in mode9 file. Anyway we will leave that there just change the line close to other properties for this variable (below line 24)

* What we want is to easily change the variable CHTWNotes1_Text1 in a way that shows notes in the screen of our devices, as seen in this screenshot I dont find many 'inputs-variables' in Sense, in a way to write directly in there. Actually I am slowly looking into internetportal.mode9 (021adf6f_manila) and internetportal.luac (62ece951_manila) [99% decompiled by Manila CMD Kitchen Environment] trying to know how i can write directly in the variable by pressing the widget, as the internet search bar actually does, but still didnt get the right code ...

* Lets go for plan B meanwhile, using the registry We need here the invaluable help of Dunc0001

So lines 31 and below will be as follow:

So we define the function Handle_CHTWNotes1 = function() for wich some properties of the variable CHTWNotes1_Text1 will be set as referenced to the registry HKCU\Software\HTC\Manila\CHT.Notes1

GetCHTSettingString("Notes1.Text", "write here your note") gets the string from HKCU\Software\HTC\Manila\CHT.Notes1.Text, if it does not exist then asign "write here your note" by default

GetCHTSettingInt("Notes1.FontSize", 8, 64, 22) get the integer value from the registry HKCU\Software\HTC\Manila\CHT.Notes1.FontSize, minimum value = 8 Maximum value = 64, default value = 22

GetCHTSettingColor("Notes1.Color", "0,0,0") get the rgb code for the color property from registry HKCU\Software\HTC\Manila\CHT.Notes1.Color, or give value 0,0,0 (black) by default

Then call it by Handle_CHTWNotes1()

and then set the update (GetValueChangedEvent) call

_application.Store:GetValueChangedEvent(Lifetime_Permanent, "CHT.Notes1.FontSize"):connect(Handle_CHTWNotes1)

_application.Store:GetValueChangedEvent(Lifetime_Permanent, "CHT.Notes1.Color"):connect(Handle_CHTWNotes1)

_application.Store:GetValueChangedEvent(Lifetime_Permanent, "CHT.Notes1.Text"):connect(Handle_CHTWNotes1)

Its a good time to save and test the changes ...

We have made half of the work, read from the registry. How to write there easily? Maybe there's many ways to write in the registry using lua files (USING INPUT VARIABLES), but i dont know them. Right now i am trying JMLMenuSense ....