Re: /Library/Application Support off limits? (Davidap)

2021-04-21 Thread Jonathan Prescott via Cocoa-dev
Adobe, Google, etc., use the Apple security frame works and interfaces to temporarily elevate privileges to write their respective data to /Library/Application Support, which is actually where this data should go, based on Apple guidance. There is extensive documentation on this whole issue in

Re: sharing code between screensaver and regular app

2020-03-02 Thread Jonathan Prescott via Cocoa-dev
When you created the application, you should have created two pairs of files, AppDelegate.h/.m and ViewController.h/.m. The AppDelegate is used to augment and tailor the behavior of the NSApplication that is implicitly created as part of the AppKit framework. For your purposes, you may not nee

Re: What is the preferred way to set NSTextView content from NSAttributedString?

2020-02-02 Thread Jonathan Prescott via Cocoa-dev
f setting the > value to T2. There is no attributedString variable, just an accessor method, > so I've been trying a variety of insert methods. > > -jeff > > On Sun, Feb 2, 2020 at 12:19 PM Jonathan Prescott <mailto:jprescot...@icloud.com>> wrote: > Did you t

RE: What is the preferred way to set NSTextView content from NSAttributedString?

2020-02-02 Thread Jonathan Prescott via Cocoa-dev
Did you tell V that it needs to re-load it’s display? There is a method on NSView (from which NSTextView is derived) called “needsDisplay(sic)” which sets a flag on the view so that the view will re-draw its content the next display cycle. So, after you set the content to T2, you need to call

Re: Cocoa-dev Digest, Vol 13, Issue 518

2017-01-03 Thread Jonathan Prescott
I think that your expectation that presentViewController would retain a strong reference to the view controller is not right. I would put the release after the dismissal code has run. Now, you really don’t need the view controller. Jonathan > On Dec 17, 2016, at 3:00 PM, cocoa-dev-requ...@lis

Re: Cocoa-dev Digest, Vol 12, Issue 299

2015-09-03 Thread Jonathan Prescott
How’s this? #define SUPER_INIT \ do {\ self = [super init];\ if (self == nil) return self; \ } while(1); The do … while() construct is an old C/C++ trick used in macro p

Re: UNIX signals

2008-12-16 Thread Jonathan Prescott
For everything else other than Cocoa and Carbon applications that receive AppleEvents, when the computer is shutdown, everything else is sent a SIGKILL by launchd, just like any other Unix system (launchd takes the place of the init daemon seen on other Unix systems). Semantics for BSD sig

Re: Porting 'operator' to Obj-C

2008-09-26 Thread Jonathan Prescott
This is C++, not C. You need to be compiling this as Objective-C++, not Objective-C. Easiest way is to change the extension of the file from ".m" to ".mm" if you are using Xcode. As an aside, you do not need the "typedef" in C++. Simply declaring the struct (or class) is enough to declare

Re: Trying to compile an ObjectiveC and C++ program in XCode 3.1

2008-09-11 Thread Jonathan Prescott
You might want to take a look at the other header files you might be including, including those included by the AppKit or other Apple headers. MAX is a well-known MACRO definition for providing a max "function" for C (and Objective-C) environments, and, if it is being expanded by the C/C++

Re: Problem with friend function and gcc 4.2 with

2008-08-11 Thread Jonathan Prescott
Operator signatures are already know by the compiler since they are defined in the standard, and are really global in scope. Thus, you don't have to declare them prior to defining them. Jonathan On Aug 10, 2008, at 11:09 PM, Ken Worley wrote: First, I appreciate the response and discussion

Re: How to create process independent of current process AND that takes command line arguments?

2008-04-05 Thread Jonathan Prescott
fork() is the basic process by which a Unix system (IRIX, Solaris, Darwin/MacOSX, AIX, etc.), and Linux systems spawn new processes (not threads). exec() and its variants are the way to cause a new executable image to be started in either the old or new process. The only concern the OP ha

Re: How to create process independent of current process AND that takes command line arguments?

2008-04-04 Thread Jonathan Prescott
All processes on MacOSX, and any Unix/Linux operating system are child processes except for launchd (MacOSX) or init (Unix/Linux). If you fork and execv a process, then when the parent terminates, the created process is automatically made a child of launchd. Jonathan On Apr 4, 2008, at 12