Re: Drag image opacity

2020-11-16 Thread Howard Moon via Cocoa-dev
According to the docs: The Dragged Image The image that is dragged in a dragging session is simply an image that represents the data on the pasteboard. Although a dragging destination can access the image, its primary concern is with the pasteboard data that the image represents—the dragging

Proper way to retain member of AppDelegate?

2014-10-15 Thread Howard Moon
Hi, I'm working on my first ARC-enabled app, but am having a problem with how to keep my delegate's member data alive. At startup (in the delegate's applicationDidFinishLaunching: function), my delegate initializes a data object (a member of the delegate) containing some

Re: Proper way to retain member of AppDelegate?

2014-10-15 Thread Howard Moon
I think I resolved it… my data object's members were all declared using @property(assign). I changed those all to @property(retain), and it works now. Thanks, Howard On Oct 15, 2014, at 1:42 PM, Howard Moon how...@antarestech.com wrote: Hi, I'm working on my first ARC

Re: Proper way to retain member of AppDelegate?

2014-10-15 Thread Howard Moon
, 2014, at 2:30 PM, Jens Alfke j...@mooseyard.com wrote: On Oct 15, 2014, at 1:58 PM, Howard Moon how...@antarestech.com wrote: I think I resolved it… my data object's members were all declared using @property(assign). I changed those all to @property(retain), and it works now. Don't use

Crash from NSURLConnection if delegate released too soon?

2014-08-25 Thread Howard Moon
Hi, I've got an NSURLConnection owned by an NSObject that implements the NSURLConnectionDelegate protocol, used by a C++ object inside an AudioUnits plug-in. I'm seeing a crash occur if I close the plug-in (and thus call dealloc on the delegate object). The crash happens about a

Re: Crash from NSURLConnection if delegate released too soon?

2014-08-25 Thread Howard Moon
, and then *I* released it, wouldn't it cause a crash that way, as well? I'm really stumped as to where to look. -Howard On Aug 25, 2014, at 8:15 AM, Howard Moon how...@antarestech.com wrote: Hi, I've got an NSURLConnection owned by an NSObject that implements the NSURLConnectionDelegate

Re: Crash from NSURLConnection if delegate released too soon?

2014-08-25 Thread Howard Moon
, at 8:51 AM, Howard Moon how...@antarestech.com wrote: Now that I think about it, I suspect the log is a red herring, related only to Xcode at the time that it is preparing to report the EXC_BAD_ACCESS, and not related to the cause at all. I know that closing an audio plug-in right after

Re: Crash from NSURLConnection if delegate released too soon?

2014-08-25 Thread Howard Moon
example, but I've spent a few days trying to get this stupid thing to work! Thanks, Howard On Aug 25, 2014, at 9:54 AM, Jens Alfke j...@mooseyard.com wrote: On Aug 25, 2014, at 9:40 AM, Howard Moon how...@antarestech.com wrote: Ok, I fixed it. I was using the connection object

Re: Crash from NSURLConnection if delegate released too soon?

2014-08-25 Thread Howard Moon
On Aug 25, 2014, at 2:13 PM, Jens Alfke j...@mooseyard.com wrote: On Aug 25, 2014, at 1:43 PM, Howard Moon how...@antarestech.com wrote: The Apple docs show simply setting the connection and receivedData to nil, instead of calling release on them. Do you have a strong [sic] reason

Re: NSNumberFormatter 10.0+ style exception with zero

2014-05-09 Thread Howard Moon
. -- Gary L. Wade (Sent from my iPhone) http://www.garywade.com/ On May 7, 2014, at 2:37 PM, Howard Moon how...@antarestech.com wrote: Ok, this seems to be an IB issue. I've made my own NSNumberFormatter, set its properties, and set it as the formatter for my text fields, all in code

NSNumberFormatter 10.0+ style exception with zero

2014-05-07 Thread Howard Moon
Hi, is the 10.0+ style of NSNumberFormatter no longer supported? I recently moved from developing in Xcode3 under OS X 10.7 to Xcode 4 under OS X 10.8, and from having a Base SDK of 10.6 to 10.7, and from a Deployment Target of 10.5 to 10.6, and am now having problems with my xib-base

Re: NSNumberFormatter 10.0+ style exception with zero

2014-05-07 Thread Howard Moon
objects on its pages causes any problems like this? Is there a connection I've overlooked that I need to make once the objects are inside that tab view? Thanks, -Howard On May 7, 2014, at 9:34 AM, Howard Moon how...@antarestech.com wrote: Hi, is the 10.0+ style

Re: NSNumberFormatter 10.0+ style exception with zero

2014-05-07 Thread Howard Moon
, Howard On May 7, 2014, at 1:47 PM, Howard Moon how...@antarestech.com wrote: Hm, it may be that something else is at play here. I did make ONE change when porting… I put my text fields inside a tab view. I wonder if maybe there's a problem accessing the number formatter from

Re: IOS floating point performance

2013-08-07 Thread Howard Moon
On Aug 7, 2013, at 2:27 PM, Fritz Anderson wrote: On 7 Aug 2013, at 3:50 PM, Trygve Inda cocoa...@xericdesign.com wrote: I have an app that is running slow. I have narrowed it down to several functions which are trig-intensive (used to calculate the position of the moon at a given moment

Re: There must be a live human at Apple?

2013-08-03 Thread Howard Moon
On Aug 3, 2013, at 10:28 AM, Michael Crawford wrote: In what way am I symptomatic? Please Elucidate. Ever Faithful, Michael David Crawford P.E., Process Architect In your own words…

Re: Why is it wrong to have relationships without an inverse in Core Data?

2013-06-24 Thread Howard Moon
Now we're straying off into grammar, but… How about adding a word to indicate that you're talking about objects, as in std::map objects or multimap objects? (I'd rather be clear than save a few keystrokes any day.) -Howard On Jun 24, 2013, at 1:00 PM, Alex Zavatone wrote: Awesome. Thanks.

NSOpenPanel may not respond to setDirectoryURL?

2012-03-08 Thread Howard Moon
Hi all, I'm really not that familiar with Objective-C and Cocoa yet, but I'm getting a warning for something that works fine, and I hate warnings. The warning is: 'NSOpenPanel' may not respond to '-setDirectoryURL:' I know that setDirectoryURL: is an

Re: NSOpenPanel may not respond to setDirectoryURL?

2012-03-08 Thread Howard Moon
On Mar 8, 2012, at 6:21 AM, Mike Abdullah wrote: I'm really not that familiar with Objective-C and Cocoa yet, but I'm getting a warning for something that works fine, and I hate warnings. The warning is: 'NSOpenPanel' may not respond to '-setDirectoryURL:' I

Re: NSOpenPanel may not respond to setDirectoryURL?

2012-03-08 Thread Howard Moon
On Mar 8, 2012, at 9:17 AM, Mike Abdullah wrote: On 8 Mar 2012, at 14:54, Howard Moon wrote: On Mar 8, 2012, at 6:21 AM, Mike Abdullah wrote: I'm really not that familiar with Objective-C and Cocoa yet, but I'm getting a warning for something that works fine, and I hate warnings

Re: NSOpenPanel may not respond to setDirectoryURL?

2012-03-08 Thread Howard Moon
On Mar 8, 2012, at 10:10 AM, Howard Moon wrote: On Mar 8, 2012, at 9:17 AM, Mike Abdullah wrote: On 8 Mar 2012, at 14:54, Howard Moon wrote: On Mar 8, 2012, at 6:21 AM, Mike Abdullah wrote: I'm really not that familiar with Objective-C and Cocoa yet, but I'm getting a warning

Re: NSOpenPanel may not respond to setDirectoryURL?

2012-03-08 Thread Howard Moon
Hmmm... I'm building a VST3/vstgui4 plug-in, and I think the base SDK and deployment targets are set as required, like this: SDKROOT = macosx10.5 SDKROOT[arch=x86_64] = $(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk When I build either a 32-bit or 64-bit build, while running on 10.6, it executes

Re: NSOpenPanel may not respond to setDirectoryURL?

2012-03-08 Thread Howard Moon
code. On 8 Mar 2012, at 18:10, Howard Moon wrote: Hmmm... I'm building a VST3/vstgui4 plug-in, and I think the base SDK and deployment targets are set as required, like this: SDKROOT = macosx10.5 SDKROOT[arch=x86_64] = $(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk When I build either a 32-bit

Re: Modal only to another window?

2012-03-01 Thread Howard Moon
Thanks, guys! A sheet looks like just what I need here. Now I just need to figure out how to set that up in the context of vstgui. I'll ask over there if I need help with that. Thanks, Howard On Feb 29, 2012, at 7:15 PM, Graham Cox wrote: On 01/03/2012, at 10:05 AM, Howard Moon

How do IB inspector fields relate to the actual objects?

2012-02-29 Thread Howard Moon
Hi, I've added a Panel to a nib for an audio plug-in I'm working on, and am having trouble determining how the IB Inspector settings relate to the actual objects, such as an NSPanel. In the Inspector, there are several Style Mask checkboxes: Utility HUD Non

Re: How do IB inspector fields relate to the actual objects?

2012-02-29 Thread Howard Moon
Thanks, Ken! On Feb 29, 2012, at 1:39 PM, Ken Thomases wrote: On Feb 29, 2012, at 1:03 PM, Howard Moon wrote: I've added a Panel to a nib for an audio plug-in I'm working on, and am having trouble determining how the IB Inspector settings relate to the actual objects

Modal only to another window?

2012-02-29 Thread Howard Moon
HI, I have a an audio plug-in, run inside a host application, that provides me a window in which my plug-in's UI is drawn. What I would like to do is to make a modal window, but one that in ONLY modal in relation to my plug-in window. Is that possible? It's easy on Windows, but I

Re: Loading existing NIB file from Cocoa?

2012-02-24 Thread Howard Moon
On Feb 23, 2012, at 2:17 PM, Fritz Anderson wrote: ... You know best, but do you really have to support Carbon any more? — F Yes, as long as a significant portion of our customer base uses audio hosts that are carbon-based. Heck, we still supported PowerPC until last year... and we

Re: [Obj-C] if (self) vs. if (self != nil)

2012-02-24 Thread Howard Moon
Really, this belongs in the Objective-C mailing list, but... If the language provides a feature, then it is correct in terms of the language. That said, I always use the long form, just to be sure I'm always specifying a boolean condition. This helps me when I'm combining or separating

Loading existing NIB file from Cocoa?

2012-02-23 Thread Howard Moon
HI all, I've got an audio plug-in that supports Windows and Carbon, and is being updated to support Cocoa (when the audio host is Cocoa-based). On the Carbon side of things, I've got a .nib file that contains a few dialogs that I need to present to users, and I'm wondering if and how

Re: Loading existing NIB file from Cocoa?

2012-02-23 Thread Howard Moon
Oh well, thanks, guys! -Howard On Feb 23, 2012, at 12:11 PM, Seth Willits wrote: On Feb 23, 2012, at 8:49 AM, Howard Moon wrote: I'm not sure how to proceed here. Is it possible to modify my .nib file in some manner so that it works in Cocoa (and still works in Carbon)? Or, do I have

Calling an Objective-C function from C++?

2012-01-31 Thread Howard Moon
Hi all, How does one call a Cocoa function from C++ code? I've got an existing .cpp file that leverages the vstgui framework, which includes support for Cocoa in the underlying layers. However, vstgui does not support dialogs or alerts. My code already supports native Windows

Re: Calling an Objective-C function from C++?

2012-01-31 Thread Howard Moon
the Cocoa functionality from my pure Cocoa files. Thanks, Howard On Jan 31, 2012, at 1:10 PM, Greg Parker wrote: On Jan 31, 2012, at 11:31 AM, Howard Moon how...@antarestech.com wrote: How do I call from a .cpp file into a .mm file? Write a C or C++ function in the .mm file

Re: How do we get rid of application downloaded from the internet warnings?

2011-11-01 Thread Howard Moon
I experienced the exact same symptoms as the OP when trying to open more than just a handful of .png files at once (NONE of which were downloaded from the internet, but created in Photoshop). Perhaps after some number of files is exceeded, the behavior changes? It worked fine when I opened

How to create NSCursor from CGBitmap?

2011-10-28 Thread Howard Moon
Hi all, I've got several .png files that I want to use as custom cursors in my app. I'm loading them into CGBitmap objects, and have written code that creates NSImage objects using them, via initWithCGImage:size:. I then use those NSImage objects to create my NSCursor objects via

Re: How to create NSCursor from CGBitmap?

2011-10-28 Thread Howard Moon
Never mind I found it! I can create an NSBitmapImageRep using initWithCGImage:, create my NSImage using initWithSize:, and then add the representation to the image using addRepresentation:. Thanks anyway! Howard On Oct 26, 2011, at 10:17 AM, Howard Moon wrote: Hi all

Re: Programmatically created NSView subclasses, and mouse events

2011-02-18 Thread Howard Moon
I guess the problem was not what I thought it was at all. Other problems I had led me to find a naming error (one letter capitalized that shouldn't have been), and that naming error made my class hierarchy break. (Doing a Quick Model showed me the broken link.) I'm not too fond of the lack

Re: Programmatically created NSView subclasses, and mouse events

2011-02-18 Thread Howard Moon
I'm teaching myself Objective-C and Cocoa, by working on a simple (so I thought) modification to the default AudioUnit effect project. But in this project, I create my own views programmatically instead of using the NIB. (I know - why??? Just go with me, ok? :-)) I have a

Programmatically created NSView subclasses, and mouse events

2011-02-17 Thread Howard Moon
Hi all, I'm teaching myself Objective-C and Cocoa, by working on a simple (so I thought) modification to the default AudioUnit effect project. But in this project, I create my own views programmatically instead of using the NIB. (I know - why??? Just go with me, ok? :-)) I