Thursday, May 31, 2007

It's been a week....

since both my Wings teams lost. The K-Wings lost 3-1 in game 7. They played tough but just couldn't get a win on the road in the finals. They still had a good season and the countdown has begun to the start of the next season. The worst part is that the IceHogs announced earlier in the year that they were leaving the league. It bugs me that a team that bolted wins the championship on their way out the door, but they played well enough to win so I have to give them that.

The Red Wings lost in 6. I think the Ducks basically just wore them down with the physical play. It didn't help losing Schneider but there were times when they didn't seem to have the intensity they needed. Interesting talk about the possibility of them going after Giguere this off-season. Guess if you can't beat him, get him to join you. He has looked pretty solid so far, but I still think I'd prefer to see Ottawa win it.

Add to these the funk the Tigers have been in the last week and the uphill battle the Pistons are fighting and it's kind of a tough time for Detroit sports lovers.

Tuesday, May 22, 2007

Do or Die Tuesday

Both the K-Wings and Red Wings are down 3-2 in their series, and both play game 6 tonight. The K-Wings are at home and, according to coach Reeds "always play their best when their backs are against the wall." Here's hoping that's true once again tonight. As for the Red Wings, hope the bitter taste from Sunday lingers long enough to give them motivation.

Both teams just need to play to win rather than playing not to lose. Easier said than done, I know.

I know I'm biased, but I'm not sure an Anaheim-Ottawa series is what the NHL is hoping for from a TV ratings standpoint. Not to mention the fact that there will be more late night games that way. I'm just hoping I can find Versus at the hotel or a bar tonight in Cleveland!

Thursday, May 3, 2007

Wings Win! (Twice)

Both the K-Wings and Red Wings won last night! The K-Wings play at home again on Friday and the Red Wings are home on Saturday. Keep the momentum going!

SnTT: Single-View User Interface Problems (and Solutions)

Lately, I've been doing a lot of user interface work. I've updated the interfaces on three of our applications and created a new interface for the Team Room (7) template. I also used a completely different (for us) style on a new database I developed, which is what I want to share today.

This is a database for which we wanted to keep the interface simple. The primary users are more focused on mainframe programming and don't use a lot of Notes applications, so rather than giving them a list of views to choose from and hundreds of documents to wade through, I embedded a view on a form (called, very creatively, User Interface) and let them choose the category they want to see using a radio button and drop down list on the form. When it is opened, the database creates a document using the UI form and displays the category for the user who opened the database (as in "My Documents"). The embedded view is set to Fit to Window for both height and width.

The original idea was to display the UI form in the top frame of a two-frame frameset. The bottom frame, collapsed by default, would be for previewing documents in the embedded view.

All seemed to be going well until I ran into a category that had too many entries to fit on one screen. In that case, I could see a scroll bar at the right of the view but the last two documents could not be seen. After a while, I discovered that was because Notes does not include the height of text above the embedded view when it calculates the height of the embedded view to fit it to the window. In other words, my embedded view extended below the bottom of the screen by the amount of space I had above it on the form.

Because this was my interface (not an individual document), I didn't want a scroll bar at the right side at all times. I didn't want the user to have to scroll both the interface form and the embedded view, and I didn't want the top part of the form to scroll off the screen so I could see the bottom of the view. So, what to do? I had a couple of ideas that involved tables but I couldn't get the table row height to automatically go to the window height. Setting the height of the embedded view also didn't work because it didn't scroll correctly if the preview pane opened up big enough to hide part of the view. I also thought of a little more traditional two-pane setup but liked the basic idea I had better. "A-HA!," I thought, "I'll create a frameset with three frames." The "A-HA" was easier than the implementation ended up being.

The top frame contains a form with the radio button and drop down list in it, the middle frame contains the embedded view, and the bottom frame is the preview frame. Here is the frameset in Designer:


Because the embedded view is the only thing on the form in the middle frame, setting its height to Fit to Window does not present any scrolling problems; the scroll bar appears when it is needed due to the number of documents in view or when the preview pane is open. The problem is communicating changes in the fields in the top frame to the view in the middle frame so that the view displays the proper category. I decided to use an environment variable for that communication, setting it in the top frame and reading it in the middle frame. I was going to use the OnChange event of the drop down field to trigger the update but @formulas can't be used there. I also found that a) I couldn't set the variable using @formulas and b) I couldn't update the middle frame using LotusScript. GRRRR! I still don't know why neither @Environment nor @SetEnvironment worked. Maybe I needed to restart my client or something.

At any rate, I ended up adding a button next to the drop down with two @formulas: one that runs a small LotusScript agent to set the environment variable and one that refreshes the frame containing the view. I also put an @Environment command in the QueryOpen of the form in the top frame (it worked there!) to set the default value of the variable. After all that work, it looks the way I wanted it and scrolls properly:


I don't love the 'Go' button I had to add but I couldn't come up with another way to trigger the updates I needed to refresh the embedded view. I thought later about using JavaScript to update the view frame and refresh it but I don't know JavaScript very well and couldn't find a good example for what I wanted to do. Maybe I'll revisit it later.

But in the meantime, maybe this is something you can add to your own toolset as you think about your application interfaces.

Technorati:

Wednesday, May 2, 2007

Baseball....and hockey

The Little League season is off to a good start. Because we have only 5 teams in our division, one team gets a bye each night. But on opening day, our team played a double header of shortened games - and won both of them! I was out of town for the weekend but got the full report. Lots of walks and passed balls as you'd suspect but some good hitting and good plays too. Can't wait until Friday to actually see them play.

As for hockey, the K-Wings are in the second round after winning the first series in 6 and are tied at 1 game each heading into tonight's game at home. Two very evenly matched teams but the Wings will win if they play the fill 60 minutes. The Red Wings seem to have their hands full too. I don't want to be too pessimistic, but I think they have to win tonight to have a realistic shot at taking the series.

As Badger Bob used to say, "It's a great day for hockey!"