Re: Changes in -performSelectorOnMainThread: from iOS 6 to 7?

2014-02-14 Thread Rick Mann
performSlectorOnMainThread still exists. Although I'm re-writing my app from the ground up, I'm posting an interim release which will continue to use this approach. The behaviors between the OSes are different, and I was looking for some indication as to why. On Feb 14, 2014, at 11:32 , Fritz A

Re: Changes in -performSelectorOnMainThread: from iOS 6 to 7?

2014-02-14 Thread Fritz Anderson
On 12 Feb 2014, at 1:29 PM, Rick Mann wrote: > I think you misunderstand my question. I know about the new concurrency > types. I'm not interested in that. I want to know why my old code works > better on iOS 7 than 6. Given that the new concurrency method goes back a couple of years (iOS 5),

Re: Changes in -performSelectorOnMainThread: from iOS 6 to 7?

2014-02-12 Thread Rick Mann
On Feb 12, 2014, at 07:58 , Fritz Anderson wrote: > On 11 Feb 2014, at 6:04 PM, Rick Mann wrote: > >> I'm updating an old project that was built long ago, skipping udpates for >> iOS 5 & 6. One of the things my app does, in an NSOperation, is call >> -perf

Re: Changes in -performSelectorOnMainThread: from iOS 6 to 7?

2014-02-12 Thread Fritz Anderson
On 11 Feb 2014, at 6:04 PM, Rick Mann wrote: > I'm updating an old project that was built long ago, skipping udpates for iOS > 5 & 6. One of the things my app does, in an NSOperation, is call > -performSelectorOnMainThread: (waiting until done) as it integrates > download

Changes in -performSelectorOnMainThread: from iOS 6 to 7?

2014-02-11 Thread Rick Mann
I'm updating an old project that was built long ago, skipping udpates for iOS 5 & 6. One of the things my app does, in an NSOperation, is call -performSelectorOnMainThread: (waiting until done) as it integrates downloaded data into the Core Data store (Core Data operations all happ

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-05 Thread Steve Sisak
At 8:13 AM -0800 2/5/13, Glenn L. Austin wrote: I understand the *reasoning* behind performSelector:withObject:afterDelay:, but I've banned that from code I work on. In the OP's case, I think he just needs to perform the selector asynchronously so he doesn't deadlock -- waitUntilDone:NO ought

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-05 Thread Glenn L. Austin
On Feb 4, 2013, at 8:58 AM, Kyle Sluder wrote: > On Sun, Feb 3, 2013, at 11:58 PM, 尹佳冀 wrote: >> Thanks Mike seem You are right, and I write like this >> >> [self performSelector:@selector(doTheThing) withObject:nil >> afterDelay:0.5]; >> it can work correctly. > > Magic constants like this ar

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread Steve Sisak
UD not show > > > //[self performSelectorOnMainThread:@selector(doTheThing) > > withObject:nil waitUntilDone:YES]; to ... waitUntilDone:NO... it will work as well. It's hard to tell what's going on without looking at more of your code, but this smells a lo

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread Kyle Sluder
On Sun, Feb 3, 2013, at 11:58 PM, 尹佳冀 wrote: > Thanks Mike seem You are right, and I write like this > > [self performSelector:@selector(doTheThing) withObject:nil > afterDelay:0.5]; > it can work correctly. Magic constants like this are evil and are a serious indicator of poor programming practi

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread 尹佳冀
; > Does anyone can know what the difference between [NSOperationQueue > > currentQueue] and > > performSelectorOnMainThread, If I do some work use operation > > on [NSOperationQueue mainQueue], the UI will not hang up, but if i > > use performSelectorOnMainThr

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-03 Thread Mike Abdullah
On 3 Feb 2013, at 07:41, 尹佳冀 wrote: > Hi All > > Does anyone can know what the difference between [NSOperationQueue > currentQueue] and > performSelectorOnMainThread, If I do some work use operation > on [NSOperationQueue mainQueue], the UI will not hang

What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-02 Thread 尹佳冀
Hi All Does anyone can know what the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread, If I do some work use operation on [NSOperationQueue mainQueue], the UI will not hang up, but if i use performSelectorOnMainThread the UI will hang up - (void) doTheThing

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Dave Keck
run loop. Since -performSelectorOnMainThread relies on that reference, calls to -performSelectorOnMainThread fail. Both issues seem to involve bad timing in the use of certain Cocoa APIs; it seems there's something about the order and timing of Gideon's project that's causing NSThread to think tha

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Dave Keck
t in my test app and the calls to -performSelectorOnMainThread seem to work fine. ___ 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/Uns

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Kyle Sluder
On Wed, Dec 8, 2010 at 4:30 AM, Gideon King wrote: > So could this issue be something to do with the timing of the first time the > threaded operation is run? > > During startup of the application, in an awakeFromNib, it calls a > performSelector...afterDelay:0, and when that eventually fires, i

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Charles Srstka
On Dec 8, 2010, at 6:30 AM, Gideon King wrote: > So could this issue be something to do with the timing of the first time the > threaded operation is run? > > During startup of the application, in an awakeFromNib, it calls a > performSelector...afterDelay:0, and when that eventually fires, it

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Gideon King
would be perfectly safe, but maybe not? Thanks Gideon On 08/12/2010, at 10:02 PM, Dave Keck wrote: > > 4. Does -performSelectorOnMainThread work if you call [NSThread > mainThread] as the first line in main()? ___ Cocoa-dev mailing list (

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Gideon King
t; Cocoa/NSThread APIs safely together. > > 2. Do you have any functions marked __attribute__ ((constructor)) ? > > 3. What does your main() function look like? > > 4. Does -performSelectorOnMainThread work if you call [NSThread > mainThread] as the first line in main()? __

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Dave Keck
ion certain considerations that have to be made to use the pthread and Cocoa/NSThread APIs safely together. 2. Do you have any functions marked __attribute__ ((constructor)) ? 3. What does your main() function look like? 4. Does -performSelectorOnMainThread work if you call [NSThread mainThread]

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread jonat...@mugginsoft.com
On 8 Dec 2010, at 11:43, Gideon King wrote: > 0x114400a60 ?== 0x1029006e0 > > Assertion fails. The two are completely different as per previous results. > > FYI, I do not create any run loops explicitly in my application, and can't > think of anything I am doing which would create one implicit

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Gideon King
Dave Keck wrote: >> You are correct. They are two different things: > > Alright, does the following assertion fail when placed before the > -performSelectorOnMainThread line? (Ignore the warning - using private > APIs.) > >id a = (id)[[[NSThread mainThread] runLoop] g

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Dave Keck
> You are correct. They are two different things: Alright, does the following assertion fail when placed before the -performSelectorOnMainThread line? (Ignore the warning - using private APIs.) id a = (id)[[[NSThread mainThread] runLoop] getCFRunLoop]; id b = (id)CFRunLoopGetM

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Gideon King
TrackingRunLoopMode"} 2 : {contents = "kCFRunLoopDefaultMode"} } ... Thanks for offering to look into this further. Gideon On 08/12/2010, at 8:16 PM, Dave Keck wrote: >> That was the output for $rdi at the CGRunLoopWakeUp breakpoint immediately >> after the c

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Gideon King
Thanks Jonathan, but that's exactly what I did, and I couldn't replicate the problem in my test project, which is why I'm saying that something outside the multithreading is screwing things up somehow, but that could be anywhere in 23,000 lines of code, and I don't know what to look for. This is

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Dave Keck
> That was the output for $rdi at the CGRunLoopWakeUp breakpoint immediately > after the call to performSelectorOnMainThread... Sorry, realized that after I sent. The output still isn't what I would expect though: on my system, the run loop supplied to CFRunLoopWakeUp() from

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread jonat...@mugginsoft.com
On 8 Dec 2010, at 08:57, Gideon King wrote: > That was the output for $rdi at the CGRunLoopWakeUp breakpoint immediately > after the call to performSelectorOnMainThread... > > The output of po (void*)CFRunLoopGetMain() on the line after that is > http://pastie.org/1358258 &g

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Gideon King
That was the output for $rdi at the CGRunLoopWakeUp breakpoint immediately after the call to performSelectorOnMainThread... The output of po (void*)CFRunLoopGetMain() on the line after that is http://pastie.org/1358258 When I print $rdi at the CGRunLoopWakeUp in my mini test application, I do

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Dave Keck
you entered: po (void*)CFRunLoopGetMain() and not: po (void*)CFRunLoopGetCurrent() ? To clarify: [anObject performSelectorOnMainThread: ...] NSLog(@"Breakpoint line"); // <-- set breakpoint here On my machine, if I set a breakpoint on the NSLog line and upon hitting it,

Re: performSelectorOnMainThread fails second time through

2010-12-08 Thread Dave Keck
> {locked = false, wakeup port = 0x5a03, > stopped = false, > current mode = (none), > common modes = {type = mutable set, > count = 1, > entries => > 1 : {contents = "kCFRunLoopDefaultMode"} > } > , > common mode items = {type = mutable set, > count = 1, > entries => > 25 : {locked = No, signalled

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Gideon King
On 08/12/2010, at 4:19 PM, Dave Keck wrote: > > 1. Place a breakpoint on the line after the call to > -performSelectorOnMainThread. After this is hit, at the GDB prompt, > enter the following command: > >po (void*)CFRunLoopGetMain() > > This should print a lot

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Dave Keck
> 3. Stop your program, and set a breakpoint on the > -performSelectorOnMainThread line. Run your program again. When this > breakpoint is hit, before continuing your program, set a breakpoint at > CFRunLoopSourceSignal(). Continue your program. The > CFRunLoopSourceSignal breakpoin

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Dave Keck
icious of that. Should that kill any > application? No, it shouldn't make your app terminate - it'll just cause CFRunLoopRunInMode() to return (see the stack trace you posted earlier.) I was thinking this would cause the -performSelectorOnMainThread machinery to notice that there wa

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Gideon King
I have copied the source code to a different computer, and can confirm that it made no difference - the behaviour is the same. Regards Gideon ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Gideon King
ons though... Gideon On 08/12/2010, at 2:36 PM, Dave Keck wrote: > Some thoughts: > > 1. What happens if you specify a different object to receive the > message? For example, try [NSApp performSelectorOnMainThread: > @selector(terminate:) ... waitUntilDone: YES]. Does your app >

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Dave Keck
Also: a quick peek at the assembly of -performSelectorOnMainThread: reveals that it calls _CFExecutableLinkedOnOrAfter(). Presumably this is to modify its behavior based on what SDK your app links against; perhaps changing your Base SDK has an effect

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Dave Keck
Some thoughts: 1. What happens if you specify a different object to receive the message? For example, try [NSApp performSelectorOnMainThread: @selector(terminate:) ... waitUntilDone: YES]. Does your app terminate? 2. Specify waitUntilDone: NO, and after the call to -performSelectorOnMainThread

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Gideon King
[pool release]; } - (void)innerExecute:(AADataForLayoutProcess *)data { [self performSelectorOnMainThread:@selector(callback) withObject:nil waitUntilDone:NO]; } - (void)callback { NSLog(@"Called back from thread"); } At this stage, I'm pretty sure that something oth

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Dave Keck
> Any ideas? Post your code! ___ 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 Subscri

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Gideon King
I have completely commented out all the actions of the method that is executing in the thread. The only things it does are to create an autorelease pool, call a simple performSelectorOnMainThread, and release the pool. There is nothing else going on that I can see, and yet it still fails as per

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Gideon King
Good thought thanks Charles, but everything else seems to be responding as usual. No spinning wheel, still able to do other things in the UI. Main thread trace says: #0 0x9546b0fa in mach_msg_trap () #1 0x9546b867 in mach_msg () #2 0x9212d37f in __CFRunLoopRun () #3 0x9212c464 in CFRunLoopRu

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Charles Srstka
On Dec 7, 2010, at 2:19 PM, Gideon King wrote: > Another data point on this: if I use waitUntilDone:NO, it doesn't even work > the first time through. > > Responds to selector still returns YES. There are no error messages. Is something tying up the main thread? It won’t execute your request if

Re: performSelectorOnMainThread fails second time through

2010-12-07 Thread Gideon King
at I run in a > separate thread, and right at the end of the method, I call > > [anObject performSelectorOnMainThread:@selector(myMethod:) > withObject:someData waitUntilDone:YES]; > > This works fine the first time I run it. The second and subsequent times I > try it

performSelectorOnMainThread fails second time through

2010-12-07 Thread Gideon King
Hi, I'm trying to debug a really odd issue. I have a method that I run in a separate thread, and right at the end of the method, I call [anObject performSelectorOnMainThread:@selector(myMethod:) withObject:someData waitUntilDone:YES]; This works fine the first time I run it

Re: performSelectorOnMainThread problem

2009-05-28 Thread Kyle Sluder
On Thu, May 28, 2009 at 4:53 PM, Erg Consultant wrote: > Either your main thread doesn't implement the selector requested, or else > it's an issue with the runloop never processing the request. If you have code > that alters the runloop or modifies its input sources, check that code first. Thre

Re: performSelectorOnMainThread problem

2009-05-28 Thread Erg Consultant
nstein To: cocoa-dev@lists.apple.com Sent: Thursday, May 28, 2009 9:11:42 AM Subject: performSelectorOnMainThread problem Does anyone know of any issue that would cause performSelectorOnMainThread to not actually perform the selector but not report any kind of error? I use threads very often and

Re: performSelectorOnMainThread problem

2009-05-28 Thread Ben Einstein
Well at the time I wrote that, I thought it was sitting completely idle, but it seems the NSManagedObjectContext lock was blocking the main thread, even my application is specifically designed to not do that. It's working okay now... Thanks, Ben On May 28, 2009, at 1:51 PM, Shawn Erickson

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 ___

Re: performSelectorOnMainThread problem SOLVED

2009-05-28 Thread Jason Foreman
On May 28, 2009, at 12:13 PM, Ben Einstein wrote: Thanks for the advice, I had actually tried that as well to no avail. After playing around a bit, I'm fairly certain I've solved it, although I'm not really sure why it was a problem. At the top of the worker method, I was locking the NSMan

Re: performSelectorOnMainThread problem SOLVED

2009-05-28 Thread Ben Einstein
Thanks for the advice, I had actually tried that as well to no avail. After playing around a bit, I'm fairly certain I've solved it, although I'm not really sure why it was a problem. At the top of the worker method, I was locking the NSManagedObjectContext and unlocking it just before retu

Re: performSelectorOnMainThread problem

2009-05-28 Thread Corbin Dunn
On May 28, 2009, at 9:46 AM, Ben Einstein wrote: On May 28, 2009, at 12:36 PM, Jeff Johnson wrote: Three general possibilities: (1) aControllerObject is nil. Definitely not the problem because it works when calling performSelector: without the mainThread part. (2) The main run loop i

Re: performSelectorOnMainThread problem

2009-05-28 Thread Ben Einstein
On May 28, 2009, at 12:36 PM, Jeff Johnson wrote: Three general possibilities: (1) aControllerObject is nil. Definitely not the problem because it works when calling performSelector: without the mainThread part. (2) The main run loop is not running for some reason. The main run loop i

Re: performSelectorOnMainThread problem

2009-05-28 Thread Jeff Johnson
tein wrote: Does anyone know of any issue that would cause performSelectorOnMainThread to not actually perform the selector but not report any kind of error? I use threads very often and have never had a problem like this, but when I call: [aControllerObject performSelectorOnMainThread

Re: performSelectorOnMainThread problem

2009-05-28 Thread Nick Zitzmann
On May 28, 2009, at 10:11 AM, Ben Einstein wrote: Does anyone know of any issue that would cause performSelectorOnMainThread to not actually perform the selector but not report any kind of error? Are you sure the main thread isn't busy and is running a run loop in its default

performSelectorOnMainThread problem

2009-05-28 Thread Ben Einstein
Does anyone know of any issue that would cause performSelectorOnMainThread to not actually perform the selector but not report any kind of error? I use threads very often and have never had a problem like this, but when I call: [aControllerObject performSelectorOnMainThread:@selector

Re: RunLoops and performSelectorOnMainThread problem

2009-05-06 Thread Michael Ash
On Wed, May 6, 2009 at 3:13 AM, Martin F. Carianni wrote: > Hello, i'm having some trouble with CFRunLoop, and > performSelectorOnMainThread. I've a CFFTP client (with a latter COCOA > implementation to interface with the GUI-class) which needs to pass a > directory listing

RunLoops and performSelectorOnMainThread problem

2009-05-06 Thread Martin F. Carianni
Hello, i'm having some trouble with CFRunLoop, and performSelectorOnMainThread. I've a CFFTP client (with a latter COCOA implementation to interface with the GUI-class) which needs to pass a directory listing array to the GUI. But when I try to send the array object via a

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Torsten Curdt
ust had the idea to add an un-boxed version of performSelectorOnMainThread to NSObject via Category. But could you elaborate on the HOM a bit. Not sure I can follow there. cheers -- Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

RE: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Kirk Kerekes
Value: (id) value { [self setValue: value forKey: @"activated"]; } OR, in your thread: [view performSelectorOnMainThread: @selector(setValuesForKeysWithDictionary:) withObject: [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], @"activated",nil] wai

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Keith Duncan
Is this supposed to work or not? - (void) setActivated:(BOOL)theStatus; [view performSelectorOnMainThread:@selector(setActivated:) withObject:[NSNumber numberWithBool:YES] waitUntilDone:YES]; This won't work since the boolean isn't auto-unboxed. Your method should accept a

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Michael Ash
On Wed, Apr 22, 2009 at 12:13 PM, Torsten Curdt wrote: > Hey folks, > > Is this supposed to work or not? > >  - (void) setActivated:(BOOL)theStatus; > >  [view performSelectorOnMainThread:@selector(setActivated:) > withObject:[NSNumber numberWithBool:YES] waitUntilDone:YE

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Ken Thomases
On Apr 22, 2009, at 11:13 AM, Torsten Curdt wrote: Is this supposed to work or not? - (void) setActivated:(BOOL)theStatus; [view performSelectorOnMainThread:@selector(setActivated:) withObject:[NSNumber numberWithBool:YES] waitUntilDone:YES]; It does not seem like it works that way. No

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Volker in Lists
vated:(BOOL)theStatus; [view performSelectorOnMainThread:@selector(setActivated:) withObject:[NSNumber numberWithBool:YES] waitUntilDone:YES]; It does not seem like it works that way. Do I really have to use NSInvocation for this? cheers -- To

performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Torsten Curdt
Hey folks, Is this supposed to work or not? - (void) setActivated:(BOOL)theStatus; [view performSelectorOnMainThread:@selector(setActivated:) withObject:[NSNumber numberWithBool:YES] waitUntilDone:YES]; It does not seem like it works that way. Do I really have to use NSInvocation for this

Re: performSelectorOnMainThread

2009-01-10 Thread Michael Ash
ifies as > in-significant. Given that assumption, my real question is how to implement > it. I call: > > [self performSelectorOnMainThread:@selector:mySimpleSelector withObject:nil > waitUntilDone:YES]; > > (int) mySimpleSelector { >if (whatever) return 0; >

Re: performSelectorOnMainThread

2009-01-10 Thread Quincey Morris
Given that assumption, my real question is how to implement it. I call: [self performSelectorOnMainThread:@selector:mySimpleSelector withObject:nil waitUntilDone:YES]; (int) mySimpleSelector { if (whatever) return 0; else return 1; } via

Re: performSelectorOnMainThread

2009-01-10 Thread glenn andreas
nt. Given that assumption, my real question is how to implement it. I call: [self performSelectorOnMainThread:@selector:mySimpleSelector withObject:nil waitUntilDone:YES]; (int) mySimpleSelector { if (whatever) return 0; else return 1; } via

Re: performSelectorOnMainThread

2009-01-10 Thread Ashley Clark
nt. Given that assumption, my real question is how to implement it. I call: [self performSelectorOnMainThread:@selector:mySimpleSelector withObject:nil waitUntilDone:YES]; (int) mySimpleSelector { if (whatever) return 0; else return 1; } via

Re: performSelectorOnMainThread

2009-01-10 Thread Jelle De Laender
ment it. I call: [self performSelectorOnMainThread:@selector:mySimpleSelector withObject:nil waitUntilDone:YES]; (int) mySimpleSelector { if (whatever) return 0; else return 1; } via my call to -performSelectorOnMainThread, just how do I access - mySimpleSelector's returne

performSelectorOnMainThread

2009-01-10 Thread John Love
is how to implement it. I call: [self performSelectorOnMainThread:@selector:mySimpleSelector withObject:nil waitUntilDone:YES]; (int) mySimpleSelector { if (whatever) return 0; else return 1; } via my call to -performSelectorOnMainThread, just how do I access - mySimple

Re: performSelectorOnMainThread and exceptions

2008-10-28 Thread [EMAIL PROTECTED]
At 6:51 PM -0500 10/27/08, Ken Thomases wrote: On Oct 27, 2008, at 4:05 PM, [EMAIL PROTECTED] wrote: if i call -[anObject performSelectorOnMainThread:aSelector withObject:nil waitUntilDone:NO] and then later throw an exception (of my own), which i catch, the deferred execution of aSelector ne

Re: performSelectorOnMainThread and exceptions

2008-10-27 Thread [EMAIL PROTECTED]
At 6:51 PM -0500 10/27/08, Ken Thomases wrote: On Oct 27, 2008, at 4:05 PM, [EMAIL PROTECTED] wrote: if i call -[anObject performSelectorOnMainThread:aSelector withObject:nil waitUntilDone:NO] and then later throw an exception (of my own), which i catch, the deferred execution of aSelector ne

Re: performSelectorOnMainThread and exceptions

2008-10-27 Thread Ken Thomases
On Oct 27, 2008, at 4:05 PM, [EMAIL PROTECTED] wrote: if i call -[anObject performSelectorOnMainThread:aSelector withObject:nil waitUntilDone:NO] and then later throw an exception (of my own), which i catch, the deferred execution of aSelector never happens. note that the performSelectonOnM

performSelectorOnMainThread and exceptions

2008-10-27 Thread [EMAIL PROTECTED]
if i call -[anObject performSelectorOnMainThread:aSelector withObject:nil waitUntilDone:NO] and then later throw an exception (of my own), which i catch, the deferred execution of aSelector never happens. note that the performSelectonOnMainThread, and the throw and catch are all in the same run

Re: performSelectorOnMainThread Help

2008-10-06 Thread Peter Sagerson
You appear to have declared updateAirDate: to be an instance method, but you're sending the message to the class. You want something more like [appDelegate performSelectorOnMainThread:@selector(updateAirDate:) withObject:airDate waitUntilDone:NO]; where appDelegate is the rel

performSelectorOnMainThread Help

2008-10-06 Thread Sandro Noel
Greetings. I need to gain a better understanding of performSelectorOnMainThread I have my main window that had a delegate and the delegate spawns threads, once the threads(NSOperation) are done they return a string, I use to do it thru a delegate but Core Data does not appreciate multiple

Re: How inspect pending performSelectorOnMainThread ?

2008-04-07 Thread Jean-Daniel Dupas
Le 7 avr. 08 à 16:49, Jens Alfke a écrit : On 7 Apr '08, at 6:24 AM, Jacob Engstrand wrote: In a separate thread I call: [self performSelectorOnMainThread: @selector(broadcastMessage:) withObject: nil waitUntilDone: NO]; Now, is there a way for the main thread to inspect the que

Re: How inspect pending performSelectorOnMainThread ?

2008-04-07 Thread Jens Alfke
On 7 Apr '08, at 6:24 AM, Jacob Engstrand wrote: In a separate thread I call: [self performSelectorOnMainThread: @selector(broadcastMessage:) withObject: nil waitUntilDone: NO]; Now, is there a way for the main thread to inspect the queue of pending messages, their targets and argu

How inspect pending performSelectorOnMainThread ?

2008-04-07 Thread Jacob Engstrand
Hi all, In a separate thread I call: [self performSelectorOnMainThread: @selector(broadcastMessage:) withObject: nil waitUntilDone: NO]; Now, is there a way for the main thread to inspect the queue of pending messages, their targets and arguments? (I would like my unit test to verify that

Re: performSelectorOnMainThread problem

2008-03-13 Thread Thomas Engelmeier
On 13.03.2008, at 02:27, Nick Rogers wrote: In my secondary thread I'm doing: [self performSelectorOnMainThread:@selector(updateProgress) withObject:data waitUntilDone:YES]; with the error that self does not recognize the selector updateProgress. I have imported the main AppControl

Re: performSelectorOnMainThread problem

2008-03-12 Thread Dave Hersey
#x27;re calling performSelectorOnMainThreadFrom? That's what you're saying by passing self. If not, you need to refer to the class/object it's in. So, if "updateProgress:" is defined in your app controller and you have a reference to that, you might do something like: [m_app

Re: performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
n Stiles wrote: If -updateProgress is taking "data" as an argument, then you probably want @selector(updateProgress:) Note the colon. Nick Rogers wrote: Hi, In my secondary thread I'm doing: [self performSelectorOnMainThread:@selector(updateProgress) withObject:

Re: performSelectorOnMainThread problem

2008-03-12 Thread John Stiles
n 13-Mar-08, at 7:00 AM, John Stiles wrote: If -updateProgress is taking "data" as an argument, then you probably want @selector(updateProgress:) Note the colon. Nick Rogers wrote: Hi, In my secondary thread I'm doing: [self performSelectorOnMainThread:@select

Re: performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
wrote: Hi, In my secondary thread I'm doing: [self performSelectorOnMainThread:@selector(updateProgress) withObject:data waitUntilDone:YES]; with the error that self does not recognize the selector updateProgress. I have imported the main AppController.h into this secondary class fil

Re: performSelectorOnMainThread problem

2008-03-12 Thread John Stiles
If -updateProgress is taking "data" as an argument, then you probably want @selector(updateProgress:) Note the colon. Nick Rogers wrote: Hi, In my secondary thread I'm doing: [self performSelectorOnMainThread:@selector(updateProgress) withObject:data waitUntilDone:YES];

performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
Hi, In my secondary thread I'm doing: [self performSelectorOnMainThread:@selector(updateProgress) withObject:data waitUntilDone:YES]; with the error that self does not recognize the selector updateProgress. I have imported the main AppController.h into this secondary class file. stil

Re: Does performSelectorOnMainThread: preserve order?

2008-02-28 Thread Hamish Allan
On Thu, Feb 28, 2008 at 10:48 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > The documentation explicitly describes -[NSObject > performSelectorOnMainThread:withObject:waitUntilDone:] as queueing and > dequeueing selectors on the main thread. It seems reasonable to > assume they're not outright

Re: Does performSelectorOnMainThread: preserve order?

2008-02-28 Thread Kyle Sluder
On Thu, Feb 28, 2008 at 5:31 PM, Hamish Allan <[EMAIL PROTECTED]> wrote: > > However, there is no equivalent promise in Apple's documentation for > NSObject; it is conspicuous in its absence. Can anyone confirm or deny > that it has the same behaviour as in GNUstep? The documentation explicitly

Does performSelectorOnMainThread: preserve order?

2008-02-28 Thread Hamish Allan
Hi, The GNUstep documentation for the NSObject(NSMainThreadPerformAdditions) category states the following for performSelectorOnMainThread: withObject: waitUntilDone: modes: "Where this method has been called more than once before the runloop of the main thread runs in the required mode