Changes in SuperWaba 3.21 1. fixed problem in Exegen not finding stub.prc in MacOS. . fixed problems in examples\wgl. 2. fixed bug in String.indexOf 3. fixed bug in Exegen when showing the deprecated parameter message. 4. fixed bug when the user uses a 24bpp bitmap icon. Now it gives a fatal error in ExeGen. 5. fixed bug when menu items were disabled and checked at the same time. 6. optimized the MenuBar class by replacing a big "if" for bounds check by an (ArrayIndexOutOfBounds)Exception 7. optimized IntVector.isBitSet and setBit to use >> instead of / and & instead of % 8. new method IntVector.ensureBit to add enough elements to the array so it can safely use the two bit-array already provided methods. . fixed makeex.bat and rundemoex.bat so you can use it with your own programs. See the SW faq for more details . new examples/TestCatalog. . new examples/ImportTxt to convert a txt to a pdb file . now you can specify 'ignore' in exeparams and warpparams to ignore them (from make.bat file) 9. anodos fixed the "blank screen" bug that happens in some JDKs. 10. optimized JDK drawings in 30%. 11. added Frank Diebolt fixes in str2int in SuperWaba.c. 12. fixed bug when in PopList when the window was moved and the cursor was being drawn in a wrong position Changes in SuperWaba 3.2 Please read the items marked with ! carefully; they mean compatibility breaks! ! removed all deprecated methods in the SDK! . Graphics.setColor(r,g,b). Use Graphics.setForeColor and setBackColor instead . Vm.isColor, Vm.getPlatform, Vm.getUserName, Vm.getVersion: use Settings public members instead . Vm.setSystemKeysUse: use Vm.interceptSystemKeys(intercept?SK_ALL:SK_NONE) instead . Vm.setTrace. Use a Java IDE to debug your code instead . Math.random. Use waba.util.Random instead 1. added support for specifying a Jar file for Warp. It will read the jar file and get all .class and .bmp. ! removed ext/xplat/retroguard. Placed Jopt.jar directly in /superwaba/bin directory (note: Jopt makes the VM classes 5kb smaller than Retroguard) . removed support for jdk 1.1.x in make.bat files. You must use jdk 1.2.2 or superior. 2. added java.lang.ClassCastException. . note: although you can use ClassCastException, the use of instanceof is faster. 3. removed an old constructor (and not more used) for class String(String [], n) 4. Optimized String, StringBuffer and Convert classes. Note: some methods of String and StringBuffer are now native directly, because in the desktop they are substituted by the JDK java.lang package. . Next are some results of this optimization (running in PalmIIIc): s1 = "1234567890abcdefghijklmnopqrstuvwxyz"; s2 = "1234567890abcdefghijklmnopqrstuvwxyy"; for (i =0; i < 30000; i ++) s1.hashCode(); for (i =0; i < 30000; i ++) s1.compareTo(s2); for (i =0; i < 30000; i ++) s1.equals(s2); SW 3.1 SW 3.2 (after optimizations) hashCode : 147.860 16.280 compareTo: 178.000 17.110 equals : 172.160 17.140 5. added new type: UtfString16 and stringToUtf16, where this one returns a pointer directly to the char array in memory (uint16). 6. String.indexOf(String) now correctly handles 16 bit chars. 7. fixed bug in VM that was issuing "method called on array" when a class was missing. Now it correctly issues a RuntimeException: Class not found 8. changed initial StringBuffer buffer increment from 16 to 10. This saves time and memory 9. Added Andy DePue (Sir Anodos) code to implement a blocking Modal blocking window. . new method Window.pumpEvents. new method Event.isAvailable. Used in blocking modals. 10. fixed triple painting in start of program in PocketPC. I hope this change don't affect other devices. 11. Added support for Sony's and Handera's jogdial. When other devices that has jogdial appear, i'll add support for it (after being informed :-) ). See IKeys.JOG_xxx. 12. fixed "Function WinGetBitmap does not exist in this PalmOS version" that freezes POSE and PalmOS < 3.5 devices. ! removed Palette.fade method. 13. added color icon support for Palm OS applications. Please note that the Palm OS icons must have the web-safe-palette or some colors will change, since Palm OS does not stores the palette in the icon. 14. added icon and version support for Windows CE applications. Notes for 13, 14 and regarding Exegen: . /!, /i, /j parameters don't work anymore. Its use will break the Exegen. . icons are now scanned in the directory: first, in the current dir, after in the classpath. It will scan for files icon15x9x1.bmp, icon15x9x8.bmp, icon16x16x4.bmp, icon22x22x1.bmp, icon22x22x8.bmp, icon32x32x1.bmp, icon32x32x4.bmp, icon32x32x8.bmp, icon48x48x8.bmp. You may not provide all the files; the default icons will be used instead. . the .lnk file isnt created anymore. To create the 8 exe files for Windows CE, specify /e. This will create a dir structure like the one under /superwaba/bin/ce with the user's exe file. . Note that as default Windows CE exe files are *not* generated. 15. lots of optimizations, specialy on method call. optimized a sum by doing an assumption that no sum would ever get above 300 (VM) . A comparision between SW 3.11 and 3.2 with the current optimizations, running the Bench program: native methods, loop, field, methods, array, string 3.11 : 42650, 15020, 2710, 7740, 50470, 14960 (133550) 3.2 : 38840, 13840, 2700, 6660, 50470, 9570 (122080) ~ 9.4% faster 16. removed Vm.setTrace. There's no more need for it. 17. fixed bug in ComboBox when an item was added, selected but not made visible. 18. Added Kambiz Darabi code to fix 'user' bug when he tries to popup a window using a not recommended approach 19. Made Calculator.clear public as a request of Po-Chuan Lin and also added code to set the first edit with focus. 20. Added code in Calculator.postPopup to check not only if the field isnt empty, but also if its value is valid. 21. Added Andrew Fedoniouk fixes to avoid a bug in Win CE devices. 22. Added Michal Hobot changes to SerialPort at desktop. - lastError support - default receiveTimeout = 100 ms as on Palm - SerialPort.DEFAULT, IRCOMM, SIR, USB support, with mapping by file support. It works that way: There is a file swserial.properties which maps logical port names to physical ports, like this: IRCOMM=COM2 swserial.properties have to be put somewhere on classpath (ie in \superwaba\classes). - also, when user use port number like 1, 2, 3, ... SW scans port names available and chooses one that matches. That makes it compatible with different operating systems, like Windows ( COMx ), Windows CE ( COMx:), Linux (/dev/cua0x), Mac... Added new examples\SerialPipe: "For testing new serial support I made a simple app, called WabaSerialPipe. It logically connects two serial ports and passes all data between them, both directions. So, at first I ran it on my PC, "connecting" port COM1 my palmtop is connected to and port COM3 my internal modem is connected. After that, my palmtop "saw" the modem and I made an Internet connection from it. And i saw all data on Java console. After that, I ran the same software on my iPAQ, "connecting" its serial port to infrared port. After connecting it to PC, my PC saw data coming on infrared port of iPAQ. I could then connect my Nokia cell phone which has infrared but no serial cable to my computer which have serial but no infrared. That was cool!" 23. fixed bug at Serial manager for Handspring 3.5.2H3 devices. Enabling the keyboard 2 times was making an OS function fail. 24. fixed an array index out of bounds not being thrown in the some functions 25. removed the parameters dump in dumpStackTrace ! Removed some classes from WExtras. Those classes are: . ExtraMainWindow, List, Menu, MenuBar, Popup, PreferredSize, Title, RelativeContainer, Math . If you use any of these classes, please update your program to the ones provided by the SuperWaba SDK. . removed extra.io.builtin and placed it in superwaba.ext.palm.builtin, since they are specific for Palm OS. There's a new library, called PalmBuiltIn.pdb with those classes. ! Removed some classes from WGL. They are all the menu classes and: Integer, StatusDisplay, JDialog and JEdit. Also, reformatted the completely confused code and updated some methods for the SW api. Also removed all dependency on the WExtras extra.ui. Fixed files that were using System.out.println. Now the html files are created in a separate library, called wglhtml.pdb. I also cleaned up lots of code from Utilities class, that now belongs to the proper classes. 26. new Edit.setCapitaliseMode(ALL_NORMAL, ALL_LOWER, ALL_UPPER) to automaticaly convert text entered to upper/lower case. 27. removed setStatePosition in Keyboard.postPopup. 28. optimized and fixed edits.MultiEdit. Removed NewEdit* classes. Changed MultiEditMenu a little. Placed all in superwaba.ext.xplat.ui. . made ScrollBar.setValues public. It was, by mistake, package access. 29. fixed user bug when he tries to add a record in an invalid position. 30. ScrollBar.setMaximum and setValue now tests if the value being set is different to avoid recomputing params. 31. new public Control.setFocusLess method. If set to true, the control can receive pen events but not key/focus ones. Very useful to prevent a control from stealing focus. 32. changed Keyboard and Calculator class to use focusLess on its PushButtonGroups. Removed handlePenEvent. Changed Window class to not call handlePenEvent anymore. Why haven't i think about this before? :-) 33. added back the commandChr notification for PalmOS >= 3.5 that was removed by mistake. 34. new events Keyboard.KEYBOARD_ON_UNPOP and KEYBOARD_POST_UNPOP. Used to make possible the MultiEdit use the same Keyboard class of Edit. 35. new methods Window.getPreferredWidth/Height that will return the size based on current title/border. 36. Completely reestructured the packages under ext folder. Now javadocs are generated for classes under ext folder too, except for Date (too many javadocs warnings) and wgl (wgl follows a different design pattern which may confuse SW users). Renamed JTable to Grid and placed under xplat.ui. New folder apps that will store 3rd party applications and SW applications (like TTF2PDBs) . regarding DateRGF classes, i renamed all (removing RGF but keeping it in the package name) and also removed all JDK routines. . removed splash screen on waba.ui.Welcome. SDK is now occuping 290Kb. 37. made the 'items' Object array public in class Vector for fast access. . improved javadocs for SW classes. 38. replaced float values in io.gps classes by double values. 39. fixed Frame.requestFocus not checking if the applet was destroyed . did a correction in all examples to make sure they conform with the SuperWaba User Interface Design Guidelines. 40. fixed an error in WinCE classes on routines calling changeFileSize with the wrong parameter. This was resulting in an corrupted db. 41. added Michal Hobot code for Serial.readCheck under WinCE. Fixed documentation. 42. added Michal Hobot suggestions to map the Serial.IRCOMM,SIR,USB in Windows CE . created new paths under bin/palm/Libraries and bin/ce/Libraries. Moved PalmIoScanner.pdb, SWScanner.prc and PalmIoBuiltIn.pdb to bin/palm/Libraries 43. added operator ^ (exp) to waba.ui.Calculator. 44. Calculator: added new button "reuse" to copy the result into the first operator (good to continue the calculation) 45. added a flag to Calculator.clear. If you call it with (true) before the window is popped up, a trash will appear when the window is unpopped. 46. added support for ctrl+c, ctrl+x, ctrl+v in WinCE deviced for clipboard operations in Edit and MultiEdit (this one also supports ctrl+s(ave) and ctrl+r(estore)). 47. now command/control + space clears the Edit. 48. now in PocketPC, the done button is shown instead of the x button. Clicking on it terminates the application 49. now in WinCE/PocketPC, it uses the MSW fonts even if res > 320. 50. fixed the display of invalid chars in WinCE. . fixed bat files when dealing with parameter with spaces.