Mimicing the preview-switch option

I thought I give this Thursday a ‘SnTT’ swing (what happened with that phenomena?).

My collegue Tomas can be sometime tough with progressive ideas, but this makes you just try that extra effort to make something in Notes a little bit better than expected.

When I asked him for ideas for a standard development template he liked the ideas to have multiple collapsible preview panes BUT he wanted the option for the user to switch in preview in bottom or preview on side, just like in the Notes 8 mail template.

previewbutton

Since we know that the mail is a composite application with it specific functionality a different approach to provide something similar in the ‘classic’ client.

Solution

The following image shows the frameset for my application:

main_frameset2

So in frame ‘main’ I have a frameset. By default the frameset is the one that contains a preview on the bottom. This frameset is called ‘$fs-notes-documents-vr’ (vr for vertical). I have a second frameset that is called ‘$fs-notes-documents-hr’ (hr vor horizontal) that will be displayed in frame ‘main’ when the user chooses for a preview on side.

In my horizontal menu (alternative menu) I have added 2 action buttons:

  • Preview on Bottom.

@SetTargetFrame(“Main”);
@Command( [OpenFrameset] ; “$fs-notes-documents-vr” );
@Environment(“AppCode-AppPreview”;”$fs-notes-documents-vr”)

  • Preview on Side.

@SetTargetFrame(“Main”);
@Command( [OpenFrameset] ; “$fs-notes-documents-hr” );
@Environment(“AppCode-AppPreview”;”$fs-notes-documents-hr”)

These actions will place the appropiate frameset in frame ‘main’ and set an environment variable. This variable is being read when the ‘default’ frameset (the frameset that contains frame ‘main’) is being used when opening the application.

For frame ‘main’ I have as computed value:

varFrSetDefault:=@Environment( “AppCode-AppPreview” );
@If ( varFrmSetDefault = “” ; “$fs-notes-documents-vr” ; varFrmSetDefault)

So if the user has used the application before and has set a preview preference the next time the user comes in the application the ‘prefered’ frameset / preview option is being used!

Too bad there is no option to read which design element is currently used in a frame (like in a @GetTargetFrame). In that way I would have been able to re-open the currently opened view / folder (okej I could use another environment variable for that).

Advertisements

One thought on “Mimicing the preview-switch option

  1. Tomas Ekström 2009-April-23 / 4:54 pm

    I like the side preview for one reason!
    Modern monitors are all wide screen. Most apps are not!

    When browsing in full screen mode you always have a lot of unused pixels to the left and right. So why not use them when possible. For instance as a preview pane!

    Otherwise you can hope for a monitor which you can turn 90 Deg. I’m I right Patrick 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s