Re: AppleScript in Sandboxed App

2013-01-15 Thread John Nairn
to execute a python script to interact only with your own sandboxed app using ScriptingBridge? John Nairn On Jan 14, 2013, at 9:59 AM, Mike Abdullah wrote: On 14 Jan 2013, at 17:50, John Nairn j...@geditcom.com wrote: I have sandboxed an app that allows users to run scripts as a major

AppleScript in Sandboxed App

2013-01-14 Thread John Nairn
]; The errorInfo dictionary has only NSAppleScriptErrorNumber = -43 and no other details. I could not find this error number in a google search. 5. I have more problems running python scripts using Scripting bridge when sandboxed, but I am working on one problem for now John Nairn http

Embedded Library in Cocoa App

2012-01-19 Thread John Nairn
what has now stopped it from working? John Nairn --- John Nairn (1-541-737-4265, FAX:1-541-737-3385) Professor and Richardson Chair Web Page: http://www.cof.orst.edu/cof/wse/faculty/Nairn/ FEA/MPM Web Page: http://oregonstate.edu/~nairnj

Re: Embedded Library in Cocoa App

2012-01-19 Thread John Nairn
need to be compatible with OS X 10.4 or earlier, @rpath is probably a better way to go than @executable_path. Charles --- John Nairn (1-541-737-4265, FAX:1-541-737-3385) Professor and Richardson Chair Web Page: http://www.cof.orst.edu/cof/wse/faculty/Nairn/ FEA/MPM Web Page: http

Re: Embedded Library in Cocoa App

2012-01-19 Thread John Nairn
On Jan 19, 2012, at 5:04 PM, Charles Srstka wrote: On Jan 19, 2012, at 6:37 PM, John Nairn wrote: Well it almost works. I did the following: 1. I took my library (which was already compiled) and renamed it using install_name_tool. It now reports as: DC:lib$ otool -D libxerces-c-3.1

Cocoa AppleScript

2011-08-02 Thread John Nairn
fine in 10.4 through 10.6. In Lion the read process works fine but times out immediately when called from AppleScript. John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: App won't get to my code in Lion

2011-07-26 Thread John Nairn
, no crash, etc). I tried setting breakpoint on objc_exception_throw as explained in http://www.corbinstreehouse.com/blog/2008/08/your-most-important-breakpoint-in-cocoa/ but no break appears in the above start up procedure either. John Nairn http://www.geditcom.com Genealogy Software

Re: App won't get to my code in Lion

2011-07-26 Thread John Nairn
command 0x24 unable to read unknown load command 0x26 unable to read unknown load command 0x24 and then it is stuck? John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: App won't get to my code in Lion

2011-07-26 Thread John Nairn
in Xcode 4.1. I switched target to 10.6 (which builds, but lots of warnings) and left deploy at 10.4. I will try changing some more (but I am away from my development Mac until tonight) On Jul 26, 2011, at 9:52 AM, Joseph Ranieri wrote: On Tue, Jul 26, 2011 at 2:39 AM, John Nairn j...@geditcom.com

App won't get to my code in Lion

2011-07-25 Thread John Nairn
/Icons but other users claim that does not help? John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: One last try: how do you make a bookmark bar like Safari?

2010-09-20 Thread John Nairn
not gotten as far yet as implementing it in any of my applications. --- John Nairn GEDitCOM - Genealogy Software for the Macintosh http://www.geditcom.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Scripting Bridge Strange Pauses

2010-09-17 Thread John Nairn
that gave up well before finishing, they all run to completion without pauses. John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Scripting Bridge Strange Pauses

2010-09-16 Thread John Nairn
encounters and error. The long pause seems to be corrupting memory as well. John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Scripting Bridge Strange Pauses

2010-09-16 Thread John Nairn
on subsequent runs. John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev

Scripting Bridge Strange Pauses

2010-09-15 Thread John Nairn
; } } } John Nairn http://www.geditcom.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: Applescript: force garbage collection? (NSAppleScript call from Cocoa app)

2010-09-14 Thread John Nairn
are willing to go through the several hundred page scripting dictionary). I found the MS Word scripting dictionary hard to follow. Many things that should work don't work as expected. It took me a long time to get useful scripts that interact with Word (although it is possible). John

ScriptingBridge problem

2010-09-13 Thread John Nairn
problem if inefficient (but valid) scripts are crashing. Furthermore, I am working on numerous other scripts and method 2 simply cannot be used. Thus, while I try to avoid method 1, it cannot always be avoided? John Nairn http://www.geditcom.com Genealogy Software for the Mac

ScriptingBridge Commands

2010-05-04 Thread John Nairn
) someResult=gedit.myCommandArgument_(arg1) should both work. For me the AppleScript method works (verifying my command is defined correctly), but the python one does not work. Is this a bug in the ScriptingBridge framework? John Nairn http://www.geditcom.com Genealogy Software

initWithObject Confusion

2010-04-08 Thread John Nairn
of my custom classes defines an initWithObject: method) 2. Even if it compiles, how can it run in Snow Leopard when there is no initWithObject: selector for NSArray (or at least according to the NSArray docmentation there isn't one)? --- John Nairn (1-541-737-4265, FAX:1-541-737

Re: initWithObject Confusion

2010-04-08 Thread John Nairn
Leopard, however, there was no message and it worked fine as if Snow Leopard read my mind and realized I wanted to create an array with a single object. But, I am nervous about relying on the OS to read my mind (or even have an idea of how it did that)? --- John Nairn (1-541-737

Saving jpeg data

2010-03-30 Thread John Nairn
representationUsingType:properties] has been available since 10.0. I don't know what NSCachedImageRep is and I did not think I created or accessed one either? --- John Nairn (1-541-737-4265, FAX:1-541-737-3385) Professor and Richardson Chair Web Page: http://www.cof.orst.edu/cof/wse/faculty

performFindPanelAction

2010-02-02 Thread John Nairn
find panel itself or make it pass the command along? --- John Nairn (1-541-737-4265, FAX:1-541-737-3385) Professor and Richardson Chair Web Page: http://www.cof.orst.edu/cof/wse/faculty/Nairn/ FEA/MPM Web Page: http://oregonstate.edu/~nairnj

Custom Field Editor Problem

2010-02-02 Thread John Nairn
object (if the field editor was never instantiated, therelease message has no effect and is harmless). John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Tabbed windows

2010-01-29 Thread John Nairn
? Is it possible for non-Apple program to integrate into the tool bar of the window? --- John Nairn GEDitCOM - Genealogy Software for the Macintosh http://www.geditcom.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Package Maker Won't Install on Snow Leopard

2009-11-07 Thread John Nairn
not work in Snow Leopard? (mine copy says version 3.0.4) 2. Something funny about installing on my development computer? (but it used to work, and I cleared all traces of app before installing) John Nairn http://www.geditcom.com Genealogy Software for the Mac

Undo without Redo

2009-07-12 Thread John Nairn
-code the change process or for an alternative, is there a way to perform to top level undo without having it moved to the redo stack? Or, similarly, is there a way to perform an undo and then remove the top most item in the redo stack? John Nairn http://www.geditcom.com Genealogy

PackageMaker Script

2009-04-05 Thread John Nairn
John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Printing WebView as a subview

2009-01-30 Thread John Nairn
that documentView as it might start anywhere on a page? --- John Nairn GEDitCOM - Genealogy Software for the Macintosh http://www.geditcom.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

NSTextField line breaking

2009-01-26 Thread John Nairn
In a nib file I can set line breaking mode of an NSTextField (e.g., clip, truncate front, middle, end, etc.). But, I cannot find and way to make that setting in a programmatically created NSTextField. I looked through NSTextField, NSTextFieldCell, and NSControl. John Nairn

Re: NSTextField line breaking

2009-01-26 Thread John Nairn
methods as setLineBreakMode: John Nairn http://www.geditcom.com Genealogy Software for the Mac ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Debugging objc_msg errors

2009-01-14 Thread John Nairn
. Is there a debugging tool that can provide more information about what message was sent to what object at the time of the crash? --- John Nairn GEDitCOM - Genealogy Software for the Macintosh http://www.geditcom.com ___ Cocoa-dev mailing list (Cocoa-dev

NSMenu icon

2008-12-24 Thread John Nairn
setImage:[[NSImage imageNamed:@item_image.tiff] retain]]; [newItem setView: menuImage]; [newItem setTarget:self]; [newMenu addItem:newItem]; [newItem release]; --- John Nairn GEDitCOM - Genealogy Software for the Macintosh http://www.geditcom.com

Finding front most window of a document

2008-12-23 Thread John Nairn
for a document is first. I looked for some ordered list of windows but couldn't find it (although Apple Script windows property of an application does have them in order) I looked for way to compare two windows to see which is in front of the other, but could not find one. --- John Nairn

Re: NSMutableArray sorting

2008-12-21 Thread John Nairn
category with a sort method that gets called from a delegate. The sort method calls the delegate to cache the objects and then later to provide comparison results between those cache objects. You can get it here: http://homepage.mac.com/nairn/.Public/sorting.zip --- John Nairn

Find Panel Stopped Working (maybe)

2008-12-20 Thread John Nairn
NSTextView but recently subclassed it for some extra features. The subclass does very little. I tried commenting out all its methods (so it does nothing more than an NSTextView) and that did not make the Find Panel work either. --- John Nairn GEDitCOM - Genealogy Software

Re: Find Panel Stopped Working (maybe)

2008-12-20 Thread John Nairn
and since they were wrong, the menu commands were always disabled. On Dec 20, 2008, at 11:18 AM, Kyle Sluder wrote: On Sat, Dec 20, 2008 at 2:10 PM, John Nairn j...@geditcom.com wrote: 1. I noticed the items in the Find menu were not connected to any actions. I tried connecting them all

(no subject)

2008-12-20 Thread John Nairn
algorithm using information from each object to determine which one is greater than the other. Thanks! Jacob --- John Nairn GEDitCOM - Genealogy Software for the Macintosh http://www.geditcom.com ___ Cocoa-dev mailing list (Cocoa-dev

Cocoa Apple Script Problem

2008-12-19 Thread John Nairn
to override the make command? Curiously this method of form insertInKeyRecords: is not even mentioned in the Key-Value Coding and Cocoa Scripting section of the Cocoa Scripting Guide. I had to find it by an error message in the Console before it was present. --- John Nairn GEDitCOM

first responder stopped working

2008-12-13 Thread John Nairn
. Other times the window freezes up with this error message *** NSRunStorage, _NSBlockNumberForIndex(): index (4294967294) beyond array bounds (30) which I do not recognize in my code. --- John Nairn GEDitCOM - Genealogy Software for the Macintosh http://www.geditcom.com

Re: Scaled Printing

2008-07-01 Thread John Nairn
the paper even if it meant going through subviews and this change solved that problem. This way scales correctly as well. --- John Nairn (1-541-737-4265, FAX:1-541-737-3385) Professor and Richardson Chair Web Page: http://woodscience.oregonstate.edu/faculty/Nairn FEA/MPM Web Page

Scaled Printing

2008-06-30 Thread John Nairn
view float scale = [[[pi dictionary] objectForKey:NSPrintScalingFactor] floatValue]; return NSMakeSize(pageWidth/scale, pageHeight/scale); } --- John Nairn (1-541-737-4265, FAX:1-541-737-3385) Professor and Richardson Chair Web Page: http://woodscience.oregonstate.edu/faculty