Search

Everything stated on this site is, of course, MY opinion / statement / thought, unless specifically stated otherwise. You knew that.

 

PLEASE NOTE: I'm *slowly* combining my blogs into this single site. If you are looking for Lotus Notes content from my old site, please EMAIL me at: jrlitton at gmail dot com and tell me the link or the content you were seeking. I will try to email you the content within a day.

- Joe

Blog Index
The journal that this archive was targeting has been deleted. Please update your configuration.
Navigation
Wednesday
Mar262003

Use STYLE tags to control richText fields

My preferred approach to design and coding is to first decide how the interface should appear and behave, and THEN figure out how to make it happen.

One of the thorns in my side when I first tried using a richText field on the web a couple of years ago was the challenge of controlling the look of the generated textarea. The default textarea from Domino is 7 rows by 50 columns, and (as I recall) is Times or Courier. The default size is never what I really want, and I tend to develop pages that display Verdana or other sans-serif font.

Solution: Use STYLE parameters. A couple of years ago I would put ROWS and COLS parameters in the 'Other' portion of the Field's HTML tab. Now I prefer to specify settings in the 'Style' area of the same tab:


For a recent app, the settings I used for one richText field were
height:78px; width:250px; font-family: Verdana, sans-serif;

Here's how the richText field renders as a textarea before using the STYLE settings:


...and here it is after:


In this case, I had some other CSS that was also ensuring that the text came in as Verdana, so I got a bit redundant on the HTML tab.

In a similar vein, folks will often have a field located within a table or DIV. In this case, I think the easiest way to allow the richText area to render as a textarea that uses the maximum available width, is to simply include a STYLE 'width' parameter set to 100%: width:100%;

Of course, in the best tradition supporting the notion of the cobbler's children with no shoes, you may notice that there are several parts of this site that could use a bit of cosmetic attention. All in time...all in time.
Sunday
Mar232003

CSS

(Hmmm....the espresso must be in the bloodstream, 'cause the fingers keep typing :-) CSS (Cascading Style Sheets) are in use, at least to a degree, on more and more sites. This is pretty much required if one wishes to approach a goal of separating content from presentation. In the USA, the Rehabilitation Act's Section 508 requires Federal agencies to make their web sites accessible to those with disabilities. This would include designing the site to be compatible with software that 'reads' the site for folks who are visually impaired. More on theories of usability is available at Jakob Nielsen's site.

As for me, I see that the folks who have graciously offered Domino blog templates (BlogSphere, CodeStore, DominoBlog, and FreeDom Blog - on which this site is currently based) have all used CSS to some or large degree. On my own site, one of my goals is to completely get away from the use of tables for formatting, unless I am presenting true tabular data (row/column stuff).

So, as a start, a week or so ago I changed my About page to use only CSS for the presentation, instead of tables. I've used tables for years to control the presentation of data within Notes client documents and pages, Domino pages, and 'regular' web sites. Part of that is from having FrontPage at work and at home (NetObjects Fusion at home before that), and it's just so easy to use the WYSIWYG editors to get a page looking how you want. But if you look at the generated html, it's a mess! There are font tags and all kinds of junk strewn throughout the page. While FrontPage (and I'm guessing most other web tools) have provisions for CSS, if one simply opens the tool and starts building a page, what you end up with is heavy use of tables and heavy use of the HTML4-deprecated font tag.

My first html editor was Notepad and that's still the editor I use the most. When using FrontPage, I tend to use the html tab to type or paste in my html (after first deleting the stuff that FrontPage puts in there), and then use the preview mode to check how it's looking. Even easier is using my favorite JavaScript editor, Antechinus, plopping the html in there, and doing a preview.

With the studying I'm doing, and all the stuff going on at work, no guarantees just how soon I'll meet my goal of a site devoid of tables, a site with ALT text equivalents for all images, etc.,etc........but it will happen.
Sunday
Mar232003

Certifications

IT certifications do serve a purpose, and I will most likely continue earning industry certifications throughout my IT career.

Mike Golding had a post on Notestips.com almost a year ago posing questions about the value of certifications. There have been a number of comments to the post over the months, and it's a good read.

In my case, I'm a PCLP in R4,5,6 and an MCP (VB 6), have done some of the Oracle Developer tests, and will be taking the Sun Java Programmer test in a few weeks. I definitely agree that the Lotus tests have typically been easier than those from other vendors, although some of that perception could be because I live in the Notes/Domino world; forays into the Microsoft (VB) and Oracle stuff are definitely less frequent.

In the case of Java, I've been writing Java agents in Notes for a few years. That might sound good, but it's too easy to simply take what one might have done in LotusScript and simply 'Java-ize' it, without really taking the time to address the task at hand in a more object-oriented way (Bruce Eckel's "Thinking In Java" - free download or available in hardcopy - is an excellent intro to the OO/Java world). And now, of course, with the merging of Notes/Domino into the WebSphere world, the opportunities of Sametime, QuickPlace, XML in the Domino world, etc., etc., ......it will behoove us each more and more to know real Java, not just Java within the Domino IDE. But I digress.

What I find when studying for these tests is that while I might be fairly familiar with various features of the given technology, there are invariably holes in my knowledge and skills, and learning what's needed for certification helps fill in those holes. For me, the certification tests have fit well into a scheme of continually learning more. By scheduling a test, then taking time each day studying for that test, I find that I learn more than I would if I were using a less organized approach. Without the target of passing a test, I tend to be more scattered, since there are so many interesting things to learn.

Now as for the value of certifications when seeking a job, I think that varies quite a bit. Each company where I've worked has valued certifications, but none has required it. I have seen job postings from some companies, however, listing particular certifications as required. Maybe that would only be smaller companies that did not have anyone available to assess a resume and drive a technical interview? As many have stated, there are many out there with 'paper' certs, and no real experience.

The bottom line is that I enjoy the feeling of accomplishment each time I pass a test, I know that while the amount learned for each certification may vary, I do gain valuable knowledge with each cert, and, having been through a layoff in 2001 and subsequent job hunt (fortunately, it was a short hunt), I figure anything that helps ensure my marketability is a good thing.
Wednesday
Mar192003

WinAPI to mimic keystrokes

There are times when there seems to be no easy way to accomplish something programmatically - the only way to do the task at hand is via the keyboard. I recently shared this tip with someone at work, so figured I'd post it here: using the WinAPI to send keystrokes to the PC.

In this example, the API will be used to send keystrokes to deselect selected documents in a view and then refresh the view. This would be the same as manually hitting <Alt-E-D> to deselect and then hitting <F9> to refresh (there are, of course, many things you could do by sending keystrokes). The critical piece here is to know the hex code for whatever keystrokes need to be sent to the PC. There are a number of places on the web to find this. Here's a site of ASCII codes, and here's a site that includes the codes for some of the function keys. You want the hex value for the key, not the decimal value.

OK, so here's a LotusScript example. The 'magic' part of the code (the declaration of the API call) I believe I pulled from NotesNet quite a while back. And the html rendition of the code was, of course, rendered using Julian's ls2html routine.

Of course, it's your responsibility to ALWAYS carefully test anything before using it production!
Monday
Mar172003

Dixie Chicks - music

Jess has a post today about Dixie Chicks and freedom of speech. Well, I'm home today, taking a vacation day to do my once-every-five-years cleaning of the office room. In support of free speech (and 'cause their music is great), I've got a Dixie Chicks CD playing.

Whilst cleaning the room, I found a pic from before my son was born (he's in his last year of high school now). The pic below is of a buddy of mine and me (I'm on the left; Dave's on the right). He was teaching in a 2-room schoolhouse in Yaak Valley, Montana. My wife and I went out there in the summer to visit, and this shot is Dave and I picking some tunes on a Montana bluff at sundown. It's kind of a sanity check for me with all that's going on in the world right now, so I figured I'd post the pic.

And I'm going out later today to buy another Dixie Chicks CD.