Remove all saved USB drive letter assignments
134
get yourself a copy of usbdview shows all assigned usb devices, including drive letters. delete away
Related videos on Youtube
Author by
Alan10977
Updated on September 18, 2022Comments
-
Alan10977 almost 2 years
Let me explain, I have a UIViewController in a thread n.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myCommandNotification:) name:NetConnection object:nil];
I have an other Class in thread n +1 and i post a message.
[[NSNotificationCenter defaultCenter] postNotificationName:myCommandNotification: object:MyObject];
Ok so far no problem I'm happy lol.
Well, yes there is problem for later.
now when i try to use
SEL selector = NSSelectorFromString([NSString stringWithFormat:@"%@:", myCommandNotification]); if ([[NSNotificationCenter defaultCenter] respondsToSelector:selector])
The return code is always NO.
When i use
if ([MyViewController self] respondsToSelector:selector])
it's work
I'm stupid or not ?!!
Many Thanks
-
rmaddy over 9 yearsWhy are you checking if the
NSNotificationCenter
responds to the selector? It's your first class that has the method. BTW - what is a "treat" in this context? Looks like a translation error. -
Alan10977 over 9 yearsNo no, i have multiple UIViewContorller and when exit a vc i use in dealoc remove observer and i have one session for my App
-
Alan10977 over 9 yearsAnd all task download are assync
-
Alan10977 over 9 yearsif you don't understand what is a treat tread, You can not help me..
-
rmaddy over 9 yearsDo you mean "thread"? As in "multi-threaded"?
-
Alan10977 over 9 yearsyes i mean Thread excuse me
-
-
Alan10977 over 9 yearsDo not careful with names just a sample
-
Alan10977 over 9 yearsNo, when you create a NSNotification with object is nil you can post any object.
-
Avi Tsadok over 9 yearsImaging the notification centre is an object that has an array/dictionary of objects and selectors linked to a notification name. When you tell the notification centre to POST notification (by name), it search this list, and when it finds an object that linked to this notification name, it fires it's method. Thats it. Is that clear?
-
Avi Tsadok over 9 yearsResponses to selector means the object has this method and can execute it. In this case the notification centre doesn't have this method, It just knows what objects listen to this notification and execute THIER methods. Thats it
-
Alan10977 over 9 yearsPost 1 ok for me, but the point 2 i don't really a response for SEL selector = NSSelectorFromString([NSString stringWithFormat:@"%@:", myCommandNotification]); if ([[NSNotificationCenter defaultCenter] respondsToSelector:selector] not work
-
Alan10977 over 9 yearsIf i understod defaultcenter retain the name and not the selector it' t right ?
-
Alan10977 over 9 yearsI use UIViewController self for my ResponseToSelector and that work without problem. Many tanks. I understood now, it's impossible with defaultcenter to have with their design.
-
Avi Tsadok over 9 yearsIf you understand, you can always mark my answe... :)