• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Fwd: Thanks for the TableView hint.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Thanks for the TableView hint.


  • Subject: Fwd: Thanks for the TableView hint.
  • From: Jerry LeVan <email@hidden>
  • Date: Wed, 3 Mar 2004 09:25:24 -0500

Eric's Mail server wont let me in ;(

Begin forwarded message:

From: Jerry LeVan <email@hidden>
Date: March 3, 2004 9:15:10 AM EST
To: email@hidden
Subject: Thanks for the TableView hint.

Hi Eric,

I am working on a Postgresql Browser and read your reply to a questions
about detecting key events in a table view.

Your solution allowed me to replace:

if( !( ( [[NSApp currentEvent] keyCode] == ENTER_KEY_CODE) ||
([[NSApp currentEvent] keyCode] == RETURN_KEY_CODE) &&
([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask )
)
) return NO;

with
NSString *characters = [[NSApp currentEvent] characters];
unichar ch = [characters characterAtIndex:0];

if( !( (ch == NSEnterCharacter) ||
(ch == NSCarriageReturnCharacter) &&
([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask)
)
) return NO ;

I had felt uncomfortable with using keycodes. I had to write a
small program to get the return and enter keycodes...

( I intercept the enter key or shift return in the sql window to send the
current selection (or the line containing the cursor) to the postgres backend)

Jerry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Thanks for the TableView hint.
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Re: NSButton darkens background when pressed
  • Next by Date: Re: Notify when App quits
  • Previous by thread: Recreating iPhoto's image matrix
  • Next by thread: Re: Thanks for the TableView hint.
  • Index(es):
    • Date
    • Thread