Re: How can I make a window just like the Anxiety App?

2011-02-21 Thread Bavarious
On 21/02/2011, at 02:53, Graham Cox wrote: > While I have wholeheartedly recommended BWToolKit in the past, a word of > warning: If you use it "as is" your app will fail App Store approval due to > use of undocumented/private API. > > I've contacted Brandon about this but haven't heard back. Yo

Re: How to detect when an NSTextView has finished being loaded into a window?

2011-02-21 Thread Kyle Sluder
On Mon, Feb 21, 2011 at 1:04 PM, Keith Blount wrote: > Hi Matt, > > Many thanks for the reply. Unfortunately that doesn't really work, as if it > is hidden in any way then it is off screen and therefore the artefacts bug > rears its ugly head. (The whole thing is in a tab view, and even if the t

Re: -[NSSet containsObject:] returns NO when it should return YES

2011-02-21 Thread Wim Lewis
On 19 Feb 2011, at 2:17 PM, Michael Crawford wrote: > Anyone have previous experience with this problem? Can you shed some light > on where my thinking and assumptions are wrong. I could write a sweet of > tests to try and prove/disprove what I think is happening but I'm hoping to > benefit f

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Ken Ferry
On Mon, Feb 21, 2011 at 3:49 PM, Ken Thomases wrote: > On Feb 21, 2011, at 5:07 PM, Jonathan Taylor wrote: > > > So as far as my situation goes, what I'm after is an efficient way of > starting from a path to some sort of raster image and obtaining a raw pixel > buffer I can read. [Obviously if a

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Quincey Morris
On Feb 21, 2011, at 15:07, Jonathan Taylor wrote: > So as far as my situation goes, what I'm after is an efficient way of > starting from a path to some sort of raster image and obtaining a raw pixel > buffer I can read. [Obviously if actually reading from disk then the disk > will be the bottl

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Ken Thomases
On Feb 21, 2011, at 5:07 PM, Jonathan Taylor wrote: > So as far as my situation goes, what I'm after is an efficient way of > starting from a path to some sort of raster image and obtaining a raw pixel > buffer I can read. [Obviously if actually reading from disk then the disk > will be the bot

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Jonathan Taylor
> I too have ran into this issue recently, with an old project that is > half-resurrected. > > Performance was good in 10.5, but now horrible in 10.6. I'm not sure > what to do instead. > > The CIImage docs say "Core Image images are immutable", and indeed I > don't see any method like bitmapDat

Re: exception when I try to access a managedObject property from within an accessor of another property

2011-02-21 Thread Sean McBride
On Mon, 21 Feb 2011 16:53:10 -0600, Brad Stone said: >When I replace: >if ([[self valueForKey:@"isEncrypted"] boolValue]) > >with >if (1 == 2 ) or if (1 == 1 ) What if you do: id foo = [self valueForKey:@"isEncrypted"]; then po foo in gdb -- __

exception when I try to access a managedObject property from within an accessor of another property

2011-02-21 Thread Brad Stone
I am getting an exception when I try to access a managedObject property from within an accessor of another property. As ridiculous as it sounds I've been at this for over three days. Hopefully someone can point out what I'm doing wrong. - (NSString *)category { NSString * tmpValue;

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Sean McBride
On Mon, 21 Feb 2011 14:27:39 -0800, Quincey Morris said: >OK, what I was *trying* to say is that NSBitmapImageRep in SnowLeopard >is basically an immutable object pretending to be mutable. My suggestion >was to use a really mutable object instead. I actually don't know if >CGImage counts as mutabl

Re: Printing a view

2011-02-21 Thread Graham Cox
On 22/02/2011, at 9:24 AM, Bruce Cresanta wrote: > Hello, > > I'm working with NSDocument. I only have one view that I would like > to print, but I don't see a method in NSDocument that takes an NSView > parameter.How do I print only one view in an NSDocument? You override: - (NS

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Quincey Morris
On Feb 21, 2011, at 13:53, Jonathan Taylor wrote: > I'm actually doing a fair amount of work with the pixel data, but > nevertheless this one copy (specifically the zero fills as well as memcpy) at > the start takes considerably longer than the analysis itself. I recently ran into this problem

Printing a view

2011-02-21 Thread Bruce Cresanta
Hello, I'm working with NSDocument. I only have one view that I would like to print, but I don't see a method in NSDocument that takes an NSView parameter.How do I print only one view in an NSDocument? Thanks, Bruce ___ Cocoa-dev maili

Re: NSDocument Problems

2011-02-21 Thread Bruce Cresanta
Thank you Graham, it worked! I now have all the main menu items working. Thank you, Bruce On Feb 21, 2011, at 3:05 PM, Graham Cox wrote: > > On 22/02/2011, at 1:28 AM, Bruce Cresanta wrote: > >> I have two NSDocuments in my project: MyDocument patterned after the >> template, and An

Re: NSTextAttachment, MouseOver, GlyphPosition

2011-02-21 Thread Ross Carter
On Feb 19, 2011, at 12:49 PM, Peter Krajčík wrote: > What is a proper way to get cellFrame for NSTextAttachmentCell (or to be more > general, position of glyph in NSAttributedString) that is inserted to > NSAttributedString or drawn by NSTextFieldCell? If you have subclassed NSTextAttachmentCel

Re: NSDocument Problems

2011-02-21 Thread Graham Cox
On 22/02/2011, at 1:28 AM, Bruce Cresanta wrote: > I have two NSDocuments in my project: MyDocument patterned after the > template, and AnalyzerDocument. Analyzer document is ordered second in the > target list of documents, so it is not the default document.All the menu > items fo

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Ken Thomases
On Feb 21, 2011, at 3:53 PM, Jonathan Taylor wrote: > On 21 Feb 2011, at 21:29, Quincey Morris wrote: >> 3. Use something else, such as CGImage, instead. > > Thanks. In this case I need to access every single pixel value unfortunately. > I was using NSImages for convenience since I do display so

Re: drawRect: GCContext errors

2011-02-21 Thread Scott Steinman
Problem solved! Thanks to Matt Neuberg for his suggestion. It let me hone in on the culprit. Scott ___ 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: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Jonathan Taylor
On 21 Feb 2011, at 21:29, Quincey Morris wrote: > On Feb 21, 2011, at 13:19, Jonny Taylor wrote: > >> So do I understand it correctly that there is no way at all of peeking (read >> only) at the pixels of a NSBitmapImageRep without triggering a copy? That's >> a bit of a shame if so - guess I'll

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Quincey Morris
On Feb 21, 2011, at 13:19, Jonny Taylor wrote: > So do I understand it correctly that there is no way at all of peeking (read > only) at the pixels of a NSBitmapImageRep without triggering a copy? That's a > bit of a shame if so - guess I'll have to look into CoreImage. If I understand the rele

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Jonny Taylor
>> I am looking at the performance of my code, and have found that rather a lot >> of time is spent in [NSBitmapImageRep getBitmapDataPlanes]. This is rather >> disappointing because I had assumed this was a 'trivial' way of getting a >> pointer to the actual data store itself in the case of ras

Re: How to detect when an NSTextView has finished being loaded into a window?

2011-02-21 Thread Keith Blount
Hi Matt, Many thanks for the reply. Unfortunately that doesn't really work, as if it is hidden in any way then it is off screen and therefore the artefacts bug rears its ugly head. (The whole thing is in a tab view, and even if the text view is in a different tab to the visible one while it is

Re: NSDocument Problems

2011-02-21 Thread Bruce Cresanta
Sherm, I checked this and the class is AnalyzerDocument, just the way it should be. Bruce On Feb 21, 2011, at 12:35 PM, Sherm Pendley wrote: > On Mon, Feb 21, 2011 at 2:12 PM, Bruce Cresanta wrote: >> Hello Volker, >> >> I have the following two methods implemented in AnalyzerDocumen

Re: GCContext errors

2011-02-21 Thread Matt Neuburg
On Mon, 21 Feb 2011 12:25:36 -0600, Scott Steinman said: >I'm getting strange error messages in the console when the application's main >window first opens. > >When the figure legends' drawRect: method is executed, the console spits out >about 50 or so Core Graphics errors stating that there's a

Re: NSDocument Problems

2011-02-21 Thread Sherm Pendley
On Mon, Feb 21, 2011 at 2:12 PM, Bruce Cresanta wrote: > Hello Volker, > > I have the following two methods implemented in AnalyzerDocument, but I still > get greyed menu items. > > - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError > > - (BOOL)readFromData:(NSData *)data ofTy

Re: NSDocument Problems

2011-02-21 Thread Bruce Cresanta
Hello Volker, I have the following two methods implemented in AnalyzerDocument, but I still get greyed menu items. - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError Do I need to imp

drawRect: GCContext errors

2011-02-21 Thread Scott Steinman
I've been sitting at home sick for over a month, trying to keep sane by re-learning Cocoa. I am just about to complete my first non-trivial Cocoa application. The application is working perfectly, including no memory management issues, but I've been constantly checking the console so I can make

Re: need variable # core model properties for entity

2011-02-21 Thread Quincey Morris
On Feb 21, 2011, at 09:30, Shane wrote: > I have data fields that come from a record (row) that was imported > from a file, so it's like an array of numbers which is currently > unknown until the user assigns meaning to these data fields. > > I'm wondering if an entity can have a property w/ an a

Re: How to detect when an NSTextView has finished being loaded into a window?

2011-02-21 Thread Matt Neuburg
On Mon, 21 Feb 2011 06:22:35 -0800 (PST), Keith Blount said: > I've also tried only posting the notification after a delay of 0, which works > and avoids the crash, but is a little slow - you can see the original text > view getting loaded on screen before being swapped for the multiple page vi

Re: How to use Photo Albums of the landscape mode iphone app

2011-02-21 Thread Matt Neuburg
On Sun, 20 Feb 2011 10:08:07 +0800 (CST), =?GBK?B?zuLD9w==?= said: >I hope the UIImagePickercontrooler Interface Orientation is Landscape. >How do it. > If this is really important to you, you'll have to make your own image picker. This is possible in iOS 4 thanks to the Assets Library framewor

Re: -[NSSet containsObject:] returns NO when it should return YES

2011-02-21 Thread Matt Neuburg
On Sat, 19 Feb 2011 17:17:36 -0500, Michael Crawford said: >I'm trying to compare instances of NSNumber using NSSet. I have a set of >numbers, which represent 64-bit persistent IDs for iTunes media-items. I >access these values using the -[NSNumber longLongValue] method. You're having a fund

need variable # core model properties for entity

2011-02-21 Thread Shane
Hi, I've got a problem in defining the structure of a core data model. I have data fields that come from a record (row) that was imported from a file, so it's like an array of numbers which is currently unknown until the user assigns meaning to these data fields. I'm wondering if an entity can h

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Quincey Morris
On Feb 21, 2011, at 03:56, Jonathan Taylor wrote: > I am looking at the performance of my code, and have found that rather a lot > of time is spent in [NSBitmapImageRep getBitmapDataPlanes]. This is rather > disappointing because I had assumed this was a 'trivial' way of getting a > pointer to

Problem with multiple screensaver threads

2011-02-21 Thread Gabriel Zachmann
The question I have could be titled "How to communicate between screensaver threads?" Subtitle: "Are screensaver threads really threads?" Let me please explain the scenario (sorry for the lengthy question). I've got a screensaver that displays images. With two monitors, OSX starts two threads o

Re: NSDocument Problems

2011-02-21 Thread Volker in Lists
Hi, these all rely on the ResponderChain - so, if one of your ANalyzerDocuments is front-most, it must implement these methods to enable the menu commands. If your analyzer document is always coupled with a "normal" document, you may relay the calls to that. volker Am 21.02.2011 um 15:28 schr

Re: Getting NSScrollView to ignore scrolling

2011-02-21 Thread Mark Wright
However, as far as I recall, the scroll view is responsible for tiling and drawing the table column headers (and the little corner view). So, it's only a workable solution if you don't want headers over your table columns... On 21 Feb 2011, at 04:10:24, Scott Anguish wrote: although you

Re: NSDateFormatter initialization+formatting not working

2011-02-21 Thread Markus Spoettl
On Feb 19, 2011, at 11:18 PM, Ken Thomases wrote: >> And why doesn't the -initWithDateFormat: initializer work? > > I think it does work, but produces a formatter using the old-style behavior. > From >

NSDocument Problems

2011-02-21 Thread Bruce Cresanta
Hello, I have two NSDocuments in my project: MyDocument patterned after the template, and AnalyzerDocument. Analyzer document is ordered second in the target list of documents, so it is not the default document.All the menu items for save, save as, print, and page setup are grayed

How to detect when an NSTextView has finished being loaded into a window?

2011-02-21 Thread Keith Blount
Hello, I'm trying to detect when an NSTextView has finished being loaded into its window in a situation where -viewDidMoveToWindow won't work - is there another way of doing this that I'm overlooking? Here's the situation, and the reason -viewDidMoveToWindow won't work: I've spent the last wee

[NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-21 Thread Jonathan Taylor
I am looking at the performance of my code, and have found that rather a lot of time is spent in [NSBitmapImageRep getBitmapDataPlanes]. This is rather disappointing because I had assumed this was a 'trivial' way of getting a pointer to the actual data store itself in the case of raster data. I

Re: How can I make a window just like the Anxiety App?

2011-02-21 Thread 23Labs
Thanks all. You're quite helpful. I'm quite new to Mac development, I don't even know about bwtoolkit. It's a very cool and helpful plugin. If I use bwtoolkit in my app, do I violate Mac App Store's term if I submit it to the store? ___ Cocoa-dev mailin

Re: could not locate an NSManagedObjectModel

2011-02-21 Thread Andreas Grosam
On Feb 20, 2011, at 10:23 PM, Shane wrote: ... Shane, you usually need these initial steps for virtually any Core Data application: (please refer to corresponding documentation for each CoreData class and method mentioned!) @interface SomeDelegateOrControllerOrElse (CoreDataAdditions) { NS

Re: How can I make a window just like the Anxiety App?

2011-02-21 Thread Gleb Dolgich
I created a fork of BWToolkit with an added target for Mac App Store which has private APIs conditionally removed; our app Decloner that uses it is in the App Store. https://github.com/glebd/bwtoolkit -- Gleb Dolgich PixelEspresso http://www.pixelespressoapps.com On 21 Feb 2011, at 05:53, Gr