The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   OF 1.7 Printing Problems (http://forums.omnigroup.com/showthread.php?t=13409)

curt.clifton 2009-08-15 01:23 PM

OF 1.7 Printing Problems
 
I'm getting a crash when I attempt to print in OF 1.7 using either my own or a built-in perspective. Is anyone else seeing this?

(Crash reports submitted.)

curt.clifton 2009-08-15 02:06 PM

Just in case others are having this problem, I resurrected an old script to the 1.0 sneaky peek days. This script will take your current OF view and create an OmniOutliner Pro outline from it. You can then print from OO. The script is quick and dirty. It doesn't capture anything but the titles and notes of the items (that is, no additional columns), but it worked for me in a pinch today.

[CODE]
(*
This script generates an OmniOutliner outline from currently displayed view in OmniFocus.

version 0.1.2, by Curt Clifton

Copyright © 2007–9, Curtis Clifton

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)

tell front document of application "OmniFocus"
tell document window 1
set topLevelTrees to every tree of content
end tell
end tell

tell application "OmniOutliner Professional"
activate
make new document at before documents
end tell

createRows(topLevelTrees)
return

-- theItems is a list of top-level trees
on createRows(theItems)
if (theItems is {}) then return
createRow(item 1 of theItems)
createRows(rest of theItems)
end createRows

-- anItem is a tree
on createRow(anItem)
set rowData to getRowData from anItem
tell front document of application "OmniOutliner Professional"
set aRow to make new row at end of children with properties {topic:(rowTopic of rowData), note:(rowNote of rowData)}
end tell
createChildren(anItem, aRow)
end createRow

on getRowData from anItem
using terms from application "OmniFocus"
set theTopic to name of anItem
try
-- Not all tree nodes have notes, so punt on error
set theNote to (note of value of anItem)
on error
set theNote to ""
end try
end using terms from
return {rowTopic:theTopic, rowNote:theNote}
end getRowData

-- anItem is a tree
-- aRow is an OmniOutliner row
on createChildren(anItem, aRow)
using terms from application "OmniFocus"
set itemChildren to every tree of anItem
end using terms from
createChildrenHelper(itemChildren, aRow)
end createChildren

-- itemChildren is a list of trees
-- aRow is an OmniOutliner row
on createChildrenHelper(itemChildren, aRow)
if (itemChildren is {}) then return
set childItem to item 1 of itemChildren
set childData to getRowData from childItem
tell front document of application "OmniOutliner Professional"
set childRow to make new row with properties {topic:(rowTopic of childData), note:(rowNote of childData)} at after last child of aRow
end tell
createChildren(childItem, childRow)
createChildrenHelper(rest of itemChildren, aRow)
end createChildrenHelper
[/CODE]


All times are GMT -8. The time now is 04:08 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.