Modal Window for NSTextField

2012-01-02 Thread Dany Golubitsky
Hello everyone! I would like to ask your help with a specific problem I have. I need to implement the following thing: There is a control displaying numeric value. When you Double-Click on a control small white window appears where you can enter the value, and when you press enter the value

Re: Modal Window for NSTextField

2012-01-02 Thread Michael Babin
On Jan 2, 2012, at 6:02 AM, Dany Golubitsky wrote: I need to implement the following thing: There is a control displaying numeric value. When you Double-Click on a control small white window appears where you can enter the value, and when you press enter the value will be updated. You can

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
Sorry Jens, I read too quickly. The app is for the physical and engineering sciences, and will perform a least squares fit of experimental data to different physical models.The models for the experimental data will be in the plugins, and the user will likely only need to the load a few

UIView is sized out of the blue

2012-01-02 Thread Alexander Reichstadt
Hi, when returning from my detail view the list view is sized out of the blue. in viewDidAppear I do this: - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; if ([theSearchbar.text length]){ [theSearchbar becomeFirstResponder]; [self

RE: Modal Window for NSTextField

2012-01-02 Thread Dany Golubitsky
Thank you! As for field editor - can it appear and disappear during runtime? Indeed, I do not familiar with this approach. About beginSheetModalForWindow - indeed, I tried to do the following either: [textField beginSheet:[textField window] ModalForWindow:[superView window]

Re: UIView is sized out of the blue

2012-01-02 Thread Alexander Reichstadt
I found the issue. The navigation bar was first shown and then removed, thus I ended calculating a wrong size. Thanks On 02.01.2012, at 16:17, Alexander Reichstadt wrote: Hi, when returning from my detail view the list view is sized out of the blue. in viewDidAppear I do this: -

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Steve Sisak
At 9:47 AM -0500 1/2/12, Grandinetti Philip wrote: So, I can't really define the static variable pointing to my library in the plugin.It needs to be defined in the library that handles all the SI units. Hi Philip, This is dusting off brain cells that I haven't used in awhile but,

Re: Modal Window for NSTextField

2012-01-02 Thread Michael Babin
On Jan 2, 2012, at 9:22 AM, Dany Golubitsky wrote: Thank you! As for field editor - can it appear and disappear during runtime? Indeed, I do not familiar with this approach. The field editor is a single NSTextView object that is shared among all the controls in a single window, including

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
Hi Steve, You raise a fundamental issue that I admit I don't completely understand. What are the differences between linking against a static library versus a framework. If I turned all my static libraries into a framework would the plugin see the static variables in the framework without

NSTextView, spell checking and temporary attributes

2012-01-02 Thread Martin Hewitson
Dear list, I have an NSTextView subclass which I've set up to highlight matching words in view. So if the user highlights a word, all matching words are highlighted. I'm doing the highlighting using a temporary attribute on the layout manager: NSBackgroundColorAttributeName. In order for this

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Jens Alfke
On Jan 2, 2012, at 7:52 AM, Grandinetti Philip wrote: You raise a fundamental issue that I admit I don't completely understand. What are the differences between linking against a static library versus a framework. If I turned all my static libraries into a framework would the plugin

Re: Modal Window for NSTextField

2012-01-02 Thread Seth Willits
On Jan 2, 2012, at 4:02 AM, Dany Golubitsky wrote: // Make the text field in focus, and start an editing session on it [textField becomeFirstResponder]; -becomeFirstResponder is a notification method for when the responder becomes first responder; it doesn't *make* it first responder. For

CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion

2012-01-02 Thread Michael Crawford
I'm trying to hide the cursor when in full-screen mode on Lion but the CGDisplayHideCursor call immediately takes the display out of full-screen mode. It doesn't matter which call comes first, I get the same result every time. Here's the code: -

Re: CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion

2012-01-02 Thread Seth Willits
On Jan 2, 2012, at 10:30 AM, Michael Crawford wrote: I'm trying to hide the cursor when in full-screen mode on Lion but the CGDisplayHideCursor call immediately takes the display out of full-screen mode. It doesn't matter which call comes first, I get the same result every time. Works

Re: NSTextView, spell checking and temporary attributes

2012-01-02 Thread Seth Willits
On Jan 2, 2012, at 10:20 AM, Martin Hewitson wrote: [[self layoutManager] removeTemporaryAttribute:NSBackgroundColorAttributeName forCharacterRange:visibleRange]; This has the unfortunate side-effect of removing the red squiggly lines which indicate misspelled words. Hmm. Works fine

Re: CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion

2012-01-02 Thread Michael Crawford
Seth, don't run from inside Xcode. Start the app from the finder. I find that in that instance, it goes to full screen and then immediately exits full screen. Here is a trace: 1/2/12 1:51:21.428 PM JTVideoPlayer: -[JTVAppDelegate window:willUseFullScreenPresentationOptions:] 1/2/12

Re: CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion

2012-01-02 Thread Seth Willits
Still works fine. Can you repeat it in a sample project that I can test? On Jan 2, 2012, at 11:27 AM, Michael Crawford wrote: Seth, don't run from inside Xcode. Start the app from the finder. I find that in that instance, it goes to full screen and then immediately exits full screen.

Re: Setting ApplePressAndHoldEnabled key for specific application.

2012-01-02 Thread Jens Alfke
On Jan 1, 2012, at 8:44 PM, Vaibhao Mahore wrote: 2. I have tried with setting defaults for my application with ApplePressAndHoldEnabled being NO. I can even read defaults for my application using defaults read my application bundle-identifier Still I am unable to see Press and

Re: CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion

2012-01-02 Thread Kyle Sluder
On Jan 2, 2012, at 11:27 AM, Michael Crawford michaelacrawf...@me.com wrote: Seth, don't run from inside Xcode. Start the app from the finder. I find that in that instance, it goes to full screen and then immediately exits full screen. Try launching with Shift held down to clear

Re: NSTextView, spell checking and temporary attributes

2012-01-02 Thread Douglas Davidson
Are you making other modifications to temporary attributes? The spelling indicator does use various temporary attributes, though not background color, so (for example) clearing temporary attributes would interfere with it. Douglas Davidson On Jan 2, 2012, at 10:20 AM, Martin Hewitson

Re: NSTextView, spell checking and temporary attributes

2012-01-02 Thread Martin Hewitson
Yes, it seems I was mistaken. I also made a test app and can't reproduce the problem. So it must be something else I'm doing with the textview that stops the continuous spell checking from working. Oh well, more digging to do. Thanks for confirming! Martin On 2, Jan, 2012, at 08:07 PM, Seth

Re: CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion

2012-01-02 Thread Michael Crawford
Thank you, Kyle. That works. -Michael On Jan 2, 2012, at 3:16 PM, Kyle Sluder wrote: On Jan 2, 2012, at 11:27 AM, Michael Crawford michaelacrawf...@me.com wrote: Seth, don't run from inside Xcode. Start the app from the finder. I find that in that instance, it goes to full screen and

Re: CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion

2012-01-02 Thread Michael Crawford
Seth, I appreciate your offer to help out by testing some code. Now that Kyle has identified what is going on, I'm looking into programmatically disabling or overriding the window restoration behavior for my app. -Michael On Jan 2, 2012, at 4:44 PM, Michael Crawford wrote: Thank you, Kyle.

Re: CGDisplayHideCursor and -[NSWindow toggleFullScreen] don't get along on Lion

2012-01-02 Thread Michael Crawford
For the benefit of anyone else who is watching and also has limited experience with some of the new Lion features, a call to [NSWindow setRestorable:] or flipping a switch in the interface builder UI for the NSWindow instance, handily solves the problem. -Michael On Jan 2, 2012, at 4:56 PM,

need to use NSManagedContext performBlock for contexts with NSMainQueueConcurrencyType?

2012-01-02 Thread davelist
If I create a child context of type NSMainQueueConcurrencyType such as: context = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; [context setParentContext:mainContext]; do I need to call [context performBlock:^{ // some code }]; or can I just use

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
Hi Jens, Thanks for your patience. I'm getting a better understanding. Also, it helped a bit reading through ... http://developer.apple.com/library/mac/#documentation/developertools/conceptual/MachOTopics and

NSTextField subclass not working properly

2012-01-02 Thread Devarshi Kulshreshtha
Hi all, I am using below code to subclass NSTextField- - (void)drawRect:(NSRect)dirtyRect { // black outline NSRect blackOutlineFrame = NSMakeRect(0.0, 0.0, [self bounds].size.width, [self bounds].size.height-1.0); NSGradient *gradient = nil; if ([NSApp isActive]) {

Re: NSTextField subclass not working properly

2012-01-02 Thread Seth Willits
On Jan 2, 2012, at 10:35 PM, Devarshi Kulshreshtha wrote: First Problem: When a text field is selected, it is showing overlapping white edges over round corners as shown in below image: That's the field editor drawing its background. Tweak it in setUpFieldEditorAttributes: -- Seth Willits

File UTI on 10.6.8

2012-01-02 Thread Martin Hewitson
Dear list, I want to check if a file extension is registered as a text file. So I made a little category method on NSString like this: - (BOOL)isText { BOOL fileIsText = NO; CFStringRef fileExtension = (CFStringRef) self; CFStringRef fileUTI =