Re: Cahnging bgColor of a UIView not working.

2009-07-29 Thread David Duncan
n the head here too): Always ensure your using floating point division if your going to do this. That means always dividing by 255.0. I've seen too many people asking "why do I always get black" and pointed out "because you forgot the . 0" :). -- David Duncan Ap

Re: [iphone] split an image

2009-08-04 Thread David Duncan
you elaborate? -- David Duncan Apple DTS Animation and Printing ___ 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

Re: [iphone] split an image

2009-08-04 Thread David Duncan
ffset into its coordinate system. -- David Duncan Apple DTS Animation and Printing ___ 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-admi

Re: How can I get the reference to Cancel and Print buttons in Print Dialogue

2009-08-10 Thread David Duncan
ecifically) demonstrates this. <http://developer.apple.com/samplecode/OutputBins2PDE/index.html> -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: [iPhone] CAKeyframeAnimation

2009-08-12 Thread David Duncan
y required. -- David Duncan Apple DTS Animation and Printing ___ 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

Re: [iPhone] CAKeyframeAnimation

2009-08-12 Thread David Duncan
trol to do this, but at the same time your still looking at using a lot of memory to implement this (especially on older devices that don't have non-power-of-2 textures). Am I right in assuming that quicktime playback on the iphone does not support transparency? Correct. -- Da

Re: CGImageRef printing issue

2009-08-12 Thread David Duncan
igate that alternative instead. -- David Duncan Apple DTS Animation and Printing ___ 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

Re: [iPhone 3.0] -- UIImage imageFromContentsOfFile and animations

2009-08-13 Thread David Duncan
if your getting memory glitches, it sounds like your images are awfully large... -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the li

Re: Trouble with NSColor

2009-08-13 Thread David Duncan
On Aug 13, 2009, at 9:24 AM, Daniel Furrer wrote: I'm trying to get the RGB components of a system color. Which system color? Many system colors are patterns and thus do not have real RGB values. -- David Duncan Apple DTS Animation and Pri

Re: iPhone: detect if docked?

2009-08-13 Thread David Duncan
On Aug 13, 2009, at 2:12 PM, Eric E. Dolecki wrote: Is there a way to tell if the device is currently docked? Probably the closest thing would be to use the Battery API to determine if the battery is being charged. See UIDevice for details. -- David Duncan Apple DTS Animation and Printing

Re: iPhone: detect if docked?

2009-08-15 Thread David Duncan
vice is on external power (which in this particular case would likely be a false positive on one of those external battery packs) then you want to know if the battery status is "charging". -- David Duncan Apple DTS Animation and Printing __

Re: iPhone: detect if docked?

2009-08-16 Thread David Duncan
gnize this situation. Caveat implementor. On Aug 15, 2009, at 2:19 PM, Jack Carbaugh wrote: ah but wouldn't this be a FAIL if say, the user was using a battery extender for a quick recharge ? On Aug 15, 2009, at 3:40 AM, David Duncan wrote: On Aug 14, 2009, at 4:29 AM, Sean Kline wrot

Re: Displaying an animated graph (= nodes and edges)

2009-08-17 Thread David Duncan
If you can require iPhone OS 3.0 then you can experiment with the CAShapeLayer which will automatically rerender when zoomed. -- David Duncan @ My iPhone On Aug 17, 2009, at 4:18 PM, Kaspar Fischer wrote: Any ideas? Kaspar On 16.08.2009, at 12:43, Kaspar Fischer wrote: Dear list

Re: Over Riding Print Function in Cocoa PDE Plugin

2009-08-19 Thread David Duncan
Mac OS X 10.5 or later. <http://devworld.apple.com/samplecode/OutputBins2PDE/> -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to th

Re: Coding with VM limitation on the iPhone?

2009-08-19 Thread David Duncan
no control over when data is written (and writing to flash can be fairly costly). -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to t

Re: When do I need to override hash?

2009-08-20 Thread David Duncan
there is a certain amount of experimentation required. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators a

Re: When do I need to override hash?

2009-08-20 Thread David Duncan
than just returning 0, usually by just extracting some bits from 'self', ala -(NSUInteger)hash { uintptr_t hash = (uintptr_t)self; return (hash >> 4); } -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mai

Re: I am not sure which message I have to trust?

2009-08-24 Thread David Duncan
was able to find the source. Trust what you see on the device. It is what your users will experience. But you haven't provided enough information for anyone to really assist you at this time... -- David Duncan Apple DTS Animation and Pri

Re: leak in a sound function

2009-08-24 Thread David Duncan
from the sample code because there were a number of design flaws that lead to many issues, such as the leak you are seeing here. Use the AVAudioPlayer class or OpenAL directly instead. -- David Duncan Apple DTS Animation and Printing ___ Cocoa

Re: Where to get Frameworks for AVFoundation.framework?

2009-08-24 Thread David Duncan
the framework. Open up your Targets, Get Info, select the General Tab and in the list at the bottom of the window press the + button. You should be able to find the AVFoundation.framework easily in the list. -- David Duncan Apple DTS Animation and Printing

Re: [IPhone 3.0] How do I make a UITextField the first responder?

2009-08-25 Thread David Duncan
does not mean that it is in a view hierarchy yet. -viewDidAppear: or -viewWillAppear: make more sense here. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: CALayer drawing delay

2009-08-27 Thread David Duncan
your just drawing an image, you could instead just set the contents directly to the image (same issue applies). -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: CALayer drawing delay

2009-08-27 Thread David Duncan
On Aug 27, 2009, at 3:58 PM, David Duncan wrote: By default when the contents of an animation change contents of a layer change, sorry for any confusion... -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev

Re: Implementing delegates with formal protocols

2009-08-28 Thread David Duncan
t found in protocol(s). Your protocol probably doesn't conform to NSObject, ala @protocol MyProtocol -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: Elapsed time vs sleep

2010-07-26 Thread David Duncan
s the drift that you will get from assuming that timers will always fire on time, every time (neither of which is true). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Problem with UITableView

2010-07-31 Thread David Duncan
l instance of some cell type, but as you scroll through a table you might go through dozens or hundreds of rows that all share a specific type. In such a case you might have less than a dozen cell instances for those hundreds of rows, but you still need individual instances for each row. -- Dav

Re: NSURLConnection - data comes in after completion

2010-08-02 Thread David Duncan
gt; nil, and there is a significant amount of data coming in - 30K out of a 200K > image. It is unclear how you are managing having multiple requests. Do you have multiple instances of this class, or does -loadAsync just get called 4 times? -- David Duncan ___

Re: iOS 4: CGImageCreateWithImageProvider

2010-08-03 Thread David Duncan
this mean? It means exactly what it says. Someone tried to create a CGImage with a size of 0x0. > What can I do about this? If you are creating CGImages, you should ensure they aren't 0x0 in size. If you are not creating CGImages then you shoul

Re: UIImageView and UIViewContentModeBottomLeft

2010-08-04 Thread David Duncan
e is always draw at its full size. A UIView (really the CALayer owned by the view) can and will display content larger than its bounds if given to it. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: UIImageView and UIViewContentModeBottomLeft

2010-08-04 Thread David Duncan
On Aug 4, 2010, at 4:46 PM, Jonathon Kuo wrote: > On Aug 4, 2010, at 9:43 AM, David Duncan wrote: > >> A UIView (really the CALayer owned by the view) can and will display content >> larger than its bounds if given to it. > > Is there a way to restrict this behavior, i

Re: UIImageView and UIViewContentModeBottomLeft

2010-08-05 Thread David Duncan
of your view hierarchy). -- David Duncan ___ 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

Re: AttributedString from NSData on iPhone.

2010-08-05 Thread David Duncan
re a representation of the NSAttributedString (probably as strings with matching attribute dictionaries) and reassemble the NSAttributedString from that at runtime. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: AttributedString from NSData on iPhone.

2010-08-05 Thread David Duncan
r both getting and setting attributes and characters. You will have to use those methods along with your own storage scheme to save and restore the NSAttributedString. It primarily comes down to reading the documentation and asking more pointed questions if necessary :). -- David

Re: Scroller With CATiledLayer Running out of Memory

2010-08-06 Thread David Duncan
ecially if each of them takes a while to draw, which is a function of their size – then you could end up blowing past available memory pretty quickly. You might try using smaller tiles instead. Fade duration is unlikely to have any effect (as that i

Re: Scroller With CATiledLayer Running out of Memory

2010-08-06 Thread David Duncan
e a small set of layers or views that do your drawing as you scroll through the document. This allows you to maintain control of memory usage as well. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

Re: Scroller With CATiledLayer Running out of Memory

2010-08-07 Thread David Duncan
on-layer backed mode. In UIKit and in AppKit under layer backed mode however a layer will retain backing store for its entire content area (generally bounds.size * contentsScale). You can ask for partial draws, but if the content isn't going to change then that may not

Re: Hiding Document Files from iTunes

2010-08-07 Thread David Duncan
; I've tried hiding the files and folders, to no avail -- they still show up > in iTunes. Is there any way to prevent this? http://developer.apple.com/iphone/library/qa/qa2010/qa1699.html -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: Scroller With CATiledLayer Running out of Memory

2010-08-07 Thread David Duncan
to accomplish and what your bottlenecks really are, because I think part of your issue may be due to assumptions about where your bottlenecks are. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: Understanding property/synthesize

2010-08-08 Thread David Duncan
f the iOS 4.0 SDK, the simulator supports the modern, non-fragile runtime. -- David Duncan ___ 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-

Re: iphone large image downloading

2010-08-11 Thread David Duncan
chronous networking (like you are above) is generally discouraged. -- David Duncan ___ 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-ad

Re: iphone large image downloading

2010-08-11 Thread David Duncan
k on devices that have more built in memory, but is almost certain to fail on older devices that do not. But 24MB is still a huge amount of memory to consume on a single image that the user can't even see all at once. -- David Duncan ___ Cocoa-d

Re: who stole my UIView?

2010-08-13 Thread David Duncan
rovided that you are on iOS 3.2 or later (there was a bug in 3.1 and prior where UIGraphicsBeginImageContext() used a format that caused Core Animation to make a copy of the data). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: UIView antialiasing

2010-08-19 Thread David Duncan
egant, which makes me wonder if there's a better way. Unfortunately at this time the "clumsy and inelegant" solution is also the only viable one. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Autorelease Pool Question.

2010-08-25 Thread David Duncan
On Aug 25, 2010, at 5:08 AM, Mr. Gecko wrote: > I do not do garbage collection because I am building for 10.4. Why, because I > have 10.4 customers. -drain is still available on 10.4. -- David Duncan ___ Cocoa-dev mailing list (Coc

Re: UIViewController and splash screen orientation issue on iPad

2010-08-25 Thread David Duncan
i.e. supporting the portrait and landscape default pngs) it should just work from there. -- David Duncan ___ 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

Re: Difference between NSOperationQueue and NSThread in iOS4?

2010-08-25 Thread David Duncan
ur. Now that NSOperation uses GCD, the threads are much longer lived and thus Core Animation's state flush doesn't occur (because you aren't running a run loop). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: UIViewController and splash screen orientation issue on iPad

2010-08-25 Thread David Duncan
up hitting one of the watchdog timers and having your application get killed. Basically you should NEVER block the main thread for any reason. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

Re: TARGET_OS_MAC section generates a compile error on an iPhone project?

2010-08-27 Thread David Duncan
> >[task release]; >} > #elif TARGET_OS_IPHONE > >// > > #endif > >return __sSystemPageSize; > } There is no reason to use NSTask for this on the desktop. Just call getpagesize() on either platform. -- David Duncan __

Re: NSString / NSURL

2010-08-28 Thread David Duncan
What is the error you are getting? -- David Duncan ___ 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/Unsubscri

Re: NSString / NSURL

2010-08-28 Thread David Duncan
ppendingPathComponent:]: unrecognized selector sent to instance > 0x16fbe0 defaultImageLocation is an NSURL* (because thats what you created at the top of the method). You want to use -URLByAppendingPathComponent: with it. -- David Duncan ___ Cocoa-dev

Re: CGLayer resolution on iPhone with Retina display

2010-08-28 Thread David Duncan
On Aug 28, 2010, at 1:22 PM, Matt Neuburg wrote: > In my UIView's drawRect: I derive a CGLayer from the current context, draw > into it, and then draw the layer into the context (the view). Out of curiosity is there any particular reason you are taking this approach? -- D

Re: CGLayer resolution on iPhone with Retina display

2010-08-29 Thread David Duncan
I would recommend you file a bug. -- David Duncan On Aug 29, 2010, at 9:38 AM, Matt Neuburg wrote: > On or about 8/28/10 9:31 PM, thus spake "David Duncan" > : > >> In the case of iOS for example, caching contents to CGLayers is rarely useful >> because it is

Re: CGLayer resolution on iPhone with Retina display

2010-08-29 Thread David Duncan
On Aug 29, 2010, at 11:21 AM, Matt Neuburg wrote: > On or about 8/28/10 9:31 PM, thus spake "David Duncan" > : > >> it is usually far more >> useful to use a hardware cache, which means CALayer or UIView, not CGLayer. > > Sorry to keep coming back to thi

Re: can you autorelease toll-free bridged types

2010-08-31 Thread David Duncan
Retain/Release and calls CFRelease() under GC. The typical idiom for dual mode code is to do "[NSMakeCollectable(foo) autorelease]" which will ensure the object will be released under both RR and GC (NSMakeCollectable is identical to CFMakeCollectable except for its return valu

Re: CALayer -drawInContext and GCD

2010-09-02 Thread David Duncan
done, but you have to ensure that your layer's drawing is threadsafe. Should be as simple as this with that precondition met: dispatch_async(queue, ^{ [layer display]; [CATransaction flush]; } -- David Duncan ___ Cocoa-dev mailing l

Re: CALayer -drawInContext and GCD

2010-09-02 Thread David Duncan
On Sep 2, 2010, at 9:40 AM, Chris Parker wrote: > On 2 Sep 2010, at 8:52 AM, David Duncan wrote: > >> On Sep 2, 2010, at 7:39 AM, Vincent Habchi wrote: >> >>> I just wanted to know someone has already tried to successfully send a >>> CALayer -drawInConte

Re: CALayer -drawInContext and GCD

2010-09-02 Thread David Duncan
of which is things "mostly" working but occasionally your drawing going into the wrong view. Basically *never* use the context given to you in -drawInContext: outside of that invocation. -- David Duncan ___ Cocoa-dev mailing list (Coc

Re: CALayer -drawInContext and GCD

2010-09-03 Thread David Duncan
d in the >> block, does nothing: the -(void)display > > Read: "at any subsequent call, albeit the block is correctly enqueued, > nothing is done: …" Are you sure the block was executed? I've done this before in various incarnations and

Re: CALayer instant content update

2010-09-03 Thread David Duncan
of other ways to do this too, I would recommend you read the documentation for -[CALayer actionForKey:] for more details. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Animating the view layer

2010-09-09 Thread David Duncan
t; various forums including apple forum I cant find the answer for it. I > hope you guyz can help. The following is the code which I used for the > animation. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: question on speed and memory display on 10.6.

2010-09-12 Thread David Duncan
ay of the > amount of system memory? Disk storage and rates should be in base-10. System memory is in base-2. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: what is best for a simple 3D animation

2010-09-12 Thread David Duncan
animation in Cocoa. You are probably looking at NSOpenGLView on Mac OS X and OpenGL ES on iOS (technically via CAEAGLLayer, but see the OpenGL template for details). -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not pos

Re: CALayer instant content update

2010-09-13 Thread David Duncan
On Sep 13, 2010, at 7:58 AM, Matt Neuburg wrote: > I would recommend that Apple improve the documentation https://bugreport.apple.com/ or the feedback links at the bottom of every page in the documentation. If there isn't a bug, the issue doesn't exist. --

Re: Layer-backed view artifact

2010-09-14 Thread David Duncan
s opaque? If so you probably want to unmark that. Or as an alternative, maybe mark your split view as layer backed instead? -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comme

Re: NSImageViews, Block Animation and Frame by Frame Image Swapping

2010-09-15 Thread David Duncan
and accomplishing the task that you are trying to do and have nothing to do with the general animation techniques. Also +[UIView beginAnimations:context:] isn't the new block based animation routines – those are the +[UIView animateWithDuration:*] and +[UIView t

Re: Apple Sample Code GLES2Sample problems

2010-09-15 Thread David Duncan
rator". > The offending line in CGPDFContext.h is: > CG_EXTERN void CGPDFContextAddDocumentMetadata(CGContextRef context, > CFDataRef metadata) CG_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_0); > > Obviously something is messed up, but what can I do to fix this? https://devforums.apple.com/message/28

Re: NSImageViews, Block Animation and Frame by Frame Image Swapping

2010-09-15 Thread David Duncan
block based animations? > > On Sep 15, 2010, at 9:56 AM, David Duncan wrote: > >> On Sep 14, 2010, at 9:42 PM, James Miller wrote: >> >>> With Apple recommending block-based animation of UIImageViews, I'm not >>> quite grasping how to take older fr

Re: Animating a non-standard layer property

2010-09-20 Thread David Duncan
e Animation define them (by declaring them @dynamic) they cannot be animated and you will see the symptoms you see. In your -drawInContext: method you can then query the property to get the current value. -- David Duncan ___ Cocoa-dev mailing list

Re: Animating a non-standard layer property

2010-09-20 Thread David Duncan
out more about this? It is not mentioned in the > Core Animation Programming Guide (2010-08-12), and I have got two e-books on > core animation, and it is not mentioned in either of them. > > Thanks > > Ken > > On 21 Sep, 2010,at 09:07 AM, David Duncan wrote: > >

Re: Need functionality of CAShapeLayer in 10.5

2010-09-21 Thread David Duncan
the layer. Either way your talking about drawing your path into a plain CALayer. -- David Duncan ___ 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 co

Re: Need functionality of CAShapeLayer in 10.5

2010-09-21 Thread David Duncan
elatively straightforward. -- David Duncan ___ 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 Sub

Re: clear a CGContextRef in an iPhone app

2010-10-04 Thread David Duncan
ontext. Where are you calling this? About the only thing I know of that might cause this is trying to call UIGraphicsGetCurrentContext() from outside of -drawRect: (in which case unless you've pushed or started your own context you get back NULL, which

Re: clear a CGContextRef in an iPhone app

2010-10-04 Thread David Duncan
e shown thus far should be causing any problems. -- David Duncan ___ 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

Re: iPhone/iPad device orientation problems

2010-10-14 Thread David Duncan
bitrates the supported orientations (most commonly this case is a UITabBarController). -- David Duncan ___ 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-ad

Re: Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread David Duncan
works" it is because you are getting very lucky with what is already on the stack. -- David Duncan ___ 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 c

Re: Why is 'missing sentinel in function call' appearing?

2010-10-14 Thread David Duncan
On Oct 14, 2010, at 1:30 PM, David Duncan wrote: > On Oct 14, 2010, at 1:25 PM, Tito Ciuro wrote: > >> return [[[self alloc]initWithObjects:someObjects]autorelease]; >> <<<<<<<<<<<< warning occurs here > > > -initWithO

Re: NSSavePanel does replace / in the filename with a :

2010-10-16 Thread David Duncan
would realize that it really doesn't matter – the Finder will still show "Part 1/2.jpg". -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: malloc_error_break

2010-10-21 Thread David Duncan
t; > The free() gives this error > > malloc: *** error for object 0x21568580: Non-aligned pointer being freed (2) > > How can I avoid this? Did you perhaps change destination between malloc() and free()? -- David Duncan ___ Cocoa-dev mailing

Re: UITableView Selection

2010-11-02 Thread David Duncan
On Nov 2, 2010, at 9:15 AM, Phillip Mills wrote: > Suggestions for a cleaner approach would be appreciated -viewWillAppear: or -viewDidAppear: perhaps? -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post ad

Re: UITouch's function locationInView not working with iOS4.2

2010-11-03 Thread David Duncan
location you expect, but we have no idea what is actually going wrong. Also, if you think this is a framework bug, file one. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comment

Re: iPad frame-by-frame animation

2010-11-04 Thread David Duncan
o static and animated bits, stuff them into views, move the views. 3) Shrink your image sizes, scale them up for animation. 512x384 for example cuts the memory usage by 75%. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: iPad frame-by-frame animation

2010-11-05 Thread David Duncan
u create a single image for the body. You put all this in a view hierarchy and move the whole thing from side to side. Done, and in far less memory. Obviously if your scene is more complex this will require more work, but for many animations of this n

Re: CAShapeLayer curved path animation

2010-11-06 Thread David Duncan
ly equivalent is the problem. You should be able to get something predictable by using AddCurveToPoint in both places, and to use the same location for both control points (which degenerates a Cubic curve to a Quadratic one). -- David Duncan ___ Cocoa

Re: CAShapeLayer curved path animation

2010-11-08 Thread David Duncan
asn't working nicely, I tried the quad curve. -- David Duncan ___ 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

Re: Synchronizing iOS redraw

2010-11-08 Thread David Duncan
ayLink, you may or may not need OpenGL. You can experiment with using a CADisplayLink to update a view/layer hierarchy and see if that gets what you need. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

Re: Calling getter on const object

2010-11-08 Thread David Duncan
er 'frameNumber' in 'frame', which is of non-class type > 'objc_object* const' -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Calling getter on const object

2010-11-08 Thread David Duncan
stored > as a variable within the class, and is fixed soon after instantiation) in > spite of the fact that I only have a 'const' pointer to the object at the > time I want to access it. Semantically I don't see why it should be unsafe to &

Re: Calling getter on const object

2010-11-08 Thread David Duncan
ontent. So as I surmised when I asked the question, you don't need the 'const' modifier at all. Just declare and use the variable normally. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: PDF and iPad

2010-11-09 Thread David Duncan
in the code, before it happens? > > I also get: > > : FT_Open_Face failed: error 2. > > for some files as well when I call CGContextDrawPDFPage on some PDF files. > Once again, is there a way to pre-flight the PDFs to determine if they are > going to fail? -- David Dun

Re: readonly property which is a mutable array

2010-11-19 Thread David Duncan
t a retain, worst case it was a mutable object that wouldn't have been modified anyway. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Re: respondsToSelector & "warning: may not respond"

2010-11-27 Thread David Duncan
fortunately you can declare that your protocol inherits from another, and there is also an NSObject protocol that defines the core functionality of the class, so you can do this when you declare your protocol and never need to worry about "NSObject" @protocol SomeProtocol : NSObject

Re: respondsToSelector & "warning: may not respond"

2010-11-27 Thread David Duncan
r probably right. Dangers of typing code into Mail instead of a compiler :). -- David Duncan ___ 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-d

Re: accelerometer puzzle

2010-11-29 Thread David Duncan
above is a warning and not an error). Technically you don't even need to conform to the protocol, you can just implement the methods and go, but implementing the protocol allows for error checking by the compiler – but only when the compiler can actually see the protocol declarations

Re: Moving a UIView when has a CAAffineTransformationRotate

2010-11-30 Thread David Duncan
form on the view the frame is a much less reliable means of making adjustments to the view. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

Re: Moving a UIView when has a CAAffineTransformationRotate

2010-11-30 Thread David Duncan
o hit the debugger to check your deltas. -- David Duncan ___ 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/Unsubscri

Re: accelerometer puzzle

2010-12-01 Thread David Duncan
lemented for correct operation. In the end the compiler is just trying to help you understand the ramifications of your code, just like the warning for "if (x = y)". You can take the advice or leave it. -- David Duncan ___ Cocoa-dev mailin

Re: Moving a UIView when has a CAAffineTransformationRotate

2010-12-01 Thread David Duncan
comes > form the frame, are not the same, and well the docs clearly says its > undefined. Check the bounds, it contains the untransformed size of the view. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: drawing thread-safety in iOS

2010-12-02 Thread David Duncan
• String and image drawing is now thread-safe. >> • Using color and font objects in multiple threads is now safe to do. > > Moreover, in the WWDC videos we see CATiledLayer being drawn to via drawRect: > with UIKit. > > So what's true? And how can I find out precisely wh

Re: assign property behaves differently from simple instance variable???

2010-12-14 Thread David Duncan
. Unless I misunderstand > something 'self->foo' is equivalent to 'foo' (both are transformed into an appropriate offset into instance storage). self.foo is equivalent to [self foo] or [self setFoo:] depending on context. -- David Duncan

Re: Using MPMediaPickerController in landscape mode - iPhone

2010-12-14 Thread David Duncan
er, but the size of the MPMediaPickerController view's > is in portrait mode always. As noted in the documentation, the media picker doesn't support landscape mode. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

<    1   2   3   4   5   6   7   8   9   10   >