Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
Yes, the table view is typed as MyTableView in the xib. On May 4, 2011, at 7:21 AM, Evadne Wu wrote: Just a wild thought, but could you probably look into the (offending) XIB and make sure that the table view is of a custom class? -ev On May 4, 2011, at 22:00, Steve Christensen wrote

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
not keep the contract of initWithNibName:bundle: atze Am 04.05.2011 um 16:00 schrieb Steve Christensen: I'm working on an app that uses a tab bar. I created a new nib to set up a view+controller and added a new tab item to the main nib that references the controller

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
On May 4, 2011, at 8:02 AM, Fritz Anderson wrote: On 4 May 2011, at 9:00 AM, Steve Christensen wrote: IBOutlet MyTableView* _resultsTable; IBOutlet UIActivityIndicatorView* _searchActivityIndicator; IBOutlet UISearchBar* _searchBar; When I ran the app and used the new view's UI, I got

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
On May 4, 2011, at 8:17 AM, glenn andreas wrote: On May 4, 2011, at 9:00 AM, Steve Christensen wrote: I'm working on an app that uses a tab bar. I created a new nib to set up a view+controller and added a new tab item to the main nib that references the controller and the controller's nib

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Steve Christensen
to restrict drawing and responding to events to L-shaped area. 04-May-11 17:38, Steve Christensen пишет: All views are rectangular in shape. You can restrict drawing and responding to events to an L-shaped area, but the view itself will still be a rectangle. On May 4, 2011, at 6:41 AM

Re: iOS Version Install Base

2011-04-28 Thread Steve Christensen
We're only supporting iOS 4.0 and later since we feel like there's sufficient adoption rate to make it worthwhile. Certainly if you feel like you still need to support pre-4.0, you could build against the current 4.x SDK, set the deployment target to be iOS 3.x (or whatever), and conditionally

Re: sort array of dictionaries by multiple critera

2011-04-27 Thread Steve Christensen
Either of these would allow you to do what you want for NSArray: - (NSArray *)sortedArrayUsingComparator:(NSComparator)cmptr; - (NSArray *)sortedArrayUsingFunction:(NSInteger (*)(id, id, void *))comparator context:(void *)context; And these for NSMutableArray: -

Re: Properties vs Instance Variables

2011-04-26 Thread Steve Christensen
On Apr 26, 2011, at 8:28 PM, Guy Steven wrote: I am currently learning objective c and cocoa I believe I understand the difference between properties and instance variables, and the effect of using properties as opposed to instance variables viz a viz KVO and memory management. A property

Re: is it has lack of understanding full of errors ??

2011-04-21 Thread Steve Christensen
Generally speaking, readers of this list are busy working on their own projects, so asking them to peruse and comment on an entire project is unreasonable. You are responsible for your own education and research. If you have specific questions and/or run into specific problems, you're more

Re: UIView/NSView doesn't display changing data in real time

2011-04-19 Thread Steve Christensen
Is your call to -setNeedsDisplay being done on the main thread or from your background thread. I seem to recall that you get ignored if the call is not made on the main thread, so you'd need to use one of the -performSelectorOnMainThread:... methods. On Apr 19, 2011, at 10:51 AM, Frederick C.

Re: Simulate touch event with cordinate?

2011-04-02 Thread Steve Christensen
On Apr 1, 2011, at 10:25 PM, Rikza Azriyan wrote: Yes, i want to make an application like ibooks that the user can navigate the page by swipe the screen, than - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; Will respond for that swipe... But in my case, i don't want to

Re: Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]

2011-03-13 Thread Steve Christensen
On Mar 13, 2011, at 11:05 AM, Matt Neuburg wrote: On Tue, 08 Mar 2011 17:01:33 -0800, Steve Christensen puns...@mac.com said: The setup has a MPMoviePlayerController instance that is playing a local audio file. There is also a UIWebView whose HTML contains an audio tag. When the play

Re: Testing apps on Mac OS X 10.5

2011-03-10 Thread Steve Christensen
On Mar 10, 2011, at 7:43 AM, Benedikt Iltisberger wrote: I would like to know how you all do your testing on older versions of Mac OS X. Do you run additional systems with older versions of Mac OS X or do you use virtual machines? I'd test on the OS versions we supported, usually the latest

Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]

2011-03-08 Thread Steve Christensen
I'm seeing the above assertion in an app running on iOS 4.2.1. It then throws an NSInternalInconsistencyException with the reason: movie player MPMoviePlayerControllerNew: 0x446fbe0 has wrong activation state (1). The setup has a MPMoviePlayerController instance that is playing a local audio

Re: Memory used by a UIImage?

2011-03-04 Thread Steve Christensen
I doubt you could find out *exactly* how much memory is being used. You could probably get an approximation by multiplying pixelHeight * pixelWidth * 4 (assuming A, R, G, B channels), since the image bitmap is likely to be the biggest chunk for images of any real size. On Mar 4, 2011, at 2:18

Re: How to scale a TabBarItem Image

2011-01-27 Thread Steve Christensen
use TabBarController, but what I am doing is that I try to implement TabBarController feature by myself by subclassing UIViewController and implement the TabBarDelegate. On Wed, Jan 26, 2011 at 11:31 PM, Steve Christensen puns...@mac.com wrote: On Jan 26, 2011, at 3:10 AM, ico wrote

Re: [iPhone] can't get views not to slide off by the height of the status bar

2011-01-26 Thread Steve Christensen
On Jan 25, 2011, at 3:24 PM, WT wrote: On Jan 25, 2011, at 8:45 PM, Dave Carrigan wrote: When the docs say that a UINavigationController can be a tab in a tab bar interface, they mean a UITabBarController, not a UIViewController that happens to implement a tab bar interface. If that's

Re: Working with CGImage and Retina Display

2010-12-15 Thread Steve Christensen
I believe the issue is that CGImage just refers to an image with an effective scale factor of 1.0, no matter the device scale. It sounds like you need to somehow keep track of the image scale you're using so that you're always drawing at the correct size. One way would be to use +[UIImage

Re: rotate UIImage based on rotation of UIView

2010-12-03 Thread Steve Christensen
One thing I noticed is that you're using the transform from wrapperView, which may not exclusively have your modifications applied. Have you tried caching the resultant scale, translation and rotation values from any gestures and then using those values to create a new transform from scratch?

Re: NSFileManager and Resource Forks

2010-10-26 Thread Steve Christensen
On Oct 26, 2010, at 7:26 PM, k...@highrolls.net wrote: Is there a way to write a resource fork for a file at a path? I don't believe that NSFileManager knows about resource files, either in the resource or data fork. You can use Resource Manager routines FSCreateResourceFile() or

Controls created at runtime aren't drawn as enabled until a mouse click...

2010-09-09 Thread Steve Christensen
I have a window and controls that are loaded from a nib. One of the controls builds a subview hierarchy to control a set of parameters that aren't known until runtime. What I'm finding is that all of the controls in that hierarchy are drawn as if they're disabled until you click on them, then

Re: Controls created at runtime aren't drawn as enabled until a mouse click...

2010-09-09 Thread Steve Christensen
an NSBorderlessWindowMask window? If so, you may need to override canBecomeKeyWindow. Kevin On Sep 9, 2010, at 11:12 AM, Steve Christensen wrote: I have a window and controls that are loaded from a nib. One of the controls builds a subview hierarchy to control a set of parameters that aren't known

Re: Using Apple icons

2010-08-16 Thread Steve Christensen
On Aug 16, 2010, at 5:52 AM, Sean McBride wrote: Ryan Joseph (r...@thealchemistguild.org) on 2010-08-16 20:48 said: What is Apples policy on using their icons in commercial application icons? I wanted to use some of the common app icons that are standard to OS X (like Mail, Safari, System

Re: CGColorSpaceCreateWithName on iOS

2010-08-12 Thread Steve Christensen
Apparently you should use CGColorSpaceCreateDeviceRGB(). In the documentation for that function, it says: In Mac OS X v10.4 and later, this color space is no longer device-dependent and is replaced by the generic counterpart—kCGColorSpaceGenericRGB—described in “Color Space Names”. If you use

Re: iOS: UITableViewCell an textlabel?

2010-08-04 Thread Steve Christensen
It's actually cleaner to create your custom views in the designated initializer, as Bill showed below. The only thing missing is that if you correctly set the custom view's autoresizingMask property, the view will resize as the cell resizes, rather than you needing to manually change it in

Re: IKImageView choppy?

2010-07-31 Thread Steve Christensen
Your browser's -imageBrowser:itemAtIndex: data source method returns objects that conform to the IKImageBrowserItem informal protocol. You can specify -imageRepresentationType to return IKImageBrowserNSImageRepresentationType and have -imageRepresentation return a reasonably-sized thumbnail

Re: Truncating UIActionSheet labels

2010-07-27 Thread Steve Christensen
Although you say that the button labels are generated dynamically, does it really not make sense for you to generate the alert title and/or message strings dynamically and use static button labels (OK/Cancel, Yes/No, etc.)? Both of those fields are set up to resize to fit the strings. Otherwise

Re: Discard all drawing in a UIView

2010-07-24 Thread Steve Christensen
. Problem is that after I extract and draw a few strings of valid ranges, I run into the exception. So, at this point I would like to clear out all drawing and do my error string handling bit. Thanks George On Thu, Jul 22, 2010 at 9:16 AM, Steve Christensen puns...@mac.com wrote: I

Re: Transparent IKImageBrowserView

2010-07-23 Thread Steve Christensen
This worked for me: NSColor* browserBackgroundColor = [NSColor colorWithCalibratedWhite:0.10 alpha:0.60]; [_effectsBrowser setValue:browserBackgroundColor forKey:IKImageBrowserBackgroundColorKey]; Are you sure that it's not working for you? Perhaps a superview has a non-transparent

Re: draw NSAttributedstring with transparency

2010-07-23 Thread Steve Christensen
On Jul 23, 2010, at 3:53 AM, Bernard Knaepen wrote: I need to draw an NSAttributedString over an image. The characters of the string might have different sizes, fonts and colors. I am currently using the drawAtPoint method but I would like to specify a global opacity (transparency) to

Re: Discard all drawing in a UIView

2010-07-22 Thread Steve Christensen
I think a more basic question is what you're doing in -drawRect that would generate an exception in the first place. Typically a view should already have access to any relevant resources (strings, images, whatever) before -drawRect is ever called. Assuming that the exception is a reasonable

Re: Erasing drawn content

2010-06-08 Thread Steve Christensen
Perhaps call NSRectFillUsingOperation(rect, NSCompositeClear) before drawing each rectangle? On Jun 8, 2010, at 5:32 AM, Matej Bukovinski wrote: * PGP Bad Signature, Signed by an unverified key Hi, In a cocoa application that I'm developing I have a custom NSView subclass that I use as

Re: Which color space?

2010-06-01 Thread Steve Christensen
It's available in the documentation that comes with Xcode. If you go to NSColorSpace's class reference, there's an item in the TOC on the left named Color Programming Topics for Cocoa. If you click on that link then on the About Color Spaces link, that will take you to a good overview.

Re: Reduce the size of an NSImage

2010-06-01 Thread Steve Christensen
On May 31, 2010, at 5:38 AM, Simon Raisin wrote: I am trying to reduce the size of an NSImage by 50% and then save the reduced image out to disk. The following code does not reduce the image. Should I be going about this a different way? NSImage* inputImage = [[NSImage alloc]

Re: I need float resolution bitmap data from a JPG using CIImage or similar helper

2010-06-01 Thread Steve Christensen
It seems like you're jumping through a lot of hoops. If you picked up where David left off, you could do something like this. (Typed in Mail so YMMV.) CGImageSourceRef source = CGImageSourceCreateWithURL(urlToFile, (CFDictionaryRef)[NSDictionary dictionaryWithObject:[NSNumber

Re: Which color space?

2010-05-30 Thread Steve Christensen
Is either NSCalibratedWhiteColorSpace or NSDeviceWhiteColorSpace not working for you? Also, just a style note, but you don't need to cast every parameter passed to a function; the compiler typically figures that out. The only time you really need to do it is if there could be confusion of

Cannot change IKImageBrowserView group title text color?

2010-05-26 Thread Steve Christensen
I have a IKImageBrowserView using disclosure-style groups. I'm setting a dark background and have changed the item title attributes to use a light color so the titles are visible. That all works great. The problem is that I haven't been able to find a property key for changing the group

Re: Cannot change IKImageBrowserView group title text color?

2010-05-26 Thread Steve Christensen
setValue: yourLayerTree forKey: IKImageBrowserGroupHeaderLayer]; -- Thomas On May 26, 2010, at 7:00 PM, Steve Christensen wrote: I have a IKImageBrowserView using disclosure-style groups. I'm setting a dark background and have changed the item title attributes to use a light color so

playing QuickTime movies on iPhone/iPad?

2010-04-21 Thread Steve Christensen
I have a need to be able to play a QuickTime movie containing subtitle tracks, and to be able to turn specific tracks on or off. In looking through the iPhone/iPad docs, it looks like the movie player classes are pretty much restricted to simple playback functions. Have I missed something?

Re: Drawing a path and making an object follow that path IPHONE

2010-04-14 Thread Steve Christensen
You could probably start by studying the documentation for CGPathRef, which lets you create, manipulate and draw bezier paths. These are C, not Objective-C API calls, but they work perfectly fine in an Objective-C application. iPhone OS 3.2 adds UIBezierPath, with wraps these calls, but if

Re: How to get wifi information

2010-03-29 Thread Steve Christensen
If you're just playing around with an app that only you will be using, have fun exploring. However, if you're planning to release it through Apple's store, I've read that they will reject your app if it's using private API calls. On Mar 27, 2010, at 1:43 AM, Gavin(??) wrote: I would like

Re: Determining an inter-application drag source

2010-03-26 Thread Steve Christensen
some image types that the Finder wouldn't normally use (except maybe for picture clippings) But as Steve said, why should it matter? Matt Gough On 25 Mar 2010, at 23:22:54, Steve Christensen wrote: I'm curious why you need to know where the drag originated since it generally shouldn't

Re: Determining an inter-application drag source

2010-03-26 Thread Steve Christensen
the impression that there was a mechanism to determine the drag source that I didn't know about. As the consensus appears to be that there isn't, I will file a bug report. Jeffrey On Mar 26, 2010, at 10:28 AM, Steve Christensen wrote: I wouldn't say that there has been any argument over whether

Re: Determining an inter-application drag source

2010-03-25 Thread Steve Christensen
I'm curious why you need to know where the drag originated since it generally shouldn't matter. Do you have to do some extra work in one case? And what happens if you see a drag from another application? On Mar 25, 2010, at 7:55 AM, Jeffrey J. Early wrote: Is there any way to determine the

-[QCNSBitmapImageRep encodeWithCoder:]: Inconsistent state

2010-03-13 Thread Steve Christensen
I am running into a weird error and I don't know why it's happening. I am adding an image that comes from a Quartz Composer composition to a dictionary. The dictionary is archived, and when that happens I see the following message in the console: -[QCNSBitmapImageRep

Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5

2010-03-09 Thread Steve Christensen
The class NSRunningApplication only exists on 10.6 and later. Are you doing a runtime check before using it? Class nsRunningAppClass = NSClassFromString(@NSRunningApplication); if (nsRunningAppClass != NULL) { // 10.6 case... NSRunningApplication* currentApplication =

Re: Store more complex values into NSDictionary

2010-02-25 Thread Steve Christensen
On Feb 25, 2010, at 2:59 PM, Dave Carrigan wrote: On Feb 25, 2010, at 2:51 PM, Daniel Káčer wrote: i need help with solution about store more complex values into NSDictionary. I have following data which i need store in NSDictionary: value1:@A1 value2:@B1 key:1 value1:@A2 value2:@B2 key:2

Re: Deprecated APIs

2010-02-24 Thread Steve Christensen
On Feb 24, 2010, at 11:04 AM, Bill Bumgarner wrote: On Feb 23, 2010, at 8:57 PM, Steve Christensen wrote: That code uses blocks, though, which implies that it will be compiled using a later version of Objective-C. Will that code really run on older versions of OS X? The compile-time

Re: Deprecated APIs

2010-02-23 Thread Steve Christensen
On Feb 23, 2010, at 2:09 AM, charisse napeÿf1as wrote: I am not sure if this problem has already been submitted but how do I define two APIs, one that is supported from Leopard down and another that is only supported in Snow Leopard if I only have one binary for all OSes? Below is a

Re: Deprecated APIs

2010-02-23 Thread Steve Christensen
On Feb 23, 2010, at 3:26 PM, Charles Srstka wrote: On Feb 23, 2010, at 2:25 PM, Steve Christensen wrote: As others have already pointed out, it's your choice of whether or not to support a deprecated API method. When I decide to use OS version-specific API methods, I code as follows

Re: super call in the middle of a block of code ..

2010-02-19 Thread Steve Christensen
Although it looks like your code is leaking a NSIndexPath each time through because you retain it on if (editing) and release it on if (!editing). On Feb 18, 2010, at 7:53 AM, Luke the Hiesterman wrote: This seems fine to me. Generally, when subclassing, the contract is that you must

Re: How to detect if mouse on border of view

2010-02-19 Thread Steve Christensen
On Feb 18, 2010, at 8:44 PM, Mazen M. Abdel-Rahman wrote: I was wondering if there is a straight forward away to know if the mouse is on the border of a view? I know how to detect if the mouse enters a view area by using NSTrackingArea - but how can I tell if the mouse is on a border? I

Re: super call in the middle of a block of code ..

2010-02-19 Thread Steve Christensen
with YES twice without an intervening setEditing:NO. On 20-Feb-2010, at 12:07 AM, Steve Christensen wrote: Although it looks like your code is leaking a NSIndexPath each time through because you retain it on if (editing) and release it on if (!editing). On Feb 18, 2010, at 7:53 AM

Re: NSView : Background bitmap drawing issue

2010-02-15 Thread Steve Christensen
While there could be a drawing but in the OS, it's probably best to rule out issues with your code first. How do you determine the OS version? I ask because that's the only version-specific test in your drawing code. I would do something like this to initialize the variables: double

Re: Null value from NSMutableArray

2010-02-15 Thread Steve Christensen
You could expect to see zero/nil values returned from object properties if the object pointer is nil. Adding NSLog(@%p, fooObj); would tell you if that's the case. Also, I'm not sure how your question relates to NSMutableArray since, at least in your code snippet, you don't do much with

Re: NSColorPanel question

2010-01-18 Thread Steve Christensen
A bit of the crash log showing the backtrace and reason for crashing would be much more helpful than just saying that it crashed. Secondly, NSColorPanel is a floating panel so its behavior isn't really oriented towards modally opening it, selecting a color and closing it. You'd normally

Re: Keeping closed windows in the Window menu

2010-01-18 Thread Steve Christensen
Just a guess that they're known windows, so items are added to the Window menu in IB. On Jan 18, 2010, at 11:23 AM, Andreas Eriksson wrote: What's the recommended way of keeping a window in the Window menu (like e.g. Address book and iChat does) so that it can be brought back even after it

Re: Keeping closed windows in the Window menu

2010-01-18 Thread Steve Christensen
- [NSWindow setExcludedFromWindowsMenu:]? On Jan 18, 2010, at 11:58 AM, Andreas Eriksson wrote: That would still require some effort to prevent the window (and the separator) to be listed twice, I assume? On Mon, Jan 18, 2010 at 8:38 PM, Steve Christensen puns...@mac.com wrote: Just

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Steve Christensen
As others have pointed out, letting the service do the validation takes the onus off of your app to keep itself up-to-date. If you get an error, though, I would let the user know that the zip code is invalid and give them an opportunity to fix it or choose a different one. The user

Re: How can a plug-in bundle get access to its own resources?

2009-11-16 Thread Steve Christensen
application (or host library) load a plug-in by a specific version, and KNOW FOR SURE that the right library was loaded? Any references to how-to implement multi-version code bundles? On 16/11/2009, at 00:51, Steve Christensen wrote: As has been pointed out several times, it's a really bad

Re: How can a plug-in bundle get access to its own resources?

2009-11-15 Thread Steve Christensen
As has been pointed out several times, it's a really bad idea to have the same-named class in multiple plugins. The Objective-C runtime will load the first class instance it finds (in your case, in the first- loaded plugin). For all other plugins, when the class is referenced, that first

Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...

2009-11-03 Thread Steve Christensen
Oleg, had you thought of doing something like adding -isSelectionValid and -setSelectionValid: methods to your controller class? The view would always keep track of the mouse state, tell the controller what the current selection is when the mouse moves, but won't update itself or respond

Re: Bulletproof way to create a new CGBitmapContext from an existing image?

2009-11-03 Thread Steve Christensen
Why not alway create a CGBitmapContext of the desired size and in a supported pixel format (see http://developer.apple.com/mac/library/qa/qa2001/qa1037.html ), then call CGContextDrawImage to draw the CGImage into the context? Then you're always controlling the parameters. CGRect bounds =

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-22 Thread Steve Christensen
I don't know what the difference would be in trying to attach to a native NSWindow vs one that wraps a Carbon window. When I've done this in the past, I always knew that I was attaching to a native NSWindow. Sorry I can't be more helpful. steve On Oct 22, 2009, at 6:44 AM, Motti Shneor

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-21 Thread Steve Christensen
of the active document, such as the menubar window, floating windows, help tags and toolbars. On 15/10/2009, at 21:40, Steve Christensen wrote: I had written this NSOpenPanel category to work in a plugin environment, and I think it should do the right thing. Just set up the NSOpenPanel as you

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-15 Thread Steve Christensen
I had written this NSOpenPanel category to work in a plugin environment, and I think it should do the right thing. Just set up the NSOpenPanel as you like then call - runModalForDirectory:file:types:relativeToWindow: and it will return when the user has selected (or not) a file. steve

Re: Are these Apple or 3rd party classes?

2009-10-09 Thread Steve Christensen
A quick Google search came up with a reference to EPIJDataManager that somehow relates to Epson printers. I couldn't find any other info than that. On Oct 9, 2009, at 6:48 AM, Philip White wrote: A customer of one of my shareware programs has reported that my program frequently crashes

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 1, 2009, at 10:57 PM, James Lin wrote: Thank you for the code snipet, but I am confused at the logic here... the following code will be executed EVERY time the program runs, right? NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithCapacity:10]; [dictionary

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 7, 2009, at 10:47 AM, Marco S Hyman wrote: On Oct 7, 2009, at 10:33 AM, Steve Christensen wrote: In that case if ([[NSUserDefaults standardUserDefaults] boolForKey:@PIFirstRun] == YES){ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@PIFirstRun

Re: How to create a control just as RGB Sphere and Alpha bar

2009-09-25 Thread Steve Christensen
Is there some reason why you can't use the color picker to specify a color+alpha value? It would save you a bunch of work in duplicating existing system functionality. On Sep 24, 2009, at 11:20 PM, Symadept wrote: Hi Graham, Yes. But do you have any other ways to handle this. I want

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Steve Christensen
On Sep 21, 2009, at 2:29 PM, Laurent Daudelin wrote: On Sep 21, 2009, at 14:23, Kyle Sluder wrote: Fonts really don't have colors. I don't know why NSFontColorAttribute is defined in NSFontDescriptor.h, but none of the other attributed string attributes are in there. Why are you trying to

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Steve Christensen
On Sep 17, 2009, at 8:18 PM, Rick Mann wrote: On Sep 17, 2009, at 20:15:43, Michael Babin wrote: On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths =

Re: sprintf and 64-bit integers

2009-09-13 Thread Steve Christensen
On Sep 13, 2009, at 11:10 AM, slasktrattena...@gmail.com wrote: On Sun, Sep 13, 2009 at 8:01 PM, Bill Bumgarner b...@mac.com wrote: On Sep 13, 2009, at 10:59 AM, slasktrattena...@gmail.com wrote: I'm updating my code for Snow Leopard and ran into this problem. The app crashes at this line:

Re: Image Thresholding

2009-09-03 Thread Steve Christensen
On Sep 2, 2009, at 10:29 PM, fawad shafi wrote: I want to convert grayscale or RGB image to Binary Image. Please provide sample code. Requests to please provide sample code sounds like you want other people to do your work for you. There is plenty of information on how to do that if you

Re: drawing my image in snow leopard

2009-09-02 Thread Steve Christensen
Does this not do what you want? [myImage drawInRect:NSIntegralRect(myCenteredRect) fromRect:...]; steve On Sep 2, 2009, at 9:22 AM, Rick C. wrote: thank you markus i do see that now. since my icon centers the numbers will always change. this should be obvious but what would be the

Re: Macros

2009-09-02 Thread Steve Christensen
Wouldn't this be better asked on the xcode-users mailing list (assuming you're talking about Xcode debug/release builds)? It doesn't have anything to do with Cocoa. On Sep 2, 2009, at 8:54 AM, Development wrote: Ok I cannot find an example of how to do this online so I'nm asking here. I

Re: Drawing over a transparent background

2009-08-24 Thread Steve Christensen
On Aug 23, 2009, at 10:00 PM, Ron Fleckner wrote: On 24/08/2009, at 2:29 PM, Rob Keniger wrote: On 24/08/2009, at 9:33 AM, Ron Fleckner wrote: My borderless window has a semi-transparent background. When the drawing in a subview changes, the background retains a ghost of the original

Re: NSTextField too slow to update

2009-08-22 Thread Steve Christensen
On Aug 22, 2009, at 6:41 PM, PCWiz wrote: I have a large list of files that are being copied in my app, and after each file I need it to update the NSTextField so that it reads something like this: Processing file X of X The problem is that the text field is way too slow in updating its

Re: Accessing method from another class

2009-08-20 Thread Steve Christensen
If your logging code is displaying a message on entry to resetTextAndBar:, but nothing after that, it sounds like you're taking an exception. In your code snippet below, you're calling [self updateText], but in the last sentence of your problem description, you mention a method called

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Steve Christensen
On Aug 18, 2009, at 4:53 PM, Jonathon Kuo wrote: On Aug 18, 2009, at 4:37 PM, Luke the Hiesterman wrote: Your app will not be paged to the disk at all. It must run entirely on in physical memory. To know when you're running out of memory, override -[UIViewController

Re: Adding string encodings CoCoa

2009-08-16 Thread Steve Christensen
Well, certainly one way would be to preprocess the text buffer, converting the custom characters into a standard encoding like UTF-8, then passing the processed buffer into +[NSString stringWithUTF8String:]. At that point it would just work since it's in a known encoding. Depending on

Re: Exception-like behavior in save panel used for file choose

2009-07-31 Thread Steve Christensen
You could very well be taking an exception. Given this possibility, why haven't you tried wrapping your code in -pushChooseButton: in a @try/@catch block and either just dumping out the exception (if any) and/or putting a breakpoint in the @catch to see what the state of the world is? If

Re: Converting colors to CGFloat

2009-07-31 Thread Steve Christensen
On Jul 31, 2009, at 2:31 AM, Matthias Schmidt wrote: how do I convert color values from longint or UInt16 as they were used with the carbon API to CGFloat used with NSColor? I assume you're talking about something like QuickDraw's RGBColor, where color components range from 0 to 65535? You

Re: [iPhone] UITableView cell display bugs ?

2009-07-20 Thread Steve Christensen
From what you've said below, you probably should be creating a custom cell type based on UITableViewCellStyleSubtitle and add the third label to your class. At least in NSTableView (I haven't yet played with the iPhone), a cell class determines what is drawn at a particular row/column

Re: Ideas required on testing an application install

2009-07-19 Thread Steve Christensen
On Jul 19, 2009, at 12:24 PM, Ian Piper wrote: On 19 Jul 2009, at 6:46pm, Andy Lee wrote: On Jul 19, 2009, at 7:45 AM, Ian Piper wrote: How do you get the SD card to act as a bootable drive? Did you try Google? A search for boot sd card macbook turned up this as the first hit:

Re: 10.4 vs 10.5 SDK - some problems in compilation

2009-07-15 Thread Steve Christensen
On Jul 15, 2009, at 5:10 AM, Alexander Bokovikov wrote: I'm rather new in XCode and Cocoa, so maybe it's my misunderstanding. Am I correct in my understanding, that I need to select 10.4 SDK in XCode project menu to create an application, compatible with both Tiger and Leo? I've got few

Re: NSScrollView

2009-07-11 Thread Steve Christensen
The view hierarchy is: NSScrollView - NSClipView - YourDocumentView. I believe all you need to do is set the frame of your document view to be the size needed to represent your diagram and then everything else should just work, i.e., the scrollbars should correctly reflect the relative

Re: NSSavePanel delegate Methods called by NSOpenPanel

2009-07-10 Thread Steve Christensen
On Jul 9, 2009, at 6:40 AM, Daniel Demiss wrote: Hi all, I'm a little confused by the following situation: I have an NSPathControl (PopUp-Style) that should only allow certain paths to be selected. Therefore I have a controller-object that I set as the delegate of the NSPathControl and the

Re: TableView displaying a zillion empty rows

2009-07-07 Thread Steve Christensen
On Jul 6, 2009, at 8:20 PM, Brian Hughes wrote: I really appreciate your other points about my error code -- I never thought about what the tableView might do if -1 was returned and now that I think about it I don't really want to find out so I changed it to 0. Others have already given

Re: How to share Cocoa classes?

2009-07-06 Thread Steve Christensen
I build a number of plugins and ended up with a lot of shared code so I ended up creating a project that builds a static library with all those pieces, then make all my plugin targets dependent on it so that it gets [re-]built first. I created a common include file that includes all the

Re: TableView displaying a zillion empty rows

2009-07-06 Thread Steve Christensen
On Jul 6, 2009, at 11:50 AM, Greg Guerin wrote: Brian Hughes wrote: -(int) numberOfRowsInTableView: (NSTableView *)aTableView { int returnValue; if (aTableView == gameScoresTableView) //This works as expected { if (currentIndex_= 0)

Re: How to share Cocoa classes?

2009-07-06 Thread Steve Christensen
to use some standard (system) directories for that? If I must use my own directories, then where should I add a path to them to avoid the necessarity to add this path to every new XCode project manually? Thank you. - Original Message - From: Steve Christensen puns...@mac.com

Re: Determining OS at Runtime

2009-07-03 Thread Steve Christensen
On Jul 2, 2009, at 9:56 PM, Andrew Farmer wrote: On 2 Jul 2009, at 16:29, Steve Christensen wrote: If you want to make sure that you don't include any old code in your executable when you decide to make 10.5 (for example) your base OS version, you could arrange your code like

Re: Determining OS at Runtime

2009-07-03 Thread Steve Christensen
PM, Andrew Farmer wrote: On 2 Jul 2009, at 16:29, Steve Christensen wrote: If you want to make sure that you don't include any old code in your executable when you decide to make 10.5 (for example) your base OS version, you could arrange your code like

Re: Determining OS at Runtime

2009-07-02 Thread Steve Christensen
On Jul 1, 2009, at 5:22 PM, Sherm Pendley wrote: On Wed, Jul 1, 2009 at 7:24 PM, iseecolorsiseecol...@sbcglobal.net wrote: I need to support 10.4 in my application, but it uses some Carbon APIs that are deprecated in 10.5 and I am using some new 10.5 APIs that require the 10.5 SDK. I am

Re: Determining OS at Runtime

2009-07-02 Thread Steve Christensen
On Jul 2, 2009, at 4:29 PM, Steve Christensen wrote: On Jul 1, 2009, at 5:22 PM, Sherm Pendley wrote: On Wed, Jul 1, 2009 at 7:24 PM, iseecolorsiseecol...@sbcglobal.net wrote: I need to support 10.4 in my application, but it uses some Carbon APIs that are deprecated in 10.5 and I am using

Re: Disabling buttons in NSSavePanel

2009-06-29 Thread Steve Christensen
A question about disabling the Save button was just asked on this list a few days ago. The thread is archived here: http://www.mail- archive.com/cocoa-dev@lists.apple.com/msg38421.html. Google is your friend... steve On Jun 29, 2009, at 6:45 AM, Michael Domino wrote: I use an NSSavePanel

Re: Re[2]: NSApp problem outside of bundle

2009-06-29 Thread Steve Christensen
On Jun 29, 2009, at 3:22 PM, Peter Mulholland wrote: Monday, June 29, 2009, 11:12:20 PM, you wrote: You don't use kCurrentProcess as an argument. You use it like this: ProcessSerialNumber psn = { 0, kCurrentProcess }; TransformProcessType( psn, ... ); I see. It isn't really explained all

Re: Base SDK and deployment target Q

2009-06-28 Thread Steve Christensen
under 10.4. It's kind of a pain, but if I can just switch the SDK and run it under Leopard, that's fine. Thanks again. On Sat, Jun 27, 2009 at 8:42 PM, Steve Christensen puns...@mac.com wrote: I don't believe such a switch exists since it's not really a compiler issue: using a 10.5+ method

Re: 10.4 10.5 compatibility

2009-06-28 Thread Steve Christensen
On Jun 28, 2009, at 5:09 PM, Stephen Blinkhorn wrote: I have just noticed that some standard Cocoa objects look very different on 10.4 compared to 10.5. In particular NSPopUpMenu and NSButton objects are being drawn as much larger controls on 10.4 (rounded rect style, mini size). I am

<    1   2   3   >