Robert; As always, THANKS. I'll check out your solution (probably) Monday.
Wrt your constants rework, did you run a timing study and comparison with the 'old' method. Someone (one of the unbelievers I'm sure) said that I should do it after I proposed that a binary search be used. Drat. I found that in the first few searches the existing algorithm was faster. As to the mph (Miles per Hour in the US and kph elsewhere), this is an algorithm of my own invention (chest out and proudly displaying my medals). It is written in C/C++. It does several things that have ne'er before seen the light of day. Assuming a keyword list of ASCII words (not strictly necessary): 1. Given a list of keywords, it selects the optimum set of columns to use to get a minimum height search tree. 2. Given the results of the prepass, it will generate a polynomial whose return value is an integer, 0 <= i < |# keywords| for each input keyword. Time studies need to be done to determine usefullness, rather than feasibility. I have searched the literature (in my spare time) and can't find any algorithms or solutions for either 1. or 2. above. My own solution was developed into a Master's project in 1990 but had one small flaw. The new algorithm corrects the flaw and should yield a polynomial. Since the problem is unsolved I would expect sceptics until I publish my solution (oh yea of little faith). But I have faith - hopefully not to be dashed. The literature search was in the Digital Library from the Association of Computing Machinery (ACM), and yielded 200 out of 1,200 citations. With respect to 'easily add constants to', why would I want to work myself out of a non-paying job??? No way. Sorry, For each new constant added (or removed) Steps 1 and 2 must be rerun. I can't do better than that. All the work is done at home in my spare time. The (current) hangup is that I have just finished rewriting my list processor (SLIP - Symmetric List Processor circa 1960) and now am developing test cases to validate its operation. Next is the prepass code and then the polynomial generator. art Robert May <[EMAIL PROTECTED] lara.co.uk To Arthur I Schwarz 12/16/2005 03:40 <[EMAIL PROTECTED] PM cc [EMAIL PROTECTED] forge.net Please respond to Subject [EMAIL PROTECTED] Re: [win32gui] ara.co.uk [perl-win32-gui-hackers] Win32::GUI::Dialog() failure Arthur I Schwarz wrote: I'm have partitioned my program into modules: > <name>::GUI > The program driver is in <name>: > <name>.anonymous subroutine (the nameless thing at the end) &StartWindows # &<name>::GUI::StartWindows > and <name>::GUI::StartWindows I do: > $window->show(); Win32::GUI::Dialog(); > The window displays correctly. All the pull down menus display correctly. Selecting any item in a pull down menu has no effect (the event seems to be unhandled). Selecting the big X in the window causes the window to close and control to return to the perl program. > The GUI did work with the same code before partitioning, all code in a single .pl file. My suspicion is that you are letting the variable that holds your menu object go out of scope, but with no code posted it's hard to tell. Try using 'our $menu = ...' rather than 'my $menu = ...' when you create the menu object. Letting things go out of scope is very easy to do when you split code into modules. On another note, I'm reworking my Minimal Perfect Hash function algorithm (from college). It is a deterministic algorithm that returns a polynomial hash function which yields an O(1) probe into a hash table. Any interest in converting all of the table lookups in the *.xs files? (PS: this solves an otherwise unsolved problem in discovering such a function.) Is this a perl implementation of an mph polynomial generator? I've already re-worked the whole constants support (see the archive for this list a couple of months back), and it currently uses a perl hash to hold the constants and do the lookup, but given the potential number of constants in the windows header files I was thinking of implementing a mph solution (and have been playing with Taj Khattra's mph-1.2, which I have ported to compile under MS VC++). A perl implementation that generates the polynomial values to stick in the C code would be a nice way to solve the problem that I have been struggling with of how to make a distribution that others can easily add constants to. Regards, Rob.