NSResponder / acceptsFirstResponder

2010-03-12 Thread David Blanton
How does one get a views acceptFirstResponder method called without having to click on the view? If a class subclasses NSResponder so it can get events how does one get an instance of this class in the responder chain? -db ___ Cocoa-dev mailing

Re: Custom View in Toolbar

2010-03-08 Thread David Blanton
. Analogous situation here. So I ask again, how does one display a custom view containing controls in a toolbar? -db On Mar 5, 2010, at 2:53 PM, Kyle Sluder wrote: On Fri, Mar 5, 2010 at 10:45 AM, David Blanton aired...@tularosa.net wrote: I have called every possible method on the view

Re: Custom View in Toolbar

2010-03-08 Thread David Blanton
specific I can be. Thanks. -db On Mar 8, 2010, at 10:21 AM, Kyle Sluder wrote: On Mon, Mar 8, 2010 at 8:56 AM, David Blanton aired...@tularosa.net wrote: Apparently you do as the custom view containing two buttons placed in the tool bar is not displayed. There is no reason to believe

Re: Custom View in Toolbar

2010-03-08 Thread David Blanton
no clue about any of this so I will end the discussion. Thanks for the run around. -db On Mar 8, 2010, at 12:10 PM, Kyle Sluder wrote: On Mon, Mar 8, 2010 at 10:58 AM, David Blanton aired...@tularosa.net wrote: @implementation View I would not recommend using this as the name for your NSView

is as high as mine

2010-03-08 Thread David Blanton
, Mar 8, 2010 at 11:19 AM, David Blanton aired...@tularosa.net wrote: You did not look at what I provided. Yes, I did. But I got confused by your second screenshot and got it in my head that you had the view itself selected when you in fact had the toolbar item selected. So that was in fact my

Custom View in Toolbar

2010-03-05 Thread David Blanton
Using IB I have placed a custom view in a window toolbar. The custom view contains buttons. The buttons are connected to actions. The custom view as a tool bar item auto validates. In IB the custom view and its contained buttons appears in the tool bar and customization palette. The

Re: Custom View in Toolbar

2010-03-05 Thread David Blanton
is trivial is near impossible with Cocoa. The Windows guys here are laughing their ... off at my inability to accomplish a trivial MFC task in a Cocoa equivalent. Frustrated. -db On Mar 5, 2010, at 10:23 AM, David Blanton wrote: Using IB I have placed a custom view in a window toolbar

NSSegmentedControl

2010-03-04 Thread David Blanton
Is it possible to change the height of an NSSegmentedControl? IB gives access the the width of segments but not height. If subclass what would the method be to change the height? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Click in Table

2010-03-03 Thread David Blanton
I have a window with an NSComboBox and anNSTableView When first displayed the NSComboBox has focus When I click in the NSTableView the NSComboBox action is called followed by should select row and selection changed delegate methods for the table being called This does not seem correct to

Re: Click in Table [More Pilot Error]

2010-03-03 Thread David Blanton
The NSComBox was 'selectable' and 'editable' turned that off and behaviour is correct On Mar 3, 2010, at 6:06 PM, David Blanton wrote: I have a window with an NSComboBox and anNSTableView When first displayed the NSComboBox has focus When I click in the NSTableView the NSComboBox action

loadNibNamed:owner

2010-03-02 Thread David Blanton
I have a nib file named Hoops. In this nib is an NSPanel. Outlets and Actions are defined in Files Owner and connected to the Panel. In code I create an object that has the corresponding Outlets / Actions as File's Owner. I then loadNibNamed:owner with owner as the object just created.

Re: loadNibNamed:owner [Pilot Error]

2010-03-02 Thread David Blanton
I inadvertently set a view in the nib to the class I was instancing. Sorry for the noise. -db On Mar 2, 2010, at 2:53 PM, David Blanton wrote: I have a nib file named Hoops. In this nib is an NSPanel. Outlets and Actions are defined in Files Owner and connected to the Panel. In code

Re: loadNibNamed:owner [Pilot Error]

2010-03-02 Thread David Blanton
those details (extremely substantially if you wanted) and as long as you didn't break your contract with your client (your object's API) then it will still work and no other code needs to change. --Graham On 03/03/2010, at 9:43 AM, David Blanton wrote: I inadvertently set a view

Menu Items

2010-03-01 Thread David Blanton
I connected a menu item to an action in First Responder. The action is defined in a view. This, apparently, does not define the Target as I put validateMenuItem in the same view as the action but it is not called. So, how does one define the Target? The view and the Menu Item are in

Re: Menu Items

2010-03-01 Thread David Blanton
. This does make sense in the context of the program as the menu item I want to invoke is related to the view. I'm gettin' it. Thanks to all! -db On Mar 1, 2010, at 5:11 PM, Graham Cox wrote: On 02/03/2010, at 10:47 AM, David Blanton wrote: I connected a menu item to an action in First

Re: Menu Items

2010-03-01 Thread David Blanton
Cool .. .hook up the window's initialFirstResponder outlet to the view is the last piece for me. Thanks a bunch Graham! - db On Mar 1, 2010, at 8:12 PM, Graham Cox wrote: On 02/03/2010, at 2:07 PM, David Blanton wrote: Then the light bulb went off ... and by clicking in the view

NSMenuItem Action

2010-02-27 Thread David Blanton
What is the best practice for connecting menu items to their actions? Is it IB, is programatically? If IB what is the process? - db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: NSMenuItem Action

2010-02-27 Thread David Blanton
2¢ On Sat, Feb 27, 2010 at 2:40 PM, David Blanton aired...@tularosa.net wrote: What is the best practice for connecting menu items to their actions? Is it IB, is programatically? If IB what is the process? - db ___ Cocoa-dev mailing list (Cocoa

Re: How to get my application version from inside my code?

2010-02-27 Thread David Blanton
You don't need to , it is displayed automagically! On Feb 27, 2010, at 2:21 PM, Bengt Nilsson wrote: Hi! I need to access the bundle version of my application from inside my code to show it in the About.. box. How can I do this? BN ___

Re: NSColorPanel changeColor not called

2010-02-25 Thread David Blanton
/2010, at 6:21 PM, David Blanton wrote: Well, no. I have run it modal from a modal panel non-modal from a modal panel non-modal from a non-modal panel changeColor is never called. I am stumped and going to pour a glass of wine and play a game of chess ! - db On Feb 24

NSDeviceResolution

2010-02-25 Thread David Blanton
[window deviceDescription] is to return an NSDictionary of device description data NSDeviceResolution key is to return an NSString representing an NSSIze Calling NSSizeFromString on this returned string causes and exception -[NSConcreteValue getCString:maxLength:encoding:]: unrecognized

Re: NSColorPanel changeColor not called [work around]

2010-02-25 Thread David Blanton
On 25/02/2010, at 6:21 PM, David Blanton wrote: Well, no. I have run it modal from a modal panel non-modal from a modal panel non-modal from a non-modal panel changeColor is never called. I am stumped and going to pour a glass of wine and play a game of chess ! - db

Re: NSDeviceResolution

2010-02-25 Thread David Blanton
I did the below ... duh, all good now! On Feb 25, 2010, at 2:50 PM, Greg Parker wrote: NSValue* v = [dd valueForKey:NSDeviceResolution]; NSSize sz = [v sizeValue]; ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Application Menu - Preferences

2010-02-24 Thread David Blanton
In an NSDocument app where should or how should the Application Preferences menu item be connected? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Application Menu - Preferences

2010-02-24 Thread David Blanton
the target and action. Am I doing too much? Is there a 'less code' approach? -db On Feb 24, 2010, at 1:46 PM, Paul Bruneau wrote: On Feb 24, 2010, at 3:28 PM, David Blanton wrote: In an NSDocument app where should or how should the Application Preferences menu item be connected? This is kind

Re: Application Menu - Preferences

2010-02-24 Thread David Blanton
, at 2:39 PM, Quincey Morris wrote: On Feb 24, 2010, at 12:58, David Blanton wrote: What I was really getting at is how to set the target / action for when the item is selected. Here is what I did, so if this is way off base please let me know. I sub-classed NSMenuItem and set

How to call on id

2010-02-24 Thread David Blanton
I have an ivar tyoed as id as id m_view at some point m_view gets set to a particular view I would like to send messages to m_view as [m_view selector] but since it is not typed I get the message 'struct objc_object' has no member named 'selector' How does one work with / around this

Re: How to call on id

2010-02-24 Thread David Blanton
earlier ! On Feb 24, 2010, at 8:31 PM, David Blanton wrote: I have an ivar tyoed as id as id m_view at some point m_view gets set to a particular view I would like to send messages to m_view as [m_view selector] but since it is not typed I get the message 'struct objc_object' has

Re: How to call on id

2010-02-24 Thread David Blanton
Yeah! 2) looks like the answer ... I am trying now ... Thanks! -db On Feb 24, 2010, at 8:52 PM, Andrew Farmer wrote: On 24 Feb 2010, at 19:43, David Blanton wrote: I misspoke earlier. What I want to do is access an an ivar in m_view such as m_cpp wher m_cpp is an instance of a C

NSColorPanel changeColor not called

2010-02-24 Thread David Blanton
changeColor is listed as a delegate method for NSColorPanel Here is my code - (IBAction)color:(id)sender { NSColorPanel* cp; cp = [NSColorPanel sharedColorPanel]; [cp setDelegate:self]; [cp setContinuous:YES]; NSLog(@%@,[cp delegate]); [NSApp

Re: NSColorPanel changeColor not called

2010-02-24 Thread David Blanton
wrote: On 25/02/2010, at 5:44 PM, David Blanton wrote: Am I missing something obvious? Generally apps don't run the color panel modally. I believe there is a way to do it, I've seen it in some apps with an added OK/Cancel button, though it seems rare and weird. It may be that running

selectItemWithObjectValue

2010-02-19 Thread David Blanton
I get this warning, but I never call these methods: 2010-02-19 09:56:29.975 Customize It[338:10b] *** -[NSComboBoxCell selectItemWithObjectValue:] should not be called when usesDataSource is set to YES 2010-02-19 09:56:29.976 Customize It[338:10b] *** -[NSComboBoxCell

Re: selectItemWithObjectValue

2010-02-19 Thread David Blanton
AM, David Blanton aired...@tularosa.net wrote: I get this warning, but I never call these methods: 2010-02-19 09:56:29.975 Customize It[338:10b] *** -[NSComboBoxCell selectItemWithObjectValue:] should not be called when usesDataSource is set to YES I do call [self

Re: NSFullUserName() always returns the user name at app launch?

2010-02-04 Thread David Blanton
No. They are logged n a user A, changing the name to user B is meaningless until they log out / login in. My guess anyway. On Feb 4, 2010, at 9:26 AM, Joar Wingfors wrote: On 4 feb 2010, at 00.27, Laurent Daudelin wrote: I'm using NSFullUserName() to get the user name of the currently

Rosetta Quandry

2010-02-02 Thread David Blanton
I run my app on my Intel MacBook Pro. Get Info shows it as Universal. I have a customer who must turn Rosetta on else the app crashes. Is there any rhyme or reason to this? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Rosetta Quandry

2010-02-02 Thread David Blanton
0x2ab9 0x1000 + 6841 On Feb 2, 2010, at 8:48 PM, Nick Zitzmann wrote: On Feb 2, 2010, at 8:07 PM, David Blanton wrote: I run my app on my Intel MacBook Pro. Get Info shows it as Universal. I have a customer who must turn Rosetta on else the app crashes. Is there any rhyme

Re: Rosetta Quandry

2010-02-02 Thread David Blanton
, 2010, at 9:20 PM, Nick Zitzmann wrote: On Feb 2, 2010, at 9:11 PM, David Blanton wrote: Yes, I have the crash log that is generated when launching with Rosetta off which I include here for list perusal. Interestingly, I just got off the phone with an Apple Consulting Engineer who let me know

Re: Rosetta Quandry

2010-02-02 Thread David Blanton
, David Blanton wrote: I run my app on my Intel MacBook Pro. Get Info shows it as Universal. I have a customer who must turn Rosetta on else the app crashes. Is there any rhyme or reason to this? Assuming you meant to put an or between the on and else, did you ask the user for the crash log

Re: Rosetta Quandry

2010-02-02 Thread David Blanton
iMac since Apple has done two firmware update, held shipment for three weeks at on time, and I only get this error on three customer's 27 iMacs. -db On Feb 2, 2010, at 10:52 PM, Jens Alfke wrote: On Feb 2, 2010, at 8:11 PM, David Blanton wrote: 4 libstdc++.6.dylib 0x95628fda

NSSlider

2010-01-28 Thread David Blanton
I cannot discern a method that tracks the knob on and NSSlider. Is it possible to track an NSSlider? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: NSSlider

2010-01-28 Thread David Blanton
Continuous Check Box did the trick .. Thanks! -db On Jan 28, 2010, at 10:11 AM, Jens Alfke wrote: On Jan 28, 2010, at 9:05 AM, David Blanton wrote: I cannot discern a method that tracks the knob on and NSSlider. Check the continuous checkbox in IB (or set the object property of the same

Re: NSTabView

2010-01-26 Thread David Blanton
Ok, so there is no flag to set. So how would one deal with the situation I described? I want to see all the tab items ... are there multiple rows? Any help or suggestions, please. -db On Jan 25, 2010, at 11:46 PM, Scott Anguish wrote: On Jan 25, 2010, at 10:34 PM, David Blanton wrote: I

NSComboBox or Better Choice

2010-01-25 Thread David Blanton
I would like to display an image and descriptive text is some sort of popup list such as an NSComboBox. Can the NSComboBoxCell draw method be overridden to display an image along with text? Or, what is the best way to accomplish a pop up list of images and descriptive text? -db

NSTabView

2010-01-25 Thread David Blanton
I have a fixed size NSTabView that displays 4 NSTabViewITems very nicely. It is possible that the application may want to add more NSTabViewItems. Is there a flag to set (somewhere) so that added items will not be truncated to the view but display like Safari indicating more items and

Observed behaviour - Is this expected

2010-01-25 Thread David Blanton
Class A is a subclass of NSView Class B is a subclass of Class A Class A and Class B are in a NIB. Class A as an Object - the blue cube Class B as a view in a window. When the program runs: Class A's init method is called Class B's awakeFromNib is called Class A's awakeFromNib is called NOTE

Re: Observed behaviour - Is this expected

2010-01-25 Thread David Blanton
On Jan 25, 2010, at 8:51 PM, Kyle Sluder wrote: On Mon, Jan 25, 2010 at 7:43 PM, David Blanton aired...@tularosa.net wrote: Class A is a subclass of NSView Class B is a subclass of Class A Class A and Class B are in a NIB. Classes don't live in nibs. You mean an object of class

Re: Observed behaviour - Is this expected

2010-01-25 Thread David Blanton
to the CocoaNibs.html -db On Jan 25, 2010, at 8:51 PM, Kyle Sluder wrote: On Mon, Jan 25, 2010 at 7:43 PM, David Blanton aired...@tularosa.net wrote: Class A is a subclass of NSView Class B is a subclass of Class A Class A and Class B are in a NIB. Classes don't live in nibs. You mean

View Handling

2010-01-22 Thread David Blanton
I have two views that need to occupy the same space and have their visibility toggled via an action. I first overlaid one on the other setting it hidden, all done in IB. Then in code set one hidden the other visible at which time it dawned on me that one view was contained in the other and

Re: View Handling

2010-01-22 Thread David Blanton
NSTabView w/o tabs ... yeah that's the ticket! Thanks. -db On Jan 22, 2010, at 4:45 PM, Scott Anguish wrote: NSTabView with tabs that aren’t visible? On Jan 22, 2010, at 4:57 PM, David Blanton wrote: I have two views that need to occupy the same space and have their visibility toggled

Re: Moderated post on self going out of scope

2010-01-19 Thread David Blanton
Yes, the C++ Class is in a BSD Static library. I am checking the compiler options etc now. I'll let you know the result. -db On Jan 18, 2010, at 10:09 PM, Ken Thomases wrote: On Jan 18, 2010, at 9:50 PM, David Blanton wrote: So I set stack-protector-all as other C++ flags and got

Unembed Objects

2010-01-18 Thread David Blanton
I have embeded two views in a split view then embeded that result with another view in a split view to get a resulting vert splitter and horz splitter. Now I would like to Uembed an cannot no matter what selections I do get Uembed to enable in the IB Layout Menu. Any suggestions ? Please

Moderated post on self going out of scope

2010-01-18 Thread David Blanton
I posted this with two images from the debugger but it is awaiting moderator screening. In a view IBAction I instance a C++ class. As soon as the class is instanced, self in the variables window, goes to 0x0 ! This worked fine until I embedded the view win a split view! Now moving the

Re: Moderated post on self going out of scope

2010-01-18 Thread David Blanton
Good tips Ken ... I am on it! On Jan 18, 2010, at 8:28 PM, Ken Thomases wrote: On Jan 18, 2010, at 9:17 PM, David Blanton wrote: In a view IBAction I instance a C++ class. As soon as the class is instanced, self in the variables window, goes to 0x0 ! Try logging the value of self, rather

Re: Moderated post on self going out of scope

2010-01-18 Thread David Blanton
Ok. The C++ constructor does nothing more than assign a member variable by calling a function. And, the NSLog of self breaks as well! Hmmm ! On Jan 18, 2010, at 8:32 PM, David Blanton wrote: Good tips Ken ... I am on it! On Jan 18, 2010, at 8:28 PM, Ken Thomases wrote: On Jan 18, 2010

Re: Moderated post on self going out of scope

2010-01-18 Thread David Blanton
Oh I forgot to do -fstack-protector-all where do I set that? On Jan 18, 2010, at 8:28 PM, Ken Thomases wrote: On Jan 18, 2010, at 9:17 PM, David Blanton wrote: In a view IBAction I instance a C++ class. As soon as the class is instanced, self in the variables window, goes to 0x0 ! Try

Re: Moderated post on self going out of scope

2010-01-18 Thread David Blanton
So I set stack-protector-all as other C++ flags and got _stack_chk_fail So this means the C++ constructor is corupting the stack? -db On Jan 18, 2010, at 8:28 PM, Ken Thomases wrote: On Jan 18, 2010, at 9:17 PM, David Blanton wrote: In a view IBAction I instance a C++ class. As soon

Scrolling

2010-01-15 Thread David Blanton
A custom view sub-classed from NSView when embedded in an NSScrollView has its drawRect method called when the NSScrollers are manipulated by the user. Is there a method further up the (NSResponder?) chain where scoll activity can be overridden? And if so, is there an example or sample

Re: Scrolling

2010-01-15 Thread David Blanton
trackKnob]; // do something with _curValue } do something no that mouse is released } Has anyone done something like this? -db On Jan 15, 2010, at 9:42 AM, David Blanton wrote: A custom view sub-classed from NSView when embedded in an NSScrollView has its drawRect method called when

Re: Scrolling [SOLVED]

2010-01-15 Thread David Blanton
Never mind. Figured it all out. If anyone is interested ping me off- list. -db ___ 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

Re: Scrolling [SOLVED]

2010-01-15 Thread David Blanton
who encounter your thread to contact you about the solution. Please share your solution with the list, it's silently appreciated by many a web searcher. :) --Kyle Sluder On Fri, Jan 15, 2010 at 10:22 AM, David Blanton aired...@tularosa.net wrote: Never mind. Figured it all out. If anyone

Re: Scrolling [SOLVED]

2010-01-15 Thread David Blanton
, 2010, at 3:47 PM, Graham Cox wrote: On 16/01/2010, at 9:19 AM, David Blanton wrote: - (void)drawRect:(NSRect)rect { [super drawRect:rect]; ... if(m_scrolling) { NSLog(@drawRect scrolling); float v = 100

IBLibraryObjectTemplate

2010-01-14 Thread David Blanton
This appeared automagically in my .xib. Can anyone tell me what this is and how it got there: -db 2010-01-14 11:50:44.021 Customize It[9646:813] Unknown class IBLibraryObjectTemplate in Interface Builder file. ___ Cocoa-dev mailing list

NSDocument

2010-01-14 Thread David Blanton
When my document based app starts up the awakeFromNib method in my NSDocument subclass is called. When I choose Open a new NSDocument is instanced but this does not call awakeFromNib. Am I missing a setting? I need awakeFromNib to be called for any instance on my NSDocument sublass. I

Re: NSDocument

2010-01-14 Thread David Blanton
if any one of many init methods are implemented and awakeFromNib is implemented these are called. So, I do not understand what you have said. - db On Jan 14, 2010, at 1:53 PM, Matt Neuburg wrote: On Thu, 14 Jan 2010 12:57:57 -0700, David Blanton aired...@tularosa.net said: When my document

Re: NSDocument

2010-01-14 Thread David Blanton
Only one nib (xib) that was created (MyDocument.xib) when the project was created form the document based app template. I am looking at the Open as Files Owner ... hmm not sure. Thanks. -db On Jan 14, 2010, at 1:27 PM, Quincey Morris wrote: On Jan 14, 2010, at 11:57, David Blanton wrote

Re: IBLibraryObjectTemplate

2010-01-14 Thread David Blanton
) are library object templates. Kevin On 14 Jan 2010, at 12:51, David Blanton wrote: This appeared automagically in my .xib. Can anyone tell me what this is and how it got there: -db 2010-01-14 11:50:44.021 Customize It[9646:813] Unknown class IBLibraryObjectTemplate in Interface Builder

Re: NSDocument

2010-01-14 Thread David Blanton
ensues. On 2010-01-14 16:19, David Blanton wrote: Thank you for commenting but now I am really confused. When a project is created from the document based template it contains files MyDocument.h and MyDocument.m which define the interface and implementation for a class MyDocument

Re: NSDocument

2010-01-14 Thread David Blanton
No. This is a vanilla document based app with two nibs, MainMenu and MyDocument as created by the project template. The document window is in MyDocument.xib. On Jan 14, 2010, at 2:41 PM, Jeffrey Oleander wrote: On Thu, 2010/01/14, David Blanton aired...@tularosa.net wrote: From: David

Re: NSDocument

2010-01-14 Thread David Blanton
2010, at 22:51, David Blanton wrote: No. This is a vanilla document based app with two nibs, MainMenu and MyDocument as created by the project template. The document window is in MyDocument.xib. What is specified as the class of file's owner in the nib/xib file: (a subclass of) NSDocument

NSScroller knob reposition

2010-01-13 Thread David Blanton
I am seeing some strange behavior. I set the knob position of the horz and vert scrollers as follows: - (void)centerScrollers { [m_hScroller setDoubleValue:0.5]; [m_vScroller setDoubleValue:0.5]; } Then when I move either knob with the mouse the other knob

Hiding the Window Content View

2010-01-08 Thread David Blanton
When the content view of a window has setHidden:YES called on it the result is a Title Bar, Size Control and a body (for lack of a better term). Is it possible to get rid of this body leaving just the Title Bar and Size Control. The effect would be that when dragging the Title Bar the

Re: Workspace Configuration

2010-01-08 Thread David Blanton
How I don't know but View / Smart Groups / Error Warnings wasn't on. But still, using Xcode 3.1.2, why do my previous XC 2.1.4 projects not show inline: Picture 3.png but only this inline: Picture 1.png On Jan 8, 2010, at 12:12 PM, David Blanton wrote: OK. I guess the real question

Flicker Free Drawing

2010-01-08 Thread David Blanton
Does NSBackingStoreBuffered guarantee there will be no flicker when drawing? That is, I won't see the content view background drawn, then myview background drawn, then myview whatever I draw into bounds rect ... which would be flicker, flicker if I am drawing all through resizing the

Re: Hiding the Window Content View

2010-01-08 Thread David Blanton
I am just trying to find the best way to do rapid drawing with no flicker. I don't see an override on background drawing so I was wanting to eliminate the backgroud of the content view. On Jan 8, 2010, at 1:30 PM, Kyle Sluder wrote: On Fri, Jan 8, 2010 at 12:01 PM, David Blanton aired

Re: Flicker Free Drawing

2010-01-08 Thread David Blanton
). It is one of the joys of programming on the Mac (compared to Windows). Paul Sanders - Original Message - From: David Blanton aired...@tularosa.net To: cocoa-dev List cocoa-dev@lists.apple.com Sent: Friday, January 08, 2010 8:38 PM Subject: Flicker Free Drawing Does NSBackingStoreBuffered

Re: Flicker Free Drawing

2010-01-08 Thread David Blanton
I guess I just choose Buffered in Window Attributes in IB. On Jan 8, 2010, at 1:56 PM, David Blanton wrote: Great and thanks! Now, if my app is a Cocoa document-based application where do I implement initWithContentRect:styleMask:backing:defer: -db On Jan 8, 2010, at 1:48 PM, Paul Sanders

Re: Hiding the Window Content View

2010-01-08 Thread David Blanton
Thanks for references and tips. I think I will be able to achieve the results I am looking for from all who have commented! - db On Jan 8, 2010, at 4:39 PM, Alastair Houghton wrote: On 8 Jan 2010, at 20:46, David Blanton wrote: I am just trying to find the best way to do rapid drawing

Re: NSBitMapImageRep Woes

2010-01-07 Thread David Blanton
) bitsPerPixel:32]; On Jan 6, 2010, at 11:32 AM, David Duncan wrote: On Jan 6, 2010, at 10:19 AM, David Blanton wrote: Now, from David Duncan's comment. My bitmap data does have alpha, i.e 4 samples per pixel ARGB. I thought kCGImageAlphaNoneSkipFirst says don't make an alpha plane, skip byte

Re: NSBitMapImageRep Woes

2010-01-07 Thread David Blanton
Answered my own question ... apologize for the noise! On Jan 7, 2010, at 4:05 PM, David Blanton wrote: Thanks to all. I have my bitmap being drawn but it is upside down. Do isFlipped play any role in this / how do I get it to draw right side up without inverting my raw data? For those

ColorSpace Question

2010-01-07 Thread David Blanton
I have been using CGContextRefcontext; context = CGBitmapContextCreate (m_bitmap.m_array.m_array, m_bitmap.m_array.m_pixelsx, m_bitmap.m_array.m_pixelsy, 8, m_bitmap.m_array.m_pixelsx * 4, colorSpace,kCGImageAlphaNoneSkipFirst| kCGBitmapByteOrder32Host);

CGImageCreate performance

2010-01-07 Thread David Blanton
If David Duncan would comment on performance issues using his suggested approach: CGColorSpaceRef colorSpace; colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); CGDataProviderRef provider = CGDataProviderCreateWithData (NULL,m_bitmap.m_array,

Re: CGImageCreate performance

2010-01-07 Thread David Blanton
, at 6:42 PM, Rob Keniger wrote: On 08/01/2010, at 11:36 AM, David Blanton wrote: The performance issue comes from the fact the user will be dragging this bitmap around so I a regenerating m_bitmap.m_array constantly. I'm not sure what your app does, but have you considered using a Core

NSScroller

2010-01-07 Thread David Blanton
Is there an 'easy' way to get NSScroller events in an NSDocument app? I would like to know where the knob is. -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: NSScroller

2010-01-07 Thread David Blanton
, Graham Cox wrote: On 08/01/2010, at 2:52 PM, David Blanton wrote: Is there an 'easy' way to get NSScroller events in an NSDocument app? I would like to know where the knob is. The knob's position is just the -floatValue (or -intValue) of the scroller control. What are you trying

Re: NSScroller

2010-01-07 Thread David Blanton
. If the user scrolls I want to tell my model how much was scrolled so it can regenerate a bitmap for display. 3. If the window size changes apply a factor to the content view to achieve 1 above. -db On Jan 7, 2010, at 9:33 PM, Graham Cox wrote: On 08/01/2010, at 3:21 PM, David Blanton wrote

NSBitMapImageRep Woes

2010-01-06 Thread David Blanton
Here is the code: @interface MyDocumentView : NSView { @public NSBitmapImageRep* m_NSBitmapImageRep; NSRect m_frameRect; float m_sz; BBitmap m_bitmap; unsigned char*

Re: NSBitMapImageRep Woes

2010-01-06 Thread David Blanton
thought kCGImageAlphaNoneSkipFirst says don't make an alpha plane, skip byte 1 and go to RED. I am not sure how to specify this in the 'bitmapFormat' parameter. On Jan 6, 2010, at 10:35 AM, David Duncan wrote: On Jan 6, 2010, at 9:21 AM, David Blanton wrote: m_NSBitmapImageRep

Re: NSImage

2010-01-01 Thread David Blanton
for display. Any comments on performance, please. db On Jan 1, 2010, at 11:08 AM, Mike Abdullah wrote: On 31 Dec 2009, at 22:26, David Blanton wrote: Given an array of color data (a generic bitmap) what is the best / fastest / recommended method to convert this to an NSImage? Strictly speaking

Re: NSImage

2010-01-01 Thread David Blanton
CGBitmapContexts or CGImageRefs. Well, at least not in any code you write :-) -- Uli Kusterer The Witnesses of TeachText are everywhere... http://www.masters-of-the-void.com On 01.01.2010, at 00:21, David Blanton wrote: Yeah, I was doing it with CGBitmapContextCreate followed

NSImage

2009-12-31 Thread David Blanton
Given an array of color data (a generic bitmap) what is the best / fastest / recommended method to convert this to an NSImage? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: NSImage

2009-12-31 Thread David Blanton
this evening ! On Dec 31, 2009, at 3:54 PM, Henry McGilton (Boulevardier) wrote: On Dec 31, 2009, at 2:26 PM, David Blanton wrote: Given an array of color data (a generic bitmap) what is the best / fastest / recommended method to convert this to an NSImage? Load your data into memory, create

Re: MyDocument.xib v MainMenu.xib

2009-12-30 Thread David Blanton
/12/2009, at 4:23 PM, David Blanton wrote: In a document based app I want to have some 'inspectors that reflect what i sgoing on in the document. These inspectors should float. If I make NSPanel's for the inspector in MyDocument.xib then each instance of a document gets its own set

Save MyDocument

2009-12-30 Thread David Blanton
MyDocument is a subclass of NSDocument. The docs say: You can control whether the default accessory view (which contains a pop-up menu allowing the user to choose what type to save) appears in the Save panel by overriding shouldRunSavePanelWithAccessoryView. The default accessory view is

Re: Save MyDocument

2009-12-30 Thread David Blanton
Duh ... It was workling and I didn't see it. sorry for the bandwidth waste. On Dec 30, 2009, at 6:55 PM, David Blanton wrote: MyDocument is a subclass of NSDocument. The docs say: You can control whether the default accessory view (which contains a pop-up menu allowing the user to choose

MyDocument.xib v MainMenu.xib

2009-12-29 Thread David Blanton
In a document based app I want to have some 'inspectors that reflect what i sgoing on in the document. These inspectors should float. If I make NSPanel's for the inspector in MyDocument.xib then each instance of a document gets its own set of inspectors. I would like to have just one set

NSPredicate mal behaviour?

2009-12-28 Thread David Blanton
In a directory I have: .DS_Store ._Filename These name are in a array that is filtered using this predicate: notBeginsWithDot = [NSPredicate predicateWithFormat:@NOT SELF BEGINSWITH %@, @.]; childrenArray = [childrenArray filteredArrayUsingPredicate:notBeginsWithDot]; childrenArray

Re: NSPredicate mal behaviour?

2009-12-28 Thread David Blanton
Errata. Can't debug my own code. NSPredicate is working properly. Happy New Year! On Dec 28, 2009, at 2:09 PM, David Blanton wrote: In a directory I have: .DS_Store ._Filename These name are in a array that is filtered using this predicate: notBeginsWithDot = [NSPredicate

Window Controllers

2009-12-23 Thread David Blanton
In my NSDocument app I have three Panels that will act as inspectors for the document content. In best Cocoa practices, should these Panels be owned by a window controller? db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Window Controllers

2009-12-23 Thread David Blanton
Please disregard my question about Window Controllers. db On Dec 23, 2009, at 1:48 PM, David Blanton wrote: I meant should each Panel have a Window Controller. On Dec 23, 2009, at 1:45 PM, David Blanton wrote: In my NSDocument app I have three Panels that will act as inspectors

Re: Window Controllers

2009-12-23 Thread David Blanton
I meant should each Panel have a Window Controller. On Dec 23, 2009, at 1:45 PM, David Blanton wrote: In my NSDocument app I have three Panels that will act as inspectors for the document content. In best Cocoa practices, should these Panels be owned by a window controller? db

  1   2   3   >