Re: AppleScript in Sandboxed App

2013-01-15 Thread John Nairn
nyone be able to use NSTask 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 wrote: > >> I have sandboxed an app that allows users

AppleScript in Sandboxed App

2013-01-14 Thread John Nairn
errorInfo]; 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 N

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 re

Re: Embedded Library in Cocoa App

2012-01-19 Thread John Nairn
’t know exactly what tool is used to edit the install >> name, but I’m guessing libtool. > > If you don’t 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, FA

Embedded Library in Cocoa App

2012-01-19 Thread John Nairn
and don't know 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://ore

Cocoa AppleScript

2011-08-02 Thread John Nairn
This same code works 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 l

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

2011-07-26 Thread John Nairn
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 wrote: >&

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

2011-07-25 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-25 Thread John Nairn
d. run [Switching to process 7184] Running… and then nothing happens (no code, 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 proce

App won't get to my code in Lion

2011-07-25 Thread John Nairn
brary/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

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

2010-09-20 Thread John Nairn
ut I have 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

Re: Scripting Bridge Strange Pauses

2010-09-17 Thread John Nairn
Yes, that is the solution. I was using 10.6.1. After updating my sample code and even much longer scripts that gave up well before finishing, they all run to completion without pauses. John Nairn http://www.geditcom.com Genealogy Software for the Mac _

Re: Scripting Bridge Strange Pauses

2010-09-16 Thread John Nairn
orelease pool and it had no affect on when it paused. I did notice once that after a long pause, I could run the code again and it would finish without a pause. It always pauses the first time it is run after launching the app, but sometimes finishes without a pause on subsequent runs. --

Re: Scripting Bridge Strange Pauses

2010-09-16 Thread John Nairn
defined have changed to "None" and then the script 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 (Coco

Scripting Bridge Strange Pauses

2010-09-15 Thread John Nairn
xtFraction) { NSLog(@"%f ",fractionDone); nextFraction = nextFraction+fractionStepSize; } } } ---- John Nairn http://www.geditcom.com ___ Cocoa-dev

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

2010-09-14 Thread John Nairn
t interact with Word (although it is possible). 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 mode

ScriptingBridge problem

2010-09-13 Thread John Nairn
w (as implied by the documentation), but it is a serious 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? --

ScriptingBridge Commands

2010-05-04 Thread John Nairn
t;com.geditcom.GEDitCOMII") 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.gedit

Re: initWithObject Confusion

2010-04-08 Thread John Nairn
Snow 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-54

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-54

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/fa

Custom Field Editor Problem

2010-02-02 Thread John Nairn
place, such as the dealloc method of the window delegate 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 ___

performFindPanelAction

2010-02-02 Thread John Nairn
eld handle 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.e

Tabbed windows

2010-01-29 Thread John Nairn
Cocoa? 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) Plea

Package Maker Won't Install on Snow Leopard

2009-11-07 Thread John Nairn
kage Maker does 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 Softw

Undo without Redo

2009-07-12 Thread John Nairn
either re-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

PackageMaker Script

2009-04-05 Thread John Nairn
aker 3.0.3 ---- 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

Printing WebView as a subview

2009-01-30 Thread John Nairn
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

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 the

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

Debugging objc_msg errors

2009-01-14 Thread John Nairn
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

NSTextField Content Sensitive Menu

2008-12-31 Thread John Nairn
ocated this custom editor when the window controller got deallocated. Thus, I was confused on how to handle a custom field editor. --- John Nairn GEDitCOM - Genealogy Software for the Macintosh http://www.geditcom.com ___ Coc

NSMenu icon

2008-12-24 Thread John Nairn
menuImage=[[NSImageView alloc] initWithFrame:NSMakeRect(0.,0.,32.,32.)]; [menuImage setImage:[[NSImage imageNamed:@"item_image.tiff"] retain]]; [newItem setView: menuImage]; [newItem setTarget:self]; [newMenu addItem:newItem]; [newItem release]; --- Jo

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.

Re: NSMutableArray sorting

2008-12-21 Thread John Nairn
NSMutableArray 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.

(no subject)

2008-12-20 Thread John Nairn
Cocoa? ie in this case I need to apply a mathematical 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 __

Re: Find Panel Stopped Working (maybe)

2008-12-20 Thread John Nairn
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 wrote: 1. I noticed the items in the Find menu were not connected to any actions. I tried connecting them all to performFindPanelAction

Find Panel Stopped Working (maybe)

2008-12-20 Thread John Nairn
a standard 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 Softwa

Cocoa Apple Script Problem

2008-12-19 Thread John Nairn
ne? Do have to manuul find a way to override the make command? Curiously this method of form insertInRecords: 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 befor

first responder stopped working

2008-12-13 Thread John Nairn
lected 2. 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.ge

Re: Scaled Printing

2008-07-01 Thread John Nairn
e break. I wanted to fill 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/facul

Scaled Printing

2008-06-30 Thread John Nairn
ze to the scaled 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