Ben Langhinrichs

Photograph of Ben Langhinrichs
E-mail address - Ben Langhinrichs

Recent posts

Fri 27 Apr 2018

Our digital selves

Wed 18 Apr 2018

The long strange trip with Midas

Wed 4 Apr 2018

Pondering pre-anonymization and GDPR

March, 2007
    01 02 03
04 05 06 07 08 09 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Search the weblog

Genii Weblog

Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.

Sun 25 Mar 2007, 09:11 PM
In customizing the latest version of FCKeditor for our upcoming CoexEdit release, I noticed this technique for showing toolbar icons.  It is one with which I am not familiar.  Basically, instead of each toolbar icon being a separate image, there is one long image (see a portion of it to the left).  Each image is 16x16 pixels, and they are simply stacked vertically, all 68 of them.  Then, the images are displayed using a bit of JavaScript code such as:

eCell.innerHTML = '<div class="TB_Button_Image"><img src="default/fck_strip.gif" style="top:-' + ( i * 16 ) + 'px;"><\/div>' ;

referencing the CSS which looks like:

    overflow: hidden;
    width: 16px;
    height: 16px;
    margin: 3px;
    background-repeat: no-repeat;

So, while I understand how it works, I am a bit mystified as to the purpose.  The images were small to start with, and the very minor byte size reduction was more than overwhelmed by the additional JavaScript, so it wasn't a clever attempt to reduce delayed images, as I first thought.  So, why?  Anybody know?

Copyright © 2007 Genii Software Ltd.

Fri 23 Mar 2007, 12:46 PM
Yesterday, I wrote about using the OpenSesame @DbColumn call.  Today (now that it is working), I though I'd share the @DbLookup logic, which is a bit more complex, but very powerful.  Below are a couple of simple examples.  The first returns the values in cells from F4 to F50 for which the corresponding value in column E is equal to 4.  Taking a look at the spreadsheet, you will see that this matches F4 ("Red"), F7 ("Silver"), etc.

Colors := @DbLookup("OpenS":"NoCache""c:\\temp\\trial.ods""Sheet1""F4-F50""E=4");

The second call is similar, in that it returns the colors in F4 to F11 for which the corresponding value in G does not equal DHL.

Colors := @DbLookup("OpenS":"NoCache""c:\\temp\\trial.ods""Sheet1""F4-F11""G<>DHL");

All in all, the choices for comparison include starts with, ends with, contains substring, equals, does not equal, as well as less than, greater than, less than or equal to and greater than or equal to.  For example, you could use:

Units := @DbLookup("OpenS":"NoCache""c:\\temp\\trial.ods""Sheet1""D""C^=Edwards,");

which would return all the Units (product names) sold by anybody whole last name was Edwards (since the last name comes first and is separated from the first by a comma).

Spreadsheet view of data

Copyright © 2007 Genii Software Ltd.

Thu 22 Mar 2007, 11:58 PM
Another one of my "projects" as part of OpenSesame (see earlier post on Edit view in spreadsheet) is the ability to do an @DbColumn or @DbLookup on an OpenDocument spreadsheet in Notes 8.  This is what I have working tonight::

Colors := @DbColumn("OpenS""c:\\temp\\trial.ods""Sheet1""F4-F999");
Colors := @Implode(@Trim(@Unique(Colors)); ",");
@Prompt([Ok]; "All Colors"; Colors);

gives a result of:

Results of @DbColumn

with the spreadsheet:

Spreadsheet view of data

Copyright © 2007 Genii Software Ltd.

Thu 22 Mar 2007, 12:32 PM
Just thought I'd share the fact that the Edit view in spreadsheetdescribed recently has a nice side benefit.  Since I am using revision tracking, you can send a copy of a view to someone else and have them change what they think they should, even someone without Notes using, for example, and when you get the file back, you will see the modified cells.  If you mouse over a modified cell (this is from the Beta 2 Lotus Spreadsheets), you get the following.  You can even pass it to multiple people and see who changed what.

Screen shot of revsion markings on edited view

Copyright © 2007 Genii Software Ltd.

Wed 21 Mar 2007, 09:54 PM
A curious friend wrote and asked, "What kind of extension is that 'Edit view in spreadsheet' anyway?"  It is a good question, but has a non-obvious answer.  Right now, it is callable in three ways.  It can be called as part of a larger LSX, in which case the call I use is something like:

Sub Initialize
   Dim ws As New NotesUIWorkspace
   Dim session As New NotesSession
   Dim db As NotesDatabase
   Dim sheet As New OpenSesameSpreadsheet
   Set db = session.CurrentDatabase
   If ws.CurrentView Is Nothing Then Exit Sub
   Call sheet.GenerateView(db.Server, db.FilePath, ws.CurrentView.ViewName, "c:\temp\trial.ods")
End Sub 

or it can be called as part of a formula language extension, in which case you could have a smart icon like this:


or it can be in a menu addin so that the Action menu simply has an entry called "Edit View in Spreadsheet".  My guess is that I will sell it with the latter two choices, so that you can either add it to your Action menu or add it to a smart icon, but you could also call it from the web or from Java or from LotusScript or anywhere else a formula can be evaluated.  That would be the most flexible.

Copyright © 2007 Genii Software Ltd.

Wed 21 Mar 2007, 07:35 AM
Kathy Sierra has a wonderful post titled Is your app an ass-kisser? 
If your app was an employee, what kind of employee would it be? When it's employee performance review time, how would you rate it? These are just a few of the apps I've worked with recently...
Even aside from the provocative title, this is a clever and concise way to think about your applications... and possibly avoid making your application one of these dudes duds.

Copyright © 2007 Genii Software Ltd.