Re: Question about dispatch_timer function

2012-04-26 Thread Dave Zarzycki
On Apr 25, 2012, at 6:07 PM, Kévin Vavelin wrote: > Hi there, > > I've a question about the dispatch_timer function. I try to make a strobe > flash on my iPhone app and for that i used an NSTimer but a friend of mine > say that it's better to use dispatch function. So i was looking and try to

Re: Declaring Variables - Setting to nil VS Not Setting?

2012-04-26 Thread Chris Tracewell
On Apr 26, 2012, at 1:20 PM, David Duncan wrote: > In C unless you explicitly initialize a local variable its value is > undefined, and Objective-C inherits this behavior. Thank you, that was what I was after. > I believe however that under ARC these lines are equivalent (at least thats > my r

Re: Declaring Variables - Setting to nil VS Not Setting?

2012-04-26 Thread Sean McBride
>I usually use the sample in line 1 when declaring vars inside my methods. > >NSString *theString = [NSString string]; >NSString *theString = nil; >NSString *theString; > >I thought lines 2 and 3 were the same thing. I was wrong. What is the >difference and when do you use the style shown in line

Re: Declaring Variables - Setting to nil VS Not Setting?

2012-04-26 Thread Nick Zitzmann
On Apr 26, 2012, at 2:00 PM, Chris Tracewell wrote: > I usually use the sample in line 1 when declaring vars inside my methods. > > NSString *theString = [NSString string]; Here you are creating a pointer to an empty string. This consumes memory. > NSString *theString = nil; Here you are cre

Re: Declaring Variables - Setting to nil VS Not Setting?

2012-04-26 Thread Chris Tracewell
On Apr 26, 2012, at 1:17 PM, Fritz Anderson wrote: > You should be able to get this from any elementary book about C. I'm sure you are correct. >> NSString *theString = nil; > > fills it with zero (not a pointer to anything). > >> NSString *theString; > > and doesn't fill it with anything; t

Re: SMJobBless

2012-04-26 Thread Zac Bowling
I don't know but it annoyed us at SeatMe. Apple stole our SM prefix for ServiceManagement.framework in 10.6 and we banged into a few classes. We need namespacing in Cocoa so bad. -- Zac Bowling On Thursday, April 26, 2012 at 11:28 AM, Jeremy Matthews wrote: > Does anyone out there use SM

Re: Declaring Variables - Setting to nil VS Not Setting?

2012-04-26 Thread David Duncan
On Apr 26, 2012, at 1:00 PM, Chris Tracewell wrote: > I usually use the sample in line 1 when declaring vars inside my methods. > > NSString *theString = [NSString string]; If you are going to assign another value to 'theString' before you use it, then doing this is pointless. > NSString *the

Re: Declaring Variables - Setting to nil VS Not Setting?

2012-04-26 Thread Fritz Anderson
On 26 Apr 2012, at 3:00 PM, Chris Tracewell wrote: > I usually use the sample in line 1 when declaring vars inside my methods. You should be able to get this from any elementary book about C. > NSString *theString = [NSString string]; Declares a variable containing a pointer to an NSString obje

Declaring Variables - Setting to nil VS Not Setting?

2012-04-26 Thread Chris Tracewell
I usually use the sample in line 1 when declaring vars inside my methods. NSString *theString = [NSString string]; NSString *theString = nil; NSString *theString; I thought lines 2 and 3 were the same thing. I was wrong. What is the difference and when do you use the style shown in line 3? Tha

Re: DataSource modified while TableView is displaying data

2012-04-26 Thread Corbin Dunn
On Apr 26, 2012, at 3:23 AM, Jean Suisse wrote: > Dear Peter, > > Thank you for your reply. Here is the requested code (see below). > After more investigations, I would like to take back a previous statement, > that the tableview was perfectly aware that the number of rows in the DS was > ch

Re: Using Instruments to profile UITableView drawing

2012-04-26 Thread Tito Ciuro
Hello, I would also profile it with the Core Animation instrument. Make sure you select the "Color Blended Layers" checkbox in the Debug Options area. This will apply a colored overlay to each view (green is opaque and red is transparent.) -- Tito On Apr 26, 2012, at 11:59 AM, Mikkel Islay wro

Re: Using Instruments to profile UITableView drawing

2012-04-26 Thread Mikkel Islay
On 26 Apr 2012, at 20:37, Marco Tabini wrote: > I wonder if someone could point me to the right way to profile > poorly-performing custom-drawn UITableView cells. I've come across this > problem several times, and usually manage to figure out how to solve it, but > my process is not very scien

Using Instruments to profile UITableView drawing

2012-04-26 Thread Marco Tabini
I wonder if someone could point me to the right way to profile poorly-performing custom-drawn UITableView cells. I've come across this problem several times, and usually manage to figure out how to solve it, but my process is not very scientific—there's far too much trial and error involved, and

SMJobBless

2012-04-26 Thread Jeremy Matthews
Does anyone out there use SMJobBless to interact with the Mac OS X to create/destroy, and load/unload launchdamons/agents? Really looking for sample code to make sure I'm doing things correctly...sometimes my jobs go wonky. Apple docs have not been updated in about 2 years time... Thanks, jerem

Re: CALayer compositingFilter trouble

2012-04-26 Thread Markus Spoettl
On 4/26/12 6:50 PM, David Duncan wrote: On Apr 26, 2012, at 9:12 AM, Markus Spoettl wrote: I'm posting this here because quartz-dev seems dead. Quartz-Dev may be quiet, but it doesn't seem dead to me :). OK, my bad, I'm subscribed but I didn't realize there is actually a bit of traffic. I'

Re: CALayer compositingFilter trouble

2012-04-26 Thread David Duncan
On Apr 26, 2012, at 9:12 AM, Markus Spoettl wrote: > I'm posting this here because quartz-dev seems dead. Quartz-Dev may be quiet, but it doesn't seem dead to me :). > It shows both the colors used (upper rect) and blended result (lower rect). > The upper screen shot is for two colors that "wo

CALayer compositingFilter trouble

2012-04-26 Thread Markus Spoettl
Hello, I'm posting this here because quartz-dev seems dead. I have a layer hosting view where I use a -compositingFilter with a CIColorBlendMode filter (default settings). It's constructed and applied to the layer like this: CIFilter *cf = [CIFilter filterWithName:@"CIColorBlendMode"];

RE: removeFromSuperview problem

2012-04-26 Thread Leanne Attard
Thanks for replying, to tell you the truth I thought of this before the post and i tried using [view performSelectorOnMainThread:@selector(remove_view:) withObject:nil waitUntilDone:YES]; where remove_view method calls 'removefromsuperview' however the application still came to a Not Responding

RE: removeFromSuperview problem

2012-04-26 Thread Jim Adams
I wonder if you should move that removeFromSuperview back onto the main thread? I know when I was doing lots of cross language stuff with java in the past that that was usually my problem. Jim Adams -Original Message- From: cocoa-dev-bounces+jim.adams=sas@lists.apple.com [mailto:co

Re: DataSource modified while TableView is displaying data

2012-04-26 Thread Roland King
how about using @synchronize to avoid it On Apr 26, 2012, at 6:23 PM, Jean Suisse wrote: > Dear Peter, > > Thank you for your reply. Here is the requested code (see below). > After more investigations, I would like to take back a previous statement, > that the tableview was perfectly aware th

Re: DataSource modified while TableView is displaying data

2012-04-26 Thread Peter Hudson
I've had a similar problem to this in the past. I never bottomed it out. The workaround I used was to check validity of the row index for every data call and, if the index was invalid, return a suitable easily visible debug string ( "bad index") and post a timed update 0.25 second later. I n

Re: DataSource modified while TableView is displaying data

2012-04-26 Thread Jean Suisse
Dear Peter, Thank you for your reply. Here is the requested code (see below). After more investigations, I would like to take back a previous statement, that the tableview was perfectly aware that the number of rows in the DS was changed. This is due to my inexperience in stepping through the c

Re: DataSource modified while TableView is displaying data

2012-04-26 Thread Peter Hudson
Can you post your code for numberOfRowsInTableView: Peter ___ 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 He

Proxy settings in UIWebview or at application level

2012-04-26 Thread Vikas Mahajan
Hi, I am currently working on making an iOS browser which will have provision to set proxy in it. I am making browser as wrapper around UIWebview. But as NSURL / NSREQUEST doesn't support setting proxy, so I got struck here. I know that we can set proxy in CFURL, so is there any way we can capture