Re: -[NSMutableSet randomObject]

2010-05-25 Thread Michael A. Crawford
t; > @end > > On May 25, 2010, at 10:49 AM, Michael A. Crawford wrote: > >> I'd like to extend Apple implementation of NSMutableSet to include a >> randomObject method. The purpose of this method is self-explanatory and its >> potential use is I'm s

-[NSMutableSet randomObject]

2010-05-25 Thread Michael A. Crawford
I'd like to extend Apple implementation of NSMutableSet to include a randomObject method. The purpose of this method is self-explanatory and its potential use is I'm sure obvious to most of you. For my first idea I thought about simply adding a category to NSMutableSet but any obvious implemen

Re: Are there any tools or techniques for detecting / debugging retain-cycles?

2010-05-07 Thread Michael A. Crawford
Thanks. Mike's article was extremely helpful. -Michael On May 5, 2010, at 11:32 PM, Andy Lee wrote: > > > > > --Andy > __

Are there any tools or techniques for detecting / debugging retain-cycles?

2010-05-05 Thread Michael A. Crawford
-Michael ___ 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-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.a

Is there a better way to delete all objects in a MOC & persistent store?

2010-04-30 Thread Michael A. Crawford
Or, am I forced to iterate through the results of a fetch calling deleteObject for each object found? -Michael ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

Re: "iPhone Programming For OS X Coders"?

2010-04-19 Thread Michael A. Crawford
Sorry for chiming in late, Jens. Been busy. I like "Cocoa Touch for iPhone OS 3" by Jiva Devoe and The iPhone Developer's Cookbook by Erica Sadun. Both focus specifically on UIKit elements with very little overlap to the desktop. Exceptions are CoreData and NSURLConnect/NSURLRequest. Still

How do I compare two NSDates using NSPredicate & Core Data

2010-04-04 Thread Michael A. Crawford
Thus far I've gotten away with using -predicateWithFormat and scalar values. I now need to compare a couple of NSDate instances but am not sure how to code it up with NSPredicate. Consider me a 'visual' learner. -Michael ___ Cocoa-dev mailing list (

Re: Need help with scrolling marquee

2010-03-11 Thread Michael A. Crawford
ar 11, 2010, at 4:58 PM, Eric E. Dolecki wrote: > Isn't there a truncation property that handles this for a UILabel? > > On Thu, Mar 11, 2010 at 4:53 PM, Graham Cox wrote: > > On 12/03/2010, at 5:23 AM, Michael A. Crawford wrote: > > > - (void)timerFireMethod:

Re: Need help with scrolling marquee

2010-03-11 Thread Michael A. Crawford
Graham Cox wrote: > > On 12/03/2010, at 5:23 AM, Michael A. Crawford wrote: > >> - (void)timerFireMethod:(NSTimer*)theTimer >> { >> #if 0 >> // Here I was using a periodic timer to animate the scroll. I noticed that >> // the animation wasn't sm

Need help with scrolling marquee

2010-03-11 Thread Michael A. Crawford
not be an issue. // // ScrollingMarqueeViewController.m // ScrollingMarquee // // Created by Michael A. Crawford on 3/11/10. // Copyright Crawford Design Engineering, LLC 2010. All rights reserved. // #import #import "ScrollingMarqueeViewController.h" @implementation ScrollingMarqueeViewController

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael A. Crawford
aspx > > As might be apparent, I have put quite a lot of work into this, but I don't > have anything in a form that can be packaged up and given away. Nor do I > want to do that, in fact, but I hope this at least gives you some ideas. > > Not really a Cocoa question.

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael A. Crawford
Thanks for the pointer to the more appropriate group. I'll go check it out. -Michael On Feb 24, 2010, at 5:37 PM, jonat...@mugginsoft.com wrote: > >> >> Not really a Cocoa question... Don't know where else you'd ask it though. >> > The macsb group has this topic discussed to death. > > htt

Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael A. Crawford
Thanks, Sherm. I'm not a fan either. This is a client request. -Michael On Feb 24, 2010, at 5:00 PM, Sherm Pendley wrote: > On Wed, Feb 24, 2010 at 4:54 PM, Michael A. Crawford > wrote: >> I've purchased apps from other developers on this forum, which have >

Looking for info on anti-piracy and trial-mode techniques for my app . . .

2010-02-24 Thread Michael A. Crawford
I've purchased apps from other developers on this forum, which have mechanisms for limiting functionality until a valid registration code has been provided. I'd like to include this functionality in my own app but don't want to create it from scratch if I don't have to. To that end, I'm lookin

Need to duplicate the look & feel of the upper-left traffic-lights on a borderless window app

2010-02-24 Thread Michael A. Crawford
I'm creating an app where the client wants to have rounded corners and other oddities on the main window. Therefore I'm thinking I need the main window to be borderless. Unfortunately I also lose the standard look and behavior that the red-yellow-green gumdrop buttons, in the upper-left corner

Re: Copying CLHeading objects does not appear to work . . .

2010-02-11 Thread Michael A. Crawford
It the copy failing because these are read-only properties? -Michael On Feb 11, 2010, at 11:29 AM, Michael A. Crawford wrote: > Here is the code (pertinent snippets) > > @interface BlueSLRGPS () > @property (copy) CLHeading* currentHeading; > @property (copy) CLLocation*

Copying CLHeading objects does not appear to work . . .

2010-02-11 Thread Michael A. Crawford
Here is the code (pertinent snippets) @interface BlueSLRGPS () @property (copy) CLHeading* currentHeading; @property (copy) CLLocation* currentLocation; @property (retain) CLLocation* previousLocation; - (NSString*)compassPointForHeading:(double)heading; - (void)locationManager:(CLLocationManage

Re: How can I populate certain table-columns with image cells while using NSArrayController?

2010-01-15 Thread Michael A. Crawford
Thank you for the article. -Michael On Jan 15, 2010, at 12:54 PM, Arun wrote: > You can find a beautiful article on the same @ > http://www.martinkahr.com/2007/05/04/nscell-image-and-text-sample/ > > HTH > -Arun KA > > On Fri, Jan 15, 2010 at 11:20 PM, Michael

How can I populate certain table-columns with image cells while using NSArrayController?

2010-01-15 Thread Michael A. Crawford
Consider an NSTableView instance populated with data from an NSArrayController, which is bound to a content array containing instances of class foo. All of class foo's properties return BOOL and NSString values. The two BOOL values need to be shown in the table using icon images. Should the i

Need some help with custom views . . .

2010-01-10 Thread Michael A. Crawford
I'm trying to create come custom views with attributes exhibited in this screen shot snippet: files.me.com/michaelacrawford/iy4bhj I'm looking for suggestions on how I might accomplish some of these effects. Here are some ideas I've come up with on my own, some of which I have already tried a

Re: Looking tutorials or blogs on NSOutlineView & NSTreeController . . .

2010-01-06 Thread Michael A. Crawford
Thanks for the pointers (Ken & Rob). -Michael On Jan 6, 2010, at 5:52 PM, Michael A. Crawford wrote: > Never used this view/control before. I'm looking for resources to help me > shorten the curve, especially when used with the NSTreeController. I'm also > considerin

Looking tutorials or blogs on NSOutlineView & NSTreeController . . .

2010-01-06 Thread Michael A. Crawford
Never used this view/control before. I'm looking for resources to help me shorten the curve, especially when used with the NSTreeController. I'm also considering switching my model to CoreData. Currently I have some code working that uses neither CoreData nor NSTreeController and I wondering

NIB/XIB created objects, should they be released in -[dealloc]?

2009-11-23 Thread Michael A. Crawford
I wouldn't have though so. I would assume that since I did not allocate them directly, I don't need to clean them up. I've just inspected some code that declares properties that are marked as outlets and whose member variables are allocated in the NIB file. When the class' dealloc method is c

Looking for Sample code: WWDC2007 - Session 201 - Building Animated Cocoa User Interfaces

2009-09-27 Thread Michael A. Crawford
I believe the demos were called CocoaShuffle and Layer-Backed OpenGL View. Can these be downloaded somewhere? -Michael ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Re: Not receiving mouseDown/Up events in borderless window . . . (Solved!)

2009-09-17 Thread Michael A. Crawford
ng -[super sendEvent:event] was quickly followed by a call to -[mouseUp:event]. On Leopard it is not. -Michael On Sep 14, 2009, at 2:47 PM, Michael A. Crawford wrote: Ok. I went back and did some experimenting and it doesn't look good. First of all the ignoresMouseEvents property was alre

Re: Not receiving mouseDown/Up events in borderless window . . .

2009-09-14 Thread Michael A. Crawford
)mouseUp:(NSEvent*)event { [self.delegate mouseUp:event onImageView:self]; } @end -Michael On Sep 12, 2009, at 10:36 PM, Ken Thomases wrote: On Sep 12, 2009, at 9:12 PM, Michael A. Crawford wrote: I have created a borderless window that is used to display a custom graphic, which need to

Re: Not receiving mouseDown/Up events in borderless window . . .

2009-09-12 Thread Michael A. Crawford
out too. -Michael On Sep 12, 2009, at 10:36 PM, Ken Thomases wrote: On Sep 12, 2009, at 9:12 PM, Michael A. Crawford wrote: I have created a borderless window that is used to display a custom graphic, which need to respond to the enter key or a mouse click by closing itself. Seems straightforw

Not receiving mouseDown/Up events in borderless window . . .

2009-09-12 Thread Michael A. Crawford
I have created a borderless window that is used to display a custom graphic, which need to respond to the enter key or a mouse click by closing itself. Seems straightforward enough. It works great on Snow Leopard (10.6) but I do not get the mouse events on Leopard (10.5). Hitting the ent

Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Michael A. Crawford
2009, at 11:41 AM, Graham Cox wrote: On 03/09/2009, at 1:28 AM, Michael A. Crawford wrote: Anyway, I thought of changing the structure of my app so that the main nib displays the startup and then loads what used to be my main nib with my primary view, menu, etc. I'm not experienced e

Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-02 Thread Michael A. Crawford
I'm looking for techniques on how to display a startup or loading panel for my app. There is some initial processing that needs to be done and it can sometimes be moderately lengthy in terms of making the user wait. What I'd like to do is display a startup graphic with licensing and copy

_subtreeDescription: What do the ampersands mean?

2009-08-26 Thread Michael A. Crawford
In the line of GDB output below, what do the ampersands following the h= and v= mean? (gdb) po [self _subtreeDescription] [ D A W#] h=--& v=&-- NDView 0x10012fca0 f=(0,113,480,473) b=(-) => TIME drawRect: min/mean/max 0.00/0.00/0.00 ms A=autoresizesSubviews, C=canDrawConcurrently, D=need

Re: Why would +[initialize] be called twice?

2009-08-24 Thread Michael A. Crawford
Got it. Thanks. -Michael On Aug 24, 2009, at 1:29 PM, Quincey Morris wrote: On Aug 24, 2009, at 10:19, Michael A. Crawford wrote: Why would the class initializer be called more than once when my app starts up? Is this expected behavior? In case you're wondering, it is called

Why would +[initialize] be called twice?

2009-08-24 Thread Michael A. Crawford
Why would the class initializer be called more than once when my app starts up? Is this expected behavior? In case you're wondering, it is called twice. + (void)initialize { // Create the defaults dictionary, fill it with the standard values, // and register it. NSMutableDicti

Re: Need NSOperation replacement for Tiger (10.4)

2009-08-24 Thread Michael A. Crawford
t 10:25 PM, Michael A. Crawford wrote: I have written an application that uses the NSOperation and NSOperationQueue classes. My customer now wants me to make it run on Tiger. Before I try to write my own limited version of NSOperation and NSOperationQueue that creates threads based on the

Need NSOperation replacement for Tiger (10.4)

2009-08-24 Thread Michael A. Crawford
I have written an application that uses the NSOperation and NSOperationQueue classes. My customer now wants me to make it run on Tiger. Before I try to write my own limited version of NSOperation and NSOperationQueue that creates threads based on the number of available processing cores (

Re: I need to convert NSTableView data into something suitable for consumption by a spreadsheet

2009-08-24 Thread Michael A. Crawford
Thanks to Kyle for the 'where' and to Graham for the 'how'. -Michael On Aug 18, 2009, at 11:08 PM, Kyle Sluder wrote: Coming at it from the point of NSTableView is attacking from the wrong direction. You should be exporting your model data as CSV; a controller (in your case, likely an NSArr

I need to convert NSTableView data into something suitable for consumption by a spreadsheet

2009-08-18 Thread Michael A. Crawford
I have an application that uses an NSTableView, bindings, and an NSArrayController to manage some data pertinent to my application. While running the application, I realize that I need to do some statistical analysis on the data in the table-view and it would be a nice feature to dump this

Re: Mixing Objective-C and C++ classes; How?

2009-08-06 Thread Michael A. Crawford
2009, at 4:59 PM, Shawn Erickson wrote: On Thu, Aug 6, 2009 at 1:51 PM, Michael A. Crawford wrote: Should the following work (assuming it is included in an Objective- C file with a .mm extension)? @interface CDBPMDetectOperation : NSOperation { class BPMDetect* bpmDetector; // C++ class as an

Mixing Objective-C and C++ classes; How?

2009-08-06 Thread Michael A. Crawford
Should the following work (assuming it is included in an Objective-C file with a .mm extension)? @interface CDBPMDetectOperation : NSOperation { class BPMDetect* bpmDetector; // C++ class as an objective-c class member } -Michael smime.p7s Description: S/MIME cryptographic signatu

Re: What are the finer points to programatically loading a view from a NIB and attaching to the default window in MainMenu.xib?

2009-07-21 Thread Michael A. Crawford
wrote: On Jul 20, 2009, at 9:28 PM, "Michael A. Crawford" > wrote: The NIB file is loaded in that I was able set a breakpoint on - [awakeFromNib] for the NDView class. Yet, I don't see any output. If I remove the controller and use IB to add the NDView to the window as a

Re: How do I track down an OSStatus error code?

2009-07-21 Thread Michael A. Crawford
, never seen that command, so I tried it out $ macerror -43 Mac OS error -43 (fnfErr): File not found On Jul 21, 2009, at 6:29 PM, Tommy Nordgren wrote: On Jul 20, 2009, at 10:00 PM, Michael A. Crawford wrote: Looking for the meaning behind the value -43. -Michael

What are the finer points to programatically loading a view from a NIB and attaching to the default window in MainMenu.xib?

2009-07-20 Thread Michael A. Crawford
I've tried the following but I get no output (the view is blank). - (void)awakeFromNib { ndViewController = [[NDViewController alloc] initWithNibName:@"NDView" bundle:nil]; #if 1 [window.contentView addSubview:ndViewController.view]; #else [window setContentView:ndViewControll

How do I track down an OSStatus error code?

2009-07-20 Thread Michael A. Crawford
Looking for the meaning behind the value -43. -Michael smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mo

Re: iTunes COM interface for Windows; need the equivalent for iTunes on the Mac

2009-07-16 Thread Michael A. Crawford
deficiencies. -- C.A.R. Hoare On Jul 16, 2009, at 5:42 PM, Michael A. Crawford wrote: So, is there an SDK for accessing iTunes on the Mac? -Michael -Michael -- The united stand. The divided get played. -- Bernie MAC ___ Cocoa-dev

iTunes COM interface for Windows; need the equivalent for iTunes on the Mac

2009-07-16 Thread Michael A. Crawford
So, is there an SDK for accessing iTunes on the Mac? -Michael -Michael -- The united stand. The divided get played. -- Bernie MAC smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@

When filing bugs with RADAR are attachments confidential?

2009-07-16 Thread Michael A. Crawford
If I attach sample code from my app, is it out there for all to see? -Michael -- We know as much about software quality problems as they knew about the Black Plague in the 1600s. We've seen the victims' agonies and helped burn the corpses. We don't know what causes it; w

Convention for class name prefixing . . .

2009-07-16 Thread Michael A. Crawford
Engine app or framework with a class called ProtocolDatabase, I would have the following options: MCProtocolDatabase MACProtocolDatabase CDEProtocolDatabase PEProtocolDatabase Using my name 'Michael A. Crawford' or my company name 'Crawford Design Engineering' or the app

Re: Which Foundation classes should I use for parsing text from a file?

2009-06-19 Thread Michael A. Crawford
also moderately easy to browse, though a whole framework might be a bit heavy depending on what your needs are. - Ben On 19 Jun 2009, at 15:58, Michael A. Crawford wrote: My NS class vocabulary is a little shallow when it comes to text processing. I'm sure that there are classes in Foundatio

Which Foundation classes should I use for parsing text from a file?

2009-06-19 Thread Michael A. Crawford
My NS class vocabulary is a little shallow when it comes to text processing. I'm sure that there are classes in Foundation that can be used to put together a text processing application in short order, I just don't know what they are. I'm looking through the docs now, but I'm kind of in a

Should touch events related to a given view be implemented in the view or the view controller?

2009-06-04 Thread Michael A. Crawford
Previously, I would have said the view-controller. But I just finished looking at the Metronome sample, which is included in the iPhone SDK. The touch handling code as well as some of the view initialization code (requiring a completely loaded view) is implemented in the UIView-derived cl

Re: Need to find out why I get Cocoa error 256 . . . (more info)

2009-04-13 Thread Michael A. Crawford
structing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies. -- C.A.R. Hoare On Apr 13, 2009, at 10:25 AM, Michael A. Crawford wrote: Where can I find detail on

Need to find out why I get Cocoa error 256 . . .

2009-04-13 Thread Michael A. Crawford
Where can I find detail on the following error code? Or, can someone point me to information on how to effectively debug a failure for a CoreData -[NSManagedObjectContext save] invocation? 2009-04-13 10:17:28.625 SpecialOrders[4923:20b] Failed to save context with new data: Error Domain=NS

Re: CALayer autoresizing behaviour

2009-01-28 Thread Michael A. Crawford
hat* layer ... with the appropriate mask set for the autoresizing - and then see what happens. AFAIK, this is exactly what my actual app is doing, but I'm not seeing the layer resize. Any input you have would be appreciated. Regards, -Joe On 26 Jan 2009, at 21:09, Michael A. Crawford

Re: CALayer autoresizing behaviour

2009-01-26 Thread Michael A. Crawford
Joe, I don't see you setting the needDisplayOnBoundsChange property, thus: layer.needDisplayOnBoundsChange = YES; The default value for this property is NO. -Michael -- We know as much about software quality problems as they knew about the Black Plague in the 1600s. We'

NSMutableAttributedString, NSFontAttributeName, and reference counting

2009-01-11 Thread Michael A. Crawford
If I allocate a font object for use with NSMutableAttributedString and assign said font to the string using the addAttribute method, will the reference count on the font be incremented? (I assume that if the answer is yes, then removeAttribute will decrement the reference count.) As a bonu

Re: What is the equivalent of a C++ pure-virtual function in Objective-C?

2009-01-11 Thread Michael A. Crawford
een genius and stupidity... ...is that genius has its limits." -- Albert Einstein On Jan 11, 2009, at 6:20 PM, Michael A. Crawford wrote: I want to force derived classes to implement a given interface without provided a default implementation. Does the concept exist in Objective-C (I&#

What is the equivalent of a C++ pure-virtual function in Objective-C?

2009-01-11 Thread Michael A. Crawford
I want to force derived classes to implement a given interface without provided a default implementation. Does the concept exist in Objective-C (I'm almost sure it does)? If so, what does the syntax look like? -Michael -- The united stand. The divided get played. --

Re: CALayer, CATextLayer, and inheritance . . .

2009-01-11 Thread Michael A. Crawford
" -- Albert Einstein On Jan 10, 2009, at 10:47 PM, Scott Anguish wrote: On 10-Jan-09, at 7:26 PM, Michael A. Crawford wrote: I know that the documentation states the CALayer entities are to be allocated with class methods: CALayer* l = [CALayer layer]; CATextLayer* tl = [CATextLa

CALayer, CATextLayer, and inheritance . . .

2009-01-10 Thread Michael A. Crawford
Ok, I think I'm hosed but I need one of you bright people to tell me just how bad it is. I'm working on a avionics simulation project that leverages Core Animation and layers in order to composite various elements of the display. These elements all have various behaviors and attributes b

When is the - (id)init method not called for an Objective-C class?

2008-12-30 Thread Michael A. Crawford
I have an init method for an NSView sub-class that is never called. Not expert enough with Objective-C to understand why? Anyone have a clue? -Michael -- The united stand. The divided get played. -- Bernie MAC smime.p7s Description: S/MIME cryptographic signature _

CATextLayer not visible when added as a sub-layer . . .

2008-12-27 Thread Michael A. Crawford
I've been using multiple layers to create custom displays for my flight simulator instrumentation. The graphics sub-layers are displaying just fine but when I add a CATextLayer as sub-layer to the top-layer of my NSView, I can't see the text. If I make the CATextLayer the top-layer of the

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-12-07 Thread Michael A. Crawford
Well, I don't know if you guys are still listening on this thread but, for the record, I did put Graham's suggestion into practice, immediately. It was fast, easy, and simple to modify when I wanted to tweak the behavior to use float values instead of integers. Thanks, Graham. After g

Fwd: MVC question

2008-11-29 Thread Michael A. Crawford
I've included Klaus' response for the benefit of anyone who may be interested: On 29.11.2008, at 08:38, Michael A. Crawford wrote: When implementing the MVC pattern, is it inappropriate or bad-form for views and layers to have direct read-only access to the model? The Cocoa Fu

MVC question

2008-11-28 Thread Michael A. Crawford
When implementing the MVC pattern, is it inappropriate or bad-form for views and layers to have direct read-only access to the model? Currently I'm using KVO to have the different views and layers get notification of state changes in the model. Since the drawing of the views and layers is

What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Michael A. Crawford
I assume I can sub-class the control but I wondering if there is a better way. I'm using a circular slider and would like it to rotate when I roll the scroll wheel up or down. -Michael -- There are two ways of constructing a software design. One way is to make it so sim

CA: fillMode and rotation animation . . .

2008-11-11 Thread Michael A. Crawford
I have a number of layers that use rotation animation about the Z- axis. Whenever the animation(s) complete the layer returns to the original state (zero rotational offset). I set the fillMode attribute to be kCAFillModeForwards in order to preserve the layer in its transformed state but t

Re: MVC Question . . .

2008-11-10 Thread Michael A. Crawford
On Nov 9, 2008, at 1:01 PM, Ken Thomases wrote: On Nov 8, 2008, at 7:46 PM, Michael A. Crawford wrote: I have a model-view-control class hierarchy that I'd like to add an auxiliary (test-only) view to. I've created a 2nd NIB with an NSPanel instance associated with a s

MVC Question . . .

2008-11-08 Thread Michael A. Crawford
I have a model-view-control class hierarchy that I'd like to add an auxiliary (test-only) view to. I've created a 2nd NIB with an NSPanel instance associated with a sub-classed NSWindowController. I'm able to load the NIB and instantiate the panel but how to I associate the model class wi

Re: CABasicAnimation, CALayers, and rotation

2008-11-04 Thread Michael A. Crawford
rs have answered the question, but here's some code. Gotta love code. ;-) http://www.cimgf.com/2008/10/25/core-animation-tutorial-slider-based-layer-rotation/ -Matt On Nov 4, 2008, at 5:30 PM, Michael A. Crawford wrote: By default, positive angle values assigned to a rotation anim

Re: CABasicAnimation, CALayers, and rotation

2008-11-04 Thread Michael A. Crawford
4, 2008, at 4:42 PM, Graham Cox wrote: On 5 Nov 2008, at 11:30 am, Michael A. Crawford wrote: By default, positive angle values assigned to a rotation animation result in counter clockwise rotation. Is there a way to cause the rotation to occur in the clock-wise direction, with positive

CABasicAnimation, CALayers, and rotation

2008-11-04 Thread Michael A. Crawford
By default, positive angle values assigned to a rotation animation result in counter clockwise rotation. Is there a way to cause the rotation to occur in the clock-wise direction, with positive values? For example, consider a needle rotating in a compass. As the needle rotates in a clock

Re: Is there an equivalent to std::min/std::max for Cocoa programmer's

2008-10-29 Thread Michael A. Crawford
Done. See radar 6331394. -Michael On Oct 29, 2008, at 1:27 PM, Nick Zitzmann wrote: On Oct 29, 2008, at 5:19 PM, Michael A. Crawford wrote: Thank you. I did try to find these using the help feature in Xcode and the documentation that is included with Xcode but I did not get a hit. I

Re: Is there an equivalent to std::min/std::max for Cocoa programmer's

2008-10-29 Thread Michael A. Crawford
functions (I'm assuming they are functions) do. Do they work on a list, or do they just take two arguments, for example? On 29 Oct 2008, at 17:26, Michael A. Crawford wrote: -Michael___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

Re: Is there an equivalent to std::min/std::max for Cocoa programmer's

2008-10-29 Thread Michael A. Crawford
/Linux/Unix and Win32/.NET. Though I could have included the C++ standard library, I think it is probably wise not to mix this with Cocoa. -Michael On Oct 29, 2008, at 11:51 AM, Jean-Daniel Dupas wrote: MIN(), MAX() (from Foundation/NSObjCRuntime.h) ? Le 29 oct. 08 à 18:26, Michael A

Is there an equivalent to std::min/std::max for Cocoa programmer's

2008-10-29 Thread Michael A. Crawford
-Michael smime.p7s Description: S/MIME cryptographic signature ___ 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-admins(at)lists.apple.com H

Re: If the NIB instantiates everything how does the controller get a reference to the View and the Model?

2008-10-27 Thread Michael A. Crawford
I was missing the IBOutlet keyword in the class declaration. Thanks. -Michael On Oct 27, 2008, at 4:06 PM, Ken Thomases wrote: On Oct 27, 2008, at 8:48 PM, Michael A. Crawford wrote: If the NIB instantiates everything how does the controller get a reference to the View and the Model

If the NIB instantiates everything how does the controller get a reference to the View and the Model?

2008-10-27 Thread Michael A. Crawford
-Michael smime.p7s Description: S/MIME cryptographic signature ___ 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-admins(at)lists.apple.com H

Can someone point me a Core Animation layer compositing example?

2008-10-24 Thread Michael A. Crawford
I need to learn how to take three or four Core-Animation layers and composite them on onto one another while animating, in order to simulate a complex gauge. I'm assuming this will be a lot easier than it is in Windows. The different elements (needles and such) of the gauge will be on th

How do I draw text on a custom button?

2008-06-21 Thread Michael A. Crawford
I'm using a CustomView that inherits from NSButton. I have no problem drawing the graphical representation of the button in the view but it is not immediately obvious to me how to draw text. setTitle does not work with my custom button. Can you point me to some examples? Here is the cod