S/ENL - The Sprezzatura Electronic Newsletter (All the RevSoft News That's Fit To Print (And bits that probably aren't as well...))
WELCOME - to this, the much delayed next edition of S/ENL - the Sprezzatura Electronic Newsletter. The delay in publication has been quite deliberate - with the new broom in place at RevSoft we can get back to doing what we do best. Under the old regime it didn't seem worthwhile producing SENL. We'd no sooner document a cool technique than it seemed the old management would change the license to make it illegal. As those of you who've been to the road show will know - all that has changed! So now we can concentrate on enabling! And enable we do - in this new bumper issue of SENL (specially beefed up by way of apology for absence) you can find ways of extending ALL of your apps from Rev G to AREV to OI! We're especially pleased to be able to announce S/List for AREV users! Thanks to RevSoft for finally seeing sense and allowing users to report on their own data! For those of you who are reading SENL for the first time - welcome - just for you our editor has been allowed to indulge himself with a monologue on what the Rev community is and where it seems to be heading. Those of you bored by polemic diatribes might wish to skip this article, xenophobically wittily entitled "Care in the Community". (This is only funny in the UK where medical assistance is state provided but cuts in the mental health budget have allowed previously institutionalized mental health patients to be released to look after themselves with some external support. This policy has been called (without a hint of irony) "Care in the Community".) Interspersed with our Advertorial articles we've also managed to include some handy reference materials, bringing @Attack up to date for OpenInsight 3.7.x, documenting undocumented OpenInsight trivia along with a whole host of other goodies. And we're pleased to welcome back a strangely resuscitated Eric the Emu - we don't know if he's alive or whether this is an archival flash back! Those of our colleagues in the antipodes may be interested in knowing that a UK contingent have arrived for the roadshow on the 19th of July and are staying around in Australia/New Zealand until early August. If you'd like to meet to talk about how the Sprezz Group can help you then let us know! Similarly if you're on the West Coast of America we hope to stop over for a week or so during the first week of August - so if you'd like to meet/get some cheaper (no flights <g>) consultancy, again let us know! Thanks to all of you who've been so supportive during the past year or so - it has been a bad time for the whole Rev community. But at last we're back on track with RevSoft's new management and InsiTech's cool new JOI product. So without further ado let's move on to the main journal and feed straight into some accumulated feedback! Welcome back - it's good to be with you again! Regards
All at Sprezz. On the recent roadshow, Mike of Revelation (see Celebrity Interview later in the journal) commented jokingly that he (being of Irish descent) can listen to his own voice for hours - reminiscent of that old Celtic invention the Lord Weird Slough Feg - "Eyes without life...sundered heads...piles of carcasses...these are pleasing words to me". Well, not really but... gives us an excuse to practice our Celtic meanderings... In similar vein we like to recycle customer feedback (changing the names to protect the innocent).. so on the subject of Utility32 (see article later) PR writes "MANY thanks for the product, it is a real boost to our OI applications." Meanwhile in the S/List raves corner RC writes "S/List is a very nice product. I was amazed at it being able to literally reuse our R/List statement. Really really nice. I can see that it will save us many hours of work in our conversion to OI.". MP chips in on the same subject "the S/List 2 product ... and have found it to be a very impressive bit of programming. An excellent product. Thanks for developing it!" At the same time S/List for S/Web is picking up some quaintly understated praise, as GH writes "THIS IS AWESOME!!!!!!!!!!!!!!!!!!!!!!!!!!! You guys are geniuses. Everyone here is blown away! Thanks for this, it is unbelievable, much more than I expected!". Not to be outdone, Sprezz Oz's Steve Smith's CPUPlus utility continues to garner praise "Have installed CPUPLUS; it works - reduction in processor usage on our terminal servers is significant. Thanks for your help" BS writes "Is there any chance of the article that was alluded to:- a follow-up on "OIWin_Comm_Init"...what each variable was and it's fields, plus examples of the use they can be put to.". Well we're pleased to say that your wish is our command - see the article by Aaron later in this issue. DS writes "how can I abort a long select or list process?"... Carl replies "use a symbolic dictionary item in the query ( put it in SYSDICT so it's global ) that checks to see if a cancel flag has been set - if so then kill the select list which should break the selection process. eg.. create a symbolic something like this called CANCELCHECK *// Check if Cancel Flag is set if cancelFlag then clearSelect 0 @List.Active = 0 @RecCount = 0 end return 1 and use it like this SELECT THISTABLE WITH DATA EQ "THIS" AND WITH CANCELCHECK EQ "1" Joke Section - An Oldie But Goldie From Several People Once upon a time in the Kingdom of Heaven, God went missing for six days. Eventually, Michael the archangel found him, resting on the seventh day. He inquired of God, "Where have you been?" God sighed a deep sigh of satisfaction and proudly pointed downwards through the clouds, "Look Michael, look what I've made." Archangel Michael looked puzzled and said, "What is it?" "It's a planet,- replied God, "and I've put LIFE on it. I'm going to call it Earth and it's going to be a great place of balance" "Balance?" inquired Michael, still confused. God explained, pointing to different parts of Earth. "For example, Northern Europe will be a place of great opportunity and wealth while Southern Europe is going to be poor; the Middle East over there will be a hot spot. Over there I've placed a continent of white people and over there is a continent of black people" God continued, pointing to different countries. "This one will be extremely hot and arid while this one will be very cold and covered in ice" The Archangel, impressed by Gods work, then pointed to a small island in the northern hemisphere with subdivisions within it and asked "What's that?". God said "Well that my friend is England". Pointing further north within the island Michael indicated one of the subdivisions and repeated the query. "Ah" said God. "That's Lancashire, the most glorious place on Earth. There are beautiful mountains, rainforests, rivers, streams and an exquisite coastline. The people are good looking, intelligent and humorous and they're going to be found ravelling the world. They'll be extremely sociable, hardworking and high-achieving, and they will be known throughout the world as diplomats and carriers of peace. I'm also going to give them superhuman, undefeatable cricket players who will be admired and feared by all who come across them". Michael gasped in wonder and admiration but then "You said there will be BALANCE!" God replied wisely. "Wait until you see the ugly, whinging, sheep rooting, Yorkshire buggers I'm putting next to them". The Revelation community has been through a turbulent few years recently and as the dust starts to settle and the new owners of RevSoft start to work on recapturing the community's interest I thought it might be interesting to reflect on where we are and how we got there. Early Days Back in the early 80's the PC as a business tool was only just beginning to become widely accepted, and along with it a profusion of new products for the PC all aimed ostensibly at making the everyday life of the average user easier. Users were revolting against the restrictions placed upon them by a mini/mainframe dominated IT industry and welcomed the chance to set their own standards. Users didn't want interconnectivity and compatibility, they wanted to be able to do their own thing and exchange files by exporting if needs be. They wanted to be freed from the tyranny of custom hardware and expensive peripherals. It will come as no surprise to learn that the majority of initial sales of Revelation (Revelation C) were to users of the PICK database - primarily because Rev contained a terminal emulator which could be used with Pick minicomputers and mainframes. To put this into context, Lotus 1-2-3 dominated the marketplace and Norton Utilities had just been introduced. In fact I remember writing to Peter Norton thanking him for his useful tool but suggesting he get rid of the ridiculous kipper tie if he wanted to be taken seriously in the UK. The database competition was provided primarily by dBASE and Clipper - Paradox didn't become a contender until AREV was well established. Revelation databases were normally used on twin floppy machines, with Rev in drive A: and the data in drive B:. DOS 2.0 was introduced and included sub-directories for the first time. It confused me for days. At this stage the community was supported primarily by the Revelation BBS and a couple of independent boards. The Mid 80's As users began to get more from their PCs, the market began to create new products to feed the demand. As modem cards became popular, telex cards waned. As colour adapters decreased in price, monochrome monitors became less used. Finally I remember Howard Hegwer from RevSoft coming to the UK to tell us all about the latest version of Rev - which contained networking support. This was a new concept - what was networking? We knew soon enough as Novell opened a UK office in Tunbridge Wells with 8 employees and a product called G Net. Our first users adopted the AT (I had abandoned my previous stance "AT's? 20MBs of disk? That's for power users mate..." a few months earlier) and networked Revelation became one of the first networked databases available for the PC. Back in the 80's the PC computer community was not as MS homogenous as it is these days. Rival database manufacturers flourished, each with their own different strengths. The group of users who made up the Revelation user base all tended to share certain characteristics. I know that this is editorial opinion and some may disagree but... Revelation users were in some way maverick, this was normally marked by left or right leaning tendencies. There were extremes of belief on all sides but united by the belief that it was "us" and "them". "They" were always bigger with better targeted marketing budgets and a lack of interest in individuality. "We" knew that the only way to compete was to form a guerilla style community with lots of self help. And so the community grew. In it's hey day there were lots of user groups, bulletin boards, fora, magazines, newsletters, Dan & Jerry, ELF, Ira & Dave and towards the end of the '80s including what we believe remains the best source of technical information for Advanced Revelation users, "REVMEDIA - The Developer's Link". As the 80's reached conclusion, SQL Server was all the rage. Advanced Revelation had better support for SQL Server than any other database, and this along with it's exciting BFS concept (the ability to use AREV as a front end to pretty much any back end) enabled AREV to push into companies where it was not formerly popular. Revelation were shipping lots of units - in fact they sold more SQL Server than any other database company. Somewhere along the way the original developers in Cosmos decided to sell the company to a client company which was making money hand over fist - enter Mainframe Micros, an HR company started by Steve Perry, and now so successful in their marketplace that Steve and Jim Acquaviva (Steve's partner) could take over Cosmos - thus ensuring control of their primary tool. One of the first things to go was the name - people identified with Revelation (the software) so the company name was changed to Revelation Technologies Inc. (not abbreviated to RTI originally as this was already taken) - a smart move at the time. Unfortunately, Mainframe Micros were East Coast and Cosmos was West Coast so suddenly we had a bipolar organization. The developer base tended to side with the West Coast all the more so as the internal realpolitik divided the company into two camps. The East Coast had more of a "business hat" - sensing the raise in stature of the PC from a personal device to just another extension of the Mainframe culture that preceded it. The West Coast was still more firmly grounded in the "hacker" mentality that so epitomized the enthusiast PC marketplace. But this attitude was to prove damaging for the company. The East Coast "suits" insisted that Advanced Revelation should become more mainstream and that the target marketplace was Fortune 500 companies - a goal which surprised most of the developers (whose OWN clients were Fortune 500 and who realized the nature of the sale into such beasts - a sales that the AREV product was not geared up for). The instruction was given "make AREV more mainstream compliant" and thus was launched the fiasco which we more lovingly refer to as "AREV 3.0 - Lightspeed". The West Coast cabal in a fit of what can only seem with hindsight as awe-inspiring petulance, released a "more mainstream compliant" AREV - one which no longer understood AREV 2.X commands and one which required major rewrites to work with. Now admittedly Mike Pope (Technical Writer and all round nice guy) had been trailing the potential problems on non-SQL compliant dictionary naming conventions (read . Vs _) but the act of REPLACING the commands rather than just ALIASING them was a stab in the back for the existing community. "You want SQL - we'll give you SQL" - "Oh you wanted compatibility too?!" "Lightspeed" was another indirect kick in the teeth. The East Coast proudly trailed the speed increases coming in "Lightspeed" AREV. But when the product was released it was slower than ever. Spokespeople for the East, egg showing clearly on face apologized with reference to specific test results. There are two theories here - one, the West Coast allowed the East Coast to go public to embarrass the East Coast and two, the East Coast refused to listen to subsequent information from the West Coast in their enthusiasm to plug AREV 3.0 sales. Whichever way you look at it, here was another kick in the teeth for the community. If you really want to judge how ill-advised this move was... look at Rev's internal systems at the time, they stayed 2.1 because moving to 3.1 broke them! At this stage, relations between the community and the developers changed subtly. Add in an East Coast management team who's increasingly autocratic behaviour towards their customer base showed the contempt in which they were held and it is no surprise that the developer attitude towards RevSoft changed. Meanwhile work on OpenInsight was progressing. Rather than build a team who knew the market, C programmers were drafted in and trained (incompletely) in MV techniques. Rather than listening to their existing user base and providing AREV for Windows, OpenInsight was released as an unworkable piece of middleware to a largely indifferent market. The lack of front end tool set lead to some highly speculative announcements from RevSoft management (including a Mac style OpenBook interface whose announcement at conference was the allegedly the first the developers had heard about it) but no really useful/saleable tools. So management hunkered down and began a rethink. This time they included external developers as channels for market feedback and came up with OpenInsight 2.0. At this stage the community began to pick up hope again and the release of 2.5 made it begin to look as though the developers in the community (who ultimately sell the product) were once again being listened to. Around this time the West Coast was subsumed into the East Coast - a merger caused by the increasing difficulties of running and managing two offices that far apart with one senior management team. Meanwhile as the 90s progressed the marketplace was moving towards GroupWare. Microsoft were attempting to mutate Exchange into Lotus Notes and the market was abuzz with the concept of WorkGroups. The newly focused management team arrived at a truly exciting destination - OpenInsight for Workgroups, Lotus Notes Edition. The plan was to release an edition of OI for each major piece of GroupWare. It was a good plan and had the potential to crack new marketplaces. Internally at RevSoft, the old marketplace was seen as restrictive and a commercial hindrance to the bold plans of the new direction. Aspiring Larry Ellisons were not traditionally encumbered with a fiercely loyal developer base who loved their product the way it was and resisted change for arbitrary reasons. The only use for the dinosaur community was as a cash cow. So OpenInsight for Workgroups was released - not as an upgrade but as a completely new product. The fact that it shared a code base with OpenInsight for LANs was irrelevant - if you wanted the latest and greatest version you HAD to pay for your OpenInsight again - even though several key features in 2.5 still didn't work as advertised and would only be fixed in the Workgroups version. So after years supporting an evolving product the loyal community was treated in the same way as new prospective clients - pay up or shut up. The covering letter provided with 3.0 was the final nail in the coffin of community Vs RevSoft trust. The letter (signed by Kurt Baker) explained that Revelation were in the business of providing development software to "Lotus Notes Developers" and Revelation Authorized Training Centres had to be Lotus certified if they wanted to remain authorized. Unsurprisingly the community revolted - forcing a reluctant climb down from RevSoft who opined that the developers had missed the point - the letter was for "new users". However the developer community found new champions. Cameron Purdy and Gene Gleyzer became more responsible for the direction of OpenInsight and slowly but surely the old spirit of AREV began to rise again in the product. More tools were written in the tools themselves and with Cameron's pushing more sample source code (and product source code) began to emerge. Once again the community began to feel that whilst management might not understand them, at least the technical people at RevSoft did! So when in around 1997 RevSoft announced that they were embracing Microsoft's COM model for OI32, the community whilst surprised, waited to see what would happen, trusting that the lead developers had their interests at heart. When in 1998 RevSoft announced a change of direction towards Java, this made more sense to the community and the change was embraced with enthusiasm. Developers signed up for Works willingly, knowing that they would, as promised, get jREV included (the full final release, not some cut down non-commercial version) when it came to fruition shortly. These next few years marked a downwards spiral as RevSoft management set about more effectively alienating the community they professed to serve. Every aspect of licensing which could be tweaked was tweaked. Restrictions on runtime copies became increasingly draconian. Literal interpretation of the license would lead to the product's being undeployable out of the box. Add to this the addition of retrospective licensing conditions (that which was provided as part of Works suddenly became a chargeable item (c.f. WDP) etc) and refusal to listen to opinion of the various fora - especially the licensing forum - and developer ennui became complete. Developers in the community split into two camps, helped in part by the cultural apartheid inspired by the Works program. Virtually no technical support questions were answered in the non-Works section by RevSoft personnel showing how RevSoft were defining community (someone who is currently paying for a subscription service rather than somebody who buys/works with my products). So community stalwarts sprang to the rescue and began an almost CompuServe Sysop style of contribution. As the relationship deteriorated yet further RevSoft in our opinion seemed to renege on previous promises - restricting the scope of the Works program vis a vis jRev, changing the license to prevent deployment of specific 3rd party tools. Shortly thereafter, Cameron and Gene (the chief architects for jREV) left to form Tangosol and jREV to all intents and purposes died. At this stage things seemed to be unable to get any worse. The Rev community was still there and kept together by the public fora on the Rev Website - by this time comp.databases.revelation had all but died and no other viable discussion boards were out there (yes - we know of at least two others but they have failed to gain critical mass) but RevSoft management were no longer trusted over anything by the community. The Works program had stagnated and there seemed little point in renewing - new content was trivial and few and far between. Just where this could have began to take on the characteristics of a eulogy the plot took on a surprising twist. RevSoft UK was sold to Clive Booth - the UK MD, marking an end to RevSoft US's involvement - the reins were slackening. The future began to look mutable. Jim Acquaviva put his majority stake in RevSoft up for sale. Jim has left the Rev community and gone to work as CEO at Kada Systems (www.kadasystems.com) formerly www.emwerks.com. Kurt has gone with him and all former employees of RevSoft are gone - the end of an 18 year old era. So here we are at the present - and the future looks interesting. jREV is dead, JOI looms. Works in actually receiving input for the first time in a long time. Technical issues are being addressed and bugs resolved. Mike Ruane is attempting to reach out to the developer community. Licensing is becoming more reasonable, and the developer community are again being asked to contribute. Once again the community has come full swing and RevSoft is becoming community lead again. The community continues to thrive - the collective that would not die. Will this mark a rebirth or is it just another hiccup in a slow and lingering death? We don't have answers but we do know that our efforts are going to go into the rebirth and not into euthanasia! See you there? Celebrity Interview - Mike Ruane
OI Window Common Revisited - Aaron Kaplan One of the items most ARev developers miss most about OpenInsight is the loss of Window_Common variables. While Window_Common was a great boon to ARev, most of its functionality is handled through GET_PROPERTY and SET_PROPERTY, a method I much prefer. However, there are some properties that are not accessible through these functions, and some which do not have SET_PROPERTY methods. These values must be stored somewhere though, and that place is in the OI Window Common area. The OI Window Common area is a variably labelled common area. Before we go any further, let’s talk a little about variably labelled common areas. This a new feature added into Basic+ for OpenInsight. It’s something most of us would have killed for in ARev. OK, not killed, but maimed. Well, maybe not maimed, but busted some kneecaps for. How about selling our mother-in-laws? The idea behind this is that you can variably define the name of the labelled common block. As with standard labelled common, when the names match, the variables are the same. Otherwise, they are a different set of variables. This was the reason the Window_Common was a common block, and not a labelled common block in ARev. Common blocks are instantiated with each execution of a MAIN program, not a subroutine. WINDOW is a MAIN program so each time a new window was loaded over an existing window, the MAIN routine would instantiate a new instance of the common block. OpenInsight does not have that luxury, since all windows exist side by side. So, variable named labelled commons were created. The syntax for these is very simple: common //someVar// lcVar1@, lcVar2@, lcVar3@ Notice how the labelled common name is delineated by a double slash instead of a single slash. This tells OpenInsight that the areas name is a variable, not a literal. This feature can come in handy in many places, especially on web applications, where all users are potentially sharing a single variable space. By loading up a labelled common block per registered user or session ID, the server can store specific values for each session. However, this all beyond this document. We’re here to talk about OI’s window common area. OpenInsight’s common area is defined in a SYSPROG insert record called OIWIN_COMM_INIT. Here’s the contents of the row compile insert OIWin_Comm_Init * to access the internal attributes of a particular window, set the variable * WinID to the name of the window immediately before inserting this record equ COMMON_PREFIX$ to "%COM_" CommName@ = COMMON_PREFIX$: WinID common //CommName@// JoinMap@, RowMaps@, MasterRowMap@, KeyMap@, ControlMap@, ControlList@, OrigResultRow@, ControlSemantics@, QBFIds@, QBFRows@, QBFCount@, QBFPos@, RowLocks@, SubRows@(10), QBFMode@, DataSourceMap@, OIWinReserved@ Each block is defined by WinID, which is assigned from @WINDOW or CtrlEntID during the Create Event.
Note: OpenInsight works on a very different principle than ARev. In ARev, the window was a representation of @RECORD. In OpenInsight, @RECORD doesn't really exist. The RECORD property is loaded on demand from the SubRows@(0). SubRows@(0) is only updated programmatically by setting DEFPROP, RECORD or INVALUE. Normal window operations also set this value. @RECORD in OpenInsight is transient and flaky. You can be assured of it's correctness and completeness when referenced from symbolics, but that's about all. For the sake of completeness, @RECORD, @ID and @WINDOW are updated when RUN_EVENT is called. @RECORD comes from SubRows@(0), @ID from RowLocks@< 1, 1, 1 > and @WINDOWS comes from the window name passed into RUN_EVENT. The reason for this is the OpenInsight is form based. The form is the primary controlling item. When you write from an OpenInsight form, the system first compares what changed on the form from what was originally read (which would be SubRows@(0) and OrigResultRow@). Once that list is determined, the system reads the record from disk, inserts the changed fields, then writes the record back to disk. You are reading this correctly. Data on the screen might not actually be written back to disk. Only information different from when the record was originally read will be written back. There's more information on these field definitions in Sprezzatura's Technical Bulletin #2, Compiled Window Structures and in the OIWIN_EQUATES insert record in OpenInsight. I don't know about you but I sometimes have the need to ensure that associated MVs in a window are stored in sorted order. I'm sure we've all written a generic beast to deal with this over the years but here's a simple one I knocked up recently. (And no, that doesn't mean the same in the UK...) Subroutine Sort_Row(Param) SortOrder = Field(Param, "*", 1) FieldsLeft = Field(Param, "*", 2, 999) FieldsToSort = FieldsLeft Convert "*" To @Fm In FieldsToSort Ctr = Count(FieldsToSort, @Fm) + 1 DataArray = '' LoopCtr = Count(@Record<FieldsToSort<1>>,@Vm) + (@Record<FieldsToSort<1>>#"") For X = 1 To LoopCtr For Y = 1 To Ctr DataArray := @Record<FieldsToSort<Y>, X> : @Fm Next DataArray := @Rm Next Call V119("S", "", SortOrder[1,1], SortOrder[2,1], DataArray, Flag) Convert @Rm : @Fm To @Fm : @Vm In DataArray For X = 1 To LoopCtr For Y = 1 To Ctr @Record<FieldsToSort<Y>, X> = DataArray<X, Y> Next Next Return Windows NT/2000 Editor Annoyances If like us you've been frustrated by trying to open rows in the System Editor using Windows NT or Windows 2000 (you open the dialog and try as you might you can't select the row in the row box by typing or clicking, meaning you have to type it in yourself in full) you will be pleased to hear that for once, the product favours keyboard users! Rather than using File/Open from the menu, press Ctrl-R to open the dialog directly. Now suddenly you'll find that the old selection functionality has been restored! (Thanks Aaron - you mouse luddite you!) If you've got one of those weird situations where you search to find a term and the editor finds it but refuses to move focus to the line, simply press arrow left and the cursor will relocate on the line in question. Same for Ctrl-G for GOTO. The Emperor's New Clothes - Carl Pates Ok, so you’ve spent hours designing your user interface – it’s perfect in every detail and looks just like part of the latest UI masterpiece from Redmond…and then the user decides that they want their system in a lovely shade of pink and green, ruining your carefully-wrought design and making the beautiful grey and blue shades of your app hideous and unsightly (hey, we all use ‘Windows Standard’ right? J) So how can you cope with this tragedy? – Well it’s quite simple really; when the user decides that they are fed up with the same color scheme and wants to use something more obnoxious and visually painful, the system broadcasts a special message to all the running top-level windows to flag that a color change has taken place. We just need to respond to this message and change the colors of our windows to match the system ones and hey presto – now our app looks ugly too! So the first thing to do is trap the system broadcast message. It’s called WM_SYSCOLORCHANGE and is defined in Windows as: #define WM_SYSCOLORCHANGE 0x0015 Which to you and me means 21. So for any OI forms where we want to react to this message we need to define a WINMSG event handler that responds to it. First we need to tell OI that we want to trap the message by using the Send_Message() QUALIFY_EVENT method . The CREATE event of a form is usually the best place to do this: $insert logical equ WM_SYSCOLORCHANGE$ to 21 call send_Message( @window, “QUALIFY_EVENT”, WM_SYSCOLORCHANGE$, TRUE$ ) Then we need to create a WINMSG event handler that OI calls to handle the change. Something like this would do using Event script: $insert logical equ WM_SYSCOLORCHANGE$ to 21 begin case case ( Message = WM_SYSCOLORCHANGE$ ) call exampleDoChangeColors() end case return 0 …or something similar if you used Quickevents and commuter modules. OK, so now you can write a function to actually find out what the colors are and change them. For this you’re going to need to use a Windows API function called GetSysColor() which is exported from User.Exe. It’s defined in the Windows API as: GetSysColor(nDspElement) int nDspElement; /* display element */ The GetSysColor function retrieves the current color of the specified display element. Display elements are the various parts of a window and the Windows display that appear on the system screen.
So you pass it an integer representing the display element to want to get and it returns an integer that represents the RGB color value of the element you asked for. So, if you’re still interested at this point here’s what those display elements mean in OI: Equ COLOR_SCROLLBAR$ To 0 Equ COLOR_BACKGROUND$ To 1 Equ COLOR_ACTIVECAPTION$ To 2 Equ COLOR_INACTIVECAPTION$ To 3 Equ COLOR_MENU$ To 4 Equ COLOR_WINDOW$ To 5 Equ COLOR_WINDOWFRAME$ To 6 Equ COLOR_MENUTEXT$ To 7 Equ COLOR_WINDOWTEXT$ To 8 Equ COLOR_CAPTIONTEXT$ To 9 Equ COLOR_ACTIVEBORDER$ To 10 Equ COLOR_INACTIVEBORDER$ To 11 Equ COLOR_APPWORKSPACE$ To 12 Equ COLOR_HIGHLIGHT$ To 13 Equ COLOR_HIGHLIGHTTEXT$ To 14 Equ COLOR_BTNFACE$ To 15 Equ COLOR_BTNSHADOW$ To 16 Equ COLOR_GRAYTEXT$ To 17 Equ COLOR_BTNTEXT$ To 18 Equ COLOR_INACTIVECAPTIONTEXT$ To 19 Equ COLOR_BTNHIGHLIGHT$ To 20
Of course you’ll have to prototype GetSysColor before you use it but that’s easy. Open the DLL_USER record in your SYSPROCS table and add the following line to the end if it’s not already in there: LONG PASCAL GetSysColor(USHORT) Save the record and from the System Editor Exec line do this: RUN DECLARE_FCNS “DLL_USER” So onto a function that reacts to color changes. Basically you want it go through the controls on your forms and change them as necessary. You don’t need to worry about the menus either as the system takes care of these for you. * // Sets the colors on a window to match the system controls * // * // object -> Window name to apply changes to
if len( object ) else object = @window end if Len( object ) then ctrlMap = object : @fm : get_Property( object, "CTRLMAP" ) backColor3D = GetSysColor( COLOR_BTNFACE$ ) textColor3D = GetSysColor( COLOR_BTNTEXT$ ) windowColor = GetSysColor( COLOR_WINDOW$ ) windowTextColor = GetSysColor( COLOR_WINDOWTEXT$ ) hiLightColor = GetSysColor( COLOR_HIGHLIGHT$ ) hiLightTextColor = GetSysColor( COLOR_HIGHLIGHTTEXT$ )
ctrlArray = "" propArray = "" dataArray = ""
pos = 1 loop nextCtrl = ctrlMap[POs,@fm] POs = col2()+1 while Len( nextCtrl ) ctrlArrayX = nextCtrl propArrayX = "TYPE" dataArrayX = ps_Get_Property( ctrlArrayX, propArrayX ) ctrlType = dataArrayX[1,@rm] locate ctrlType in "EDITFIELD,EDITBOX,COMBOBOX,LISTBOX" using "," setting something then ctrlArray := nextCtrl : @rm propArray := "BACKCOLOR" : @rm dataArray := windowColor : @rm
ctrlArray := nextCtrl : @rm propArray := "FORECOLOR" : @rm dataArray := windowTextColor : @rm end else CtrlArray := nextCtrl : @rm propArray := "BACKCOLOR" : @rm dataArray := backColor3D : @rm
ctrlArray := nextCtrl : @rm propArray := "FORECOLOR" : @rm dataArray := textColor3D : @rm end repeat ctrlArray[-1,1] = "" propArray[-1,1] = "" dataArray[-1,1] = "" call ps_Set_Property( ctrlArray, propArray, dataArray ) end
That’s a pretty basic way of handling the color change, but at least you should get the idea. One thing to watch out for: The colors of the column headers and row buttons in an Edit Table cannot be changed. They are hardcoded to be grey! Anyway, if you want to see this work in action download the S/Param wizard from our website and have a go at changing the system colors when it’s running. Enjoy! One of the most welcomed licensing changes on the recent roadshow has been the permission to create RList style reports on a runtime copy of OpenInsight. The idea that you were not allowed to report against your own data seemed one of the most ludicrous ideas in the history of databases - magnified by the suggestion by Kurt Baker that if you wanted to report on a runtime you should export the data using the data warehousing feature and use Crystal reports! With this returning to normal of licensing we have the capability to help existing AREV developers provide Windows reporting tools to their client base, a chargeable upgrade that adds both flexibility and value. We're pleased to announce the availability of S/List for AREV - our premier reporting tool on an OpenInsight runtime with tools to allow the attachment of AREV files for sophisticated Windows based reporting. S/List is a Wizard driven replacement for EasyWriter - with the added benefit that you have full access to the entire range of Windows fonts along with special effects like shading and grids. Upon launching the S/List application the user is presented with the S/List main screen as follows :- Firstly the developer or user must define the AREV files that they want included for the end user to report on. To do this they go to the developer menu and choose Tools, Database Manager. This launches the Database Manager window :- from where the AREV tables can be navigated to and added to the database. Once there and the database is saved, the developer can further customize the product by going to the Developer, Options menu which displays the product customization window The customization Window permits the developer to "Brand" the product with their own logo, and even to determine whether the user should have TCL access - an important consideration with some users! Finally the developer can decide specifically which tables and columns a user has access to by choosing the Developer, Options menu - this provides a drill down hierarchical view of the tables and columns available for reporting on and allows the exclusion of specific columns for the current user. This provides a visual display using intuitive icons to assist In the example above, the user has partial access to LOG but will not even be shown the existence of SYSREPOS. Once setup is complete the user can start to create reports. S/List provides both a "Wizard" approach to reporting and a data entry screen approach - both will be shown here. We think this wizard is largely self explanatory so mostly we'll just show screen shots! Note that we eventually chose 3 columns so for each column we can define display characteristics such as font or shading. The screen icons change to represent the choices made. Now the system launches the normal entry window with the report we have just defined Alternatively the user could just type in a list statement into TCL - if they want to remember the extended syntax! S/List for AREV is kept current with S/List for OI - so it too will shortly be able to produce not just printouts and screen displays, but PDFs, HTML, RTF et al. So to the crunch - what does it cost to provide real time true Windows reporting to your AREV users - the answer is probably a lot less than you think! Existing OpenInsight S/List users may be surprised by this but the price for AREV S/List has to be greater to accommodate the OpenInsight license seat required to ensure data integrity between AREV and OI. Still it represents great value for money at only $499 per Reporter seat. As more seats are required the price decreases in proportion like normal AREV bump disk licensing. Unlimited user seats are available and for the package developer reasonable licensing is available to make it possible to make S/List part of your product. As the many happy existing users testify (see feedback earlier) S/List is a great product to use - we're VERY pleased to finally be able to make it available to the AREV market. To order your copy mail Sprezzatura now! A Primer in CSS Styles - Jahveen Davis and Palminder Sangha Definition CSS is an abbreviation of Cascading Style Sheets that can be utilized to optimize document style management on your website. It allows one to change the appearance of the site without having to update each web page. History The World Wide Web Consortium, known as W3C, first released CSS Styles in 1996. The sole purpose for introducing CSS styles was to separate the document layout from the document appearance. However, the idea of this separation was hatched right at the very beginning of the creation of HTML back in 1990, but poorly made decisions by browser firms staggered the release and development of style design. Advantages
Disadvantages
When to use them and why The usage of CSS styles is recommended when an organization boasts a large web site, which requires regular maintenance. This goes without saying that changes made to the CSS styles will be reflected in the entire web site, reducing maintenance by orders of magnitude. Major HTML Editor Vendors
Examples of CSS Styles The following example shows the most common ways of incorporating CSS styles into a web site. Styles can be user-defined, or can be modifications of HTML styles. In Figure 1 below, there is a mixture of CSS styles uses; styles are defined in-between the <head>" tags of the page:
Figure 3 shows the expected output from the application of CSS.
Figure 1: A Web Page using CSS
Figure 2: An external style sheet file
How to set up CSS Styles in Dreamweaver We will now go through a step-by-step process of how to create CSS Styles in Dreamweaver.
Figure 4: A CSS Style Window in Dreamweaver
Note there are 3 different Types of CSS Styles you can use. 1. Make Custom Styles Custom Styles can be applied to any text in a document regardless of which tags control the text. You have an option to design your own styles. Note, under Name you will not have any options to choose from. Instead you type the name of your style here. 2. Redefine HTML Tag Default formatting of specified HTML tags such as body, table, paragraph and so on. 3. Use CSS Selector Defines the formatting of particular combination of tags i.e. link tags which are available and The bottom half shows you can define the style in this document alone or an External Style Style sheets created in a document alone can be exported to create a new style sheet file. As an example we will be designing a Style by selecting the following:
Note: Our style sheet will only be used for this document, not for the entire site. Any custom style that you create has a period appended to the front of the definition. In order to use custom styles you apply it as a Class Attribute into the tag in which you intend to use.
Figure 6: A Style Definition window for your new style In this window you can modify your style to your preference. You can change font colours, size, font name and so on. The Category list allows the user to change various attributes such as the background, list, box and so on.
Figure 7: An example of a CSS Style being used on your document The CSS Style has added zzbold to the window. You can apply the style to your text as shown in the above example, by highlighting the text and clicking onto the style. To make instantaneous changes to the style you can double click on the style or by clicking the third icon on the right hand side of the window.
Exporting Internal CSS to File To do this you do the following: - Go to:
You can access this CSS Style Sheet from your files and make instantaneous changes to your document. How to Import Style Sheets to your page You go to:
Note you can have more than one style sheet files, for example one can contain text styles and another one can contain all the table styles and together they complete CSS Style solution. Please find below website addresses on CSS Tutorials and FAQ which you may find useful: http://www.dynamicdeezign.com/css/introduction.html http://hotwired.lycos.com/webmonkey/reference/stylesheet_guide/ |