Home Contact Site Map Privacy Policy Rev Search
Volume 2 Issue 2
 

Up
Volume 1 Issue 1
Volume 1 Issue 2
Volume 1 Issue 3
Volume 1 Issue 4
Volume 1 Issue 5
Volume 1 Issue 6
Volume 1 Issue 7
Volume 1 Issue 8
Volume 1 Issue 9
Volume 1 Issue 10
Volume 2 Issue 1
Volume 2 Issue 2
Volume 2 Issue 3
Volume 2 Issue 4
Volume 2 Issue 5
Volume 2 Issue 6
Volume 2 Issue 7
Volume 3 Issue 1
Volume 3 Issue 2
Volume 3 Issue 3
Volume 4 Issue 1
Volume 4 Issue 2
Volume 4 Issue 3
Volume 4 Issue 4


 

 

 S/ENL - The Sprezzatura Electronic Newsletter

(All the RevSoft News That's Fit To Print (And bits that probably aren't as well...))

Contents

Welcome

Feedback

MYKL'S JOKE SECTION

EVER WANTED TO KILL A CONSULTANT?: Katherine Rhodes

Speaking In Tongues: A Layman's Guide - Andrew P McAuley

Connections: Arguing with your Data (or how to use DS Arguments): Carl Pates

Previously in Connections

Strings and Things

Who's That Gnu? - Gary

S/TCL: Andrew P McAuley

Standard OpenInsight Commands

Special SLIST Commands

EVAL

LIST

SORT

SELECT

SSELECT

GETLIST/GET-LIST

SAVELIST/SAVE-LIST

CLEAR/CLEARSELECT/CLEAR-SELECT/CLEARLIST

CELEBRITY INTERVIEW - Brock J Prusha

ERIC THE EMU'S AREV TIPS

Peripheral Trivia

12th June 1998

S/ENL Volume 2 Issue 2

 

Welcome

WELCOME - to this issue of S/ENL, the Sprezzatura Electronic Newsletter.

Firstly an apology: this issue is stunningly late: but I guess you've noticed by now! The thing about publishing REVMEDIA was that because people paid to receive it we couldn't let deadlines slip. But we've been so busy dealing with work coming out of the States that SENL just got re-prioritised. We have now changed our internal policies and SENL will be published with more frequency: but probably shorter. We figure timely information is better than bulk!

As we're changing, we thought we may as well go the whole hog, and now Ramblings and Welcome have been merged. This removes the formally tenuous distinction between things having no connection to the RevSoft community and things bearing directly on said community.

It's been an interesting few months for us here at Sprezz. Our user base has been expanding and we seem to be gaining support clients in droves. Several documentation projects have had to be put on hold whilst we address technical issues relating to client's problems. Whilst this is a pain in the short term it has led to the creation of an internal Sprezzatura Knowledge Base containing more REVMEDIA style goodies with which we can fill SENL! (For more details on this see later!).

The most significant events of the last few months have been the two Developer Conferences in Boston and Santa Clara, at which both Sprezzatura Ltd and Sprezzatura Inc were pleased to have representatives. The conferences were originally called to show the community where RevSoft were going with the new jREV product and to give RevSoft the chance to showcase Kurt's excellent AREV to the Web presentation.

Well, what's to say about jREV? Firstly let's get the bad news out of the way: there has been some slight slippage whilst the core technologies are developed. This means that at the conference all RevSoft were able to demonstrate was the Java implementation of Linear Hash. Still this is the first and most important step on the road to becoming a more open system so let's not diss it! So we can now run Java Linear Hash on an NT Server! The API isn't published yet but this can only be a matter of time! Subscribers to the Works program should have their own copy of jLH by now.

The word of the conference was "Components": well actually "Webification" kinda gets an honourable mention too! jREV is going to be so component oriented it's untrue. At last we get what we were promised with OI: true inheritance of object classes. To say this is exciting is an understatement: and because it all compiles to Java we can run on anything!

For me though the absolutely best news was that jREV is being written in jREV. Those of you who were not brought up on AREV cannot begin to comprehend the sheer significance of this fact. You see, in AREV days, AREV was used to write AREV. What this meant was that the developers of AREV got to see just what did and didn't work. If the screen painter was flawed they'd soon know about it cos they wouldn't be able to build screens! What this also meant was that the developer in the field could do anything to the product: customise it to their heart's content! The problem with early OI is that the tools were written in C++, so the developers didn't actually have to use them to build the product. This showed. In fact one of the reasons why OpenInsight has become so useable recently is that there has been a return to the art of writing new tools using OpenInsight.

Kurt's "AREV to the Web" presentation was great. He demonstrated how to take an AREV application and easily move it to OpenInsight and from there to the Web. This was done as a live dem and was all the more impressive for actually working! The application he chose was the old KnowledgeBase application, beloved of AREV users and of course REVMEDIA FKB aficionados. Essentially he split the demo into three sections: taking the AREV window and porting it to OI. Taking the OI window and making it prettier and finally taking the OI Window and "Web-enabling" it so that users could query and update the knowledge base over the web.

Doing demos live like this is always way more impressive than PowerPoint presentations and for sheer balls Kurt has to be congratulated! As the handouts showed, it is possible to use virtually the same code between AREV and OI in many areas. Kurt took great pains to credit the people who'd done the work behind the scenes: Blaise for his KB work and Tracy for her Web work.

As previously mentioned, we've taken RevSoft's work a bit further and created our "Windows 98" lookalike version of the KnowledgeBase window, as the screen shot below shows :-

This will be available for download shortly from our Web Site and we'll be looking at making articles available for it in the future!

We've been doing more Web work ourselves recently and it really is simple! In just one day for one client we were able to take an AREV application, dummy up an MDI front end and then Web enable it: even to the extent of using cookies to ensure site security! If you're interested in moving your app (be it Advanced Revelation of OpenInsight) easily to the Web why not drop us an email (sales@sprezzatura.com) and we'll be only too glad to help!

At both venues, independent third parties were allowed stand space to exhibit their wares and it was good to see Mike Ruane of Win Win Solutions at both events! Sprezz were pleased to be able to off-load the last of their insulated coffee mugs to the delegates and to be offered the opportunity to talk about how we can help any RevSoft user with their requirements. We demonstrated some of our more recent projects (including a completely multi-lingual OI application using an Access MDB as back end) and although it is less than modest to admit it the consensus was that Sprezzatura remain undisputed User Interface leaders!

People frequently ask us how we achieve some of the more visually stunning effects in our applications and I think it's fair to say that it's a combination of a sound knowledge of the Windows API and a lot of hard work. All of the technology we use is encapsulated for re-use so that our clients can benefit from our experience. And in answer to a couple of recent queries: yes, the source code for S/LIST is available for those who wish to create a similar interface. Regretfully though, as it represents over six man months of work, it doesn't come cheaply!

The Conferences also gave us the chance to catch up with people who I haven't seen for ages! This was a really pleasant treat. And, hey, Mykl, why didn't you tell us you lived in San Francisco now?! <g>

So a big thumbs up to Jim, Kurt, Cam, Jennifer and all the other good RevSoft folks who helped to make the events such fun. Here's looking forward to the fall sessions.

Whilst in the States I had the chance to stop by the Philadelphia office for a week. I wish the UK offices were so swish! Anyway, one evening I chanced into a pub with a few live bands and they were great! So much so that I rushed up to one of the singers at the end and asked if there was a CD available. Much to my pleasure there was and it hasn't been off my CD player since. The compilation features several "underground" rock bands from New York/New Jersey - quite varied but with a tendency towards Beatles/Monkees/Early Blondie/Skids. Katherine has created a small web page for me with sample WAVs at our site so if you like musical rock give it a visit: it comes complete with details of how to order a copy! It's at http://www.sprezzatura.com/fdr.htm.

More recently Sprezz have been leading seminars for Revelation Software in the UK on the value of the Network Performance products. We're using the NT Service ourselves internally and have nothing but praise for it. If you've got more than a few users on your network and you're not using either the NLM or the NT Service then you ought to seriously reconsider!

Finally a big plug for what I can only describe as a moment of welcome sanity from Revelation Software. I have not been a big fan of the deployment model chosen for the Web Deployment pack. It seemed to me that if you bought an unlimited runtime deployment pack then that's exactly what you should get. To differentiate between a web user and a local user seemed pedantic at best.

However, RevSoft are currently running a promotion where if you buy an unlimited runtime deployment pack you get the Web Deployment Pack included free: which is essentially just what I'd want! If you or any of your clients are looking at getting to the Web then get on the phone NOW and order your package before the offer expires! Check out http://www.revelation.com/WebSite/vipweb.nsf/etc... (whoops expired as of 24 Dec 98 - Ed) for details!

OK, in keeping with my resolution to get this out timeously I'll draw this editorial to a close! Thanks for reading and we look forward to catching you all on the RevSoft discussion database over the next few weeks!

Andrew P McAuley
Publisher

Feedback

I had a strange email from a subscriber who commented that it seemed Sprezz were moving away from linear hash. Quite the contrary! We still love the filing architecture! We use what our clients ask us to use. We get very frustrated with the limitations of more mainstream filing systems. In fact, when Carl moans too much about shortcomings of OpenInsight I force him to play with an Access back-end for a while to remind himself how easy he has it!

Seems like the world and his dog have decided to send me jokes. As I know most of you will be on joke mailing lists already I'm not going to reprint them all as I get them but just for this one issue I'm going to include a few. So you can avoid them more easily they're the things with the bar down the side (if you're reading the PDF version). Like this one from my accountant (Scousers by the way are people from Liverpool -near where I grew up).

St. Peter is standing at the Pearly Gates one day when up comes a group of forty Scousers. St. Peter tells them that there isn't enough room for them all and goes off to ask God which ones he should let in.

" Go back to the gates, pick the ten most righteous and they shall enter Heaven!! "

Ten minutes later Peter comes back to God, "

They're gone!!! " He exclaims.

"What all forty?" says God

"Not the Scousers " Says Peter " The F*****' gates .............!!!!"

Jim Dierking (liberty@teleport.com) would like to know if anybody has a copy of R/Laser they'd like to sell him - if so please mail him direct.

Thanks to Debra Fedchin who forwarded the following -

"Now you too can be enlightened:

All my life, when I read comics, I thought the "zzzz" in those little balloons indicated someone was sleeping. Boy, did I miss the boat, and it took me all these years to figure it out. All that wasted time.?

With the help of Bill Gates (the man who avoided changing the light bulb by redefining darkness as the standard), I have, indeed, seen the light. Now, I finally know what all those "sleeping" people in those comics had on their minds.

If you want to see what I'm babbling about, start your Microsoft Word, type in 4 z's ("zzzz") (without the quotes, of course) and hit the spell check."

Or another good one (sent to me by several people but special mention to Victor Ratnieks for getting it here first!)

Transcript of recent call to Brussels Police Department:

"Brussels police department, how may I assist you?"

"Uh.. yes.. I just got hit in the face with a cream pie."

"Okay, sir. Have you called the Brussels police department before?"

"No"

"Well, let me get a little information about you for our records. Your name?"

"Bill Gates"

"Country?"

"The USA"

"Native language?"

"English"

"Okay, sir. Your police department ID number is BP31415927. Please use this number the next time you call. Now, you say you were hit in the face with a pie?

"Yes, I was just about to meet with the Belgian Prime Minister. One person distracted me while another hit me with a cream pie."

"We've had other customers report that they were hit in the face with a custard pie. Are you sure it was a cream pie?"

"Well, I have white stuff all over my face and I don't see any custard, so I really don't think it was a custard pie."

"Have you visited the Prime Minister before?"

"Yes"

"Were you hit in the face with a pie then?"

"No"

"Hmm... have you visited any other Prime Ministers in the past month?"

"Yes"

"Any pies then?"

"No"

"Okay, well.. let's try something. Go outside the building and come in again. I'll wait."

"Just a minute.." <several minutes pass>

"Okay, I'm back."

"Did you get hit by another pie?"

"Of course not"

"Well sir, I don't know what could have caused the first pie, but it looks like things are working fine now. I'll make a note of the problem, though. If it happens again, please note the exact details of the situation and call us again.

Thank you for calling the Brussels Police Department. <click>"

Maggie Woo at the Nature Conservancy Council makes the valid point that if we just email people the PDF version we could crash quite a few mail servers - so we won't. It'll just be available for download from the Web site! Speaking of the Nature Conservancy Council, we tendered on a contract for the Joint Nature Conservancy Council in the UK and won the contract. We were a little surprised by the terms - "We want 10-50 days consultancy in the next three months". We kinda thought this seemed a little loose anyway - business is business. So the first meeting is organised for two days to see what needs doing. The Sprezz consultant walks in, gets an overview of the problems, looks through the initial list and completes it in the two days.

This presented a problem - that list was meant to be the initial ten days work! The JNCC now have to work out what else they want doing as they are contracted to ten days. So they mull it over and send for a Sprezz consultant again - this time for three days. Once again the list is attacked, once again it is completed.

This intensified the problem. That three days work was the remaining 40 days. So there are five days of the contract to run and nobody knowing what ought to be done. Eventually we decide on odds and ends (toy with putting an OpenInsight front end onto the data so that we can set up an intranet, or perhaps a direct data warehouse to Ingres but end up moving data around the network etc ) and taking the unusual step of modifying the contract so that the unused days can be carried forward into the next financial year!

Needless to say we had a blast - nothing like a happy customer to give your ego a rub! They must have had some bad experiences with consultants in the past to provide such generous estimates of time required!

Bob Foy writes

"Hi,

We also use the PDF format.

We do not however zip the pdf file. It is left in pure PDF format on our web page. That enables those with the FREE adobe acrobat reader (pdf reader) to read our magazine upon download and/or save it and/or print it out. Try it, you will like it in that format.

The zipping of the pdf adds just another unnecessary step in the process of getting to your publication.

Also, in the cover letter we have discovered it is a good idea to always repeat the URL and location of where they can get the pdf file.

Hope all this helps with your excellent mag.

Thanks,

Bob Foy"

thanks Bob, and as you can see we followed your advice!

Steve Bush at Neosys in Cyprus writes

"I hear that you are dabbling in a link to jBASE from OI. We would be _very_ interested in purchasing/any information about a bond/BFS from AREV to jBASE."

We'd love to Steve but the simple fact is it is so much easier to do these things between Windows applications. As it is, jBase is a 32 bit app and so won't run on pure Windows! It has some nice features though although it seems a curious hybrid when you first look at it.

Finally this which I received from several sources but which in a fit of sincere grovelling I'll credit to Clive Booth RevSoft UK's MD.

This is a true story from the WordPerfect helpline. Needless to say, the helpdesk employee was fired; however, he/she is currently suing the WordPerfect organisation for "termination without cause".

Actual dialogue of a former WordPerfect Customer Support employee:

"Ridge Hall computer assistant, may I help you?"

"Yes, well, I'm having trouble with WordPerfect."

"What sort of trouble?"

"Well, I was just typing along, and all of a sudden the words went away."

"Went away?"

"They disappeared."

"Hmm. So what does your screen look like now?"

"Nothing."

"Nothing?"

"It's blank. It won't accept anything when I type."

"Are you still in WordPerfect, or did you get out?"

"How do I tell?"

"Can you see the C: prompt on the screen?"

"What's a sea-prompt?"

"Never mind. Can you move the cursor around on the screen?"

"There isn't any cursor. I told you, it won't accept anything I type."

"Does your monitor have a power indicator?"

"What's a monitor?"

"It's the thing with the screen on it that looks like a TV. Does it have a little light that tells you when it's on?"

"I don't know."

"Well, then look on the back of the monitor and find where the power cord goes into it. Can you see that?"

"Yes, I think so."

"Great. Follow the cord to the plug, and tell me if it's plugged into the wall."

"...Yes, it is."

"When you were behind the monitor, did you notice that there were two cables plugged into the back of it, not just one?"

"No."

"Well, there are. I need you to look back there again and find the other cable."

"...Okay, here it is."

"Follow it for me, and tell me if it's plugged securely into the back of your computer."

"I can't reach."

"Uh huh. Well, can you see if it is?"

"No."

"Even if you maybe put your knee on something and lean way over?"

"Oh, it's not because I don't have the right angle - it's because it's dark."

"Dark?"

"Yes - the office light is off, and the only light I have is coming in from the window."

"Well, turn on the office light then."

"I can't."

"No? Why not?"

"Because there's a power cut."

"A power... A power cut? Aha, OK, we've got it licked now. Do you still have the boxes and manuals and packing stuff your computer came in?"

"Well, yes, I keep them in the closet."

"Good. Go get them, and unplug your system and pack it up just like it was when you got it. Then take it back to the store you bought it from."

"Really? Is it that bad?"

"Yes, I'm afraid it is."

"Well, all right then, I suppose. What do I tell them?"

"Tell them you're too f***ing stupid to own a computer."

MYKL'S JOKE SECTION

A retiring Physical Chemistry professor was setting his last exam, for a graduate course in statistical thermodynamics. Being a bit bored with it all, and with a well kept and wry sense of humor, he set a single question on the sheet:

Is Hell endothermic or exothermic? Support your answer with a proof.

He had little idea what to expect, or how to grade the results, but decided to reward any student who was able to come up with a reasonable and consistent reply to his query. One A was awarded.

Most of the students wrote proofs of their beliefs using Boyle's Law or some variant. The top student however wrote the following:

First, we postulate that if souls exist, then they must have some mass. If they do, then a mole of souls can also have a mass. So, at what rate are souls moving into hell and at what rate are souls leaving? I think that we can safely assume that once a soul gets to hell, it will not leave. Therefore, no souls are leaving.

As for souls entering hell, lets look at the different religions that exist in the world today. Some of these religions state that if you are not a member of their religion, you will go to hell. Since there are more than one of these religions and people do not belong to more than one religion, we can project that all people and all souls go to hell.

With birth and death rates as they are, we can expect the number of souls in hell to increase exponentially.

Now, we look at the rate of change in volume in hell. Boyle's Law states that in order for the temperature and pressure in hell to stay the same, the ratio of the mass of souls and volume needs to stay constant. There are two possible conditions.

One, if hell is expanding at a slower rate than the rate at which souls enter hell, then the temperature and pressure in hell will increase exponentially until all hell breaks loose.

Conversely, if hell is expanding at a rate faster than the increase of souls in hell, than the temperature and pressure will drop until hell freezes over, condition two.

We can solve this with the 1990 postulation of Theresa LeClair, the girl who lived across the hall from me in first year residence. Since I have still not been successful in obtaining sexual relations with her, condition two above has not been met, and thus it can be concluded that condition one is true, and hell is exothermic.

 

EVER WANTED TO KILL A CONSULTANT?: Katherine Rhodes

Obviously we can't fulfil that fantasy but we can offer the next best thing! Here at Sprezz HQ we are big fans of the computer game Duke Nukem 3D and frequently punish the network in a Deathmatch, after work of course!

After a while of this we thought it would be fun to be able to play a Deathmatch around the complex that is Northumberland House, where these offices are situated. After a while I decided to actually do something rather than just think about it and set about learning the BUILD editor which is used to construct the levels of the game. It took a while to get the damn thing to actually run without crashing, let alone learn how to use it!

As with most things it got easier with time and the level started to take shape. Each day I would have a floppy disk with a slightly larger map than the day before. Now, a couple of months later, it is nearing completion.

Whilst having tried to stay as faithful as possible to the actual layout of this building there has been, obviously, a certain amount of give for artistic licence! For example, there isn't really a secret armoury hidden in the venting ducts

or, indeed, a secret Sprezzatura programming room tucked neatly away behind the cupboards!

Teleporters are another thing that only exists in the depths of our imaginations, too!

We are looking for SENiLe readers who have Duke Nukem 3D to test it. (If you don't have it, it is now out on a budget label so there is absolutely NO excuse!) So, get your copy of Duke, email me for a copy of the map and come and explore

Whatever your preferred locale, get Duke Nukem 3D, get the Sprezz map and knock seven bells out of a consultant!

Speaking In Tongues: A Layman's Guide - Andrew P McAuley

One of the joys of living in Europe is that you get to misunderstand clients in many different languages. This joy was intensified with the move from Dos to Windows, when Microsoft thought they'd have a bit of fun at the expense of Revelation developers. You see, good old Dos stores data using an extended version of the ASCII coding system, whereas Windows stores data using the ANSI standard. What this actually means is that characters which were previously useable in AREV were suddenly mapped to system delimiters in OI!

At first this didn't seem such a big deal to US developers: but imagine the havoc wreaked on say German developers when suddenly storing author resulted in truncation of data! How so? Consider a perfectly normal Teutonic request to store information about Germany's best-known living author, Günther Grass. In Dos this would resolve to an ASCII string as follows :-

71,129,110,116,104,101,114,32,71,114,97,115,115

which if displayed in Windows would be

Gnther Grass

not very useful as the ü disappears. However the Windows string for Günther Grass would resolve to an ANSI string as follows :-

71,252,110,116,104,101,114,32,71,114,97,115,115

This is fine but note: the ü is Char(252): a sub-value mark. Store this data and all you are left with is G (the artiste formally known as Günther Grass).

Microsoft recognised the problem and provided a routine called OemToAnsi in the WinAPI to get around this. Sprezzatura traditionally implement multi-lingual applications in this manner.

However OI 3.6 has eliminated the need for such convoluted chicaneries by introducing a two-way conversion facility: a vastly improved CHARMAP property. CHARMAP is a property of SYSTEM which essentially makes it possible for developers to specify that characters will display as one character but save as another. Thus in the example above, we could display Günther Grass, but actually store something like G$nther Grass. Obviously we wouldn't actually use $ as we may occasionally need this for storing money. Rather we'd choose a character value which is never used.

The obvious advantage of this is that as we no longer store system characters, we no longer break our data BUT the system displays the data the way we wanted it.

Implementation is extremely simple, essentially the CHARMAP property is set to a string that is (2 * 255) bytes long, with the first 255 bytes being the external representation of the data, and the last 255 bytes being the representation of the data as it will be stored on disk: the internal representation.

In other words, the first character of CHARMAP will contain the character to display when the data is a char(1), the second character will contain the character to display when the data is a char(2), the 65th character will contain the character to display when the data is a char(65), the 255th character will contain the character to display when the data is a char(255).

Normally of course this means that the first character will be char(1), the second char(2), the 65th char(65) and the 255th char(255).

The 256th character of CHARMAP will contain the data to store when the displayed character is char(1), the 257th character will contain the data to store when the displayed character is char(2) etc.

So if we wished to display the high characters úûüýþÿ: char (250) to char (255) without actually storing them as char (250) to char (255) we must first decide which alternative characters we wish to display as úûüýþÿ.

Looking at standard display characters we see that Char 127 is &127;, Char 128 is €, Char 129 is , Char 130 is ‚, Char 131 is ƒ, Char 132 is „, Char 133 is , Char 134 is  , Char 135 is ‡, Char 136 is ˆ, Char 137 is ‰, Char 138 is  , Char 139 is ‹, Char 140 is Œ, Char 141 is , Char 142 is Ž, Char 143 is , and Char 144 is .

As 127-129 and 141-143 are normally not used we could opt to use these to display the high characters. So in this case we would simply get the CHARMAP property and set the 127th character to Char (250), the 128th to char (251), the 129th to char (252), the 141st to char (253), the 142nd to char (254) and the 143rd to char (255).

Next we have to decide what the displayed high characters should be stored as. Normally we simply invert the selection we made above. Remember that the outward portion of the CHARMAP property is the second 255-byte string. So in this case we'd get the CHARMAP property and set the 505th (255 + 250) character to char (127), the 506th to char (128), the 507th to char (129), the 509th to char (141), the 509th to char (142) and the 510th to char (143).

Once we have made this change, all subsequent displays of data by presentation server will respect this convention. In other words, all entry forms, popups, messages and quick-help will use the new mapping we have established. System Editor and Reporter will not currently use these mappings.

The program to achieve the results outlined above would be as follows

Function SwapDelimiters(Void)

Declare Function Get_Property, Set_Property

CharMap = Get_Property("SYSTEM", "CHARMAP")

CharMap[127, 3] = Char(250) : Char(251) : Char(252)

CharMap[141, 3] = Char(253) : Char(254) : Char(255)

CharMap[505, 6] = Char(127) : Char(128) : |

Char(129) : Char(141) : Char(142) : Char(143)

Void = Set_Property("SYSTEM", "CHARMAP", CharMap)

Return 1

One final point to note: as the system still sorts using standard ASCII collation sequences, we will now see that what previously would have sorted at the end of a list, sorting in the middle. To get around this we need to modify collation sequences. Revelation Software has provided an excellent article on the Works CD, \oiworks\3.6cd\whitepapers\intlchar.pdf.

 

Connections: Arguing with your Data (or how to use DS Arguments): Carl Pates

Welcome to another gripping edition of Sprezzatura's Connections column, where we once again shower you with the guts ripped from a Wombat expose you to the inner workings of OpenInsight's Client/Server (C/S) technology.

Previously in Connections

Last time we went through the basics of connecting to a data source, defining a simple SQL query and retrieving the data into a form. However, we had to press F5 to read in the data and then could only step through it one record at a time, which doesn't offer us the same functionality as normal OI records where we can type in a key and have the corresponding record returned.

This was because the dataset SELECT script we used selected every record in the table without applying any filters, hence we need to amend it with a WHERE clause to limit which records are selected.

Using the same datasource ( 32-bit Northwinds ) as last time, open up the C/S workspace and your MSACCESS97 dataset. Click on the Scripts' tab so you see your SELECT script.

As you can see we have now added a WHERE clause that demonstrates the SELECT script we want to run if we type in a SupplierID of 3' in a form. However, if we actually used this as is we would always get Supplier 3 returned regardless, so what we need is some way of having the 3 replaced by a variable at runtime, and we do this by the use of Arguments.

Simply put, arguments are variables' ( placeholders? ) that are declared in your Dataset scripts, and then replaced by OpenInsight at runtime with the appropriate value. So to implement this, change the SELECT script as follows:

The 3' has now been replaced with an argument named SUPPLIER_ID'. Also note the :' character in front of the argument, which denotes that SUPPLIER_ID should be treated as a replaceable value and is not a table or column name.

The argument name must also appear in the Arguments edit table, where you may also set a default value for it (Default values are optional. They will be used if SUPPLIER_ID is null when the dataset is executed).

Save this and open the MSACCESS97 form that you created last time in the Form Designer (or create a new form based on this dataset). We now need to specify which control is linked to the SUPPLIER_ID argument, i.e. the control whose contents are used to replace the SUPPLIER_ID argument in the SELECT script at runtime.

From the Form Designer menu select Database' followed by Edit Selection Criteria' and you should get the Build Form Selection Criteria dialog box as shown below.

You can see a list of available datasets for the current form in the list at the top and beneath it the details of any of selection criteria that apply to it. For this exercise we want to specify that the data in the SUPPLIERID edit line should be used to replace the SUPPLIER_ID argument in the MSACCESS97 dataset, so select SUPPLIERID' in the Control combo-box, =' in the Relation combo-box, and SUPPLIER_ID' in the Argument combo-box. Click the +' button to add it to the selection criteria list so you get this:

Click OK' and then compile and run the form. Type in a supplier number at the prompt and tab off, and lo-and-behold the record appears just like a normal OI record!

Strings and Things

In the example above we were using an argument to represent a number, i.e. SupplierID in the Northwinds database is defined as an integer. If we were basing our selection clauses on a string data-type then we have to modify the script slightly by adding single quotes around the argument

E.G.

If SupplierID was defined as a CHAR(5) datatype, we would have to alter our script as follows:

This would then treat any values used to replace SUPPLIER_ID as strings.

 

Who's That Gnu? - Gary

Early last week I was sunning myself in a dry riverbed. When I awoke, I found one of those pink "While you were out" sheets jammed onto my left horn. Normally I would have ignored the note, it being migration season and all, but since I was planning on spending this migration on a White Star Line cruise instead of grazing in Masai Mara, I had some time to kill. I wandered my way over to Elise Ewe's office to see what all the fuss was about.

"Elise, what's all the fuss about!"

"Oh Gary", she exclaimed. "This system, its...its...oh!"

"Schitzo?", I queried.

"No! Well, yes! I mean....I don't know what I mean," she answered and flopped her arms back and just stared sheepishly.

Something was really wrong. She was loosing wool like crazy and she counts on knitting a few sweaters to help defray Christmas costs. I start wrapping the wool around my horns to get it out of the way. No one wants a sweater with gnu's prints.

"Just explain the problem to me", I said.

"It's this window...look...here, walk this way," she responded and turned and headed for her office.

I was just about to open my mouth when I heard her yell "And don't even think about saying it, Buster!".

So, with that bit of fun over, I followed her into the office and watched as she loaded up the screen. She brought up a simple test window with 2 edit lines and one edit box. Just for completeness there were text boxes acting as labels.

"OK", she said all business like, "we've got a simple window. Key field, edit line, edit box. No events, nothing fancy. Watch".

I reached to my right hoof and removed my scooby-doo watch and handed it to her. I know better than to disobey an angry ewe.

Ignoring my gesturing, she clicked on the key field, entered in a value, then tabbed off to the editbox. She then clicked the close box. Much to my surprise, the system gave the "Would you like to save changes to the entity?" message.

"See that!" she bleated. "I didn't change anything! What is it doing!".

I must admit, I was slightly confused. OK, I was extremely confused.

"Mind if I drive?" I asked.

Elise pushed the keyboard and mouse my way and said "Knock yourself out."

I opted not to take her literally this time. I tried a few times, examining the before and after contents. It made no difference whether I saved the information or aborted. The record was unchanged. At this point, I was fit to be tied. I tried a few other records and they all did the same thing.

Finally, in utter frustration, I tabbed about for a while and closed the window, ready to throw my hoof up in the air in defeat. This time, there was no message.

"Did you see that?" we both said at the same time. She was first with the jinx and it took me 30 minutes to try to explain to her that I needed to talk in order for me to fix this. Actually, it only took a minute, but it took 29 minutes for us to learn enough sign language to communicate.

I loaded up the window and tried again. What we found was astonishing. If we left the window with the cursor on the edit field, it closed without complaining. If we were on the edit box, it prompted us with the message. Curiouser and curiouser.

"Maybe it has something to do with single lines and multi-lines," I mused. "Elise, can you find me a record with only one line for the edit box?"

Elise grabbed the keyboard and clicked away until she found one. With the cursor flashing in the edit box, she slowly moved the mouse over the close button. I crossed all my hoofs and held my breath as she clicked the button. No message.

At least we found a pattern. However, something was nagging me. I knew it wasn't just that it was single lined or multi-lined. Something else had to be involved. Then it hit me harder than being trampled on during the great migration! SAVEWARN! Something, somewhere, somehow, someway, sometime, some enchanted evening, was setting SAVEWARN.

I put in all sorts of hooks in all nooks and crannies displaying the value of SAVEWARN as we stepped through the window. At no time, in no place was it ever, ever, ever set TRUE. Now, I wasn't just frustrated. I was dejected. Have you ever been frustrated and dejected? All you want to do is solve the problem, but you know it's hopeless and makes you wish you were a lemming.

But necessity is the mother of invention. Desperation is it's father and paranoia is it's 2nd half cousin on it's father's side once removed. I started thinking about SAVEWARN and what could be happening when the light bulb went off glowing brighter than the southern lights. SAVEWARN compares GOTFOCUS_VALUE and DEFPROP. That's when I knew I had the answer.

Did you know what the Gnu knew? The answer appears at the end of the newsletter.

********************

********************

Answer: GOTFOCUS_VALUE is the value when the control gets focus. The record is already displayed, so multiple lines are delimited by CRLF for the GOTFOCUS_VALUE and @TM for DEFPROP. Doing a compare, the system finds these not equal (which from the computer's point of view is absolutely correct) and displays the message. Running a few tests confirmed the hypothesis.

An even larger problem is that you cannot guarantee the accuracy of delimiters in GOTFOCUS_VALUE. Although this information is pulled directly from CONTROLSEMANTICS@, delimiters are promoted in the GET_PROPERTY call. @SVM and @TM appear to always be converted to @FM and @VM. So, no matter what you try and do to the GOTFOCUS value, you can't change it for the system to acknowledge. DEFPROP will always return @TM and GOTFOCUS_VALUE will never return @TM.

This left Elise and I with an interesting conundrum. We had no way of wrapping or trapping this layer of the system, yet, we had to find someway of running interference.

How can you trap or wrap a window processing layer that you don't have access to? Promoted events! We used a promoted CLOSE and CLEAR event to modify the processing. Essentially, if an editbox has focus during one of these events, we set focus to the next non-editbox control.

S/TCL: Andrew P McAuley

The S/LIST demo is now available as a self-installing downloadable file from the Sprezzatura Web Site. (check out http://www.sprezzatura.com/products.htm if you'd like details of our InstallShield scripting service). The demo version if fully functional but terminates after one page. This means you can develop all your reports and then pay for the product at deployment time!

Tucked into the bowels of S/List is a freebie which we thought as it as fully functional: not restricted even in the demo - it'd be a good idea to document. That feature is TCL for OpenInsight, or S/TCL.

As ex-AREV developers, we missed the ability to just type in commands without having to prefix "Run" and remember to use commas between parameters. You see, we don't mind having to relearn commands, we survived to AREV 2 to AREV 3 massacre, we just object to unnecessary typing! More than that though we missed the EVAL statement. So like any frustrated developer we did something about it and incorporated the solution in SLIST!

At the top of the SLIST_97 window is a large drop down: this is S/TCL and is where we can type commands in. These commands can be either standard OpenInsight commands or special SLIST commands.

Standard OpenInsight Commands

S/TCL is designed to help you when you forget the syntax of a command, although it will equally as well just make it quicker for you to enter commands. As an example, MSG is a familiar command so you may choose to test a message by simply typing the parameters directly into S/TCL. Thus to test message CS_ABOUT, the parameters would be @Window, Null, CS_ABOUT, Null and a version number. We'd just type it in directly as the screen shot below shows.

On the other hand, where the parameters may not spring as quickly to mind, just typing the name of the command and pressing return generates a dialog box with all parameters named (where possible). So if we'd forgotten the parameters to say BTREE.EXTRACT we'd just type it in and press return like in the screen shot below.

In the unlikely event that these reminders were not enough, pressing F1 goes straight to the Programmers Reference Guide for context sensitive help as follows

 

Special SLIST Commands

To make development even easier several non OI commands have been added. These are listed below.

EVAL

The EVAL command is functionally identical to its AREV equivalent. That is to say, it takes a multi-line program (delimited by semi colons) and compiles it and runs it. This is useful for testing routines on the fly. E.G.

Eval Call Rlist("SELECT 100 SYSREPOS", 5, "", "", "") ; Call Popup(@Window, "", "REP")

LIST

The LIST command runs an SLIST statement typed in at S/TCL. E.G.

LIST SYSREPOS UPDATED JUSTLEN "R" COLFONT "Amherst,10" COLSHADE 5% UPDATED_BY JUSTLEN "L" COLFONT "Amherst,12" COLSHADE RED ENTITYID JUSTLEN "L" COLFONT "Arial,14" COLSHADE 10% COLHDRFONT "Arial,22" ID-SUPP DBL-SPC BOX GRID CENTRE LANDSCAPE SCREEN

SORT

The SORT command runs an SLIST statement typed in at S/TCL and sorts it by @Id after all other sorts are complete. E.G.

SORT SYSREPOS UPDATED JUSTLEN "R" COLFONT "Amherst,10" COLSHADE 5% UPDATED_BY JUSTLEN "L" COLFONT "Amherst,12" COLSHADE RED ENTITYID JUSTLEN "L" COLFONT "Arial,14" COLSHADE 10% COLHDRFONT "Arial,22" ID-SUPP DBL-SPC BOX GRID CENTRE LANDSCAPE SCREEN

SELECT

The SELECT command runs an RLIST select statement typed in at S/TCL. E.G.

SELECT SYSREPOS WITH UPDATED_BY = AMCA'

SSELECT

The SELECT command runs an RLIST select statement typed in at S/TCL and sorts it by @Id. E.G.

SSELECT SYSREPOS WITH UPDATED_BY = AMCA'

GETLIST/GET-LIST

Activates a saved select list E.G.

GETLIST MYLIST

SAVELIST/SAVE-LIST

Saves an active select list E.G.

SAVE-LIST MYLIST

CLEAR/CLEARSELECT/CLEAR-SELECT/CLEARLIST

Clears any currently active select E.G.

CLEAR

 

CELEBRITY INTERVIEW - Brock J Prusha

> Who are you?

Brock J. Prusha, aka BoneHead (male, married, 27).

> Who do you work for?

DFM Systems, Inc. and my wife.

> What is your role in the RevSoft community?

I arrange and design Software, Hardware, Revelation basic and basic+ code, Unusual customizations for clients, Better application building tools, Booths for our shows, Easy to use interfaces, Radical solutions for support, Yearly product enhancements, and Sales technical support.

Somehow, I get my paws into just about everything.

> How long have you been involved with RevSoft?

About 4 1/2 years.

> Which products do you use?

Arev 2.x, 3.x. Sometimes I get lucky and get to work with RevG or 1.x. I've worked with OI since it began (were those 1.x days fun). Most the time I work with OI 3.4. I've worked with the NLM and NT Service and promote the heck out of 'em.

> What do you most like about RevSoft products?

I like how we can integrate our DOS product with the Windows product, since the linear hash filing structures are the same. This saved our buts a few times. I like the freedom. We have really developed an integrated set of tools that cuts down our development time considerably. That's difficult to do with other environments. We don't have to worry about Y2k!!! I really like the integrated debugger. It works well with our toolset. But most of all, we get extremely great support! Go John Duquette!

> What do you most dislike about RevSoft products?

Its not 32 bit yet, and getting there will be painful for us. The Revelation Reporter (ick!). There are no ODBC driver to their tables. We've lost a few clients due to the problems with the Revelation Reporter. Lots of unnecessary overhead for the suppository, excuse me, I mean the repository which we don't use. The Revelation Reporter has always had problems. OI can be a little slow sometimes.

And did I mention that I don't like the Revelation Reporter?

> If you HAD to use another database what would it be and why?

Egads! I suppose we'd have to conform and go with Oracle or SQL Server. They are simply the mainstream choices right now. I don't know if I'd like it as much though.

> What are your favourite 3 books and why?

In no particular order:

Red Storm Rising by Tom Clancy. I just couldn't put it down.

All the Hitchhiker guides to the Galaxy by Douglas Adams because I think that way.

All the Red Dwarf books (my mind is slipping) because I love the series and can't wait for season 8 here in the states!

What are your favourite 3 CDs/Albums and why?

This is easy.

All the Weird Al CDs- He is a true god and once you see the light you will understand

STYX - I have most the CDs and just love their music. I prefer the Tommy Shaw days.

Billy Joel's Greatest Hits I & II - I can relate to him.

> What are your three favourite films and why?

STAR WARS - no question. I am from the age of its original release and have seen it over 120 times.

Revenge of the Nerds - What can I say, I am one.

Derrig's Revenge - A 90-minute film I made with a friend in highschool. Lots of blood and guts. Soon to come out on CD, digitally remastered!

> What event in history would you most like to have been present at?

Tough question. There are so many to choose from. I would like to know how they built the pyramids. But probably, my choice would be the Moon Landing I'm a sucker for space exploration and hope we continue on with it.

Who is the best president/prime minister we never had and why?

Not sure which way the question is supposed to be, so remove the wrong one:

Ever had?

Winston Churchill. He was a true leader and a very intelligent man. I would have liked to met him.

Never had?

Weird Al Yankovich. Would have no corruption and would make government fun and likeable for everybody.

> And finally Your motto/witty aphorism

Well, its not a motto but a hand signal. I usually flip people off around ten times a day. I think giving the finger on a normal basis helps alleviate stress, save oxygen, and lightens everyone's day.

 

ERIC THE EMU'S AREV TIPS

The feathered flummoxer has given up altogether on solving the year 2000 bug, and booked a nice quiet hotel somewhere near Uluru for when the proverbial fun hits the proverbial fan. This month I take you to the happy world of DOS file attributes, merely because it is an area where AREV and REVG have problems, especially with the file attributes read-only versus read-write. In network environments the READ-ONLY attribute of AREV.EXE or REV.EXE can be checked from within AREV or REVG on startup, and a warning raised. This apparently assists in locking in some cases. (Not that you should let more than one user get to your application code at a time - Eric achieves this by selling bump disks for $25,000 each.)

Now emus can't read or write (I dictate this to the resplendent Nurse Rhodes as we speak...even though in her other hand she wields the nastiest looking suppositories this side of my sacro-coccygeal cavity) Nevertheless, file attributes are not too readily accessed as AREV politely ignores them. I also felt it long overdue to use the wonderful BITAND command, whose properties are really rather under-rated. Using BITAND a bit more often and ignoring other overworked RBASIC syntax (like READs and WRITEs) makes most application code far more robust.

Removing all READ and WRITE statements all together is a time-honoured way of reducing your client support overheads. In the interests of attribution of attributes (attributable to no-one in particular), here is a routine by which you can get file attributes under DOS from within RBASIC:

Syntax:

declare function getattr

attributes=getattr(filename)

if bitand(attributes,32) then print "(A) archive bit set"

if bitand(attributes,16) then print "(D) directory bit set"

if bitand(attributes,1) then print "(R) read-only bit set"

if bitand(attributes,2) then print "(H) hidden bit set"

if bitand(attributes,4) then print "(S) system bit set"

* under Novell the following may also work (depending on your version of Novell):

if bitand(attributes,128) then print "(SH) Novell Shareable bit set"

if bitand(attributes,8) then print "(EO) Novell Execute-Only bit set"

A return value of zero means that the file doesn't exist, or, the file has no attributes. You can always osopen it to check out which.

* Run the following program to create the object $GETATTR

A =\02000000000000000000EB6890000000\

A:=\00000000000000000000000000000000\

A:=\00000000000000000000000000000000\

A:=\00000000000000000000000000000000\

A:=\00000000000000000000000000000000\

A:=\00000000000000000000000000000000\

A:=\00000000000000000000000000000000\

A:=\002400002EC70676000000F8FCB40DBA\

A:=\01002EFF1E0A001E060E07B80000BF11\

A:=\00F3A426C605000E1FBA1100B80043BA\

A:=\1100CD21BE0000071FBA0000B800122E\

A:=\FF1E0A00F8CB\

if len(A) = 182 then

open 'BP' to bp.file then

write A on bp.file,'$GETATTR'

end else

call msg('Modify BP filename in code to a file you have','','','')

end

end else

call msg('SENL corruption error','','','')

end

 

Peripheral Trivia

As this issue of S/ENL was put to bed we fed the inner man with:

TV : South Park

Book:"Push" - by Sapphire. A Ghetto "Flowers for Algernon" for the 90s.

CD: FDR Compilation.

WEB: http://625.simplenet.com/snatcher.htm

[top]

[top]

Join us :Send Mail to Admin@Sprezzatura.com with subject SUBSCRIBE SENL
Leave Us:Send Mail to Admin@Sprezzatura.com with subject UNSUBSCRIBE SENL
Change of Address: Leave at the old address & join at the new one
Web Info:http://www.sprezzatura.com/
Tell us what you'd like to see in S/ENL:Ask_Sprezz@sprezzatura.com

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.

[top]

Copyright 2005 The Sprezzatura Group. All rights reserved.