Re: Trying to capture raw touch events on the trackpad

2012-08-10 Thread Raleigh Ledet
mouseEntered do you also have a tracking area setup? When are you calling setAcceptsTouchEvent:? FYI, You won't get touch events unless the cursor is over your view when the first touch occurs. While dragging the cursor, the touch doing that was latched to some other view. All touches are

Re: NSScroller in layer backed view

2012-05-18 Thread Raleigh Ledet
Do not override drawRect:! Override the parts drawing methods: – drawKnobSlotInRect:highlight: – drawKnob https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSScroller_Class/Reference/Reference.html -raleigh On Apr 3, 2012, at 12:47 AM, Ryan Joseph

Re: Views-based table drag and drop

2012-05-18 Thread Raleigh Ledet
You can put whatever data you want/need in the pasteboard item. Even multiple independent things. A handy trick is often to add a private type per item. This custom type can be as simple as the index of the item in the source list. So obviously I need to use tableView:pasteboardWriterForRow:.

Re: NSScrollView automatically changes scroller styles?

2012-03-30 Thread Raleigh Ledet
NSScrollView does various checks to see if the App is trying to put placards in the scroller area. If NSScrollView thinks there are placards, then it reverts back to legacy scrollers for compatibility. Some apps have been known to do this via a sibling view instead of a subview. This is why it

Re: Can't receive a scrollWheel message in a PDFView subclass

2012-03-30 Thread Raleigh Ledet
There is probably a subview that is intercepting the event. You subclass should override hitTest to return self for specific current events so that it gets first crack at the event. See the Target Gallery sample project.

Re: Transition from [NSEvent phase] to [NSEvent momentumPhase]

2012-03-16 Thread Raleigh Ledet
Sorry to be late to this party. I've been busy. ;) The System doesn't know if momentum scroll events will follow normal scroll event phrase or not. There is no way for the underlying driver to inform the system of this. Sorry. I have to deal with this problem inside appkit as well. It gets

Re: Synchronous multi-image dragging

2012-03-16 Thread Raleigh Ledet
I gave that session. At let me sate for the record, now, that exactly when drag starts is UNDEFINED. Obviously, it will start soon! I've been in your shoes before (different company). I've had to make cross-platform code work with asynchronous OS X API where other platforms had synchronous

Re: Vertical NSplitViews buggy in Lion?

2011-09-26 Thread Raleigh Ledet
Have you filed a radar? You already have a test project, so the hard part is done. Please be sure to attach the test project to the radar. -raleigh On Sep 23, 2011, at 4:03 AM, Martin Hedenfalk wrote: Hi, I'm having problems with vertical NSSplitViews in Lion. I'm dynamically adding

Re: Printing exception on Lion

2011-09-07 Thread Raleigh Ledet
This is a known problem, but it shouldn't be throwing an exception. It's just logging an error to the console that you can ignore. If it is throwing an actual exception and preventing printing from working, let me know. -raleigh On Sep 7, 2011, at 9:06 AM, Corbin Dunn wrote: On Sep 7,

Re: drag and drop not working between windows on 10.7

2011-08-30 Thread Raleigh Ledet
On Aug 29, 2011, at 11:03 PM, Michael Link wrote: I have a document based app that has a source list (NSOutlineView) that allows drag and drop on itself or another source list (same class) in a different document in the same application. Everything works on 10.6, in 10.7 drags to the

Re: rightMouseDown: never called in NSView subclass

2011-08-25 Thread Raleigh Ledet
A contextual menu in a toolbar? Lets think about this for a moment. A) such a command would be hard to discover. Your customers have other ways to activate the same commands right? If not, why not use a popup button here? B) I assume that's because you have an action tied to single click…. why

Re: Lion - CopiesOnScroll Bug with table view

2011-08-19 Thread Raleigh Ledet
A) Does the scrollview overlap your side view by a pixel or more? B) What is the frame of the scrollview? Is it integral? -raleigh On Aug 18, 2011, at 5:23 PM, Seth Willits wrote: I have an NSTableView in a scrollview, and on Lion it's now smearing all of the drawing when scrolling:

Re: Lion - CopiesOnScroll Bug with table view

2011-08-19 Thread Raleigh Ledet
numbers comes from the mouse dragged event. I noticed this somewhere else; it seems that mouse dragged events now have fractional values in Lion. -- Seth On Aug 19, 2011, at 9:48 AM, Raleigh Ledet wrote: A) Does the scrollview overlap your side view by a pixel or more? B) What

Re: Drag Drop/Pasteboard issue in Lion

2011-08-11 Thread Raleigh Ledet
Sounds like you need to file a radar. raleigh On Aug 11, 2011, at 3:14 AM, Half Activist wrote: Hello, I'm working on a project where i can drag items from the Address Book (persons) and drop them on a view to add them (actually read the vCard). Everything worked fine up to

Re: draggingEntered Not Working As Expected

2011-08-03 Thread Raleigh Ledet
On Aug 3, 2011, at 12:29 PM, Chris Tracewell wrote: XCode 4, 10.6 GC -- I have an IKImageBrowserView which I have implemented drag and drop for. I have set my view controller as the image browser's drag delegate, registered for pasteboard drag types in awakeFromNib and implemented DnD

Re: What could cause a fast enumeration mutation error in updating tracking areas?

2011-07-29 Thread Raleigh Ledet
Do you have another thread that is doing something with tracking areas? -raleigh On Jul 28, 2011, at 11:33 PM, Gideon King wrote: Hi, I have a problem where a few users of my program are getting the following exception: 0 CoreFoundation 0x7fff862df7b4 __exceptionPreprocess + 180 1

Re: Dialog Command Keys

2011-07-27 Thread Raleigh Ledet
The target of the menus should be nil and you need to set the action to what standard controls expect them to be. Namely: cut: @selector(cut:) copy: @selector(copy:) paste: @selector(paste:) so basically: [cutMenuItem setTarget:nil] [cutMenuItem setAction:@selector(cut:)] This of course means

Re: Dialog Command Keys

2011-07-26 Thread Raleigh Ledet
On Jul 26, 2011, at 9:32 AM, Bill Appleton wrote: I just noticed that even if i bring up a stock dialog (like the put file dialog to save a file) that command-x still doesn't work. for these dialogs it DOES flash (hilite) that menu, but no cutting happens. So I don't think it matters how i am

Re: Hooking into responder chain, and NSTabViews - or dont?

2011-07-15 Thread Raleigh Ledet
Hi David, As you switch views due to tab switching, the newly added view sets up it's next responder based on the view hierarchy. The new view coming in doesn't know anything about your view controller and simply wires up it's newt responder as it's parent view. You have a few options here:

Re: NSDatePicker weirdness with time.

2011-07-06 Thread Raleigh Ledet
This conversation started about NSDatePicker. Now you are referring to NSDateFormatter. Which one are you dealing with? My test shows that a nib instantiated NSDatePicker has a nil timeZone value. -raleigh On Jul 6, 2011, at 8:05 AM, Kyle Sluder wrote: On Wed, Jul 6, 2011 at 7:11 AM, Fritz

Re: NSDatePicker weirdness with time.

2011-07-05 Thread Raleigh Ledet
Trygve, That should work. I suspect that you are setting the timeZone of the NSDatePicker as well. There is a bug, where is you set the NSDatePicker timeZone but do not set the calendar, then you will run into this problem. (Same thing with NSDatePicker locale.) So, either don't adjust the

Re: NSBrowser matrix

2011-06-27 Thread Raleigh Ledet
Your instantiating your NSBrowser from a nib file. Try over riding - (id)initWithCoder:(NSCoder *)coder -raleigh On Jun 26, 2011, at 4:18 AM, Ari Black wrote: On 11-06-26 7:04 AM, Fritz Anderson wrote: On 25 Jun 2011, at 7:05 PM, Ari Black wrote: @implementation SpecialMatrix -

Re: Event Objects Return 1-Based Y Coordinate Values

2011-06-27 Thread Raleigh Ledet
Cocoa coordinates are all 0,0 based. If you have a reproducible test case that says otherwise, please file a radar and attach it. -raleigh On Jun 25, 2011, at 7:59 AM, Richard Somers wrote: The Cocoa Drawing Guide states Cocoa event objects return y coordinate values that are 1-based

Re: NSDragOperation for operationNotAllowedCursor !!

2011-06-16 Thread Raleigh Ledet
File a radar asking for a new NSDragOperation, NSDragOperationNotAllowed. In the meantime, you can create your own cursor with your own cursor image and set it manually. You'll be fighting the system a bit, but if you time it right, you should be ok. -raleigh On Jun 15, 2011, at 7:47 AM,

Re: pagingEnabled on NSScrollView?

2011-06-16 Thread Raleigh Ledet
Hi Leonardo, I'm not familiar with UIScrollView.pagingEnabled, so you'd have to tell me what it does. Also, how are you determining when the finger stops dragging on the trackpad? -raleigh On Jun 16, 2011, at 2:57 PM, Leonardo wrote: Hi, I would like to reach the same effect as

Re: Handling mouse events on transparent window conditionally

2011-06-06 Thread Raleigh Ledet
I'm shooting off the cuff here. But try setting up a tracking area that matches your active rectangle. When the mouse enters the tracking area, setIgnoreMouseEvents:NO, when the mouse exits the tracking area setIgnoreMouseEvents:YES. -raleigh On May 31, 2011, at 1:30 AM, Ken Thomases wrote:

Re: magic trackpad

2011-04-25 Thread Raleigh Ledet
, at 12:20 PM, Raleigh Ledet wrote: Charlie, First off, which gestures do you have enabled in your trackpad prefs? Second, which gestures are your trying to respond to? Swipe, Magnify, Rotate, All of the above? Or are you trying to track each touch manually yourself? -raleigh On Apr

Re: magic trackpad

2011-04-25 Thread Raleigh Ledet
, 2011, at 12:46 PM, Raleigh Ledet wrote: Charlie, You have to explicitly opt into touches, but not the other gestures. Though, I wouldn't opt into touches unless you really really need to go that route. The other gestures are targeted gestures. They are sent to the the view under the cursor

Re: NSBrowser column resizing

2011-03-06 Thread Raleigh Ledet
Why not just a headerViewController on NSBrowser proper? -raleigh On Mar 2, 2011, at 10:03 AM, Scott Ribe wrote: I need to implement a custom control, which would look very much like an NSBrowser with a header row above each column which would have 1 or 2 controls per column. It seems like

Re: Printing Appears Very Small in Lower-Left Corner of Page

2011-02-07 Thread Raleigh Ledet
Gerry, File a radar. Include the file or a sample project or whatever you can to help us duplicate. If this is a Cocoa bug, then you should be able to duplicate with a small sample app pretty quickly. -raleigh On Jan 18, 2011, at 5:42 PM, Gerry Beggs wrote: Just to follow-up (and clarify)

Re: Composing an NSImage to print

2011-02-07 Thread Raleigh Ledet
Sorry to be so late to the party. What Ken suggested will work. But generally, watermarks, header, and footers are drawn via your own -drawPageBorderWithSize: method.

Re: How does Popup menu receive keyboard events?

2010-10-07 Thread Raleigh Ledet
On Oct 7, 2010, at 12:37 AM, eveningnick eveningnick wrote: Hello I have some application active (for example, finder) and its window is a keyWindow that receives keyboard events After i click on a free from windows part of a desktop with right mouse button, i have a popup menu dropped

Re: Help to understand how do events work

2010-10-07 Thread Raleigh Ledet
On Oct 6, 2010, at 4:39 AM, eveningnick eveningnick wrote: Hello! I have created a cocoa application that has unusual behavior: it has a window (NSPanel), which does not activate the application, when it's clicked. This window is ordered always on top of the other windows. So it's like a

Re: Drag and Drop in Same View

2010-09-19 Thread Raleigh Ledet
You need to register as a dragging destination for your dragging type: -registerForDraggedTypes: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html%23//apple_ref/occ/instm/NSView/registerForDraggedTypes: -raleigh On

Re: Drag and Drop in Same View

2010-09-19 Thread Raleigh Ledet
registerForDraggedTypes:[NSArray arrayWithObjects:NSDragPboard, nil]]; On Sep 19, 2010, at 7:19 PM, Raleigh Ledet wrote: You need to register as a dragging destination for your dragging type: -registerForDraggedTypes: http://developer.apple.com/library/mac/#documentation/Cocoa

Re: Drag and Drop in Same View

2010-09-19 Thread Raleigh Ledet
data] forType:@Jump]; [self dragImage:img at:localPt offset:sz event:theEvent pasteboard:pboard source:self slideBack:NO]; On Sep 19, 2010, at 9:00 PM, Raleigh Ledet wrote: NSDragPboard is the name of a pasteboard, not the dragged type. The drag type is the type of data you put

Re: Programmatic View Question

2010-09-18 Thread Raleigh Ledet
On Sep 17, 2010, at 6:09 AM, Richard Somers wrote: The reason for the programmatic view is there are lots of similar views with minor variations between them. Having a programmatic view allows the objects in the view and the layout and configuration of those objects to be controlled from

Re: Programmatic View Question

2010-09-18 Thread Raleigh Ledet
On Sep 18, 2010, at 9:29 AM, Richard Somers wrote: On Sep 18, 2010, at 9:36 AM, Raleigh Ledet wrote: Define lots. 10 or 100? Generally, you create a nib for each view and you programmatically load the nib with a view controller. Lots means 20 initially, up to 80 total later

Re: Small memory leaks in Cocoa guts

2010-09-07 Thread Raleigh Ledet
Create the smallest test app that you can that duplicates the problem. Then attach it to a new radar along with an instruments trace. -raleigh On Sep 7, 2010, at 7:18 AM, Vincent Habchi wrote: Hi again, I was chasing some leaks in my app; I may be too perfectionist, but I cannot reduce

Re: how do I get tracking, selection etc working with custom views in NSMenuItems?

2010-08-30 Thread Raleigh Ledet
If you have access to the WWDC site: https://developer.apple.com/wwdc/mac/library/samplecode/CustomMenus/Introduction/Intro.html If not, then the short answer is that you need to send the action method yourself and then close the menu. Personally, I prefer to wire up the action on the menu item

Re: Set the Cursor Position

2010-08-29 Thread Raleigh Ledet
On Aug 19, 2010, at 6:43 PM, Sherm Pendley wrote: On Thu, Aug 19, 2010 at 9:32 PM, Murat Konar mu...@pixar.com wrote: CGDisplayMoveCursorToPoint(CGDirectDisplayID display, CGPoint point); But heed the other's hints that, except for special classes of software (like a VNC app), software

Re: Create pinch/magnify event

2010-08-29 Thread Raleigh Ledet
You can not simulate these gestures. Please file a radar. -raleigh On Aug 20, 2010, at 1:42 PM, Joe Turner wrote: Hey, I'm trying to use CGEvent to create a pinch/magnify event, but I can't find any info on how to do it. I see there's a NSEventTypeMagnify for NSEvent, but the

Re: Creating a NSEvent with NSEventTypeMagnify

2009-11-25 Thread Raleigh Ledet
Are you trying to this internally inside your app? If so, why? -raleigh On Nov 24, 2009, at 11:57 AM, Andreas Hegenberg wrote: Hello everybody, I hope this is the correct mailinglist for my question. I want to create a NSEvent with the NSEventTypeMagnify and a specific magnification.

Re: Magic Mouse and NSTouch

2009-11-20 Thread Raleigh Ledet
No. The Magic mouse does not issue NSTouches. -raleigh On Nov 20, 2009, at 2:08 PM, Nathan Vander Wilt wrote: On Oct 27, 2009, at 10:44 PM, Scott Anguish wrote: There should be a tech note shortly that describes these capabilities. Is this the one?

Re: Tablet events from ordinary touchpad?

2009-09-21 Thread Raleigh Ledet
Tablet proximity events are sent to the first responder of the window the cursor is over. Which is probably not what you want. You have two options: 1) On 10.6, add a local event monitor to catch proximity events directly by the objects that care. 2) Create your own NSApplication subclass

Re: Handling mouse events in NSCell's?

2009-09-18 Thread Raleigh Ledet
I agree with Ken and strongly encourage you to use the three tracking methods already defined in the NSCell documentation raleigh. On Sep 18, 2009, at 2:12 AM, Ken Ferry wrote: Hi Aaron, You should take a look at the NSCell

Re: Printing with Snow Leopard

2009-09-18 Thread Raleigh Ledet
Hi Gerriet, You are printing the same instance of a view that is in your UI. So basically, your are trying to get the same view to print on two threads. Unless your view can handle concurrent drawing, this could be bad. NSTextView doesn't support concurrent drawing. I think you were

Re: Printing with Snow Leopard

2009-09-14 Thread Raleigh Ledet
On Sep 12, 2009, at 6:18 AM, Gerriet M. Denkmann wrote: Can you please log a bug on bugreporter.apple.com if you believe it is a bug in the Apple framework. Please include an isolated test case, if possible (that will greatly speed up investigation into the issue, especially if it is a

Re: NSTableView -setDataCell confusion

2009-06-29 Thread Raleigh Ledet
On Jun 28, 2009, at 10:05 PM, Quincey Morris wrote: On Jun 27, 2009, at 13:18, Chase Meadors wrote: I'm using AMIndeterminateProgressIndicatorCell (at least the drawing code) to imitate a progress indicator in the table view. To get it to use the custom cell, I've been calling

Re: Enter Key Behavior in NSTableView

2009-06-18 Thread Raleigh Ledet
I don't think this is normal. When a field editor is up, the Return should go to the Field Editor's keyDown: method, not TV. (for both cases) Is your File's Owner overriding textShouldEndEditing:? and preventing the Field Editor from ending? -raleigh On Jun 17, 2009, at 4:03 PM, Chris

Re: Simple printing hangs

2009-04-08 Thread Raleigh Ledet
Yes, this is a known problem with Cocoa printing from a Carbon application. We hope to have a fix in a future version of the OS. -raleigh On Apr 8, 2009, at 10:05 AM, James Walker wrote: I. Savant wrote: On Apr 7, 2009, at 8:33 PM, James Walker wrote: I want to print some text that will

Re: NSTableView behavior changes

2009-03-18 Thread Raleigh Ledet
Harry, On Mar 18, 2009, at 11:18 AM, Harry Plate wrote: snip After more googling last night, I found similar suggestions; in fact I ended up subclassing the NSTableView, and overriding keyDown: This worked very nicely. One problem that still troubles me is I cannot seem to trap cmdA -

Re: NSTableView behavior changes

2009-03-18 Thread Raleigh Ledet
No Edit menu? That explains why you get the beep, nothing processed the key equivalent. Add a select all menu in your menu bar somewhere and assign it's action to First Responder's selectAll: method. Ideally, do this in an Edit menu because that's where people expect to find it. (You

Re: Multiple NSTabViewItems that can't fit in a Single NSTabView

2009-01-28 Thread Raleigh Ledet
Rahul, This is a classic sign that you really really need to rethink your UI. No, really, tabs are the wrong solution to your problem. I don't know your exact problem, so I can't tell you what is the best solution in your case., but a multi-line tab control is definitely not it. Off the

Re: draw two strokes(lines) simultaneousy on NSView

2009-01-20 Thread Raleigh Ledet
Gami, I assume that you have some way of knowing which device any given set of coordinates are from. You need to combine this information with your previous location data. It sounds like you are doing this: xy = coordinateFromSomeDevice() draw line from prevXY to xy prevXY = xy With

Re: Tiger vs Leopard Printing

2009-01-08 Thread Raleigh Ledet
David, Does your code assume that the pages will be printed only once and in order during the print cycle? -raleigh On Jan 7, 2009, at 5:25 PM, David Blanton wrote: I build my app with the MACOSX10.4u.sdk. When the following is executed: [[NSPrintOperation

Re: NSTableView headers

2008-12-30 Thread Raleigh Ledet
Donnie, If you're app is 10.5 and up only, check out the following delegate methods in NSTableView.h - (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn: (NSTableColumn *)tableColumn row:(NSInteger)row - (BOOL)tableView:(NSTableView *)tableView isGroupRow:(NSInteger)row

Re: performance problem with IORegistryEntryCreateCFProperties

2008-12-09 Thread Raleigh Ledet
I totally agree with Herb here. If matching on a specific serial number is not feasible, at the very least, match on the IOHIDDevicesKey. As opposed to polling, you will be informed with the HID topology changes. One very important note though. I would avoid calling

Re: How to launch window of the application on clicking of dock icon?

2008-12-09 Thread Raleigh Ledet
This depends on your application. A document based application will automatically create a new untitled document for you. Which is generally what you want. If you app is really document based, its best to use the document based project template. If you app is not document based (say Mail

Re: NSTabView in my preference pane doesn't fill the view

2008-12-02 Thread Raleigh Ledet
Eric, The pref pane window adjusts vertically, but has a static width. The contents of your window are always centered horizontally in the system preference pane window. (ie springs are not expected to work) The width of the system preference pane changed between Tiger and Leopard. It

Re: About Ink drawing with wacom tablet

2008-11-05 Thread Raleigh Ledet
Hi John, As a former Wacom OS X Software Engineer, I believe I can be of some assistance. There are 2 routes you can go. Easy and Hard. Easy: Just grab any pertinent tablet info out of the mouseDragged event. You can make sure that the mouse event has tablet data via [event subType] ==

Re: About Ink drawing with wacom tablet

2008-11-05 Thread Raleigh Ledet
Here are the following ways to see NSTabletPoint events (or - tabletPoint:) 1. Between the mouseDown: and first mouseDragged:. During this period of time, other tablet properties may be changing (such as pressure or tilt). Once the user moves the pen enough to move the cursor at least 1