S/ENL - The Sprezzatura Electronic Newsletter (All the RevSoft News That's Fit To Print (And bits that probably aren't as well...))
Sorry it's late but once again I've been on vacation. Two weeks of sitting around in the sun going a nice shade of brown... nice to be back though! Hurrah! The subscriber list for SENL has now passed the 400 mark! As a point of interest for those who wonder just how big/small the community has gotten - in it's heyday, "REVMEDIA - The Developer's Link" never had that many subscribers. OK it cost money but ... <g>. Well we FINALLY got to the bottom of the CSi problems after six months of trying. To recap - if we mail CSi members using our standard mailing technique they don't get SENL. That means that for the increasingly fewer CSi only subscribers we have to do a "hand delivery". This is a bit of a pain but hey, CSi has it's uses. After a lot of sleuthing with APK and self we proved that CSi have AMcAuley@Sprezzatura.com on an anti-spam mail block list. ANYTHING sent from this address to a CSi address will be locked. We have screamed 'til we are blue in the face that SENL is NOT spam and that CSi members have REQUESTED it but to no avail. The interesting point here is that CSi are blocking legitimate business mail to their members and DENYING it! The official line is that they don't want anybody to know how the antispam filters work so they just refuse to say anything. Anybody care for an ACLU case on this one? You send mail it doesn't get there. You are not told that it has not been delivered - in fact the CSi mailgate explicitly accepts the mail handshake - it just disappears into a bit bucket somewhere in Cleveland. The proof? If APK turns his anti-spam filters OFF he gets my mail... I'm trying to get journalists here interested in the story but it seems to be a bit slow off the ground. Any progress as ever we'll keep you posted! Andrew P McAuley The RevSoft UK conference was way cool - see the article later in the issue. For a freebie, we're having a competition on our web site - provide an amusing caption for a photo of Cameron Purdy at the conference and win Sprezz goodies. Just go http://www.sprezzatura.com/competit.htm (link no longer available) and check it out. The Wicked Witch of the Web has been quite busy lately and her graphical skills are evolving - just as everyone seems to decide that text based web sites are the way forward (tell that to LucasArt!! - Kate). Our site looks cool and should start the trend back to graphically rich sites! Speaking of which - the RevSoft web site has received a MAJOR overhaul and the discussion database is now a LOT more useable. Well played RevSoft Bods. Sprezzatura Inc's new address in Market Street is still a little late in coming - delays in incorporation for some reason. Never mind should all be sorted this week. One of the cool things about being in two locations is that we can give extended tech support hours! Great for those who get up early or go to bed late! Another even better thing is that we can now respond much more promptly to emergency callouts! At this rate Aaron's frequent flyer miles are going to be going through the roof! To assist in dealing with the US office we're using the following Email addresses until we have proper 'phone numbers and address to give you! Sales US_Sales@Sprezzatura.com Support US_Support@Sprezzatura.com Administration US_Admin@Sprezzatura.com Accounts US_Accounts@Sprezzatura.com With all of this emphasis on Java as the way forward (and we're very excited by this here at Sprezz) we were most amused to read the following on the Sun web site at http://java.sun.com/beans/ "Sept. 26-JavaBeans Bridge for ActiveX 1.0 ships! Run portable JavaBeans components within LEGACY APPLICATIONS such as Microsoft Office, Internet Explorer and Visual Basic." Gotta love it! Microsoft Office a legacy app! <g> Regards Well no further comments on the Emu other than positive so I guess that answers that one... mind you - the best entry for the caption competition received so far (in the twisted opinion of the editor) is from the Emu, but given the sensitivity of some people to jokes about certain people we feel that it can't be allowed to win... sorry. Lisa B Porch mails - "I am just now in receipt of Volume 1, Issue 9. I hate to tell you this but it was floating around in the ether for a month as it is dated August 19th and today is September 18th. So much for the wonders of the information age... It is a nice BIG issue though. Printed out to 23 pages, which I really need since I am trying to housebreak a litter of 7 Shetland Sheepdogs (better known as Sh*tting Sheepcreeps at this point in their lives). Keep up the good work!" OK already, so I forgot to change the date! <blush> noted and actioned for this issue, although at the current rate we may as well just skip the October issue! There will NOT be a December issue (well, perhaps a combined November/December one) as once again we'll be on vacation, although this time it doesn't really count as it is visiting relatives! We're arriving Adelaide on the 17th December, leaving Adelaide for Cairns on about the 21st and leaving Cairns for Singapore on the 30th. So there is a small window for meeting people in Adelaide and a larger one for meeting people in Cairns! (Anyone want to buddy up to dive the Barrier Reef - Holy Shark Repellent Batman...?!) Scott Kapaona writes "Hey Andrew, I would like to thank you for the information. I have now accomplished what I wanted to do. Thank You very much! ... By the way, do you know of anyone in the Arev community that is not using their RDK for Arev 3.12? Maybe someone who has migrated to O/I which includes the run-time kit. I am interested in purchasing one that no one uses anymore if this is the situation." so if anyone out there is in this situation let us know and we'll pass the information on to Scott. One of our lucky "Sprezz Gear" recipients writes "Thanks for the Sprezzatura clothing etc. I laughed when I saw the cap with the Apple Macintosh typeface. At least *someone* uses the correct hardware." We thought it had a certain post-modern irony - but congratulations you're the only one who's noticed so far! <g> The following should go into our "bloopers" section but as we don't have one... thought you'd be as amused as we were by this one - names have been omitted to protect the guilty <g>. "Story for the week: How to become a hero in the eyes of 35 staff at a ******** who are totally sick of seeing "error reading.....group format error in......." every 10 minutes for the last 5 weeks, and are on the verge of breakdowns. The ****** ******* says if not fixed by Friday it's out. Double click Netdrv.exe, note that it says IPX Driver. Walk to the File Server, and type LHSTART. Get people to log back in. Wait 10 minutes." Speaking of which we've succumbed to the pressure and are now running the NT Service in house. Talk about a pain free installation. Way to go RevSoft dudes! Martin Drenovac writes "I'm looking for a list of the major global organisations and their use of Arev. Specifically those that are using it over WAN such as Frame Relay." Anybody care to share some user stories? If so we'll publish in the next issue. Another satisfied customer after the last issue writes "SENL - what can I say. How's it go: Sprezzatura Ltd European Leaders in all things RevSoft (Except VIP)!!!!!!!!!! I've been trying to find how to get mplayer to play automatically for weeks!!. Cheers mate!!" Incidentally, now that we've got a US office the tag line will have to be changed to "WORLD leaders in all things RevSoft (Except VIP)". <g> There was once an Irishman and an Englishman who lived next door to each other. The Irishman owned a hen and each morning would look in his garden and pick up one of his hen's eggs for breakfast. One day he looked into his garden and saw that the hen had laid an egg in the Englishman's garden. He was about to go next door when he saw the Englishman pick up the egg. The Irishman ran up to the Englishman and told him that the egg belonged to him because he owned the hen. The Englishman disagreed because the egg was laid on his property. They argued for a while until finally the Irishman said, "In my family we normally solve disputes by the following actions: I kick you in the balls and time how long it takes you to get back up, then you kick me in the balls and time how long it takes for me to get up, whoever gets up quicker wins the egg." The Englishman agreed to this and so the Irishman found his heaviest pair of boots and put them on, he took a few steps back, then ran toward the Englishman and kicked as hard as he could in the balls. The Englishman fell to the floor clutching his nuts howling in agony for 30 minutes. Eventually the Englishman stood up and said, "Now it's my turn to kick you." The Irishman said, "You can keep the egg." IT'S THAT MAN AGAIN - AARON P KAPLAN Before we begin this little tirade, a few notes about my missive on save-as logic in OI. A very astute developer (one GG from RTI) pointed out the following: There is no check to see if the new record key actually exists. The code as written would simply overwrite what is there. He also points out that the lock of the new record should occur before the write. So then, here follows a slightly revised portion of the original code read OrigResultRow@ from hTableName, oldKey then Thanks Gene! Now, on with our regular scheduled ramblings. Q: If a one 'l' lama is a Tibetan religious leader and a 2 'l' llama is a South American camel like creature, what a 3 'l' lllama? A: A really big fire (You have to live in Boston for this, I think). And a big hello to my good friend John Van Buren who didn't believe I'd actually tell people this. Hi JVB! Now, on with the tech stuff..... Q: What do Sarah Fergeson, Oprah Winfrey, Roseanne Arnold, Advanced Revelation and OpenInsight all have in common? A: They're all in need of reduction! Reduction is a constantly used, yet little understood function of LH. Reduction is implemented by calling the reduce() function. It's purpose is to reduce a select list by the specified criteria. After reduction, only those record keys matching the criteria are returned from a select statement into the active cursor. In order to fully understand reduction, we must first look at selection. To many developers, especially Advanced Revelation developers, selection is a moderately straight forward part of their everyday lives. For those of you following along, we have this little snippet of code sentence = 'SELECT AREVKB WITH LEVEL = "EXPERT" AND WITH DATE > If this little code example is too confusing, then I'd suggest heading back to the manuals and re-reading the chapters on selection criteria. But, for those that insist on following along, here is a quick play by play of the line. Sentence contains the selection criteria we with to perform. We are looking for all record keys in the AREVKB file that are of EXPERT LEVEL and have a date past 01/01/91. We would like these returned sorted by the AUTHOR. In both OpenInsight and Advanced Revelation, running that code will create for you an active select list (provided you've downloaded the AREVKB file). If you were to examine the keys returned, you'll see that they are a subset of the entire file. The list of keys has been reduced, hence the name of subroutine. Those of you that have tried to use reduce before are looking at this, scratching your heads and thinking, "Huh? I don't get it. We didn't call reduce..." In answer to that question, we have a quick quiz for you experts out there... Q: What are the different types of selects available with LH? A: Simple and extended, Q: What is the difference between a performed select and a reduce/select? A: A performed select is a shell around reduce. For a quick highlight, the system turns the select statements above into a program similar to this: subroutine reduction_test( void ) Wow, that's a lot of code. And it works as well, since I wrote the example before doing the perform stuff. But wait, we're not done! There's more! Look at this logically for a few minutes. The system is running the code above, writing the data out to a LISTS file record using READNEXT. Isn't this exhausting the select list? Isn't the system jumping through a whole bunch of hoops to convert your simple R/LIST or OpenList statement into Reduce/Select programs? Why, yes, it is. Now from where I sit, if I could jump into the readnext section and do my processing there, the select process would run much faster. Therefore, making reduce calls is inherently faster than perform or rlist calls. This should also demonstrate that it's impossible for a perform select and a reduce/select to return different values or that perform select works while reduce/select does not. I hope this clears this up once and for all. Now that we've determined that reduce is faster then perform lets go through some information about reduce and it's use so you can make the most out of it in your applications. Reduce takes the following parameters: script The selection criterion sortList The sort criterion mode The value determines the type of select and how the cursors are handled tableName The name of the table to select against (not a handle) cursor The cursor number (0 through 8) you wish to use flag A boolean value indicating success or failure.
script: The script needs to be written in the most primitive form. Mostly this is due to the language the with processors are written in (the ever popular and always cryptic meta code). We'll talk more about this next issue. In the primitive form, the syntax is very unforgiving. Dictionary field MUST be surrounded by curly braces {MYFIELD}. Operators MUST be in the approved list (see the BRFHELP.HLP file in OI or the ARev manuals for the list of primitives). sortList: Contains an @FM delimited list of fields to sort by. These do not have to be enclosed in curly braces. If the field name is prefixed with # (eg '#LEVEL') then the sort is descending instead of ascending. mode: Mode contains one of three values, 0, 1, or 2 0: This is new criterion for reduction in the specified cursor 1: Find the next available unused cursor 2: Add this to the existing criterion or active list For example, if you were to issue the following select commands SELECT AREVKB WITH DATE >= '01/01/91' SELECT AREVKB WITH LEVEL = 'EXPERT' The first select statement would use a mode of 0. The second select statement would use a mode of 2 since there is already an active list. tableName: This field contains the literal name of the table. Optionally, field2 of this variable can contain an alternative dictionary to use. For example, if you are trying to select against the MESSAGES table in ARev, you'll find there is no default dictionary. You need to use the SYSMESSAGES dictionary. From TCL you would use the following select script SELECT MESSAGES USING SYSMESSAGES WITH MAPSCRIPT [] 'INDEXING' The reduce script for this would contain the following script = 'WITH CASEI {MAPSCRIPT} [] "INDEXING" tableName = 'MESSAGES' : @FM : 'SYSMESSAGES' cursor: With a mode of 0 or 2, cursor contains the cursor number to use. With a mode of 1, cursor is returned with the next available cursor. It's very important to keep track of your cursors since they are needed in the extended READNEXT statement. flag: Flag returns 1 if the reduce was successful and 0 if reduce failed. After calling reduce, you need to actually select the file. To do this, you need to use the extended select syntax. From the code example above, we have select tableName by sortList using cursor then/else tableName, sortList and cursor are the exact same variables used for reduce. The only thing you need to think about is the keyword. In the example above, the keyword is using. Valid keywords are setting, using and assigning. You can also have these variable by using the mode keyType syntax. When using reduce, you'll almost always want to use the using keyword. The others are there for selects done without reduction. The setting keyword is similar to the reduce mode value of 1. It returns the selection back in the next available cursor. Using is identical to a mode value of 0. Assigning is a way of allowing a keylist to be assigned to a different table. If you'll notice, reduce uses the table name. However, reduce does not actually pull the valid keys out of the file. Select does that. Reduce just sets up a series of flags for select. Assigning allows you to translate that list to another file. An example of this is finding history for current customers. Suppose you archive off old transactions to a history file. If you with to find information on current accounts that are stored in the archive, you can select on the current account to get a list of company codes. Then, through the assigning keyword, assign this list to the archive account and continue on with the select. Next time, we'll walk through what the system is doing under the hood, the purpose of various system programs and other strange and esoteric information on selection and reduction. And so for now, bye bye, and buy bonds. CELEBRITY INTERVIEW - Deleted for copyright reasons >>Who are you? (Name, married, single, male, age etc etc) << My name is Dilbert. I'm male, single and of an indeterminable age. Figure I'm about 34. >> Who do you work for? << The pointy-haired guy. >> What is your role in the RevSoft community? (Eg, UK Sales Manager for RevSoft, Authorised Trainer, End User etc) << Ice-breaker. People come into my office and break ice on my head. >> How long have you been involved with RevSoft? << Since the time I told the pointy-haired guy that his new office paradigm project wasn't worthy of using as toilet paper. He then corrected my french pronunciation. >> Which products do you use? << Mostly RevB. Occasionally Wally lets me go into his cube and play with RevF. Alice already has jRev, but when we ask to see it, she laughs in our face and says it's the privilege she has from having to wear panty hose all day. >> What do you most like about RevSoft products? << I get to practice my lucrative ASCII art business while at work. >> What do you most dislike about RevSoft products? << That it won't run on the TRS-80. >> If you HAD to use another database what would it be and why? << Probably dBASE II, though I've heard really good things about DataPerfect. >> What are your favourite 3 books and why? << The Unbearable Likeness of being Me. Mare, the story of a wayward horse that grew up to lead Gnu York. The pointy-haired guy gets tortured while his noble works watch and have cheap tawdry sex. (I wrote this book myself. Rudolph Valantino's going to play me in the movie.) >> What are your favourite 3 CDs/Albums and why? << Fred Flinstone sings Gregorian Chants. The Simpsons Sing the Blues Santanic Verses. >> What are your three favourite films and why? << Halloween 34, Wally goes Postal Take This Job and Shove it. 9 and a half seconds. >> What event in history would you most like to have been present at? << The conception of the guy who thought up the phrase 'paradigm shift'.
>> Who is the best president/prime minister we never had and why? << The pointy-haired guy. (I had something else done, but my confidential report was returned to me with corrections) >> Your motto/witty aphorism << Maybe I'll get paid one day. REVSOFT CONFERENCE REPORT - ANDREW P MCAULEY Revsoft UK recently held their annual one day conference in central London and a very well organised and attended affair it was as well. Those of you've who've visited our web site recently will have seen the photos! We decided not to issue a special report directly after the conference as it would have been discourteous for us to tell the US what's going on with RevSoft before they had a chance to themselves. If you haven't visited www.revelation.com lately you're missing out on three very important documents which chart the future of the company. As to all intents and purposes they record what was actually said at the conference by Jim and Cameron, we won't be going into too much detail here, rather we'll just summarise the presentations and strongly recommend that you check out the original articles on the web. You'll want to look at the President's letter, the article on hybrid applications and the article on 32bit jRev. Yes, it's official - the new product is codenamed jRev (not JA/Rev as we originally speculated!). This is one of those spooky synchronous things. There was a Release H of Revelation - it was just superseded by OpenInsight, so we've had G Rev, H Rev, OI could thus be said to be I Rev and the next generation will be J Rev! As is traditional, RevSoft had a room where companies could display their wares and mingle with the delegates between sessions. As is also traditional they requested that setup take place the evening before the day. As is not traditional, Sprezz actually managed to get there the evening before! (Normally we cut it so fine it isn't funny). Fate laughed in our faces though and the machine we took along to work with just wouldn't drive any of the monitors kindly supplied by RevSoft. So once again we were reduced to setting up on the morning of the conference. Side Bar for RevSoft benefit - the machine needed it's motherboard replacing under warranty! The morning of the conference arrived and the assembled hordes descended on the Queen Elizabeth Conference Centre to be greeted by Clive and his team. The event was well laid out and the facilities excellent. Clive announced the running order for the day which was to be Jim Aquaviva, Cameron Purdy, myself and finally respected UK Computer Journalist Guy Kewney. +++ Jim Aquaviva Jim talked about the strength of the company, how they've experienced 30% revenue growth last year and profitability is at an all time high. He mentioned that the company had bought out the Venture Capitalists and that the company was now employee owned and he laid out the main points they are now stressing. The theme which he kept returning to was that of a "boutique". Yup, we could all shop at Sears (well, actually we could if we lived in the US, I guess we'll have to make do with Selfridges, I think they're part of the Sears Group) but sometimes it's nice to go to a shop where we're known will be made a fuss of and get to speak to the owner - and more importantly where the staff will actually stock stuff we want instead of what head office tells them to stock. RevSoft are like a boutique - small, responsive and attentive. He then introduced "Webification" - but remember kids, Acquaman has special spider powers so don't try this at home. Essentially Webification is an acceptance and embracing of the web, and a move towards making all products useable within that environment. This naturally led to the introduction of jRev, which to quote directly from a slide "jRev is an integrated development environment that is designed for the iterative development, assembly and deployment of robust production class Internet applications." +++ Cameron Purdy Cam spoke on the Works program and the upcoming features in 3.5 which are way cool - check out www.revelation.com for a document with details on these. He also teased us with stuff we can probably hope to see in 3.6 like remote database maintenance over the Internet and secure remote access. He then spoke about the network products and how they were being improved with an ultimate goal of shipping just one cross platform next generation Linear Hash Server, suitable for both Novell and NT. Then it got really interesting as Cam warmed to the theme of why they'd tossed away last year's announcements of developing ActiveX controls in favour of Java. I have to say that this is a discussion which could run and run but the relief in the auditorium was palpable. Last year I left the conference thinking "ohmigod, ohmigod they CANNOT be serious - it won't work, it doesn't feel right, VB here I come" and I'm sure that I wasn't alone. This year I left thinking "yup that makes sense - that's far more in keeping with the Revelation philosophy". So for what was announced last year we have to make the following substitutions Instead of C++ read Java DCOM read CORBA ActiveX read Javabean Hooray! Java is a natural step for Rev people - to quote Cam quoting Gene on getting used to Java "This is just Basic+". I won't go into the details of what jRev will bring - as I said it's on the Web but there are one or two things which I believe are of major significance and deserve repeating. Because jRev will be written in jRev we'll be back with a fully flexible tool set, not hampered having to work around seemingly arbitrary design decisions. Because jRev will be written in jRev the product will be thoroughly tested before release and thus less prone to the "Version 1.0" nightmare scenarios. Because jRev will be released incrementally as part of the Works program we will not see the ludicrous situation of having to pay all over again for what should essentially be an upgrade (c.f. OI for LANs -> OI for Workgroups). VIP has served it's purpose and will be subsumed into the whole that is jRev. Sandbox releases - i.e. ones for us to play with, will begin in Q2 and Q3 of next year, with jRev 1.0 shipping Q4. And I'm the tooth fairy. The intention is good though and I look forward to having to put a quarter under RevSoft's pillow at the end of '98! +++ Andrew McAuley - Service With a Smile A Zipped version of the PowerPoint presentation which accompanied this talk can be downloaded from our Web Site at www.sprezzatura.com\conference - it's a couple of Megs but it zips to 156K! Alternatively send mail to admin@sprezzatura.com with subject CONF-PPT (no quotes!) and our mailer daemon will send you the binary via Email. This presentation was intended to be an explanation of why Network Products were such a good thing, along with a look at some of the more recent features introduced since 3.12. It has to be said that I was nervous so as ever under those circumstances I explained the fact that I was a consultant accompanied with a joke - if you know it skip the next section! A guy walks into a silicon valley pet shop and says that he wants to buy a monkey. The owner offers him a choice of three. "So how much is the first one" asks the guy "$500" "$500?! Why so much?" "He can program C++" "Well what about the second?" "$1000" "$1000?!" "He can program C++ and understands Object Oriented Programming" "And the third?" "$3000" "*&@^%!! - why what does he do?" "Well we've never actually seen him DO anything - but he says he's a consultant"... Having assured myself that my delivery still sucked we got on with the presentation. The first half of the presentation can be summed up as "Buy the NT Service or the NLM". Reasoning is simple - the Network Products both reduce Network traffic (which means improved performance for everybody) and hugely decrease the likelihood of GFEs. To illustrate we discussed three scenarios, a read request, a write request and a user powering down a workstation. In the first two scenarios assume the row length is 300 bytes. With an NLM or an NT service all that will go around the network is those 300 bytes. The whole point of the Network Products is that only the data is sent over the network not the entire frame. The Network product finds the data at the server and returns only the data. Scenario 1 - Read Request Assume that the average file is three frames in overflow (not an uncommon situation). Ask to read a row which is in the third overflow frame. RTP57 calculates the primary frame and reads 1K from disk. It then sequentially searches through the frame looking for the id and fails to find it. It then reads the first 1K of overflow space and fails to find it there. Finally it reads the next overflow frame and locates it there. 3K has had to come over the net and that is assuming that the modulo of the file has not changed. In other words in a best case scenario traffic is ten times higher. If the modulo has changed even more work needs to be done. Scenario 2 - Write Request RTP57 reads frame 1 to determine if adding the row in is going to force the primary utilisation over the threshold percentage. If it is a lot of resizing work has to go on - network traffic goes through the roof. If it is not, it calculates the primary frame and reads that from disk. It then reads through the first frame and the overflow frames 2, 3 and 4 to establish whether this is a new record. If it is it tacks it onto the end of the last frame and updates the frame 1 information. If it is not it removes the row from the frame, makes the necessary adjustments and writes it out and updates the frame 1 information. This means reading at least 5K and writing at least 2K. Again in a best case scenario traffic is about 24 times higher! Scenario 3 - User powers down workstation Without a Network Product in place the user could power down a workstation just as it was updating the file, resulting in a wrong pointer to an overflow frame. With the network product in place we have a simple binary situation. The user will have told the Network Product to commit a write or they will not have. Once the instruction has gone it is up to the Network Product to do all the splitting of overflow etc. So the only reason for GFEs now is someone downing the server! (Or of cause, bad cabling, faulty NICs etc.). Then using completely fabricated figures a graph was shown indicating that performance of NT with the NT Service was roughly equivalent to Novell without the NLM. This was explained as being due to the heavier load put on an NT Server by having to service that pretty GUI! Finally some tips on installing the software (follow the installation instructions) and known problems (FatFix and TurboDis needed for Novell 3.11 and 4.x respectively). This introduced a small competition - FatFix was shown on the slide as TurboFix. Contestants were asked to spot a deliberate mistake on a slide starting a few slides earlier. The winner would get a Sprezz sweatshirt (have we raved enough about these yet? TRES CHIC!). So after the presentation someone who shall remain nameless came up to me and pointed excitedly at the word "TurboFix" on his pad. "Congratulations" I hailed him thrusting a sweatshirt into his hands. He looked confused - "but I've only come to find out where to get this new patch from" he said... Like every other speaker there that morning (except Guy Kewney, and hey, if he knew how good Works was he'd have plugged it too!) I then plugged the Works program. I genuinely believe this is the most equitable arrangement Revsoft have come up with in years. The best bit is FREE client upgrades - cool. Then onto the bits I enjoy - showing cool tricks using OI 3.4. Unfortunately they're easier shown than described so please excuse what follows as it was for the most part performed live so there are no screen shots! SysMsg Internationalisation is an issue for us at Sprezz as we develop multi-lingual applications. The only way we've been able to address this with system messages is by intercepting the SysMsg event. By doing this we can provide our own text for any system error message. The example we gave in demo was of something different though - using SysMsg to suppress a user's ability to delete a row in a Window. This was done simply by including the following code on the Window's SysMsg event. Function SysMsg(CtrlEntId, CtrlClassId, MsgCode, CancelFlag, StatCode) simply enough - if the message meant to be displayed is a "Warning - Row will be deleted" message then don't forward the event, just set a cancel flag. Qualify_Event Next it was time to RAVE about Qualify_Event. I think if you were to press Carl Aaron and self we'd probably give this props as being our favourite new feature of all time! Originally qualify_event was designed to permit developers to influence the event chain by deciding what gets done when - the eighth concentric ring of maintenance hell. Now it has been extended to permit the trapping of ANY Windows message. So as an example, suppose you wanted to trap a right mouse click on an edit table so that you could display a Zoom window or a context menu? Easy. On the create event of the Window, tell the system that you want to look for the right click message on that particular edit control. Now whenever the user right clicks on that particular edit control the WINMSG event will be triggered for that control. You'll be told the message that got you there and any supporting information and you can then do what you want! In our case we had code to show a full Hospital address when the hospital was right clicked on and our two pieces of code were as follows... Code for Create Event of Window Function Create(CtrlEntId, CtrlClassId, CreateParam) /* So the Window is called PATIENT, the edit table is called HOSPITAL. The Windows message triggered by a right click is 0x7B, so we tell the control to let us know when that happens. Note that this won't work with Windows 3.1 as it is a 95 specific message. There are ways of making it work for 3.1 of course... <g> */ Call Send_Message("PATIENT.HOSPITAL", "QUALIFY_EVENT", "0x7b", 1) RETURN 1 and the code for the WinMsg event on the Patient.Hospital control Function WinMsg(CtrlEntId, CtrlClassId, hWnd, Message, wparam,lparam) CtrlArray = @Window : ".HOSPITAL" PropArray = "TEXT" DataArray = Get_Property(CtrlArray, PropArray) HospNo = DataArray[1, @Rm] Row = Xlate("HOSPITAL", HospNo, "", "X") Swap @Fm With \0D0A\ In Row Swap @Vm With \0D0A\ In Row Call Msg(@Window, Row) Return This is SO COOL!!! INET_RList The new Internet functionality was then VERY briefly touched upon because by this point I was getting waved at to wrap up... A program called EasyPeasyLemonSqueezy was run from the System Monitor. This program went off and listed the SYSAPPS table. It created an HTML page dynamically and then called Internet Explorer to display the resultant HTML code. Rhetorically the audience were asked how many lines of code were needed to achieve this - 50? 100? 1000? This was just to make the point how easy this new functionality is - the code follows :- Subroutine EasyPeasyLemonSqueezy(Dummy) +++ Guy Kewney - Musings Guy walked up onto the platform and said "What I want to know is how the previous speaker was so confident that there wasn't already a routine in the system API called asyPeasyLemonSqueezy"! which kind of set the tone for the next 45 minutes. Guy was hilarious but telling as he pointed out exactly why Microsoft have got it wrong in opposing Java. He did this in a laid back manner, using dialogue well peppered with amusing anecdotes. My personal favourite (which will be omitted here as it is a bit blue) was recounted slowly and with a lovely build up. The best bit though was watching our American visitors who couldn't believe that this chap was actually going to tell this Politically Incorrect risqué joke to a crowd of computer professionals. You could almost see the RevSoft guys preparing to be hung drawn and quartered by the crowds. As the punchline was delivered they averted their eyes as though expecting to see the speaker stoned ("but all I said was, it was a piece of fish fit..."). Uproarious laughter greeted the punchline - this is after all the UK <g>. Guy made a few more comments about the future of the industry and then performed the prize draw. Carl won but was disqualified for the somewhat dubious reason that he worked for Sprezzatura, so it was drawn again. Clive finally drew attention to the goodie bags that were being distributed to all delegates containing amongst other things, a Mouse Mat from RevSoft, a Waiter's Friend" and ruler from Prospectus, a circular mouse mat from Peterborough (which doubled as a frisbee as Clive demonstrated) and an insulated coffee mug from Sprezzatura. Then it was time for lunch and a wander around the various stands before we all drifted off for the afternoon - Clive very sensibly having decided to make the afternoon a free for all. So there you have it in a somewhat large nutshell! (And if you really want to know the joke Guy told send mail to admin@Sprezzatura.com with subject GUY-JOKE (no quotes) and our mailer daemon will autoship you a copy!) A big vote of thanks to all at RevSoft for making this day possible! I have been besieged by hate mail this month for my irreverent comments in an earlier column. By way of an apology, I'd like to make amends in this article. This month, Eric promises not to offend anyone, especially New Zealanders, Muslims, Seventh Day Adventists, Christians, Jews, Pakistanis, Israelis, lawyers, and of course, accountants. Eric has pledged to the editorial staff not to do any flatulence jokes, poor taste Lady Di jokes, the one about the Greek Lady who fed her husband dog food, or to run any gratuitous advertisements for AREV programmers, or the old "Diesel Fitter" joke (because it's Steve Carmichael's and he runs Scar Systems, and is a good bloke, not to mention a fine AREV programmer). Anyway, there were these two guys with Parkinson's disease who....(joke removed on legal advice - Ed.) The highlight of the month for Eric is the chance to meet Edward deBono, presently in Australia. Edward barely understands emus but has sought an audience with a certain feathered flatulence maker. If Eric can persuade him enough, de Bono will be releasing books containing poetry instead of books about thinking. Time will tell.... Another highlight was being arrested mid-week while jogging in my Sprezzatura sweatshirt and cap. The police suspected Eric had just stolen used clothing from a charity bin...(too close to the truth!) I suppose I ought to include a utility this month for the AREV programmers left in this ever more exclusive fraternity. So $dirbytes is here as a function to return the number of bytes in a directory. Good if you're planning on rebuilding XTree in AREV. I know you can do it with four million DIR() calls, but this is easier... A=/02000000000000000000E9E200202020/ That does it for this time. Next time, rebuilding XTree in AREV... Sure as hell ain't the Spring Racing Carnival *** Stop Press *** Stop Press *** Stop Press *** Stop Press *** Late scratching: - Eric's hot tips for the Melbourne Cup - Arwon, Think Big, Gunsynd, Piping Lane, and of course, at short odds, Phar Lap. As this issue of S/ENL was put to bed we fed the inner man with:
S/ENL - (c) Copyright 1998, Sprezzatura Ltd. All rights reserved. REDISTRIBUTION is allowed only with permission. You may circulate copies of S/ENL by manually forwarding it, providing (1) you forward the issue in its entirety, (2) no fee is involved, and (3) you forward no more than three issues to any one individual. After that, please encourage your correspondents to send e-mail to admin@sprezzatura.com with SUBSCRIBE SENL in the subject line to get their own free subscription. Everyone is welcome! Tell your friends about S/ENL.
|
| Copyright © 2005 The Sprezzatura Group. All rights reserved. |