![]() |
![]() |
![]() |
![]() |
Spotlet code areas
The properties notebooks for the Spotlet also have a page titled Class. This page contains code areas for user code. These code areas include
- declaration code This code area should be used to declare any static variables or instance variables that a program may need. Any Java statement which is legal to exist within the outermost scope of a Java class can be put here.
- constructor code This code area should be used for any additional initialization code that a class may need. Any legal Java statements may be placed here. This code will be appended to the class constructor.
- method code This code area should be used to declare any static methods or instance methods that a program may need.
A Spotlet Composer will also have code areas for the special methods of a Spotlet. These code areas include
- pen events This code area can be used to write code which will execute whenever a penDown, penUp, or penMoved event occurs.
- key down This code area can be used to write code which will execute whenever a key is pressed. Key presses include text entry via Graffiti(TM) as well as the hard buttons (e.g. calendar, phone...) and the soft buttons (home, calculator...) on a Palm OS Platform based handheld computer. New Spotlets will have several lines of code in this area. The code may be used to perform different tasks depending upon which key has been pressed. This code has been set up to exit the program when the "Home" key is pressed. This code may be changed or deleted as desired.
- paint This code area can be used to add code to the paint convenience method which will be added to every Spotlet that Simplicity creates.
- beam receive This code area can be used to write code which will execute whenever the Spotlet receives a "beam" event, or infrared signal from another Palm OS Platform based handheld computer. This event can be simulated by choosing 'Send Beam Event' from the Options menu of the Emulator.
- dialog dismissed This code area can be used to write code which will execute whenever the Spotlet regains control from a Dialog.
Many of these code areas can be also be reached using the Code menu in the Composer.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |