Last update: 11 September 1997 Illya Vaes Martin Luther Kingstate 23 6716 NA Ede The Netherlands ivaes@hr.nl (work; this was/is a free time project) Welcome to beta 5, the first public beta, of Tcl 7.5/Tk 4.1 for OS/2 PM. This is a binary-only beta release, full source code will be provided upon release of the final version. Installation: Unzip the archive, making sure directories are preserved (PKzip needs -d). As long as the binaries (tclsh75.exe and wish41.exe) are started in the \TclTk\bin directory, you don't need to do anything else. If you want to be able to start them from anywhere, you have to put the directory in your path or put the executables in a directory that already is in your PATH (and the DLLs in your LIBPATH). In such a case, it becomes quite likely that Tcl will not be able to find out the location of its library by itself, so you're recommended to add environment variables for those to you CONFIG.SYS (if you want them to persist, that is), e.g. SET TCL_LIBRARY=E:/TclTk/lib/tcl and TK_LIBRARY=E:/TclTk/lib/tk. Paths in Tcl/Tk use _forward_ slashes, in this port too! You can change to a different drive (and, if you like to a different directory there at the same time) by saying e.g. "cd e:/tk4.1/os2". This port has been compiled with EMX 0.9b, and requires its EMXLIBCM.DLL and EMX.DLL (or those of a higher version). Kudos to Eberhard Mattes for EMX. NOTES ===== - Because of difference in fonts and such, layout of scripts may turn out wrong. This includes the test script hscale.tcl for instance, where the arrow that follows the scale starts further to the left than the scale. Changing the "-wraplength" option to the label $w.msg from 3.5i to 300 makes it (approx.) correct. HISTORICAL CHANGES ================== Beta 5 - 11 sept.1997 ------ - Unlike the Windows port ;-), the functionality of stippling for ARCs is implemented. - Fixed inconsistency and typo in tkOS2Pointer.c wrt. Y coordinate lastMousePos. - The format of $tcl_platform(os) has been modified again to make them more logical though now the array elements for platform and OS return the same, ie. "OS/2"; Other values: osVersion e.g. "4.0", machine "intel". Similarly, "winfo server ." returns e.g. "OS/2 4.0". No marketing names (Warp) allowed here... - Menus appear at the correct height (aligned with bottom of button). - Binding to ALT works. NB: A binding is case-sensitive: Control-Shift-x will not match anything while Control-Shift-X will. The latter is equivalent to Control-X, since you will only get X (not x) by pressing Shift. - Withdrawn windows completely disappear, ie. from the task list. - Stippling works (apart from stippled ARCs, which don't get stippled in the Windows port either). - Windows port did not look at GC values for CapStyle, JoinStyle, LineStyle. This port does. - Lines have (specified) width. This needs the "geometric line width" in OS/2, which is only used by GpiStrokePath (and GpiModifyPath), so use that. - Ctrl-X and the likes work. - Focus problem after grab fixed. I was too correct in following the "Results" section for XGrabPointer, which says to return AlreadyGrabbed if the grab didn't succeed. This should be ignored, like in the Windows version, and GrabSuccess should always be returned. (Font patch by Ilya Zakharevich assimilated) - Fonts (sigh ;-}): calculation of size was wrong. Furthermore, because of unclear / confusing GPI programming info, the check of the sizes of the available fonts wasn't done on the right value. It turns out you have to *request* the size via the lMaxBaselineExt member, while the actually used value is in lEmHeight. Am I dense or what?? Actually, the returned nominal pointsize is OK. Compile-time option (via #define) provided for ignoring a PM-provided font resolution of 120dpi, taking 96dpi instead, which is the resolution in VGA and upto ?800x600?; requested by Ilya Zakharevich. - Color images now work, including those that get split up into several before drawing (LCOLF_RGB instead of LCOLF_CONSECRGB in GpiCreateLogColorTable; LCOLF_CONSECRGB should (only) be used with Palette Manager). - Width calculation of fonts improved by using TXTBOX_BOTTOMRIGHT instead of TXTBOX_CONCAT. - Tcl: File globbing was broken because DosQueryPathInfo doesn't like ".\" for the file/directory argument. Similarly, directories weren't seen. - "option readfile" wasn't succesful with OS/2 files, but was with an .Xdefaults copied from Linux. Choked on the Return&Newline being replaced by just the Newline, yielding a "nr.of chars read" smaller than the file size, aborting the entire process. Fix necessitated changing the generic file tkOption.c, function ReadOptionFile with part of Tcl_ReadCmd from tclIOUtil.c (Tcl 7.5). Fixed by Tcl team in Tk 4.2. - Compile time option (set in makefile.emx) to use "9.WarpSans" as default font. Beta 4 ------ - A "wm withdraw" now also works when running or sourcing a script (i.e. mapping/creating in withdrawn state). Switching to a withdrawn window (eg. by using the task list) works okay. Previously only a "wm deiconify" would do the trick of exposing the client area (restoring contents). - Resizing in vertical direction fixed. When resizing to a smaller height with a menu bar involved, the menu bar disappeared (partly or entirely, depending on the size). Cause was the use of CS_SIZEREDRAW for child windows. - The default screen name is determined from the DISPLAY environment variable, if available, so scripts asking for toplevels with -screen don't abort (and any toplevels without specifying a screen in an invocation of wish with the -screen argument). - Double-clicking now works correctly, OS/2 PM's WM_BUTTONxDBLCLK messages get changed to both a ButtonDown and a ButtonUp event. - Fonts changed again. Presentation Parameter-style specification now fully supported: PointSize.FontName[.Attribute][.Attribute]... where Attribute is one of bold, italic, outline, strikeout, underline. Some fonts (eg. -*-Helvetica-Bold-R-Normal-*-240-*-*-*-*-*-*) didn't show up. This was because they were scaled to pointsize 0 because the 240 is in the "pixels" spot, which should be a substitute for the point size (or at least was in the Windows version), but wasn't implemented identically. An explicit point size will override it. The ascenders and descenders of scalable fonts are fixed, so they won't get progressively larger when enlarging the font. - Double ckfree because of WM_DESTROY message (caused by WinDestroyWindow in XDestroyWindow, tkOS2Window.c) fixed, care of sleuthing by Ilya Zakharevich. - Resizing works, wm minsize and wm maxsize likewise. Beta 3 ------ - Merged resources for additional pointers into the DLL. - Clicking in the console gets the focus now too (previously, only clicking the titlebar worked). - Fonts work a little bit more correct. ;-) Height, width and actually used pointsize are correct now. Without special handling, every scalable font is of point size 12! Code by Ilya Zakharevich (ilya@math.ohio-state.edu) incorporated into tkOS2Font.c, enabling the use of e.g. "10.Courier". - Images work. Funnily, they are (exquisite) greyscale on a 64K display but color on a 256 palette management. The OS/2 part is doing what Tk tells it to with regard to color though, it just gets handed grey values, so I have to assume it is working as advertised. - 'exec' was broken in Beta 2. Fixed. PM apps should be exec-ed with '&' unless they are very short-lived. Tclsh will be "listening" for output from the app and this will "lock up the queue" because of the single-threadedness. - The format of $tcl_platform(os) has been modified slightly; return values are now "Warp 3" and "Warp 4" instead of "Warp v3" and "Warp 4 (Merlin)". Other values: platform "OS/2", osVersion e.g. "4.0", machine "intel". - Temporary files are cleaned up when closed by specifying a DosClose wrapper to be called on file closure. - Humongous memory leak in TkOS2SelectPalette fixed. Beta 2 ------ - Font selection works correctly now, so that any font available through the font dialog is available. It first determines all fonts in the system (#ifdef DEBUG) / all fonts with the specified facename (#ifndef DEBUG) via GpiQueryFonts and then determines the most suitable font based on the size. Preference is given to bitmap fonts over outline (scalable) fonts for purposes of performance in using the font. When many fonts of the same facename exist, the scalable one is at the start of the "list" and the correctly sized bitmap font is at the end of the "list", this may exact a performance penalty at the time of determining the font. This is a small one-time penalty though. Fonts with a '-' in their name have to be specified by length-3-array (eg. "Conga-Normal 180 normal"). To not get stuck with a default font (ie Courier), you will need to use font names that OS/2 knows *and* use the right case: helvetica -> Helvetica or Helv Times -> Times New Roman or Tms Rmn (eg: ... -font "-Adobe-Times New Roman-medium-r-normal-*-180-*-*-*-*-*-*" ) - Colors on non-Palette management system work. Not tested on VGA but you will not get any better there... - Choosing "Close" (Alt-F4) on a torn-off menu or otherwise non-"main" window will only close that particular window, not the whole application. Beta 1 ------ No record has been maintained for bugfixes previous to this. THANKS TO ========= - Ilya Zakharevich for his critical testing. - Anna Chiara Bellini for putting an FTP server at my disposal. - Anyone not named that has assisted by beta testing and/or doing suggestions. BUGS ==== - First (?) bitmap gets reversed. Color for stippling also exhibits non- reliable behaviour, sometimes reversed, sometimes dull/bright... - There may be a timing bug (going into EMXLIBCM) that manifests itself when compiling without any debugging code. It may also be an interaction with eg. network drivers, since this happens with running code at work that was compiled at home. - Socket code has NOT been tested very much, and is likely to either not work or contain bugs... TO DO (?) (Extending port) ========================== - Have Shift-Insert, Shift-Delete and Ctrl-Insert act on clipboard. This means extending the "Tk Clipboard" only approach to use PRIMARY and/or SECONDARY too. Just replacing CLIPBOARD with PRIMARY has Shift-Insert working. - Global Grab doesn't turn pointer into clock outside of dialog. Possible?? - Make button 2 and 3 of the mouse switchable. To OS/2, button 2 is the right mouse button and generates a WM_BUTTON2* message, 3 is an optional middle mouse button (WM_BUTTON3*). For X, and thus XFree86 in an OS/2 Full Screen session, button 2 is the ("always available") middle button and 3 the right. - Implement a "send", either via DDE or via Pipes/Queues? - Multithreading (dual-threading: one extra thread for the message queue to stay responding to the system, coomunicating with the one that now exists which might be computing for a longer time). - The list of occupied logical font IDs is a straight array. This method will leave "holes" when freeing another font than the last one. Solution: convert to a linked list or use Tcl's hash table mechanism.