Professional Web Applications Themes

+(Responder*)GetFrontResponder() ? - Mac Programming

I have a window with a drawer; I need to determine which of the two ( or more) is currently "active", or who is "the target", who has "the focus", or who is "enabled"... You get it, right? Looking around, I see in NSResponder functions like "becomeFrontResponder()", and it seems the most likely place for what I need, but it's not there. Doesn't seem to be anywhere..? Eden...

  1. #1

    Default +(Responder*)GetFrontResponder() ?


    I have a window with a drawer; I need to determine which of the two (
    or more) is currently "active", or who is "the target", who has "the
    focus", or who is "enabled"... You get it, right?

    Looking around, I see in NSResponder functions like
    "becomeFrontResponder()", and it seems the most likely place for what I
    need, but it's not there. Doesn't seem to be anywhere..?

    Eden
    Eden Guest

  2. #2

    Default Re: +(Responder*)GetFrontResponder() ?

    Eden Smallwood <pg> wrote:
     

    Not really, no. Do you want to know where the user is *looking*???? If
    you haven't got something *in* the window or the drawer that can be key
    (e.g. a textfield), the question seems sort of meaningless. What is it
    that you *really* need to know? m.

    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

  3. #3

    Default Re: +(Responder*)GetFrontResponder() ?

    matt neuburg spake:
    ? Eden Smallwood <pg> wrote:
    ?
    ?> I have a window with a drawer; I need to determine which of the
    ?> two (
    ?> or more) is currently "active", or who is "the target", who has "the
    ?> focus", or who is "enabled"... You get it, right?
    ?
    ? Not really, no. Do you want to know where the user is *looking*????

    I want to know where the user is clicking, or last clicked.

    Imagine the situation in "Mail": there's a main window, and a drawer
    off to the side; hereinafter "Main" and "Drawer".

    Both have elements which can be selected, ergo highlighted, and
    acted upon by menu commands. I am tweaking a menu command to operate on
    whichever element is currently highlighted AND ENABLED, whether it's in
    the Main or the Drawer.

    Elements in both Main and Drawer can be *highlighted* at the same time,
    but they *cannot* both be *enabled* at the same time-- it is a mutually
    exclusive choice; when user is clicking around in the Drawer, the Drawer
    items are highlit and enabled; the items in Main are highlit but
    DISABLED. When clicking around in Main, elements in Drawer may be
    highlit, but then are disabled.

    Clear?

    Eden

    Eden Guest

  4. #4

    Default Re: +(Responder*)GetFrontResponder() ?

    Eden Smallwood <pg> wrote:
     

    But this is why I said in my previous note that your question makes
    sense only if you are interested in what element is key - it's the
    window's firstResponder.

    In the case of Mail, the thing in the drawer is an outline; the thing in
    things in the main window are a table and a textview. Those are all
    things that can be key (firstResponder). Mail, however, manages things
    so that the outline refuses firstResponder status - it is never key.
    This is not mandatory; if you have something in a drawer that can be key
    and you permit it to be firstResponder, then when the user clicks in it,
    whatever was firstResponder before will be made to resign its
    firstResponder status. I suggest you RTFM - this might be a good place
    to start:

    <file:///Developer/Doentation/Cocoa/Conceptual/BasicEventHandling/Con
    cepts/FirstResponder.html>

    m.



    --
    matt neuburg, phd = com, http://www.tidbits.com/matt/
    AppleScript: The Definitive Guide
    http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
    Read TidBITS! It's free and smart. http://www.tidbits.com
    matt Guest

Similar Threads

  1. Creating email auto-responder
    By superbullet in forum Coldfusion - Advanced Techniques
    Replies: 6
    Last Post: June 9th, 02:38 PM
  2. send event to next responder?
    By Jøhnny in forum Mac Programming
    Replies: 14
    Last Post: April 3rd, 09:59 PM
  3. help changing first responder
    By Jamal Bernhard in forum Mac Programming
    Replies: 2
    Last Post: August 18th, 10:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139