Re: iPad keyboards

2013-12-12 Thread Shawn Erickson
wrote: > > On Dec 12, 2013, at 11:58 , Shawn Erickson wrote: > > > We have been submitting and getting approved apps built with Xcode 4.x > and > > iOS 6 SDK without issue still. Apple knows the iOS 7 jump is fairly large > > for some apps so hasn't yet been forc

Re: iPad keyboards

2013-12-12 Thread Shawn Erickson
We have been submitting and getting approved apps built with Xcode 4.x and iOS 6 SDK without issue still. Apple knows the iOS 7 jump is fairly large for some apps so hasn't yet been forceful but I expect to happen at some point. On Thu, Dec 12, 2013 at 1:38 AM, Rick Mann wrote: > I thought you

Re: Can we get command line arguments in applicationShouldHandleReopen?

2011-07-08 Thread Shawn Erickson
On Fri, Jul 8, 2011 at 7:13 AM, Hirendra Rathor wrote: > The idea is to launch the application with different arguments so that it can > do different > stuff every time. That isn't going to work. If the application is always running it cannot be relaunched with new command line parameters. Also

Re: App Delegate Methods

2011-07-08 Thread Shawn Erickson
On Fri, Jul 8, 2011 at 12:34 AM, Andy Lee wrote: > On Jul 7, 2011, at 5:59 PM, koko wrote: >> So, is there really an  NSApplicationWillFinishLaunchingNotification or is >> Apple just pulling my leg? > > Works for me. You should be able to confirm too by creating a new project. Yeah it also has a

Re: App Delegate Methods

2011-07-07 Thread Shawn Erickson
On Thu, Jul 7, 2011 at 12:57 PM, koko wrote: > Let me clarify: > > in my app delegate the method > > applicationDidFinishLaunching: > > is called while the method > > applicationWillFinishLaunching: > > How can this be? Most likely a typo in your source code in the method name or some late settin

Re: App Delegate Methods

2011-07-07 Thread Shawn Erickson
On Thu, Jul 7, 2011 at 12:14 PM, koko wrote: > In my app delegate applicationDidFinishLaunching is called but > applicationWillFinishLaunching is not. > > Can anyone shed some light on this apparent anomaly? As currently typed in your mail above neither of those are the methods sent by NSApplica

Re: iOS: multiple view controllers, one nib?

2011-05-18 Thread Shawn Erickson
On Wed, May 18, 2011 at 11:53 AM, Nathan Sims wrote: > I'm writing an iPad app that has its main screen subdivided into 4 equal > regions, each with a UIView, all defined in one IB nib. I have a dedicated > view controller class for each view. When I instantiate the view controller > class for

Re: Cocoa witch's broom

2011-04-14 Thread Shawn Erickson
On Thu, Apr 14, 2011 at 11:52 AM, Rodrigo Zanatta Silva wrote: > lol, bad english.. I mean use it. > > Use it is rare too? You can do a dynamic format to create a string. Using format strings to create human viewed strings is very common and in fact the best way to create such strings when consid

Re: How to optimize image loading during core animation?

2011-02-17 Thread Shawn Erickson
You will want to decouple the image load and decode operation from the render side of things as much as you can. You can do that with threading, async loading, and/or operations/blocks. Basically you will want to load the image ahead of time before it is needed for any animation. Then while a prio

Re: NSTimer firedate randomly changes

2010-11-17 Thread Shawn Erickson
On Wed, Nov 17, 2010 at 1:54 PM, Kyle Sluder wrote: > On Wed, Nov 17, 2010 at 1:54 PM, Greg Parker wrote: > >> On Nov 17, 2010, at 1:35 PM, Kyle Sluder wrote: >> > That's not how timers work. They only fire if something wakes the runloop >> > after their time has expired. Usually this is an event

Re: NSTimer firedate randomly changes

2010-11-17 Thread Shawn Erickson
Timers will cause a runloop to fire (depending on run mode of course) without any other source having to fire. #import @interface TimerTest : NSObject @end @implementation TimerTest - (void)runTest { NSLog(@"Test Thread Running"); NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] in

Re: Instantly delete a directory without recursion?

2010-10-05 Thread Shawn Erickson
On Tue, Oct 5, 2010 at 12:48 PM, Michael Watson wrote: > You should /always/ perform I/O on a secondary thread whenever possible. > Every I/O you perform on the UI thread is an opportunity for hangs or > unresponsiveness. Grand Central Dispatch is your friend here. Maybe better said in an "you

Re: Elegant Way to Create Localized String

2010-10-01 Thread Shawn Erickson
On Fri, Oct 1, 2010 at 3:12 PM, Jason Barker wrote: > Hi everyone, > > I'm working on an app with localized strings.

Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?

2010-09-27 Thread Shawn Erickson
On Sun, Sep 26, 2010 at 2:32 PM, Jerry Krinock wrote: > When my app runs for a particular user it emits these to the console once in > awhile: > > *** -[NSCFArray initWithObjects:count:]: attempt to insert nil object at > objects[0] > > However, the app does not crash for him when this happens.

Re: can you autorelease toll-free bridged types

2010-08-31 Thread Shawn Erickson
On Tue, Aug 31, 2010 at 9:45 AM, David Duncan wrote: > > On Aug 31, 2010, at 9:34 AM, Roland King wrote: > >> Of course I now have to ask if I *were* doing it .. what's the issue? > > Under GC -retain, -release, -autorelease and -retainCount are no-ops > (objc_msgSend doesn't even dispatch them).

Re: Performance issue

2010-08-27 Thread Shawn Erickson
On Fri, Aug 27, 2010 at 1:34 AM, Uli Kusterer wrote: > On 26.08.2010, at 20:37, Ken Thomases wrote: >> Shark and most of the instruments in Instruments are statistical samplers, >> not exact function-call measurement.  Also, Vijay already mentioned >> familiarity with Instruments. > >  I am sorr

Re: Mixing CPP and Obj-C

2010-08-26 Thread Shawn Erickson
On Thu, Aug 26, 2010 at 9:11 AM, wrote: > I want to add Obj-C to classes in a  CPP static library that is used by Mac > and Windows apps. I have set the compile type to cpp.objc so that the file > extension can remain .cpp and compile on Windows.  I am #ifdef'ing functions > that use Cocoa. > > M

Re: Losing my memory - a caching problem?

2010-08-18 Thread Shawn Erickson
On Wed, Aug 18, 2010 at 3:45 AM, Stuart Rogers wrote: > On 18 Aug 2010, at 01:31, Ken Thomases wrote: >> On Aug 17, 2010, at 7:26 PM, Shawn Erickson wrote: >> >>> When you say "free" I assume you mean the "free:" number listed in >>> activit

Re: Losing my memory - a caching problem?

2010-08-17 Thread Shawn Erickson
On Tue, Aug 17, 2010 at 3:10 AM, Stuart Rogers wrote: > I'm having enormous difficulty keeping tabs on memory usage in my current > project.  I'm happy that I'm not leaking anything - Build & Analyse reports no > issues, and neither does Instruments (Object Allocations and Leaks).  And yet, > when

Re: Another static analyzer mistake

2010-07-12 Thread Shawn Erickson
You should file defects using or , or email the clang list () or Xcode list to report issues like these. -Shawn ___ Cocoa-dev mailing list (Cocoa-de

Re: iOS4: VOIP App

2010-07-02 Thread Shawn Erickson
On Fri, Jul 2, 2010 at 8:05 AM, Michael Ash wrote: > My understanding is that you MUST use TCP and an NSStream for your > "control" connection, that is the connection that you use to > rendezvous with the server, send keepalives, get notices of incoming > calls, etc. However, for the actual call

Re: Authenticate NSFileManager Operations

2010-05-05 Thread Shawn Erickson
On Wed, May 5, 2010 at 4:28 PM, Dave Keck wrote: >> Which makes me wonder why Apple doesn't make an API for doing it "the right >> way" easily? :-) > > I'd be disappointed if this didn't happen in 10.7. I'm hoping for a > kind of AEWP that handles all of the launchd shenanigans for you, and > onl

Re: Help with text input

2010-04-30 Thread Shawn Erickson
On Fri, Apr 30, 2010 at 8:48 AM, Bill Appleton wrote: > hi all, > > this is great, thanks for the help. > > one issue is that the old carbon kEventTextInputUnicodeForKeyEvent delivered > typed characters that should be inserted into (say) of text field > > the new [event characters] method deliver

Re: Help with text input

2010-04-30 Thread Shawn Erickson
On Fri, Apr 30, 2010 at 7:12 AM, Bill Appleton wrote: > hi all, > > thanks for the help > > the characters message gives me the unicode output, that is working fine > > but i am unsure how to detect raw keys, like arrow keys, function keys, etc Take a look in NSEvent.h for various helpful constan

Re: NSTask objectalloc problem

2010-04-29 Thread Shawn Erickson
On Thu, Apr 29, 2010 at 6:04 PM, Tom Foutz wrote: > Worked like a charm.  I used waitUntilExit, and the number of living > objects dropped immediately.  Thanks! Note calling waitUntilExit without also draining stdout/err of the running process _could_ cause you problems. If the process you run ou

Re: white screen windows at first

2010-04-28 Thread Shawn Erickson
On Wed, Apr 28, 2010 at 11:29 AM, Bill Appleton wrote: > *this appears to only work from inside the drawRect routine, if i get here > from some other event it doesn't work Cocoa drawing is centered around doing all of your drawing under drawRect: (or drawInContext: if using CALayers, etc.). When

Re: menu madness with retain count

2010-04-27 Thread Shawn Erickson
On Tue, Apr 27, 2010 at 3:22 PM, Uli Kusterer wrote: >For example, bindings were notorious for causing retain circles when you bound >to File's Owner in a NIB, and that was fixed in 10.5, IIRC. Fairly sure it is still an issue unless you are using a NSWindowController subclass as the File's Own

Re: menu madness with retain count

2010-04-27 Thread Shawn Erickson
On Tue, Apr 27, 2010 at 2:56 PM, Gary L. Wade wrote: > On 04/27/2010 2:46 PM, "Shawn Erickson" wrote: > > [ removed lots of bad assumptions by Shawn ] > > Shawn, it is apparent your understanding of reality is flawed when it comes > to my efforts to track down the bu

Re: NSApplicationMain question

2010-04-27 Thread Shawn Erickson
On Tue, Apr 27, 2010 at 2:40 PM, Paul Sanders wrote: > Actually, I think I was just plain wrong but what I meant was > [[NSScreen screens] objectAtIndex: 0]. At one point in time I recall NSScreen not reliably updating its information on mode switches of displays. I cannot recall the specifics bu

Re: menu madness with retain count

2010-04-27 Thread Shawn Erickson
On Tue, Apr 27, 2010 at 2:32 PM, Gary L. Wade wrote: > On 04/27/2010 2:27 PM, "Shawn Erickson" wrote: > >> On Tue, Apr 27, 2010 at 2:22 PM, Gary L. Wade >> wrote: >> >>> Yes, but how would you use those to determine why an Apple framework now >>

Re: menu madness with retain count

2010-04-27 Thread Shawn Erickson
On Tue, Apr 27, 2010 at 2:22 PM, Gary L. Wade wrote: > Yes, but how would you use those to determine why an Apple framework now > chooses to retain a delegate (I'm referring to one particular one I > discovered), thereby causing a retain cycle?  It's not a memory leak in the > sense that Instrume

Re: menu madness with retain count

2010-04-27 Thread Shawn Erickson
On Tue, Apr 27, 2010 at 1:49 PM, Bill Appleton wrote: >>> Over the years, I think that looking at the retain count is the #1 cause > of hairpulling on this list. > > > it's too bad this is unreliable > > an object should be able to return this info > > and it isn't simple, it gets convoluted in pr

Re: Forcing plist preferences file to be saved as text?

2010-04-22 Thread Shawn Erickson
On Thu, Apr 22, 2010 at 2:36 PM, Laurent Daudelin wrote: > Is there any way to force the NSUserDefaults instances to save preferences of > an application as a text-only plist file in 10.5 as it does on 10.6? For some > reason, that seems to be happening only on 10.5. /me points at... http://de

Re: NSApplicationMain question

2010-04-22 Thread Shawn Erickson
On Thu, Apr 22, 2010 at 1:34 PM, Bill Appleton wrote: > hi all, > > thanks for the feedback > > i wrote a subclass for NSWindow but now i am wondering how usefull that was > > do i have to subclass NSWindow to get events, or can I use delegates? > > i'm still a bit confused on the event model I s

Re: [NSMutableArray array]

2010-04-08 Thread Shawn Erickson
On Thu, Apr 8, 2010 at 10:21 AM, Patrick M. Rutkowski wrote: > Agreed, but there's always the danger the +array method, which might > actually be implemented in NSArray.m, will not properly initialize the > more specific NSMutableArray object. A correct subclass MUST ensure that things are correc

Re: Screen size in Dual monitor mode

2010-03-23 Thread Shawn Erickson
On Tue, Mar 23, 2010 at 7:27 AM, Nikhil Khandelwal wrote: > In my application I am working with Dual monitor and I want to capture the > whole screen size. For this I am using NSScreen API to get the whole screen > size however this is returning me only with the screen resolution for single >

Re: Dock position and size

2010-02-14 Thread Shawn Erickson
You can use the difference between NSScreen's -visibleFrame and -frame to understand what is being used by the dock and/or menu bar. Of course it isn't clear why you want to know this... the best answer really depends on what you are trying to do exactly. -Shawn ___

Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !

2010-01-14 Thread Shawn Erickson
Look at the following functions... /*** FileSystem path conversion functions ***/ /* Extract the contents of the string as a NULL-terminated 8-bit string appropriate for passing to POSIX APIs (for example, normalized for HFS+). The string is zero-terminated. false will be returned if the convers

Re: New Tablet

2010-01-05 Thread Shawn Erickson
On Tue, Jan 5, 2010 at 9:33 AM, Gordon Apple wrote: > I realize that we are not going to get any answers here at this time.  My > question is whether developer info will be forthcoming simultaneously with > the announcement expected later this month (according to today's WSJ > article).  It would

Re: There must be a better way

2009-12-25 Thread Shawn Erickson
On Wed, Dec 23, 2009 at 1:18 PM, Charlie Dickman <3tothe...@comcast.net> wrote: > Except  the view and the controller are in separate xib's so they can't be > connected in this way. Who/what is the "file owner" of the two xib's you are talking about? Most commonly those are the objects that load

Re: iPhone and GC

2009-12-21 Thread Shawn Erickson
On Mon, Dec 21, 2009 at 4:54 PM, Lorenzo Thurman wrote: > Why can't iPhone apps use GC? Is it resources? Performance? Some combination > of the two or other reasons altogether? Yes. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: App works when launched from Xcode, not from Finder

2009-12-18 Thread Shawn Erickson
On Fri, Dec 18, 2009 at 3:15 PM, PCWiz wrote: > Thanks, that's helpful to know. > > Kai, I am developing on Snow Leopard but I'm using the 10.5 SDK, so is it > possible that NSRecursiveLock is being used in NSOperationQueue? Or should I > set a breakpoint on [NSRecursiveLock alloc] to see where

Re: launching login items in root context

2009-12-18 Thread Shawn Erickson
On Thu, Dec 17, 2009 at 10:59 PM, Arun wrote: > Hi All, > > Is it possible to launch login items in root context? Words to search for... launchd / launchctl / launch daemon http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html Also if you can focus on Snow Leopard and later check

Re: Linking xib's

2009-12-17 Thread Shawn Erickson
On Thu, Dec 17, 2009 at 12:46 PM, Charlie Dickman <3tothe...@comcast.net> wrote: > The question is how do I provide this linkage when the controller and the > view are in _different_ xib's? Who is the "owner" (aka loader) of the two xibs? If it is the same owning object then just hook up the out

Re: Reboot? Slow First Run

2009-12-03 Thread Shawn Erickson
On Thu, Dec 3, 2009 at 3:47 AM, gMail.com wrote: > Hi, > my app executes a given task in 1.2 seconds, all the time. I can quit the > application, relaunch it, run the same task several times and it always > takes 1.2 seconds. > But if I reboot the machine, I launch the application and run the same

Re: GC, variable optimized away wrongly?

2009-11-26 Thread Shawn Erickson
On Wed, Nov 25, 2009 at 5:04 AM, Kyle Sluder wrote: > On Wed, Nov 25, 2009 at 4:50 AM, Nick Rogers wrote: >> Why is etaDouble is being optimized away? > > Because it is unused. For those that may be wondering why etaDouble is optimized out but not the lines above it as well despite those values

Re: changing dock label name of my app

2009-11-26 Thread Shawn Erickson
On Thu, Nov 26, 2009 at 1:15 AM, Nick Rogers wrote: > Hi, >  for some reasons, my app is named like "MyApp-1". > And I want the label over the dock icon to appear as "MyApp". > > how to go about it? You can use localization of the bundle display name to do that. Don't have the details in front of

Re: CGImageRef printing issue

2009-11-12 Thread Shawn Erickson
On Thu, Nov 12, 2009 at 2:26 PM, Mirko Viviani wrote: > Do you mean that there is no way to print an image using a grid of 300 PPI > with Cocoa/Quartz? > If not, why? Alternatives?

Re: removeObserver:forKeyPath: when already removed

2009-11-11 Thread Shawn Erickson
On Wed, Nov 11, 2009 at 2:35 PM, James Walker wrote: > I had a situation where removeObserver:forKeyPath: was called twice for the > same receiver (an NSUserDefaultsController), the same observer, and the same > key path.  It threw an NSRangeException.  But the KVO docs don't say > anything about

Re: iPhone CLLocation Accuracy?

2009-11-11 Thread Shawn Erickson
On Wed, Nov 11, 2009 at 4:41 PM, Glenn L. Austin wrote: > Consumer-grade GPS is still limited to 30 meters (stationary) or 10 meters > (in-motion). > > The reason for the better accuracy for in-motion has (basically) to do with > doppler effect. Well DGPS or WAAS can improve beyond 30 meters bu

Re: iPhone CLLocation Accuracy?

2009-11-11 Thread Shawn Erickson
On Wed, Nov 11, 2009 at 1:42 PM, Chunk 1978 wrote: > how accurate is CLLocation's kCLLocationAccuracyBest?  about a meter > or more?  or is it hyper accurate as in centimeters?  anyone know? The "best" constant will give you the best position fix possible for that device you are running on in the

Re: How many processors do I have?

2009-11-11 Thread Shawn Erickson
On Wed, Nov 11, 2009 at 2:34 PM, Ben Haller wrote: >  OK, either I'm being exceptionally dense or there's a bug in NSProcessInfo > on 10.5.  If I execute: > >        NSProcessInfo *processInfo = [NSProcessInfo processInfo]; >        int processorCount = [processInfo activeProcessorCount]; > >    

Re: boundingRectWithSize:Option: and height constraint

2009-11-11 Thread Shawn Erickson
On Wed, Nov 11, 2009 at 9:28 AM, Bill Cheeseman wrote: > What I'm trying to do is figure out how -boundingRectWithSize:option: works > and what it's good for. If it did what I understood from the documentation, > it could make some things easier. But you seem to be right: it was wishful > thin

Re: Implicit @try/@catch?

2009-11-11 Thread Shawn Erickson
On Tue, Nov 10, 2009 at 8:44 PM, Jim Kang wrote: > When I stepped through it, a sort of exception was thrown at the call to > methodSignatureForSelector (it didn't like that the selector had an argument > that was a raw pointer instead of an id or pointer to an Objective-C > object). A "sort of"

Re: Cocoa Sounds

2009-11-09 Thread Shawn Erickson
On Mon, Nov 9, 2009 at 10:25 AM, Chunk 1978 wrote: > humm... i'm running 10.5.8 on 2008 iMac C2D, but i never though it > could have been the computer. would like to hear from others. What sound API are you using? -Shawn ___ Cocoa-dev mailing list

Re: Detecting a network connection

2009-10-29 Thread Shawn Erickson
On Thu, Oct 29, 2009 at 6:35 PM, colors wrote: > One challenge I am facing is that there are cases where the product I am > working on is run within a network that does not have extranet access, but > need to access a server inside the network. I do not know what the domain > or address is for t

Re: Sending a Selector to another Class.

2009-10-21 Thread Shawn Erickson
On Wed, Oct 21, 2009 at 9:23 AM, Joshua Garnham wrote: > How would I send a Selector to another class? > I know to send it to a selector in the same file you do > [self performSelector:@selector(doSomething)]; > Why not simply... [self doSomething] ? > and for sending it to another class I've t

Re: Object Alloc Instrument and releasing question

2009-10-14 Thread Shawn Erickson
On Tue, Oct 13, 2009 at 1:40 PM, Nick Rogers wrote: > Here is some Object Alloc instrument data after the first tree is formed > (1), after releasing that tree (2) and after again making a tree (3): >CategoryLive Bytes #Living #Transitory > Overall Bytes #Overa

Re: real verses Virtual memory

2009-10-10 Thread Shawn Erickson
I meant to ask if you are accessing the HTTP or using WebKit's DOM API to get at the pages content? Basically how are using using WebView to access the data you need. -Shawn On Sat, Oct 10, 2009 at 12:25 PM, Shawn Erickson wrote: > > > On Sat, Oct 10, 2009 at 12:12 PM, jon wrot

Re: real verses Virtual memory

2009-10-10 Thread Shawn Erickson
On Sat, Oct 10, 2009 at 12:12 PM, jon wrote: > I take the info off the website, "data" if you like... data that changes > or could change at any given time, every second even and process it, > and trigger an event if the data is to my liking. > > how would i get the data off a website,

Re: real verses Virtual memory

2009-10-10 Thread Shawn Erickson
On Sat, Oct 10, 2009 at 12:04 PM, jon wrote: > thanks for doing that, it helped, cacheing hmmm... i don't think there > is away around this, i need a fresh load to see if the data has changed > each time at the website.It appears that disk IO is here to stay. Stepping back from this

Re: real verses Virtual memory

2009-10-10 Thread Shawn Erickson
On Sat, Oct 10, 2009 at 11:08 AM, jon wrote: > Hi Bill, in this theme of normal behavior, maybe this would make what i'm > asking more clear. > > in an exercise of thought, if you wrote an app, and the only thing it did > was put up a window permanently (for the run of it's process life), w

Re: real verses Virtual memory

2009-10-10 Thread Shawn Erickson
On Sat, Oct 10, 2009 at 10:48 AM, jon wrote: > I could use an explanation then, if you go into "activity monitor" you > will see a heading of "real memory" and "virtual memory". specifically > for all the current "Processes".. > > what does Apple mean by "real memory"?in that, I mi

Re: real verses Virtual memory

2009-10-10 Thread Shawn Erickson
On Sat, Oct 10, 2009 at 10:55 AM, jon wrote: > oh yes, i plan on optimization, but this was not the original question, > not one of how should i optimize, it was one of "can i keep my process > from using Disk I0, as a means of it's memory use?". to save on wear and > tear of the disk for

Re: real verses Virtual memory

2009-10-10 Thread Shawn Erickson
Jon, please use Instruments.app (and/or various related tools; Activity Monitor.app, Shark.app, sample, top, fs_usage, vm_stat, vmmap/vmmap64, etc.) to understand what your process it doing both in terms of IO, memory utilization/allocations and even CPU time. Using those tools you can understand w

Re: releasing an object

2009-10-10 Thread Shawn Erickson
Ooops meant... if (selectedPTVolume != nil) { volumeScanType = [selectedPTVolume volumeScanType]; [selectedPTVolume release]; [outlineViewData reloadData] } On Sat, Oct 10, 2009 at 9:21 AM, Shawn Erickson wrote: if (selectedPTVolume != nil) > { > volumeSc

Re: releasing an object

2009-10-10 Thread Shawn Erickson
On Sat, Oct 10, 2009 at 8:43 AM, Nick Rogers wrote: > Hi, Thanks for the reply. > > In AppController.h I have an ivar: > Volume *selectedPTVolume; > > In a method in AppController, I have the following: > NSMutableDictionary *data = [partitionListDictArray > objectAtIndex:[tableViewPTList selecte

Re: real verses Virtual memory

2009-10-10 Thread Shawn Erickson
On Sat, Oct 10, 2009 at 8:34 AM, jon wrote: is there a way to force it to use real memory rather than virtual? This is, as stated, nonsensical. Your process works in its own independent virtual memory space that is mapped to physical RAM as needed by the virtual memory system. That is how it is

Re: How to ease the burden on the Garbage Collector?

2009-10-08 Thread Shawn Erickson
On Thu, Oct 8, 2009 at 7:29 AM, Gabriel Zachmann wrote: > I'm writing a simple screensaver that is basically kind of a slide show > screensaver. > (So it loads many images over time, but needs to keep only 2-3 in memory at > any given time.) > > I am using Core Animation for some animations on the

Re: Autorelease pool

2009-10-07 Thread Shawn Erickson
On Wed, Oct 7, 2009 at 2:53 PM, Michael Süssner wrote: > I habe created a small shell programm using Cocoa Foundation class for test > purposes. > > After my test program has passed successfully the drain method of the > autorelease buffer is called and "sometimes" I get the following error: > Pro

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Shawn Erickson
On Wed, Oct 7, 2009 at 2:48 PM, Gabriel Zachmann wrote: > Thanks for your response. > > No. CFRetain & CFRelease continue to work the same regardless of GC. That >> is, the reference count field still exists, but Obj-C objects in GC start >> life with a 0 retain count and -retain/-release/-retain

Re: Reduce CPU usage in screensaver?

2009-09-24 Thread Shawn Erickson
On Thu, Sep 24, 2009 at 11:43 AM, Gabriel Zachmann wrote: > I wrote a screen saver that basically zooms images at a frame rate of 10 > frames/sec. > > When running, it uses about 60% CPU ! > This could be a bit annoying sometimes, if there are other compute > intensive processes running, such as v

Re: IB does not show Outlet/Action section in inspector

2009-09-22 Thread Shawn Erickson
On Tue, Sep 22, 2009 at 2:06 PM, Michael Süssner wrote: Yeah, I also thought that the Xcode mailing list is the right one. But the > list seams to be a little bit inactive. Which xcode list you looking at? I see tens of emails a day on the Xcode list. This is the list you want...

Re: NSString vs. unicode encoding

2009-09-16 Thread Shawn Erickson
On Tue, Sep 15, 2009 at 9:04 PM, Johan Kool wrote: > Dear list, > > I need to work with strings as in stringA. (I don't have much choice, but > to have it in a NSString at the start.) I want to have the readable output > "hello world". > > NSString *stringA = @"hello\040world"; > NSString *string

Re: Snow Leopard SDK for non "Premier" or "Select" ADC members

2009-08-28 Thread Shawn Erickson
On Fri, Aug 28, 2009 at 10:54 AM, Jean-Daniel Dupas wrote: > > Le 28 août 2009 à 19:48, Shawn Erickson a écrit : > >> Snow Leopard information appears to be live now... >> >> http://developer.apple.com/mac/library/navigation/ > > Does not look like what I&#x

Re: Snow Leopard SDK for non "Premier" or "Select" ADC members

2009-08-28 Thread Shawn Erickson
Snow Leopard information appears to be live now... http://developer.apple.com/mac/library/navigation/ -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the modera

Re: When do I need to override hash?

2009-08-20 Thread Shawn Erickson
On Thu, Aug 20, 2009 at 1:37 PM, Kyle Sluder wrote: > P: Two objects are equal. > Q: They have the same hash. > > P -> Q. > > Note that Q does not imply P. Or said another way... If the hash of ObjectA is equal to the hash of ObjectB then ObjectA _could_ be equal to ObjectB. If their hash differ

Re: When do I need to override hash?

2009-08-20 Thread Shawn Erickson
On Thu, Aug 20, 2009 at 1:30 PM, Bryan Henry wrote: > > Why do you say that? I haven't noticed any documented requirement that ties > the implementation details of -hash and -isEqual together. It is fundamental requirement for the collection classes, etc. "If two objects are equal, they must ha

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

2009-08-06 Thread Shawn Erickson
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 objective-c class member > }

Re: [iPhone] networking

2009-08-04 Thread Shawn Erickson
On Tue, Aug 4, 2009 at 11:13 AM, Luke the Hiesterman wrote: > > On Aug 4, 2009, at 11:10 AM, James Lin wrote: > >> Bonjour is for local area network, right? > > No, Bonjour is applicable to any networking, local or wide area. Here's some > sample code. > > http://developer.apple.com/iphone/library/

Re: incorrect checksum for freed object

2009-07-31 Thread Shawn Erickson
On Fri, Jul 31, 2009 at 3:39 PM, kvic...@pobox.com wrote: > where interface and device are declared as follows: >       �...@property ( assign, nonatomic)  IOUSBDeviceInterface300** device; >       �...@property ( assign, nonatomic)  IOUSBInterfaceInterface300** > interface; Why are you use a poi

Re: NSString -componentsSeparatedByString: line break

2009-07-27 Thread Shawn Erickson
On Mon, Jul 27, 2009 at 10:36 AM, Chase Meadors wrote: > Thanks guys, except now I'm having a new problem. Are you using -getLineStart:end:contentsEnd:forRange:? If not you should switch to use that and see if you still have an issue. http://developer.apple.com/documentation/Cocoa/Reference/Found

Re: [window frame] reporting wrong y coordinate

2009-07-22 Thread Shawn Erickson
On Wed, Jul 22, 2009 at 12:28 PM, Eric Gorr wrote: > There is a sample application at: > > http://www.ericgorr.net/cocoadev/WindowPosition.zip > > and inside of the zip file is a screen shot (screen shot.tiff) of what I see > when I run the application. > > It shows the lower y coordinate of the wi

Re: When filing bugs with RADAR are attachments confidential?

2009-07-16 Thread Shawn Erickson
On Thu, Jul 16, 2009 at 11:19 AM, Michael A. Crawford wrote: > If I attach sample code from my app, is it out there for all to see? Best to ask ADC folks directly for questions like these... but no radar's are currently only visible to those that submit them and those inside of Apple. -Shawn

Re: Yet another memory management question

2009-07-05 Thread Shawn Erickson
On Sun, Jul 5, 2009 at 7:01 AM, DKJ wrote: > Have I finally got it right? Your dealloc method must include [super dealloc]; at the end of it. -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: NSTableView bug?

2009-07-02 Thread Shawn Erickson
On Thu, Jul 2, 2009 at 8:37 AM, Michael Ash wrote: > On Thu, Jul 2, 2009 at 10:51 AM, Chris Carson wrote: >> >> Hello, >> >> I've created a simple application with an NSTableView. I have written a >> delegate for this table, >> numberOfRowsInTableView:objectValueForTableColumn:row:, that returns

Re: libSystem.B.dylib Calling Code

2009-07-01 Thread Shawn Erickson
On Wed, Jul 1, 2009 at 3:18 PM, David Blanton wrote: > Here is code that crashes. the parms coming in are checked for validity > before ReplaceChar is called > > void ReplaceChar(char *s, char oldChar, char newChar) > { >    if(newChar == oldChar) >        return; >    char *n = strchr(s, oldChar);

Re: How Do I Statically Link to libcurl?

2009-07-01 Thread Shawn Erickson
On Tue, Jun 30, 2009 at 8:49 PM, Chris Tracewell wrote: > > On Jun 30, 2009, at 6:43 PM, Kyle Sluder wrote: > >> dylib means "dynamic library"... >> >> Why do you need to link against libcurl statically?  Not saying there >> aren't valid use cases, but please present yours. > > I guess I assumed th

Re: IBPlugin embedding question

2009-06-25 Thread Shawn Erickson
On Thu, Jun 25, 2009 at 11:33 AM, Doug Scott wrote: > Perhaps there is something basically wrong in the way I'm making IBPlugin > projects... That was essentially my point. I think you are trying to use them in a way that doesn't give you much benefit and possibly ignoring another way that may b

Re: IBPlugin embedding question

2009-06-25 Thread Shawn Erickson
On Thu, Jun 25, 2009 at 9:35 AM, Doug Scott wrote: > The point is that the way IB seems to work today is static when it must > become dynamic if developers are to be able to embed IBPlugins within each > other in the way I've done, which I've found to be incredibly powerful and > useful. It is jus

Re: IBPlugin embedding question

2009-06-25 Thread Shawn Erickson
On Wed, Jun 24, 2009 at 3:46 PM, Doug Scott wrote: > Question: How can I automate the maintenance of embedded IBPlugins. > > Xcode Version 3.1.3 > Interface Builder Version 3.1.2 (677) > > I have developed a small series of custom IBPlugin framework projects, two > of which include other custom IBP

Re: Basic, but still confuses me (initWithFrame and drawRect)

2009-06-19 Thread Shawn Erickson
On Fri, Jun 19, 2009 at 12:20 PM, Chunk 1978 wrote: > totally doesn't work. In what way doesn't it work? -Shawn ___ 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: NSMutableURLRequest weirdness!

2009-06-04 Thread Shawn Erickson
On Thu, Jun 4, 2009 at 4:44 PM, Ammar Ibrahim wrote: > Excuse me for the silly question. But I'm going to be doing hundreds of > requests, and I have GC ON, how do I create these connections and retain > them? Not sure I understand the question but as a guess... Put them in an NSMutableArray or

Re: How determine if file is in Trash, given Path or Alias

2009-06-02 Thread Shawn Erickson
For those that don't know about the interior pointer edge case... http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcUsing.html#//apple_ref/doc/uid/TP40008006-SW7 -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: Odd crash only when Toast running

2009-06-02 Thread Shawn Erickson
2009/6/1 Trygve Inda : > Thoughts? > > Exception Type:  EXC_BAD_ACCESS (SIGSEGV) > Exception Codes: KERN_INVALID_ADDRESS at 0x2c1f3000 > Crashed Thread:  0 > > Thread 0 Crashed: > com.apple.CoreGraphics    0x90afbac0 CGSConvertBGR888toRGBA + 160 > com.apple.CoreGraphics    0x90a5494b a

Re: Odd crash only when Toast running

2009-06-02 Thread Shawn Erickson
On Tue, Jun 2, 2009 at 12:12 AM, Graham Cox wrote: > > On 02/06/2009, at 4:23 PM, Trygve Inda wrote: >> The only thing I can find that may be related (based on [NSWindow >> displayIfNeeded] being in the report) is that my app has a single window >> with a single view and I call: >> >> NSImage*  

Re: End Of Method Releasing Order?

2009-06-01 Thread Shawn Erickson
On Mon, Jun 1, 2009 at 6:05 PM, WT wrote: > I don't think so. Releasing objects merely decreases their retain count. > It's up to the Obj-C runtime system to figure out in what order to actually > free the memory allocated for those objects. In other words, we are not the > ones deciding how and w

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Shawn Erickson
On Thu, May 28, 2009 at 5:42 PM, John Ku wrote: > Thank you all for the explanation. After reading over and experiment, I kind > of get what you all are saying.I've probably confused myself too much with > the dot syntax to use title = @"fdsfd". > > So if i have: > > NSMutableString *title = [[NSS

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Shawn Erickson
On Thu, May 28, 2009 at 4:57 PM, John Ku wrote: > I have this original class with the following method: > - (void) update { > NSString *title = [[NSString alloc] init]; You create an empty string instance in the above and make title point at it. > title = @"TEST"; You then make title point a th

Re: performSelectorOnMainThread problem

2009-05-28 Thread Shawn Erickson
On Thu, May 28, 2009 at 9:46 AM, Ben Einstein wrote: >> (2) The main run loop is not running for some reason. > > The main run loop is waiting to hear back from the completion of the worker What do you mean by "waiting"? Is it blocked on something? -Shawn ___

  1   2   3   4   >