Remove all saved USB drive letter assignments

134

get yourself a copy of usbdview shows all assigned usb devices, including drive letters. delete away

Share:
134

Related videos on Youtube

Alan10977
Author by

Alan10977

Updated on September 18, 2022

Comments

  • Alan10977
    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
      rmaddy over 9 years
      Why 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
      Alan10977 over 9 years
      No 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
      Alan10977 over 9 years
      And all task download are assync
    • Alan10977
      Alan10977 over 9 years
      if you don't understand what is a treat tread, You can not help me..
    • rmaddy
      rmaddy over 9 years
      Do you mean "thread"? As in "multi-threaded"?
    • Alan10977
      Alan10977 over 9 years
      yes i mean Thread excuse me
  • Alan10977
    Alan10977 over 9 years
    Do not careful with names just a sample
  • Alan10977
    Alan10977 over 9 years
    No, when you create a NSNotification with object is nil you can post any object.
  • Avi Tsadok
    Avi Tsadok over 9 years
    Imaging 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
    Avi Tsadok over 9 years
    Responses 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
    Alan10977 over 9 years
    Post 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
    Alan10977 over 9 years
    If i understod defaultcenter retain the name and not the selector it' t right ?
  • Alan10977
    Alan10977 over 9 years
    I 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
    Avi Tsadok over 9 years
    If you understand, you can always mark my answe... :)