Changes in the Junction : Jocelyn’s Place, a Stop Light & Buddha Pie

This fall has seen a few changes in Toronto’s west end Junction neighborhood (of New York Times fame):

Bronto Burger is now Jocelyn’s Place (2982 Dundas St. West, just west of Pacific Ave.), with a new owner but same menu/price and deco (at least for now). The food and service continue to be as good.
Jocelyn's  Place

The High Park Avenue and Dundas Street West intersection now has a stop light, breaking up the block and routing around the traffic from the no frill on Pacific.
STOP!!
The junctioneer has details on Ribbon-cutting ceremony, Dundas High Park Ave traffic lights.

And Lou’s Coffee Bar has been transformed (reincarnated?) into Buddha Pie (514 Annette just East of Runnymede Road), serving up gluten free thin crust pizza and sandwich’s with the best ingredients, plus great coffee!
Buddha Pie
It’s great to to see Lou is back after a loong renovation. And the pizza is buzz worthy too!
A Slice of nirvana?
that’s the “Presto Pesto Pizza” with pesto sause, red onions, green peppers, sun dried tomatoes and (real) Bufalo Mozzarella (you could have Goat Cheese) (and you can add fresh garlic and/or chicken).

Update : Buddha Pie is now Twittering @eatBuddhaPie and has a FaceBook page, and BlogTo has a in depth review (they like!)

Posted in Food, Junction City, Toronto | 1 Comment

False Positives on Planet Lotus

Once upon a time, 2006, there was “Show ‘n Tell Thursdays – A Project Of The Lotus Notes And Domino“, and the tag is still used, but Planet Lotus is where the action is now, an aggregation of Lotus related blogs and news.

Recently False Positives was accepted for inclusion as part of that community. It is a great honor (although also scary to boot) to have my Domino and Lotus Notes related post’s in such fine company.

And while you’re here there is all the “other stuff” both code and / culture ….

Posted in Code, Lotus Domino, Show-n-Tell+Thursday, Site | Leave a comment

Five films from the TIFF

We saw 5 great films in the Contemporary World Cinema program in this years (2009) Toronto International Film Festival (Tiff).

We started off with a Irish film, Perrier’s Bounty, set in the underside of North Dublin. Great and meaty characters. I hope the DVD has English subtitles and translation so I can understand the other half of the dialog.

Next was a Danish film Applause, very very northern European, although not totally bleak. (or at least, not as bleak as I thought it was going to turn out.) The big surprise was now tall and beautiful the main actress, Paprika Steen, was!!

Fatih Akin’s Soul Kitchen was a great comedy, set in Hamburg Germany!!

Hong Kong’s Yonfan presented his Prince of Tears and it was very sad and gorgeous.

The Double Hour, an Italian film, keep us guessing with each twist, and I wouldn’t say they were happy twists but they were delightful surprises as we followed these characters we came to care about.

All the film very of the highest quality and enjoyable. I would recommend them all, but Perrier’s Bounty and Soul Kitchen are more mainstream cinema, easier to watch and understand. It was also great hearing the Directors and Actors after for a Q&A.

Posted in Movies, Toronto | Leave a comment

Validating URL and Email Addresses with regexp in Lotus Notes

I needed to recreate this from scratch, and so I’m documenting this here for the next time.

Most of the credit should go to Julian Robichauxand his ls2j examples db, and in particultar the JakartaOroWrapper Library

My “invention” involves creating a isValidateURL and isValidateEmailAddress Regular Expression (or regexp ) routines that worked for me.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Uselsx "*javacon"
Use "JakartaOroWrapper"

Function isValidateURL (Url As String) As Boolean
   
    Dim jSession As New JavaSession
    Dim oroClass As JavaClass
    Dim oro As JavaObject
    Dim vector As JavaObject
    Dim jError As JavaError
   
    '** get the ORO wrapper class and instantiate an instance of it
    Set oroClass = jSession.GetClass("JakartaOroWrapper")
    Set oro = oroClass.CreateObject
   
    Dim pattern As String  
'   pattern = "^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$"
'   pattern = "(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?"  
    pattern = "^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~])*$"
   
    isValidateURL = oro.matches(Url, pattern, False)   
End Function

Function isValidateEmailAddress (emailAddress As String) As Boolean
   
    Dim jSession As New JavaSession
    Dim oroClass As JavaClass
    Dim oro As JavaObject
    Dim vector As JavaObject
    Dim jError As JavaError
   
    '** get the ORO wrapper class and instantiate an instance of it
    Set oroClass = jSession.GetClass("JakartaOroWrapper")
    Set oro = oroClass.CreateObject
   
    '** here are the strings and patterns we'll play with
    Dim testString As String
    Dim pattern As String  
    'pattern = "\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b"
    'RFC_2822 version
    pattern = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"
   
   
    isValidateEmailAddress = oro.matches(emailAddress, pattern, False)
   
   
End Function

How I used it was not very exciting but for completeness.

1
2
3
4
5
6
If Not NotesDoc.url(0) =  "" Then  
        If Not isValidateURL ( NotesDoc.url(0)) Then
            Msgbox "The URL Address ("+NotesDoc.url(0)+") doesn't look right, Please confirm it is correct.", 0 + 32, "Validation Error"       
            NotesUIDoc.GotoField("URL")
    End If
End If

A big cautionary note about the regexp patterns I used. for both Url’s and emails addresses, I seen them very short and very very long. It’s easy to make assumtion about the validate TLD and other aspects of the strings, so test test test, and be aware.

And, of course, this is but a small piece of what you could do with regexp!!

Posted in Code, Lotus Domino, Show-n-Tell+Thursday | Leave a comment

can’t use @ThisName in Hide-When formulas, LOTUS NOTES meta coding FAIL

I had hoped to use the “@ThisName” to get the suffix of the field name “Comment_1″ and hide it if the Field “Status_1″ is “Pending” by doing this :

1
2
3
4
Suffix := @Right(@ThisName; "_");
EmpListFieldName := "Status_" + Suffix;
Status_value := @GetField(EmpListFieldName);
@If( Status_value    = "Pending";@Return(@True);@Return(@False));

but it didn’t work :(

finally traced it down to the “@ThisName” formula and the Help doc’s confirmed the bad news about the @ThisName formula:

Note A hide formula is not a field formula, even though it can be set from the field properties dialog. The hide formula applies to the paragraph containing the field. Since a paragraph can contain several fields, there is no “current field” in this context.

Instead, I will have to hard code the suffix reference, and replace the above code with:

1
2
3
4
Suffix :=  "1";
EmpListFieldName := "Status_" + Suffix;
Status_value := @GetField(EmpListFieldName);
@If( Status_value    = "Pending";@Return(@True);@Return(@False))

which can be compacted down to

1
@GetField("Status_" + "1") = "Pending"

and it will need to be modified for every one of a large number of fields!!! (hence my wish to meta code).

I’ve add a “change this please on idea jam

see Ben Langhinrichs on Writing better hide-when formulas for more.

Updates : This post was linked to from DominoPower Can’t use @ThisName in Hide-When formulas on Friday, September 11, 2009, from their News Center. cool!

Richard Schwartz made a useful comment on the ideaJam posting which is under appreciated, and quickly forgotten, that:

“Hide-whens are bound to paragraph, not to a field.”

which was very helpful in me understanding why it’s “working a designed” and not broken, even if mildly frustrating!

Posted in Code, Lotus Domino, Show-n-Tell+Thursday | 2 Comments

Expanding Group Names for Lotus Domino using LotusScript

I needed to find the people that belonged to a given lotus Notes group. It couldn’t be a simple lookup since other groups can and frequently are also members of a group, so it needed to be be recursive.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Function expandGroupListMembers(GroupName) As Variant
Dim session As New NotesSession
Dim db As NotesDatabase
Dim gView As NotesView
Dim memberList As Variant
Dim gDoc As NotesDocument

Set db = session.CurrentDatabase
Dim nab As New NotesDatabase(db.Server ,"names.nsf") ' this assumes that db is NOT running locally but is a server

Set gView = nab.GetView("($VIMGroups)" )
Set gDoc = grpsView.GetDocumentByKey( GroupName , True )

If gDoc Is Nothing Then Exit Function 'could not find this GroupName in view so stop and return empty

memberList = gDoc.GetItemValue( "Members" )
Forall member In memberList
Dim subMemberList As Variant
subMemberList = expandGroupListMembers(member) 'see if member is a group and if so get its members, recursively.
If Not Isempty(subMemberList) Then
'member was a group, now add all its members to list
If Isempty (expandGroupList) Then
expandGroupListMembers= subMemberList
Else
expandGroupListMembers=  AddArraysEval (expandGroupListMembers, subMemberList)
End If
Else
'member was not a group therefore assume is a person and add to list
' note it could be a server or something else
If Isempty (expandGroupListMembers) Then
expandGroupListMembers= member
Else
expandGroupListMembers=  AddArraysEval (expandGroupListMembers, member)
End If

End If
End Forall

End Function

Function AddArraysEval (a1 As Variant, a2 As Variant) As Variant
'from http://www.nsftools.com/tools/lsbook.htm
'** add two arrays or scalar values using @Functions
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim var As Variant
Set db = session.CurrentDatabase
Set doc = New NotesDocument(db)
Call doc.ReplaceItemValue("a1", a1)
Call doc.ReplaceItemValue("a2", a2)
AddArraysEval = Evaluate("a1 : a2", doc)
'** clean up the memory we used
Set doc = Nothing
Set db = Nothing
End Function

the AddArraysEval is from Julian Robichaux’s very handy LotusScript Book

Posted in Code, Lotus Domino, Show-n-Tell+Thursday | 3 Comments

SNTT: a pseudo Computed for Display Rich Text Field in the Lotus Notes Client

As in last weeks posting, I wanted to have help verbiage centrally maintained (without developer innervation) but always displayed update in the end user document (the final end user). Easy enough to do with text or on the web, but doing this with rich text (pictures and text markup) on the Notes Client was non trivial. Rich Text field are either “editable” or “computed” which mean it wasn’t going to update it if the document was in read mode.

So what I created was a pseudo Computed for Display Rich Text Field.

the field itself was a straight forward Rich Text Computed field, named “RTCF_Help”, and with the lotus formula

@GetProfileField( “ApplicationProfileDocument” ; “HelpDocumentation”)

where “ApplicationProfileDocument” is the name on the Profile document and “HelpDocumentation” is the rich text field on that Profile document.

the trick is to destroy the item on the document so that even in read mode the field is recreated and re computed. I’m doing it before the document open and as it closes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)

Dim doc As notesdocument
Set doc = Source.Document
Dim item As NotesItem

If Not Isnewdoc Then
Set item = doc.GetFirstItem("RTCF_Help")
If Not item Is Nothing Then
Call item.Remove()
End If
End If

' the rest of your code if any....

End Sub

Sub Queryclose(Source As Notesuidocument, Continue As Variant)

Dim doc As NotesDocument
Set doc = Source.Document
Dim item As NotesItem

Set item = doc.GetFirstItem("FMUniversalUpdaterHelpDoc")

Call item.Remove()

End Sub

One thing that didn’t work was any attached file in the profile documents rich text, which looked like it was there but would open / launch (which is where last weeks post came from : SNTT : using LotusScript to launch file attachements (EmbeddedObjects) in Lotus Notes).

The fall back position for this would be have a Button that opened the Profile document in read mode like this

1
2
3
4
5
6
7
8
9
10
11
Sub Click(Source As Button)

Dim  workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set doc = db.GetProfileDocument("ApplicationProfileDocument" )
Call workspace.EditDocument( False, doc, True )

End Sub

enjoy :)

I’ve add having a real Computed for Display Rich Text Field in the Lotus Notes Client to Idea Jam

Posted in Code, Lotus Domino, Show-n-Tell+Thursday | 2 Comments

A few Toronto Festivals in September: Junction Arts, Ukrainians, Poles and Movie Stars

The Junction Arts Festival is back on Sept 9 to 13, 2009 of its 17th occasion in Toronto’s west end on Dundas Street West between Keele Street and Quebec Avenue. The festival presents visual, musical, performance, new media and site-specific works to over 150,000 people transforming Dundas Street West into a pedestrian-only, urban cultural destination.

September 9th : 13th, 2009 Junction Arts Festival at 3047 Dundas Street West, Toronto, ON, CA

Check out their website Junction Arts Fest and blog, Twitter link, and and FaceBook Group or Upcomming page

Last year was massive fun.

Following that there is the nearby Toronto Ukrainian Festival (The 13th and previously known as the Bloor West Village Ukrainian Festival), is on Sept 18 to 20th, Bloor West Village, on Bloor street between Runnymede Rd and Jane Street. The Website is UkrainianFestival.com.

We always have good time and lots of yummy food, and sights

Competing with that this year is the 2009 Roncesvalles Village Polish Festival in Toronto on Sept. 19-20. Tough choice.

And then there is a little thing known as TIFF otherwise know as the Toronto International Film Festival, which is Sept. 10 till the 19th.

during September I also expect to play Tennis, sleep, and, on yes, get some work done…

Posted in Art, Culture, Food, Junction City, Toronto | 1 Comment

Sacha Chua shares her Lotus Notes mail merge from a Microsoft Excel spreadsheet

Toronto’s extraordinaire Sacha Chua developed this super-nifty Lotus Notes script which does a flexible mail merge from a Microsoft Excel spreadsheet to Lotus Notes, as documented and shared in Lotus Notes mail merge from a Microsoft Excel spreadsheet.

Keep on Coding, Sharing, Story telling, and Connecting!

Posted in Code, Lotus Domino, Show-n-Tell+Thursday, Toronto | 1 Comment

SNTT : using LotusScript to launch file attachements (EmbeddedObjects) in Lotus Notes

I wanted to launch a excel (xls) file which was stored in a Profile document, from a Notes Client (tested in r8.5 but I see no reason this will not work in versions going back to r5)

(Making it available to all users of a certain type of document with making hundreds of replicate copies, and all a central db administrator user able to roll out a new file with out changing those other documents)

It is not very obvious how to do this, hence this posting

My first Draft was this :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    Dim  workspace As New NotesUIWorkspace
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim Pdoc As NotesDocument
    Dim attachments As Variant
    Dim attachment As NotesEmbeddedObject  

    Set db = session.CurrentDatabase
    Set Pdoc = db.GetProfileDocument("ApplicationProfileDocument" ) ' get the profile document

    attachments = Evaluate("@AttachmentNames", Pdoc)
    Set attachment = Pdoc.GetAttachment(attachments(0)) 'use a evalutate to get the first "(0)" file attachment
   
    Call attachment.ExtractFile("c:" & attachment.Name)     ' write it out to the hard drive
    Set e = CreateObject("Excel.Application")                       ' open excel
    Set eWB = e.Workbooks.Open("c:" & attachment.Name)  ' open the file in excel
    eWB.Visible = True                                     'make the opened excel file visible

There was a problem the that code in that I could be sure that there weren’t other file attachments and the first one was going to be the one I wanted.

I’ve tried to correct that problem here :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    Dim  workspace As New NotesUIWorkspace
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim Pdoc As NotesDocument
    Set db = session.CurrentDatabase
    Set Pdoc = db.GetProfileDocument("ApplicationProfileDocument" )
       
    Set rtitem = Pdoc.GetFirstItem( "RichTextFilewithFileAttacment" ) 'get the field I know the file is in.
    If ( rtitem.Type = RICHTEXT ) Then
        Forall o In rtitem.EmbeddedObjects
            If ( o.Type = EMBED_ATTACHMENT )  Then
                Call o.ExtractFile ("c:" & o.Name)      ' write it out to the c: hard drive    
                Set e = CreateObject("Excel.Application")  ' open  excel
                Set oWB = e.Workbooks.Open("c:" & o.Name)   ' open the file in excel
                oWB.Visible = True            'make the opened excel file visible
            End If
        End Forall     
    End If

This will actually launch all the files that are attached in the rich text (or rich text light) field, which I could limit by doing some validation work on the Profile form to ensure only 1 file is attached.

2 (possibly) big assumptions :

  1. This is a windows machine with a c: drive and enough free space. this is testable but I’m too lazy/busy/silly (please only pick one).
  2. The file to be launched is an Excel. This could be allow for be testing the file name extension and doing the appropriate thing. (and that assumes the MS Excel is the application for that file extension and the Open Office, or something similar).

update: Collin and Sean both make go points and reminded me of another thing : Execution Control List’s (ECL) which control access on the Notes Client. You may need to get the notes database signed with a ID that has right to write to the file system in your organization, or your end users will be prompted with a “Execution Security Alert” with will ask them to either stop the action, execute once or trust the id used.

I’ve also add related notes in : a pseudo Computed for Display Rich Text Field in the Lotus Notes Client

Posted in Lotus Domino, Show-n-Tell+Thursday | 3 Comments
  • Follow

  • Archives (since 2003)

  • Categories

  • Recent Posts

  • Twitter Updates

  • del.icio.us links

  • Flickr

    Runnymede Healthcare Centre Demolition : The EndRunnymede Healthcare Centre Demolition : The EndRunnymede Healthcare Centre Demolition : The EndRunnymede Healthcare Centre Demolition
  •  

    March 2010
    M T W T F S S
    « Feb    
    1234567
    891011121314
    15161718192021
    22232425262728
    293031  
  • Spam Blocked