Re: Tips to deploy applications to multiple Mac OS X versions

2008-04-11 Thread Steve Christensen
On Apr 10, 2008, at 9:37 PM, Michael Ash wrote: On Apr 10, 2008, at 9:26 PM, Jerry Krinock wrote: On Apr 9, 2008, at 11:08 PM, Ben Lachman wrote: On Apr 9, 2008, at 3:27 PM, David Duncan wrote: Typically you would only use 1 target. Use the SDK to the OS whose API your are targeting (such a

how to manage multiple non-document windows

2008-04-24 Thread Steve Christensen
I'm rewriting an old legacy app in Cocoa and have run into a stumbling block. The app is supposed to support having multiple windows open, but the window content is unrelated to the concept of a document - which is the "normal" multiple window model. Instead the windows provide a UI to perf

Re: how to manage multiple non-document windows

2008-04-25 Thread Steve Christensen
On Apr 24, 2008, at 5:01 PM, Ken Thomases wrote: On Apr 24, 2008, at 6:39 PM, Steve Christensen wrote: I'm rewriting an old legacy app in Cocoa and have run into a stumbling block. The app is supposed to support having multiple windows open, but the window content is unrelated t

Re: how to manage multiple non-document windows

2008-04-25 Thread Steve Christensen
On Apr 25, 2008, at 12:45 PM, Erik Verbruggen wrote: On 25 Apr 2008, at 20:06, Steve Christensen wrote: I put both the window and NSWindowController subclass in MainMenu.nib since some of the menu items control behavior in the window (and some of the window's current state is reflect

Re: how to manage multiple non-document windows

2008-04-25 Thread Steve Christensen
On Apr 25, 2008, at 5:51 PM, Jean-Daniel Dupas wrote: Le 26 avr. 08 à 01:44, Steve Christensen a écrit : On Apr 25, 2008, at 12:45 PM, Erik Verbruggen wrote: On 25 Apr 2008, at 20:06, Steve Christensen wrote: I put both the window and NSWindowController subclass in MainMenu.nib since

Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-04-30 Thread Steve Christensen
I noticed in some sample code (http://developer.apple.com/samplecode/ FSFileOperation/listing1.html), that after creating the FSFileOperationRef, it calls FSFileOperationScheduleWithRunLoop, specifying the current run loop. Just a guess that you're probably not making that association so the

Re: List Running apps and windows

2008-05-03 Thread Steve Christensen
On May 3, 2008, at 3:52 PM, Jere Gmail wrote: I want to list all the running apps and their windows. Running apps is easy with [ws launchedApplications] but I cant find a way for listing their windows. I have tried NSWindowList(win_count,arr_win) but then [[NSApplication sharedApplication] wind

Re: regarding fxPlug plugins

2008-05-08 Thread Steve Christensen
On May 8, 2008, at 7:10 AM, Shashi Kumar wrote: I am new to fxplug. And I wanted to create an fxplug plugin from a cocoa application. What should be the right way to do this ? I have fxPlug SDK installed. The specification is: I have an cocoa application with UI having effects and image. And I

Re: regarding fxPlug plugins

2008-05-09 Thread Steve Christensen
lugins work. On May 8, 2008, at 8:39 PM, Shashi Kumar wrote: Yes this exactly what I want. And I think this is the thing which FxFactory application do, as far I understood. So, could you give me the solution for this with explanation. --- On Thu, 5/8/08, Steve Christensen <[EMAIL

Re: how to create .qtz file from custom cocoa app

2008-05-12 Thread Steve Christensen
On May 12, 2008, at 6:30 AM, Shashi Kumar wrote: I am looking for an cocoa app through which I can create .qtz file. The cocoa app will be having UI in which i 'll implement some effects on image. Now, lets say I 've a button export. When I 'll click export button, it should get saved as .q

Re: list open application windows

2008-05-12 Thread Steve Christensen
On May 12, 2008, at 8:15 PM, Ben Lowndes wrote: I'm a cocoa newbie, so I may be missing something obvious here: I'd like to get a list of open windows for all currently running applications. I've been able to get the list of running applications from NSworkspace, but can't see a method of getti

Re: how to create .qtz file from custom cocoa app

2008-05-12 Thread Steve Christensen
On May 12, 2008, at 9:03 PM, Shashi Kumar wrote: Is it not possible that from UI, I will generate XML file which will be kind of PList file of .qtz file containing tree list of its properties. And from that XML file we will create .qtz file ?? And, no, there isn't a Cocoa API that will effe

Re: NSColor may not respond to colorWithCalibratedRed

2008-12-27 Thread Steve Christensen
That's because you're trying to call a class method as an instance method. It's defined as: + (NSColor *)colorWithCalibratedRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha; which means you'd use it (in your example) like this: [[NSColor colorWithCalibratedRed:5.0 gree

Re: NSImage resizing

2009-01-09 Thread Steve Christensen
For a bitmap image, -setSize: effectively alters the DPI of the pixels but doesn't actually create a new bitmap of a different size. So for a 72dpi image, the NSBitmapImageRep's -width and -height methods should give you the same values as for the image's -size method. But for a 300dpi imag

Re: Manipulating QC input ports with QCRenderer

2009-01-15 Thread Steve Christensen
So QCRenderer's -valueForInputKey: and -setValue:forInputKey: aren't working to, respectively, read or set a port value? Have you tried printing out the array returned by -inputKeys to make sure the particular keys are, in fact, published? steve On Jan 15, 2009, at 12:44 PM, Jonathan Sela

Re: Targetting Tiger

2009-01-24 Thread Steve Christensen
Your build settings below look reasonable, but given where the crash is happening it looks like the problem is with your main nib file. Is it possible that it contains a new Leopard-only view class, for example? Does IB show any incompatibilities with your xib or nib with a 10.4 target? A

Re: Targetting Tiger

2009-01-24 Thread Steve Christensen
On Jan 24, 2009, at 9:22 AM, Thomas Davie wrote: On 24 Jan 2009, at 17:48, Matt Long wrote: Not sure what you mean by "capable of running tiger". If you have a machine capable of running Leopard, it should be able to run tiger. Fraid not, the two machines I have available to develop on are to

Re: Targetting Tiger

2009-01-24 Thread Steve Christensen
On Jan 24, 2009, at 11:34 AM, Marcus wrote: 24 jan 2009 kl. 16.56 skrev Steve Christensen: And I'd suggest getting your hands on a 10.4 system of your own, particularly if current or future customers have that as a requirement. My customer does so I'm doing all my development wi

Re: Is there a more efficient way to get the first 4 bytes off a NSInputStream to compare

2009-01-27 Thread Steve Christensen
On 27 Jan 2009, at 14:23, Adam Venturella wrote: The file I am reading is assured to be in little-endian, and I am checking what the host byte ordering is first. Leopard is little endian ( at least on the intel chips, but I have read there are other macs that are big-endian, so I am trying to c

Re: Partially Transparent windows

2009-01-29 Thread Steve Christensen
On Jan 29, 2009, at 2:04 PM, Joe Turner wrote: I've noticed that some applications I see have partially transparent windows. What I mean by this, is that the window is 100% opaque in most parts, but then there's a 50% transparent part (you can see your desktop through the window). I am wond

Re: Transparent image

2009-02-09 Thread Steve Christensen
Something similar to what you're asking was discussed on this list last week. To get you started: [window setOpaque:NO]; [window setBackgroundColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.5]]; On Feb 9, 2009, at 1:55 PM, Christian Graus wrote: I have a window with an image showing

Re: Transparent image

2009-02-09 Thread Steve Christensen
gives me a white background ) or clearColor ( which gives me a black background ). Is there something I am missing ? Thanks for your help Christian On Tue, Feb 10, 2009 at 9:18 AM, Steve Christensen wrote: Something similar to what you're asking was discussed on this list last we

Re: Transparent image

2009-02-10 Thread Steve Christensen
control does not support being transparent, I need to find a way to fake it. Thanks Christian On Tue, Feb 10, 2009 at 11:25 AM, Steve Christensen wrote: Sorry, I misread your original posting. You're trying to make the view transparent, not the window. Based on what you&

Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation

2009-02-18 Thread Steve Christensen
Google is your friend. The first search result for "Mac OS X stack size" was , which says: "Each Mac OS X process is launched with a default stack size of 8 Megabytes. This allocation is used exclusively for the main thread's sta

Re: How to get the "white shadow" effect when drawing NSStrings?

2009-02-22 Thread Steve Christensen
It seems like the best solution would be to handle both the Leopard+ and pre-Leopard cases at runtime so any changes to HID over time are non-issues since you've limited the custom code to the pre-Leopard case. You might be able to get away with as little as adding a category to NSCell (typ

custom control's value change isn't being noticed by controller

2009-02-26 Thread Steve Christensen
I've written a custom control containing multiple NSTextFieldCells. The combined cell values result in a single integer value accessed via the control's intValue/setIntValue: and objectValue/ setObjectValue: (as a NSNumber). The control is correctly displaying the current value when it's bou

enabling Edit menu items in a modal window?

2009-02-27 Thread Steve Christensen
I'm working on a plugin that needs to do its configuration in a modal window. As soon as it calls [NSApp runModalForWindow:window], the items in the Edit menu are disabled. Is there some way to selectively enable some of the items? For instance, it'd be nice if I could do a Select All...

Re: enabling Edit menu items in a modal window?

2009-02-28 Thread Steve Christensen
On Feb 27, 2009, at 3:44 PM, Graham Cox wrote: On 28/02/2009, at 4:26 AM, Steve Christensen wrote: I'm working on a plugin that needs to do its configuration in a modal window. As soon as it calls [NSApp runModalForWindow:window], the items in the Edit menu are disabled. Is there

Re: Rotate NSImage to get a new NSImage, without drawing

2009-03-01 Thread Steve Christensen
On Feb 28, 2009, at 10:20 PM, Jerry Krinock wrote: On 2009 Feb 28, at 20:10, Graham Cox wrote: Create the new image, swapping width and height, lock focus onto it, apply a transform that rotates 90 degrees, and draw the first into the second. You can't do it without drawing, but the draw

Re: enabling Edit menu items in a modal window?

2009-03-01 Thread Steve Christensen
On Mar 1, 2009, at 1:59 AM, Paul Sanders wrote: At the time I check the Edit menu, the focus ring is around my custom table view and a row is selected. NSTableView says that it implements selectAll: and deselectAll:, and just to be extra sure, I created my own that just call super, but that does

Re: enabling Edit menu items in a modal window?

2009-03-02 Thread Steve Christensen
On Mar 1, 2009, at 11:38 PM, Paul Sanders wrote: I added a text field to my modal window, and when it is the first responder the cut, copy, paste and select all menu items are enabled. Just for grins I added a second NSTableView to the window and rebuilt. When that table has focus, the edit menu

Re: enabling Edit menu items in a modal window?

2009-03-02 Thread Steve Christensen
On Mar 2, 2009, at 8:47 AM, Paul Sanders wrote: nobody even calls validateMenuItem: for my modal window... Well, you're one step closer to getting to the bottom of it perhaps, knowing that. Is the target of the menu item in question set to the first responder in IB? Forgive me if you kno

Re: enabling Edit menu items in a modal window?

2009-03-02 Thread Steve Christensen
On Mar 2, 2009, at 9:10 AM, mmalc Crawford wrote: On Mar 2, 2009, at 8:28 AM, Steve Christensen wrote: http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ ApplicationKit/Protocols/NSMenuValidation_Protocol/Reference/ Reference.html I tried doing that, both in my NSTableView subclass

Re: enabling Edit menu items in a modal window?

2009-03-02 Thread Steve Christensen
On Mar 2, 2009, at 10:47 AM, Paul Sanders wrote: I think I mentioned in my original message that I'm writing an application plugin (for FCP, actually), so I wasn't involved in setting up the application's nib. Oh yes, so you did. So, I have now done what I should have done before and stuck

Re: Window widgets

2008-10-17 Thread Steve Christensen
One thing to point out is that there is no guarantee that those window widgets will continue to be red, yellow and green dots in a future OS release. Or that someone won't patch - standardWindowButton:forStyleMask: as part of a haxie for skinning the UI, in which case you could end up with s

Re: Window widgets

2008-10-17 Thread Steve Christensen
On Oct 17, 2008, at 10:52 AM, Kyle Sluder wrote: On Fri, Oct 17, 2008 at 1:41 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: I would suggest either tracking down a set of images you like and then include them in your app's bundle, or rolling your own. Fewer chances for surpris

Re: what do you use to make icons and similar?

2008-10-19 Thread Steve Christensen
On Oct 19, 2008, at 5:50 AM, Benjamin Dobson wrote: I believe png are really what I'm trying to make here, they seem to be recommended. PNGs are not resolution independent, although they are perfectly acceptable. Saving as a TIFF then converting it to PDF with Preview works well for me.

Re: Bind button title to Boolean

2008-10-27 Thread Steve Christensen
On Oct 27, 2008, at 3:32 AM, Trygve Inda wrote: How can I bind a button title to a Boolean but have a custom title for each state? For example, I have a BOOL isRunning, if YES, my button should read "Stop Running" else "Start Running". I can't really do this with an alternate title since w

NSPopupUpButton not showing checked menu items

2008-11-22 Thread Steve Christensen
In IB I created a NSPopUpButton configured as pulldown with a static menu. I bound its selectedTag binding to a method on my window controller. (I also tried binding selectedIndex with the same results.) When I run my code and select various of the items in the button's menu, none of the it

Re: NSPopupUpButton not showing checked menu items

2008-11-22 Thread Steve Christensen
On Nov 22, 2008, at 6:38 PM, Kyle Sluder wrote: On Sat, Nov 22, 2008 at 9:20 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: In IB I created a NSPopUpButton configured as pulldown with a static menu. I bound its selectedTag binding to a method on my window controller. (I also

Re: NSPopupUpButton not showing checked menu items

2008-11-23 Thread Steve Christensen
On Nov 23, 2008, at 12:13 AM, Kyle Sluder wrote: On Sun, Nov 23, 2008 at 12:45 AM, Steve Christensen <[EMAIL PROTECTED]> wrote: When I click on the popup and change the selection, the result I'm seeing is that my controller's setter method is being called, that the popup

Re: NSPopupUpButton not showing checked menu items

2008-11-23 Thread Steve Christensen
On Nov 23, 2008, at 1:02 PM, Kyle Sluder wrote: On Sun, Nov 23, 2008 at 3:27 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: I'm not at all sure that my confusion is stemming from a bindings issue, though. I've attached an archived project with both popup and pulldown m

Re: NSPopupUpButton not showing checked menu items

2008-11-23 Thread Steve Christensen
On Nov 23, 2008, at 1:14 PM, Kyle Sluder wrote: On Sun, Nov 23, 2008 at 4:09 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: Yes, but I would expect that the current selection would be shown as checked in the pulldown menu when the button is clicked. I don't think "select

Re: NSPopupUpButton not showing checked menu items

2008-11-23 Thread Steve Christensen
On Nov 23, 2008, at 3:05 PM, Kyle Sluder wrote: On Sun, Nov 23, 2008 at 6:01 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: The class methods also don't make a distinction between popup and pulldown, so I would think that the "selection" should still be marked in

Re: NSPopupUpButton not showing checked menu items

2008-11-24 Thread Steve Christensen
On Nov 24, 2008, at 12:53 PM, Peter Ammon wrote: On Nov 23, 2008, at 3:33 PM, Steve Christensen wrote: On Nov 23, 2008, at 3:05 PM, Kyle Sluder wrote: On Sun, Nov 23, 2008 at 6:01 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: The class methods also don't make a distinction be

Re: NSPopupUpButton not showing checked menu items

2008-11-24 Thread Steve Christensen
On Nov 23, 2008, at 11:26 PM, Benjamin Dobson wrote: Actually, I only wanted to select a single item in the pulldown case, the same as what correctly happens for me in the popup case. The problem has always been that, even though the button itself is reporting that a particular item is "sel

Re: Resizing an image

2008-12-11 Thread Steve Christensen
On Dec 11, 2008, at 5:43 AM, Glenn Bloom wrote: Can anyone recommend a best practice for resizing an image to reduce its size in terms of both bytes and visible dimensions, retaining the new smaller image and eliminating the original from memory? In how I go about this now, I am concerned

NSImage/NSBitmapImageRep color shifts when creating scaled copy

2009-03-06 Thread Steve Christensen
I'm trying to create a scaled-down copy of a large NSBitmapImageRep (i.e., 3200x2400 -> 320x240). The smaller image eventually gets passed to OpenGL for drawing. What I'm finding is that the copy has color shifted. When I draw the copy, it appears to be darker and more saturated than the or

Re: NSImage/NSBitmapImageRep color shifts when creating scaled copy

2009-03-06 Thread Steve Christensen
On Mar 6, 2009, at 1:15 PM, Kyle Sluder wrote: On Fri, Mar 6, 2009 at 2:21 PM, Steve Christensen wrote: I'm trying to create a scaled-down copy of a large NSBitmapImageRep (i.e., 3200x2400 -> 320x240). The smaller image eventually gets passed to OpenGL for drawing. What I'

Re: Need to use Quartz... I think?

2009-03-07 Thread Steve Christensen
I'm coming in on the middle of this so I don't know if what's already been discussed. How many -unique- images are there? If you're working with a relatively small number of images, you could just cache a single copy of each and then supply the correct image for a particular cell. If you

Re: Design question: View with hell lot of drawing

2009-03-10 Thread Steve Christensen
On Mar 10, 2009, at 1:39 AM, rajesh wrote: I need to display huge number of "elements" in NSView (1000-2000). These elements are generally made of high resolution image files with some fancy drawing around them. These elements may vary from size 300 X 270 to 4280 X 3500. First I made use

Re: NSSlider changed notification

2009-03-11 Thread Steve Christensen
As previous replies have mentioned, if you're looking for continuous change, you need to make sure that "continuous" is set to YES, either by checking "continuously send action while sliding" in IB or by calling [mySlider setContinuous:YES]. You could keep track of changes to the slider val

Re: ack no class

2009-03-30 Thread Steve Christensen
Maybe start up that generated app in gdb with a breakpoint set on NSLog? When it breaks you could look at the backtrace. That may at least tell you where the message is being generated, which may then tell you why. On Mar 29, 2009, at 3:26 PM, Mark Sibly wrote: I'm the author of BlitzMax

Re: Handling List of Hardware Devices in NSTableView w/ Asynchronous Updates

2009-04-01 Thread Steve Christensen
On Apr 1, 2009, at 7:51 AM, Grant Erickson wrote: I've a list of hardware devices in an NSTableView. The contents of the table view are updated accordingly using the device model (C++) getters in objectValueForTableColumn and using the device model setters in setObjectValue. However, the devi

Re: finder file size

2009-04-07 Thread Steve Christensen
Well, directories -are- a single file so it makes sense that the file size refers to exactly the directory and not its contents. Besides, for the general case of looking at files/folders in a particular directory, you could get all the attributes quickly without paying a time penalty to rec

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Steve Christensen
If your _instances variable is initialized using either [NSMutableArray array] or [NSMutableArray arrayWithCapacity:...], it will be autoreleased and become invalid. You can fix that by doing something like [NSMutableArray array] retain] or using [NSMutableArray alloc] initWithCapacity:...]

Re: finder file size

2009-04-08 Thread Steve Christensen
On Apr 8, 2009, at 5:51 PM, Gerriet M. Denkmann wrote: On 9 Apr 2009, at 02:03, "Sean McBride" wrote: On 4/7/09 9:04 PM, Jo Phils said: As for not using Carbon I suppose there's no reason I can't use it. I was just thinking with Finder going away from Carbon and since I'm just learni

Re: C: treated as a path component

2009-04-15 Thread Steve Christensen
On Apr 15, 2009, at 1:34 PM, Jean-Daniel Dupas wrote: Le 15 avr. 09 à 01:57, Dragan Milić a écrit : Hell all, Let's suppose I've got NSString @"C:omponent" , which represents the name of a file. Is there a way to instruct NSString class not to treat a leading single letter followed by a c

Re: Problem in displaying image in NSTableView

2009-04-20 Thread Steve Christensen
On Apr 18, 2009, at 7:54 PM, cocoa learner wrote: Hello All, In my NSTableView I am using NSImageCell as one column to display images. And I have implemented my datastore method like this - - (id) tableView: (NSTableView *)aTableView objectValueForTableColumn: (NSTableColumn *)aTableColumn r

Re: OpenGL

2009-04-20 Thread Steve Christensen
On Apr 20, 2009, at 4:23 PM, Andrew Farmer wrote: On 20 Apr 09, at 06:59, fawad shafi wrote: i am new on OpenGL Framework, i dnt know to that how to display the simple 3D image using OpenGL. This doesn't appear to be relevant to Cocoa development, at least until the Cocoa OpenGL views get

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Steve Christensen
You'd said in an earlier thread that the file path characters are coming from a text file and that you're then storing those in a STL string. The STL string doesn't care what the encoding is since it's just a storage construct. When you try to create a CFString or NSString from those characters,

Re: How remove a clip path? SOLVED

2009-05-05 Thread Steve Christensen
On May 5, 2009, at 11:57 AM, McLaughlin, Michael P. wrote: Naturally, I came up with a solution two minutes after posting my query to this list :-( My solution is [[NSBezierPath bezierPathWithRect:rect] setClip]; where rect is the viewRect. This works for me. It might not be the best s

Re: Reading word at mouse pointer w/o Universal Access

2008-02-28 Thread Steve Christensen
I don't have specific knowledge but, yes, I would expect that the dictionary support is a trusted part of the OS, thus can be hooked into every application. As far as I know, if you want to touch another application's UI, you have to go through accessibility. From the OS's point of view you

UIWebView displays margins incorrectly with black background and paginationMode = UIWebPaginationModeLeftToRight

2017-05-04 Thread Steve Christensen
Xcode 8.3.1, iOS Simulator 10.3 and iOS 10.3.1 I am using a paginated UIWebView to display some HTML. Everything appeared to be working OK until I changed the CSS to set the background color to black and the foreground (text) color to white. Then I found that wherever there is a non-zero margi

Re: Who owns a child view controller?

2017-07-12 Thread Steve Christensen
On Jul 12, 2017, at 1:16 PM, Jeremy Hughes wrote: > >> On 12 Jul 2017, at 19:25, Jens Alfke wrote: >> >>> >>> On Jul 12, 2017, at 10:57 AM, Jeremy Hughes >>> wrote: >>> >>> Wouldn’t it be ARC (rather than the consumer) that is balancing retains? >> >> Yes. ARC internally generates calls to

Re: Who owns a child view controller?

2017-07-14 Thread Steve Christensen
On Jul 14, 2017, at 3:50 AM, Jeremy Hughes wrote: > > I’m still not entirely clear on when autorelease pools are used in Swift. > There is a WWDC video which says that they’re used in code that interfaces > with Objective-C, but Greg Parker’s comments in this thread indicate that > autorelease

Re: Who owns a child view controller?

2017-07-14 Thread Steve Christensen
On Jul 14, 2017, at 8:09 AM, Jeremy Hughes wrote: > >> On 14 Jul 2017, at 14:40, Steve Christensen wrote: >> >> On Jul 14, 2017, at 3:50 AM, Jeremy Hughes >> wrote: >>> >>> I’m still not entirely clear on when autorelease pools are used in Swif

Re: I noticed that my mail address is banned

2017-10-22 Thread Steve Christensen
高田氏、 The word 'pedophilia' in English is shōniseiai' in Japanese. At least in our part of the world, that word has a very negative connotation and its practice is illegal. That is why nobody will visit your website. I would suggest that you consider a different domain name and use a service lik

Re: Getting immutable UIImage data pointer without copy?

2017-11-15 Thread Steve Christensen
On Nov 14, 2017, at 8:37 PM, Rick Mann wrote: > >> On Nov 14, 2017, at 20:18 , Jens Alfke wrote: >> >>> On Nov 14, 2017, at 8:11 PM, Rick Mann wrote: >>> >>> Maybe, at least for the bonus question. The bigger question is around the >>> copy. >> >> Where pixmaps live is a pretty complex issu

Re: Avoiding color transformations in PNG/UIImage/CGImage ops?

2017-11-17 Thread Steve Christensen
It sounds like you're looking at image file data rather than buffers of pixel data. If so then I wouldn't make the assumption that the encoded bytes in two PNG files will be identical for identical images. Depending on how flexible the file format is, then particular parts of the encoded image c

Re: Background fetch is never called

2017-12-12 Thread Steve Christensen
Did you confirm that there is a UIBackgroundModes key in your app's Info.plist? UIBackgroundModes fetch > On Dec 12, 2017, at 6:23 AM, Viacheslav Karamov wrote: > > I have configured Background Fetch at the "Capabilities" tab in my Project's > settings. Then added to the App delega

Re: Background fetch is never called

2017-12-13 Thread Steve Christensen
d execution > time. > On Dec 13, 2017, at 1:31 AM, Viacheslav Karamov wrote: > > Yes, I confirm that > > > 12.12.17 23:16, Steve Christensen wrote: >> Did you confirm that there is a UIBackgroundModes key in your app's >> Info.plist? >> >> UIB

Re: Deciphering an error message on an iOS UITextField subclass.

2018-01-17 Thread Steve Christensen
> On Jan 17, 2018, at 5:24 PM, Alex Zavatone wrote: > > po [cell.dataField isKindOfClass:[UITextField class]] Have you tried "print [cell.dataField isKindOfClass:[UITextField class]]", instead, possibly casting the result to bool? The debugger may be getting confused when you're asking it to

Re: Icon radio buttons

2018-01-24 Thread Steve Christensen
You could manage the button state yourself without a lot of code. @IBOutlet var button1: NSButton// tag = 0 ... @IBOutlet var buttonN: NSButton// tag = N - 1 private var selectedPaletteButtonIndex: Int = 0 private var paletteButtons: [NSButton] override func viewDidLoad() { super.vi

Re: Using NSFetchedResultsController with many-to-many relationship

2018-03-10 Thread Steve Christensen
Don't complicate your life by managing multiple NSFetchedResultsControllers. Just create a single one that returns Club entities. For your table view data source methods: func numberOfSections(in tableView: UITableView) -> Int { return frc.fetchedObjects.count } func tableView(_ tableView:

Re: assertion failure

2018-04-07 Thread Steve Christensen
It's not uncommon to have a method throw an exception when you make a programming error so that you get immediate feedback. Not knowing offhand which method(s) were called, my guess would be that they're designed to always succeed if you specify the correct parameter values, so the assertion is

Re: My eyes are failing me.

2019-02-22 Thread Steve Christensen
Alex, is there any reason you couldn’t have used one of these? [self.sharedData.webServicesURL URLByAppendingPathComponent:@"login"] [self.sharedData.webServicesURL URLByAppendingPathComponent:@"login" isDirectory:{YES|NO}] > On Feb 22, 2019, at 9:40 AM, Alex Zavatone wrote: > > There are 2 p

Re: NSManagedObject.managedObjectContext is nil???

2019-03-28 Thread Steve Christensen
Is it possible that the entity is retained but has been deleted from the MOC? I vaguely recall seeing this myself at one point in the dim past. > On Mar 27, 2019, at 1:18 PM, Rick Mann wrote: > > I can't tell. I don't believe I have any unreferenced MOCs. > >> On Mar 27, 2019, at 13:08 , Dave

Re: Will this get my iOS app rejected???

2013-09-27 Thread Steve Christensen
I just looked at some UITextFields with placeholder text, both on a device and in the simulator, and it was dim but readable. If you're hot to change the look then I don't recommend using -setValue:forKeyPath:. I don't know that it will get your app rejected but at the very least it's a fragile

Re: Efficient UITableViewCell usage

2013-09-30 Thread Steve Christensen
The table view needs to call -heightForRowAtIndexPath: for each cell in the table, at the very least, so that it knows how tall the table is so that it can set -contentSize on it's underlying scroll view. For performance, you could calculate and cache the cell heights in an array managed by you

Re: How to get variably sized header in a UICollectionView supporting both orientations

2013-10-04 Thread Steve Christensen
On Oct 4, 2013, at 1:52 PM, David Hoerl wrote: > But its really odd - and I'm thinking about a bug report on this - that the > delegate has to provide the size before the view is even created. It make sense if you think about it: it's asking for sizes so that scroll view contentSize can be set

Re: How to get variably sized header in a UICollectionView supporting both orientations

2013-10-04 Thread Steve Christensen
On Oct 4, 2013, at 2:45 PM, David Hoerl wrote: > On 10/4/13 5:09 PM, Steve Christensen wrote: >> On Oct 4, 2013, at 1:52 PM, David Hoerl wrote: >> >>> But its really odd - and I'm thinking about a bug report on this - that the >>> delegate has to pr

Re: Infinite Scroll View?

2013-10-07 Thread Steve Christensen
Have you thought about representing your images as cells in a UITableView? If so, you could use something like BBTableView (https://github.com/bharath2020/UITableViewTricks). It's a subclass of UITableView lays out cells along an arc but it also has support for infinite scrolling, so you could

Re: Infinite Scroll View?

2013-10-07 Thread Steve Christensen
; a gap - you can add a fragment of an image. > > Thanks anyway > All the Best > Dave > > On 7 Oct 2013, at 18:11, Steve Christensen wrote: > >> Have you thought about representing your images as cells in a UITableView? >> If so, you could use something li

Re: Infinite Scroll View?

2013-10-08 Thread Steve Christensen
Does (scrollView.contentOffset.x <= 0) not work? How are you testing for it now? On Oct 8, 2013, at 12:20 PM, Dave wrote: > Hi, > > I finally managed to get back on this! I've got it working when scrolling > from left to right and can detect when the user scrolls past the last item, > howeve

Re: iOS screen physical size (or px density)

2013-11-25 Thread Steve Christensen
I haven't seen anything that directly returns this information. Given that, it might be better to take the approach of choosing the number of cards that look good on an iPad mini and not worrying so much that there are "too few" on a full-sized iPad. On Nov 25, 2013, at 4:40 AM, Roland King w

Re: UILabel HTML to attributed string conversion: odd font choice for text

2013-12-17 Thread Steve Christensen
On Dec 17, 2013, at 1:04 PM, Jens Alfke wrote: > On Dec 17, 2013, at 10:44 AM, Steve Christensen wrote: > >> This seems odd to me since there's a perfectly fine Avenir Next Medium >> Italic available. Is this an expected font choice for italic text given the >>

UILabel HTML to attributed string conversion: odd font choice for text

2013-12-17 Thread Steve Christensen
I have formatted text delivered to the app as HTML that I am converting to a NSAttributedString and then assigning to a UILabel like this: NSDictionary* options = @{ NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding), NSDefaultAttributesDocumentAttribute:

Re: Custom UITableViewCell parent is NIL

2014-04-08 Thread Steve Christensen
On Apr 7, 2014, at 9:32 PM, Michael de Haan wrote: > It still however leaves me puzzled as to why I cannot implement Swipe to > delete. (the 2 usual suspects), ie > > -(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath > *)indexPath; > -(void)tableView:(UITableView *)

iOS: Cannot connect to iTunes Store

2014-04-10 Thread Steve Christensen
I’ve been testing IAP in the sandbox store on a development iPod and just started getting this error in -paymentQueue:updatedTransactions: with (transaction.transactionState == SKPaymentTransactionStateFailed): Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo=0x1aa5e0

Re: Navigation Design question

2014-04-13 Thread Steve Christensen
Why not just make a common UIViewController subclass that manages the global menu button, and then subclass that class for each of the controllers that live on your navigation stack? If it contains the ivar for the UINavigationItem (marked @protected) instead of having that ivar in each of the c

Re: JSONSerialization 'Garbage at end' error

2014-04-30 Thread Steve Christensen
I’m already doing downloads in my app using NSURLSession so I used my existing code to download and decode the data returned by the URL below and didn’t get an error. I am building against iOS 7.1 and I tried it out in the simulator. Doing a brief search, it seems like when others are running in

Re: Contribute some dictionary keys with registerDefaults

2014-06-18 Thread Steve Christensen
When you call -setObject:forKey:, it replaces the entire contents of that key, whether the object is a number, string, dictionary, etc. That’s the same behavior as if you called -setObject:forKey: on a regular dictionary when one of its objects is, itself, a dictionary. Depending on what you ne

Re: NSReleasePool issue

2014-06-20 Thread Steve Christensen
My main() looks like this. Does yours specify an autorelease pool? int main(int argc, char* argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, @"MyDelegateClassName"); } } On Jun 19, 2014, at 5:45 PM, Varun Chandramohan wrote: > I w

Re: rotate UI subview (CFAffline Transform)

2014-07-18 Thread Steve Christensen
On Jul 18, 2014, at 4:51 AM, 2551 <2551p...@gmail.com> wrote: > I have a problem which I can't find anyone else asking after hours of > searches through stackexchange and the like. > > In a UIView, I'm rotating a subview with a Gesture recognizer that calls this > selector: > > - (IBAction)ro

Re: CABasicAnimation does not animate bounds.origin of a layer

2019-09-14 Thread Steve Christensen via Cocoa-dev
First guess would be not to explicitly set -anchorPosition. It defaults to (0.5, 0.5), which refers to the middle of the bounds, and transforms (like scaling) are applied relative to that position. > On Sep 14, 2019, at 6:25 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Maybe, I haven't un

Swift -> Obj-C: return __kindof Something

2019-11-11 Thread Steve Christensen via Cocoa-dev
I’m working on an Obj-C app that got started a bunch of years ago and thought that I would start migrating some of the smaller pieces over to Swift. Some existing Obj-C methods are of the form: + (nullable __kindof NSManagedObject) someFooThing; Right now I have class var someF

Re: Swift -> Obj-C: return __kindof Something

2019-11-11 Thread Steve Christensen via Cocoa-dev
;> On Nov 11, 2019, at 15:07 , Steve Christensen via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> wrote: >> >> Some existing Obj-C methods are of the form: >> >> + (nullable __kindof NSManagedObject) someFooThing; >> >> Right now I have

Re: Is CGImage... thread-safe?

2020-05-27 Thread Steve Christensen via Cocoa-dev
> On May 27, 2020, at 3:03 PM, Steve Mills via Cocoa-dev > wrote: > >> I can't recall/reproduce, but it was definitely *inside* >> CGImageSourceCreateThumbnailAtIndex(). >> >> If there is no image a tinder 0, shouldn't it just return NULL gracefully? > > We don’t know that. There are many ro

Re: Relieving memory pressure

2020-06-07 Thread Steve Christensen via Cocoa-dev
For slide shows that I’ve seen, they typically display each image for several seconds at a time. If that’s the case, why can’t you just load the next image from disk on a background queue while the current image is being displayed and not have to worry about memory usage needed to cache multiple

<    1   2   3   4   >