How can I create Tracking-Areas in Cocoa-Applescript?

How can I create multiple tracking areas that activate handlers that are specific to a certain area, when the mouse enters that area, in Cocoa-Applescript, Xcode 5?

You can use NSTrackingArea to set up the area(s) you want to track.  For example, if you have a view named "myView" that you wanted to use, you can set up a tracking area by specifying the rectangle (I am going to use the entire view) and tracking options with something like:
   set options to (current application's NSTrackingMouseEnteredAndExited as integer) + (current application's NSTrackingActiveInKeyWindow as integer) + (current application's NSTrackingInVisibleRect as integer)
   set trackingArea to current application's class "NSTrackingArea"'s alloc's initWithRect:(myView's frame()) options:options owner:me userInfo:"tracking myView"
   myView's addTrackingArea:trackingArea
The options are a bit wordy, but they determine how things are tracked - you could also just look up what they are in the class headers and use that.  You then need to add NSResponder handlers in the owner class for what you are interested in - for this example, they would be:
  on mouseEntered:theEvent -- cursor has entered a tracking rectangle
    log "mouseEntered"
    log theEvent's userData() -- data specific to a trackingArea
  end mouseEntered:
  on mouseExited:theEvent -- cursor has exited a tracking rectangle
    log "mouseExited"
    log theEvent's userData() -- data specific to a trackingArea
  end mouseExited:
When using multiple tracking areas, you can add some user info that can be retrieved from the event.  In the above example, I used the string "tracking myView", but it can be whatever you want.

Similar Messages

  • How can I see tracks that are in playlists when viewing My Music?

    I have hundreds of audio tracks in iTunes. My Music shows more files than I have in all my playlists. Is there a way I can view which tracks are in a playlist when viewing My Music without having to right click each one? It would take hours. All I want to know is which tracks I have yet to include in a playlist.
    Nothing showing in "Show Duplicates".
    We really need a view option in My Music to see whether tracks are in a playlist or not.

    You can make a smart playlist showing tracks that are not in any playlist.
    You have to make a playist showing all the tracks that are in an existing playlist.
    Then you make a second playlist showing all the tracks that are not in the first playlist.
    You can make the first playlist with the rule:
    Playlist is 'one of my playlsits'
    repeated for every play list you have.
    This is only feasible for a few playlists.
    If you have a lot you can create a playlist folder: File>>New playlist folder.
    Then you drag all your playlists into the folder.
    Now you make a smart playlist with the rule:
    Playlist is not 'the playlist folder'
    This new playlist should have all tracks not already in a playlist.
    After you have finished, you can get playlists out of the folder by dragging them to the left. It might not be a bad idea to make sure you understand how to do this before dragging everything into the folder.

  • How can I view my photos in "Events" like in iPhoto? How can I create events?  I have 55,000 photos and 1700 events so the only way I can possibly manage my photos is using events that are one slide in size.

    I have 55,000 images organized into about 1700 events. The only reasonable way to view my library is using events in iPhoto where each event has one image That still leaves 1700 images to sort through but that is a lot easier than 55,000 images.  In the side bar is a folder with "iPhoto Events" but those views still show all of the slides.  How can I create events and view my photos as events as in iPhoto?  Events are critical for large libraries and has been my primary way to sort images.
    Thanks!

    I had a problem a couple of months ago when iPhotos suddenly rearranged the order of my Events (Why won't iPhoto let me arrange my photos?) .  I was told "Use albums not events - events are not a good way to organize - albums and folder are designed for organisation and are very flexible".
    Haha!  I should have paid attention and read between the lines!  My iPhotos were highly organised groupings - not according to date but the way I wanted them - and it was so easy to do!  I see now that if I had them all in albums, as per the Apple Apologist suggestion, I wouldn't have this unholy mess I have been left with just to make iPhone & iCloud users happy.  I am now going through Photos and making Albums (of what used to be in my Events)  ... maybe I'll get this finished before they do another non user friendly update!

  • HT2534 My friend created me an itunes store account with his credit card , his credit card is about to expire and they are asking me to re-enter the credit card and security card number .... I don't have these numbers ... How can i create new itunes accou

    My friend created me an itunes store account with his credit card , his credit card is about to expire and they are asking me to re-enter the credit card and security card number .... I don't have these numbers ... How can i create new itunes account without credit card?????

    Why do you need to create a new account?
    Just change the payment method.
    http://support.apple.com/kb/ht1918

  • How can I create a slideshow that depicts only a version of a photo rather than the original? Since the original and new versions are saved together, the aperture slideshow often choices the original rather than the desired version to display/

    How can I create a slideshow that depicts only a version of a photo rather than the original?   Since the original and new versions are saved together, the aperture slideshow often choices the original rather than the desired version to display.

    There are two things we use the name "Slideshow" for in Aperture:  a Slideshow Album, used for making Slideshows, and the Slideshow that is made.  (Imho, it is a design mistake to not call the containers used to create Slideshows, Books, etc., "Albums".)
    The Slideshow will use the Album Pick from any Stack.  A good way to use Aperture is to promote the Image you want to regularly use (such as, for example, a Version with adjustments) to the top of the Stack.  This makes it the Stack Pick, and will be the default Album Pick.  If you haven't done that, you can still change the Album Pick for any Stack in a Slideshow Album.  Expand your Stack(s), select the Image in each Stack that you want to be the Album Pick (and thus shown in the Slideshow), and "Stacks➞Set Album Pick".  (Note the keyboard shortcut; there is also a Toolbar icon for this.)  The change is immediate.  The Slideshow will always show the Album Pick (or, if there is not one, the Stack Pick) for every Stack in your Slideshow Album.

  • HT201441 how can i create and audio cd from a music track I have on my ipod

    how can i create and audio cd from a music track I have on my ipod

    This is how:
    Go to:
    'File'
    'Share'
    'Quicktime'
    'Expert Settings'
    'Audio as AIFF' or pick your brand of compression.
    Drag and drop the resulting file into iTunes.
    Enjoy!
    P.S. - You didn't need to delete the video but I think that'll be okay.

  • How can I create a Commercial Invoice or similar document in SAP ByD?

    How can I create a Commercial Invoice or similar document in SAP ByD?
    Our company has recently implemented ByD, but we can't figure out how to create a commercial invoice for shipping/customs purposes. I know that the German version of ByD allows for "Export Declarations" which is pretty much the same as a commercial invoice, but the U.S. version doesn't have this document/function.
    Any suggestions? I would appreciate any help.
    By the way, a commercial invoice contains:
    1. The shipperu2019s complete information: Contact name, company name, complete address and tax identification number.
       2. The recipientu2019s complete information: Contact name, company name, complete address and phone number.
       3. The buyeru2019s information (the person to whom the goods are sold by the seller) if different from the recipient: Contact name, company name, complete address and phone number.
       4. The shipment tracking number, air waybill number or bar-code label number.
       5. An accurate description of the contents in your shipment that includes the following details:
    What the product is
    What material the product is made of
    What the productu2019s Schedule B or HTS code is
    What the productu2019s intended use is
    What the productu2019s country of manufacture is
    What the productu2019s parts or serial numbers are (if applicable)
    What the productu2019s quantity and unit of measure are
    What the productu2019s value is, per unit and in total
    Thanks,
    Chris

    May I suggest that you ask this question in the customer forums in the Business Center at [http://sme.sap.com|http://sme.sap.com]
    Best regards, Christian

  • How can i create table which in use

    Dear all,
    How can i create a index on table which have much dml any time?

    In 10g :
    The CREATE ONLINE waits for existing transactions to commit before it can proceed. Once it starts, it uses a log table (MV Log) to track subsequent changes (i.e. it allows concurrent DML once it has started). At the end of the operation, it encounters another wait if there are existing transactions as it has to sync changes from the MV Log to the index.
    Here's an explanation by Jonathan Lewis : Re: Alter Index Rebuild Online
    In 11g :
    There's an improvement in that only the transactions that were active at the instant when the CREATE .. ONLINE was issued are the ones it waits for. It does not have to wait on subsequent transactions.
    Here's an explanation by Richard Foote : http://richardfoote.wordpress.com/2008/02/11/index-create-and-rebuild-locking-improvements-in-11g-ch-ch-ch-changes/
    Hemant K Chitale

  • How Can I create Media cd.

    hi,
    i have created an application HEALTH CARE.Now i want to create a Media CD .
    Using this media ,User run ORACLE 10g and health care application on his machine using this media.
    How can i create media CD.
    Thanks
    Manoj Kauashik

    Hi.. I have a two questions that are, I guess, in a similar area...
    I want to be able to produce a completed CD that I can then send off for mass duplication... I have been told that WAV files are not the same as Audio CD files (by that I mean the files that would be on a CD I have bought in a shop)... So I guess I shouldn't burn WAV fils onto the master CD. Neither, I know, are MP3s etc the right files to bounce into for a professional quality Audio CD.. But what files, that are available on LE8, should I burn onto my master CD?
    Also.. The only way I can figure to produce the track by track finished album is to create an itunes playlist and tag all the info ( album title, track titles etc) there... However, if I play that CD on another system, such as Windows, all that tagged info is lost.
    Can I overcome any of this? I would be happy to buy a separate CD burner prog if I need to.. But advice as to which one to get that would fulfil all of these requirements would also be a great help.
    I hope this is all OK to ask in this thread..
    Ta so much

  • How can I keep track of ans of quest ???? [Struts]

    hi,
    I am trying to develop Question-Answer pages using struts.
    The problem is when user selectes the right option(radio button) of different different quest. how can i keep track of these selected radio buttons ???
    I mean how can i trace the value of selected radio button corresponding to its quest. in my ActionForm and ActionClass.
    //loop for all questions
    <logic:notEmpty name="QUEST_LIST">
         <logic:iterate id="list" name="QUEST_LIST"  indexId="sno">     
         <tr>
              <td><%=(sno.intValue()+1) %>
              </td>
              <td> <bean:write name="list" property="QUESTION" />
              </td>               
         </tr>
         <tr>//loop for all options of corresponding question
    <logic:iterate id="OptionList" name="list" property="OPTION_LIST">
              <td> 
              </td>
              <td><INPUT type="radio" name="<bean:write name="list" property="QUESTION_ID" />" value="<bean:write name="OptionList" />">
                   <bean:write name="OptionList" />
              </td>
              </logic:iterate>
         </tr>     
         <tr><td> </td>
         </tr>
         </logic:iterate>
    </logic:notEmpty>Now my problem is in statement.....
    INPUT type="radio" name="<bean:write name="list" property="QUESTION_ID" />" value="<bean:write name="OptionList" />">
    if I hardcode the valueof "name" attribute then only one radio button is selected from all the question, so i created it dynamically using quesID.
    now its working fine only one radio can be selected for each quest. BUT how I set the values of these selected radio button in my ActionForm and get it into ActionClass
    I hope u understand what i am trying to say.....
    Please help me......

    hi,
    try "last" in the client's terminal. is this what you are looking for?
    cheers,
    Michael.

  • How can I create side bars without cropping the image?

    I want to create side bars because I am projecting in an vertical panel, but if I crop the image them I only get the middle part of it.
    How can I create side bars in an way that I can still move the image inside?

    On a Video Track directly above the clip(s) you want to have behind the side bars, place a clip of Color (or whatever you want to use for your sidebars).
    Now go to the Effects Tab > Matte >Mask Shape and drag the Mask Shape filter to the Color clip you have placed on the timeline.
    Double click on the clip to open it in the viewer, and click on the Filters Tab.
    Click Invert Box, and adjust the shape to get the side bars you want.
    And now the clip(s) that are beneath this effect will have the side bars and be independent of it, so that you can move them around.
    MtD

  • How can I create a smart playlist of least played complete albums?

    Hi,
    How can I create a smart playlist of least played complete albums? (of a specific genre, say jazz)
    What I would like to do is to have a playlist that will always automatically pull the least played albums of a specific genre (ideally, but not necessarily, with a random album play within that playlist) Hope you are getting the concept!
    Thank you for any idea!
    Daniel
    p.s. there have been solutions for earlier versions of iTunes, none working with iTunes 10 apparently

    As you say, you can't access the Gapless property in a smart playlist rule.
    The obvious way that comes to mind would be to create another playlist with stuff to exclude from your final list and put the gapless tracks and anything else that won't filter out easily into it.
    Yes you say but I have oodles of gapless tracks and I don't want to gather them up by hand.
    OK, so you'll need a script. Here is one I've just created for the purpose: GaplessToPlaylist
    tt2

  • How can i create a podcast ?

    Hello,
    am new here and am so anxious to know how can i create my own podcast using windows as am not a mac user.  I use both ipad and ipod and i purchased the garage band to help me with this issue but unfortunately to create podcasts i should be using a mac desktop.
    Can anyone help me with this issue please
    thanks a lot

    I think you are talking about chapter markers in an MP4 audio (.m4a) file? The chapters will work on both Mac and Windows, but unfortunately the creation of them is only supported on the Mac (as far as I know).
    They can be added to an audio track using Apple's Garageband, or LemonDreamz Podcast Maker. For a free alternative there used to be the command line ChapterTool from Apple, but it involves making XML files to describe the chapters. All these are Mac only.
    Hope this helps,
    Greg

  • How can I create an csv/excel file using pl/sql and then sending that file

    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.

    968776 wrote:
    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
    Whay do you want database (pl/sql) code to do these things?
    Anyhow, you may be interested in :
    {message:id=9360007}
    {message:id=9984244}

  • How can i create link between ipad(xcode) and webserver?

    Hi, I'm a new to iPad development and i need help,
    i'm not good with english but i try to explain my question:
    how can i create link between ipad(xcode) and webserver?
    (the webserver ".NET" with driver odbc is connected with DB Oracle)
    so, how can my ipad application access to the Oracle DB?
    Create a webservice (.NET) to be place between iPad and DB, is this correct?
    how can i do it?
    which are libraries to include in the xcode's framework?
    thx

    I think the following URL will be your best answer:
    http://stackoverflow.com/questions/3510468/connecting-iphone-to-an-odbc-database

Maybe you are looking for

  • Use Java to collect data from HTML

    Hi Guys I am doing a online stock trading project, the main part is to collect raw data from http://finance.yahoo.com User can retrieve the stock detail by inputting the right stock symbol, such as "AOL". I dont have too much problem in this part bec

  • Receiving error while viewing details for a particular session in ODI console

    Found following error in logs [2015-04-08T16:50:43.546-05:00] [odi_server1] [ERROR] [] [oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator] [tid: [ACTIVE].ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId

  • Convert tline into pdf file document in Java

    Dear ALL,      I built a RFC FM to convert smartform into tline which including PDF data. the Code:    Converting to PDF Format   DATA l_lines TYPE TABLE OF tline WITH HEADER LINE. *  DATA l_lines1 TYPE TABLE OF solix_tab WITH HEADER LINE.   DATA l_d

  • Performance tunning ...unknown view

    This query is used in a report and the cost is quite big and I don't understand why. "SELECT x,y,z,v,f,g,t,j,k FROM FR_AMOUNTS_VW VW where vw.inv_date = to_date(:p_datum,'dd.mm.yyyy')" Let's see the explain table: Execution Plan 0 # SELECT STATEMENT

  • Pse8 upgrade

    I got pse8, thought it is an upgrade?  When I loaded this program pse6 is still on the computer.  In the past, upgrades merged in with older programs.  Is this not so with pse8?