Prevent large offset when warping mouse cursor

2010-07-05 Thread Tron Thomas
I implemented the following custom view derived from NSView: #import "WarpCursorView.h" @interface WarpCursorView () - (CGPoint)centerOnScreen; @end @implementation WarpCursorView - (void)drawRect:(NSRect)dirtyRect { } - (void)mouseMoved:(NSEvent*)event { NSWindow* window = self.window;

Re: How to eliminate field editor from NSTextField?

2010-03-24 Thread Tron Thomas
on the NSTextField to eliminate the field editor. On Mar 23, 2010, at 17:10 o'clock, Kyle Sluder wrote: > On Tue, Mar 23, 2010 at 4:52 PM, Tron Thomas wrote: >> I tried that, and it did not work. The field editor remains sitting on top >> of the NSTextField. > > As

Re: How to eliminate field editor from NSTextField?

2010-03-23 Thread Tron Thomas
I tried that, and it did not work. The field editor remains sitting on top of the NSTextField. On Mar 23, 2010, at 16:39 o'clock, Kyle Sluder wrote: > On Tue, Mar 23, 2010 at 4:17 PM, Tron Thomas wrote: >> However, this desired behavior after the edit has completed is not achiev

How to eliminate field editor from NSTextField?

2010-03-23 Thread Tron Thomas
I have an NSTextField control that will display a context menu when someone right clicks on it. The context menu contains an item that can allow for editing of the control's text. The expectation is that once the edit if complete the control will revert to its default behavior in terms of disp

Re: Compile errors with Objective-C++ properties as STL/TR1 smart pointers

2009-12-26 Thread Tron Thomas
I tried (valueUser.value)->GetAmount()) and I still get the same errors. Date: Sun, 27 Dec 2009 11:47:35 +1100 From: Brian Bruinewoud Subject: Re: Compile errors with Objective-C++ properties as STL/TR1 smart pointers To: undisclosed-recipients: ; Cc: cocoa-dev@lists.apple.com Message-I

Compile errors with Objective-C++ properties as STL/TR1 smart pointers

2009-12-26 Thread Tron Thomas
I'm running into a issue using STL/TR1 smart pointers with Objective-C++ properties that I think is a bug, and I wanted to get some feedback before I submitted any bug report. The following code: #import #import class Value { public: explicit Value(int amount) : m_amount(amount){}

Re: Manipluate Cocoa Touch keyboard mode

2009-10-18 Thread Tron Thomas
textfield properties for keyboard type -- yandy On Oct 17, 2009, at 8:53 PM, Tron Thomas wrote: When an UITextField becomes active in a Cocoa Touch application, the device automatically displays a keyboard for character input. The keyboard always appears in alphabet mode so letters can be typed

Manipluate Cocoa Touch keyboard mode

2009-10-17 Thread Tron Thomas
When an UITextField becomes active in a Cocoa Touch application, the device automatically displays a keyboard for character input. The keyboard always appears in alphabet mode so letters can be typed. I have an application containing a singular UITextField that is intended for entering num

Selecting UITextField text

2009-10-17 Thread Tron Thomas
How can someone programmatically select all the text in an UITextField control? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)

Issues with NSWindowDelegate on multiple Mac OS X platforms

2009-10-06 Thread Tron Thomas
I recently got a MacBook Pro running Mac OS X 10.6.1 and Xcode 3.2 When I tried to build a project I was working on, I would get an error like this: warning: class 'MyClass' does not implement the 'NSWindowDelegate' protocol I was able to eliminate the warning by doing this: @interface M

Re: Profiling a drag and drop operation

2009-06-05 Thread Tron Thomas
Nick Zitzmann wrote: On Jun 5, 2009, at 4:11 PM, Tron Thomas wrote: What could allow me to determine why the new program is much slower when trying to deal with this dropped file? Have you tried reproducing the problem with Shark running and sampling the app? Shark comes with the

Profiling a drag and drop operation

2009-06-05 Thread Tron Thomas
I have a program whereby when I drag and drop a certain file onto the application's window, the application will take a few seconds before it displays the file contents. An older program that this newer program was based on and uses a lot of the same code, will display the same file data in ab

Re: Cocoa-dev Digest, Vol 6, Issue 742

2009-05-15 Thread Tron Thomas
On Fri, May 15, 2009 at 11:00 PM, Tron Thomas wrote: > Greg Parker wrote: >> >> On May 14, 2009, at 9:58 PM, Tron Thomas wrote: >>> >>> That did the trick. Â The stack trace allowed me to track down the cause >>> of the error. Â Becaus

Re: NSCFArray autoreleased with no pool in place

2009-05-15 Thread Tron Thomas
Greg Parker wrote: On May 14, 2009, at 9:58 PM, Tron Thomas wrote: That did the trick. The stack trace allowed me to track down the cause of the error. Because Objective-C++ does not have a concept of class static variables I had an NSArray defined in an anonymous namespace in the

Re: NSCFArray autoreleased with no pool in place

2009-05-15 Thread Tron Thomas
Greg Parker wrote: On May 14, 2009, at 9:58 PM, Tron Thomas wrote: That did the trick. The stack trace allowed me to track down the cause of the error. Because Objective-C++ does not have a concept of class static variables I had an NSArray defined in an anonymous namespace in the

Re: NSCFArray autoreleased with no pool in place

2009-05-14 Thread Tron Thomas
Clark Cox wrote: On Thu, May 14, 2009 at 6:43 PM, Tron Thomas wrote: I am writing a Cocoa application that links to many frameworks. For some reason when I debug the program the following message appears in the debug output: *** _NSAutoreleaseNoPool(): Object 0x409660 of class NSCFArray

NSCFArray autoreleased with no pool in place

2009-05-14 Thread Tron Thomas
I am writing a Cocoa application that links to many frameworks. For some reason when I debug the program the following message appears in the debug output: *** _NSAutoreleaseNoPool(): Object 0x409660 of class NSCFArray autoreleased with no pool in place - just leaking This message is occ

Re: Can't create windows with framework window nib

2009-02-21 Thread Tron Thomas
apper to define the class as a new type. Why does something like this work? What is the best way to solve this problem? On Feb 19, 2009, at 8:01 o'clock, Tron Thomas wrote: I am trying to write a framework that contains a window nib which can be used to create a window on demand by the a

Can't create windows with framework window nib

2009-02-19 Thread Tron Thomas
I am trying to write a framework that contains a window nib which can be used to create a window on demand by the application linking into the framework. The framework originally contained a singleton object was defined similar to this: @interface FrameworkObject : NSWindowController {

Re: performSelector:withObject fails with class object

2009-02-07 Thread Tron Thomas
Greg Parker wrote: On Feb 5, 2009, at 9:50 PM, Tron Thomas wrote: I have a couple of classes that are delcared like this: #import #import @interface SomeClass : Object { @private // Instance data members ... } + (SomeClass*)instanceFromData:(id)data; // Other methods ... @end Class

performSelector:withObject fails with class object

2009-02-05 Thread Tron Thomas
I have a couple of classes that are delcared like this: #import #import @interface SomeClass : Object { @private // Instance data members ... } + (SomeClass*)instanceFromData:(id)data; // Other methods ... @end @interface SomeOtherClass : Object { @private // Instance data mem

Re: How to use a button to update an application with a text field value

2008-08-07 Thread Tron Thomas
I attempted to try out what you were suggesting to see how well I understood it. I got a compiler warning that said my controller class may not respond to -selection. Also, in the case where a controller might have selector that take multiple arguments, I'm not sure how I could provide the ar

Re: How to use a button to update an application with a text field value

2008-08-06 Thread Tron Thomas
omething called selector, I'm not sure what that is for. In this case, the user interface is so simple there is no need to worry about the user tabbing to another control. There is no other control they can tab to. Ken Thomases wrote: On Aug 6, 2008, at 12:22 AM, Tron Thomas wrote: The

Re: How to use a button to update an application with a text field value

2008-08-05 Thread Tron Thomas
how that works. Ken Thomases wrote: On Aug 5, 2008, at 10:45 PM, Tron Thomas wrote: One thing I found was that if I implemented an action in my controller and connected it to the button, the controller could then call the commitEditing method in response to that action. This could accomplish

Re: How to use a button to update an application with a text field value

2008-08-05 Thread Tron Thomas
x27;s -stringValue: after you call commitEditing? In other words pull the value from the field instead of trying to provoke it into pushing its value somewhere. Much easier, no? hth, Graham On 6 Aug 2008, at 1:45 pm, Tron Thomas wrote: What can help me to implement the functional

How to use a button to update an application with a text field value

2008-08-05 Thread Tron Thomas
I am writing a Cocoa application that contains an NSTextField control. Things are such that when a user types a value into this control and hits enter, a binding will update an NSController instance in the application with the value contained in the text field. This is more elegant that havin

Re: Cocoa binding always produces zero for bound value

2008-03-24 Thread Tron Thomas
Ken Thomases wrote: On Mar 23, 2008, at 8:18 PM, Tron Thomas wrote: At this point, the compiler only knows that object is an id. It doesn't know the specific class. So, of any of the "value" methods it might know about, it doesn't know which specific one is meant. No

Cocoa binding always produces zero for bound value

2008-03-23 Thread Tron Thomas
I am having a problem with Cocoa bindings that I cannot figure out. There is some object that is observing the value of another object. An example for the relevant implementation of the classes is as follows: @implementation SomeObject - (id)initWithObject: (AnotherObject*)object { self