Re: CoreData, SyncServices & NSURL ...

2009-03-06 Thread Mic Pringle
One of the reasons I use a transformer is so that I can bind the resulting string to a column in a tableview. How would I go about doing this if I didn't use a transformer, as you suggest ? Also, I think I may have got somewhere with this. I was under the impression that it was the stored managed

Extract components from PDF page

2009-03-06 Thread malcom
Hello guys Is possible to get the components of a PDFPage? I should to take images and text from the page and put each of these inside a file. Any suggestion? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mo

Re: [Q] NSObject's poseAsClass - Replacement?

2009-03-06 Thread matt . gough
On 5 Mar 2009, at 21:00, Eric Gorr wrote: I have a need to use poseAsClass, but I see that it has been deprecated in 10.5 and won't be available for 64-bit applications. and then you said: I am working on a Carbon -> Cocoa conversion. In the carbon part, the cursor is being set to a 64x

NSToolbar EXC_BAD_ACCESS after configuration (leopard)

2009-03-06 Thread John Boydon
Hello everybody, I have a problem with NSToolbar in leopard. May be I am using it in a wrong way. In order to mutually enable/disable two toolbar items, I created a boolean variable in the delegate class and bound the toolbar items to it using Enabled entry in the Interface Builder Inspec

Re: [Q] NSObject's poseAsClass - Replacement?

2009-03-06 Thread Eric Gorr
On Mar 6, 2009, at 12:03 AM, Michael Ash wrote: On Thu, Mar 5, 2009 at 3:00 PM, Eric Gorr wrote: On Mar 5, 2009, at 2:47 PM, Benjamin Stiglitz wrote: I have a need to use poseAsClass, but I see that it has been deprecated in 10.5 and won't be available for 64-bit applications. So, is t

Re: [Q] NSObject's poseAsClass - Replacement?

2009-03-06 Thread Eric Gorr
On Mar 6, 2009, at 2:05 AM, Quincey Morris wrote: On Mar 5, 2009, at 21:17, John C. Randolph wrote: On Mar 5, 2009, at 12:00 PM, Eric Gorr wrote: On Mar 5, 2009, at 2:47 PM, Benjamin Stiglitz wrote: Although, this bug is not quite confirmed yet, but I suspect I know what the problem is.

Re: How to create a modal dialog that blocks on start-up?

2009-03-06 Thread Eric Gorr
On Mar 6, 2009, at 12:01 AM, Graham Cox wrote: On 06/03/2009, at 3:50 PM, Graham Cox wrote: Implement -applicationShouldOpenUntitledFile: in your app delegate to return a flag variable. Make sure that flag starts out as NO until your EULA is dismissed. --Kyle Sluder OK. Then after clo

Re: How to search for mop3 files, retrieve those file and play these file into apps

2009-03-06 Thread haresh vavdiya
Problem is solved now its giving all the mp3 files which are stored in my machine. But another problem is also there. Like, i have stored my favorites songs on desktop and then i transferred these songs to iTunes, so all these songs are also available on iTunes music, So when i search then it give

Re: NSStatusItem when clicked shows custom view

2009-03-06 Thread Clint Shryock
Matt Gemmell has MAAttachedWindow, a sub class of NSWindow listed here: http://mattgemmell.com/source it comes with a sample project that shows it working with an NSStatusItem. See if that will suit your needs +Clint On Thu, Mar 5, 2009 at 1:03 PM, Chris Purcell wrote: > I'm looking to do som

Re: A question about NSPredicateEditor and NSPredicateEditorRowTemplate

2009-03-06 Thread David Hoerl
[following up to a Jan 08 thread] > is it possible to modify the width of the NSTextField representing a "Number" in a NSPredicateEditorRowTemplate ? Yes, but not yet in Interface Builder. To do so programatically, get the row template, get the text field as the last member of the row te

Newbie query re notifications

2009-03-06 Thread McLaughlin, Michael P.
I have been using notifications in a simple document app that processes data from a datafile. This app has a document window and an appDelegate, both of which appear in IB with the proper connections. The document can successfully send notifications to the appDelegate and the latter can send noti

Supported platforms?

2009-03-06 Thread Bill Cheeseman
I will try to tread carefully around NDA boundaries with this remark. Perhaps someone in authority can e-mail me privately with the information I need -- or at least make sure that future announcements to qualified NDA signatories like me are revised to contain the information. Here goes:

interpretKeyEvents not handling HOME and END keys?

2009-03-06 Thread Eric Gorr
I found this old thread: http://lists.apple.com/archives/cocoa-dev/2004/Sep/msg00161.html which discusses the same problem I am currently experiencing. As near as I can tell, interpretKeyEvents: does not call any method to handle these key presses. Has something changed that I am unaware of

Re: Doing NSStringDrawingTruncatesLastVisibleLine with NSLayoutManger

2009-03-06 Thread Eric Gorr
On Mar 5, 2009, at 9:32 AM, Eric Gorr wrote: On Mar 4, 2009, at 4:57 PM, Eric Gorr wrote: I am drawing a string with a NSLayoutManager by doing: [layoutManager drawGlyphsForGlyphRange:glyphRange atPoint:NSMakePoint( [self bounds].origin.x,[self bounds].origin.y )]; What I would like i

Re: How to search for mop3 files, retrieve those file and play these file into apps

2009-03-06 Thread Michael Ash
On Fri, Mar 6, 2009 at 9:21 AM, haresh vavdiya wrote: > Problem is solved now its giving all the mp3 files which are stored in my > machine. > > But another problem is also there. Like, i have stored my favorites songs on > desktop and then i transferred these songs to iTunes, so all these songs a

Re: Newbie query re notifications

2009-03-06 Thread Kyle Sluder
On Fri, Mar 6, 2009 at 11:18 AM, McLaughlin, Michael P. wrote: > Today, I realized that I should have a separate class for some of the data > processing.  This separate class, SatManager, has no GUI elements and does > not appear in IB in any way.  Its implementation includes Classes whose names

Re: EXC_BAD_ACCESS in _class_changeInfo

2009-03-06 Thread Dave DeLong
After some rather indepth testing, I found out that I hadn't declared the static arrays correctly (sigh...). Fixing the declarations fixed the crashing problem, but led to other ones (unrelated, I think). I was eventually able to fix it. Dave On Mar 3, 2009, at 9:04 AM, Greg Parker wrote

Re: NSStatusItem when clicked shows custom view

2009-03-06 Thread Chris Purcell
Thanks Clint and Ben, MAAttachedWindow is exactly what I needed! --Chris On Mar 6, 2009, at 6:21 AM, Clint Shryock wrote: Matt Gemmell has MAAttachedWindow, a sub class of NSWindow listed here: http://mattgemmell.com/source it comes with a sample project that shows it working with an NSS

Determine colorlist/-name after NSColorPanel

2009-03-06 Thread Matthias Arndt
Hi! I think of redesigning the way colors can be selected in one of my apps: Currently I use NSPopupButtons an entry for every color and I'd like to move to NSColorWalls / NSColorPanel with predefined lists. These lists should represent color palettes, here threads of different vendors or

Re: Newbie query re notifications -- SOLVED

2009-03-06 Thread McLaughlin, Michael P.
Error was of the typo variety. Too embarrassing to describe further :-( -- Mike McLaughlin ___ 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-d

Re: How to create a modal dialog that blocks on start-up?

2009-03-06 Thread Sean McBride
On 3/6/09 4:01 PM, Graham Cox said: >Actually the problem is more complicated than this. > >The app might have been launched with a file or files, or just by >double-clicking. So if the EULA needs to be displayed this should just >defer opening the required documents. By stopping the untitled or >

Re: interpretKeyEvents not handling HOME and END keys?

2009-03-06 Thread Sean McBride
On 3/6/09 11:46 AM, Eric Gorr said: >I found this old thread: > >http://lists.apple.com/archives/cocoa-dev/2004/Sep/msg00161.html > >which discusses the same problem I am currently experiencing. On 10.5? I don't know when it started, but the home and end keys 'do the right thing' with NSTableVie

Dynamic getting of a property of BOOL type

2009-03-06 Thread Brad O'Hearne
I am dynamically retrieving properties from an NSObject, in order to convert the types to string values and store them in XML. I am using the following line of code to send a message to the object to retrieve the property's value: id value = objc_msgSend(object, propSelector); BOOL boolean

Re: interpretKeyEvents not handling HOME and END keys?

2009-03-06 Thread Eric Gorr
On Mar 6, 2009, at 1:29 PM, Sean McBride wrote: On 3/6/09 11:46 AM, Eric Gorr said: I found this old thread: http://lists.apple.com/archives/cocoa-dev/2004/Sep/msg00161.html which discusses the same problem I am currently experiencing. On 10.5=3F I don't know when it started, but the hom

Moving a window offscreen

2009-03-06 Thread Jonathan Dann
Hi All, In my application I want to create an image of a document window as a preview prior to displaying the window to the user. To obtain the CGImage of a displayed window is simple enough using the CGWindow API as shown below: - (CGImageRef)CGImage; { return CGWindowListCreateImage(CG

Re: Dynamic getting of a property of BOOL type

2009-03-06 Thread Nick Zitzmann
On Mar 6, 2009, at 11:35 AM, Brad O'Hearne wrote: How can I properly convert this id returned from the dynamic invocation of the property getter to the BOOL value that it actually is? You need to do this to get it to work correctly: BOOL boolValue = ((BOOL (*)(id, SEL))objc_msgSend)(anOb

Re: Dynamic getting of a property of BOOL type

2009-03-06 Thread Paul Sanders
> id value = objc_msgSend(object, propSelector); > BOOL booleanValue = (BOOL)value; > How can I properly convert this id returned from the dynamic > invocation of the property getter to the BOOL value that it actually is? Try BOOL booleanValue = (BOOL) (long) value; I believe this should also

Re: Dynamic getting of a property of BOOL type

2009-03-06 Thread Paul Sanders
> id value = objc_msgSend(object, propSelector); > BOOL booleanValue = (BOOL)value; > How can I properly convert this id returned from the dynamic > invocation of the property getter to the BOOL value that it actually is? Try BOOL booleanValue = (BOOL) (long) value; I believe this should also

Re: Newbie query re notifications

2009-03-06 Thread Matt Neuburg
On Fri, 6 Mar 2009 11:18:56 -0500, "McLaughlin, Michael P." said: > [nc addObserver:self selector:@selector(getGPS) name:@"fetchGPS" >object:nil]; Well, that's never going to work. There are two possibilities here: (1) Maybe you've defined - (void) getGPS: (NSNotification*) n But in that

Re: interpretKeyEvents not handling HOME and END keys?

2009-03-06 Thread Sean McBride
On 3/6/09 1:37 PM, Eric Gorr said: >If it is a bug that NSResponder does not have a >scrollToBeginningOfDocument or scrollToEndOfDocument, I can file a bug >report. IMNSHO yes. Note that /System/Library/Frameworks/AppKit.framework/ Resources/StandardKeyBinding.dict contains items with those name

Re: interpretKeyEvents not handling HOME and END keys?

2009-03-06 Thread Eric Gorr
On Mar 6, 2009, at 2:04 PM, Sean McBride wrote: On 3/6/09 1:37 PM, Eric Gorr said: If it is a bug that NSResponder does not have a scrollToBeginningOfDocument or scrollToEndOfDocument, I can file a bug report. IMNSHO yes. Note that /System/Library/Frameworks/AppKit.framework/ Resources/

Re: More user agent questions

2009-03-06 Thread Rick Mann
Thanks for the suggestions. On Mar 5, 2009, at 22:49:34, Kyle Sluder wrote: On Thu, Mar 5, 2009 at 9:58 PM, Rick Mann wrote: Our product (on the network) periodically updates its own software, and that update may include a new version of the Mac software. When the agent checks in and see

Re: Newbie query re notifications

2009-03-06 Thread Paul Sanders
> But in that case it will never be called because its name is getGPS:, and > you said @selector(getGPS) which is not the same thing. Yes, that one gets me every time. Why, when you do @selector(oops_i_forgot_the_colon) does the compiler not flag it as an error (or at least a warning). Can you

NSImage/NSBitmapImageRep color shifts when creating scaled copy

2009-03-06 Thread Steve Christensen
I'm trying to create a scaled-down copy of a large NSBitmapImageRep (i.e., 3200x2400 -> 320x240). The smaller image eventually gets passed to OpenGL for drawing. What I'm finding is that the copy has color shifted. When I draw the copy, it appears to be darker and more saturated than the or

NSDrawNinePartImage draws slowly in CALayer

2009-03-06 Thread Sebastian Morsch
Hello, I wrote a delegate that draws a bezel inside a CALayer using NSDrawNinePartImage. The drawing happens inside the drawLayer:inContext: method and it works well. The only problem is that it redraws really slow when the layers frame is resized by the user. The layer is simply attach

Re: Dynamic getting of a property of BOOL type

2009-03-06 Thread Clark Cox
On Fri, Mar 6, 2009 at 10:53 AM, Paul Sanders wrote: >> id value = objc_msgSend(object, propSelector); >> BOOL booleanValue = (BOOL)value; > >> How can I properly convert this id returned from the dynamic >> invocation of the property getter to the BOOL value that it actually is? > > Try BOOL bool

Re: NSDrawNinePartImage draws slowly in CALayer

2009-03-06 Thread Jean-Daniel Dupas
Le 6 mars 09 à 20:33, Sebastian Morsch a écrit : Hello, I wrote a delegate that draws a bezel inside a CALayer using NSDrawNinePartImage. The drawing happens inside the drawLayer:inContext: method and it works well. The only problem is that it redraws really slow when the layers frame is

Performance degrades dramatically in [NSManagedObjectContext executeFetchRequest:error:]

2009-03-06 Thread Oleksiy Gorelov
Hello Al! Summary: It looks like [NSManagedObjectContext executeFetchRequest:error:] starts to evaluate a predicate ([NSPredicate evaluateWithObject:]) with objects that was not requested and was not fetched from a database.

Re: Newbie query re notifications

2009-03-06 Thread Joar Wingfors
On Mar 6, 2009, at 11:21 AM, Paul Sanders wrote: Yes, that one gets me every time. Why, when you do @selector(oops_i_forgot_the_colon) does the compiler not flag it as an error (or at least a warning). Can you put any old thing in the brackets there? I'd suggest using: -Wundec

Performance degrades dramatically in [NSManagedObjectContext executeFetchRequest:error:]

2009-03-06 Thread Oleksiy Gorelov
Hello All!                                     Summary: It looks like [NSManagedObjectContext executeFetchRequest:error:] starts to evaluate a predicate ([NSPredicate evaluateWithObject:]) with objects that was not requested and was not fetched from a database.                          

Performance degrades dramatically in [NSManagedObjectContext executeFetchRequest:error:]

2009-03-06 Thread Oleksiy Gorelov
Hello All! (this is the same in plain text) Summary: It looks like [NSManagedObjectContext executeFetchRequest:error:] starts to evaluate a predicate ([NSPredicate evaluateWithObject:]) with objects that was not requested and was not fetched from a database

Re: A question about NSPredicateEditor and NSPredicateEditorRowTemplate

2009-03-06 Thread Peter Ammon
On Mar 6, 2009, at 6:42 AM, David Hoerl wrote: [following up to a Jan 08 thread] > is it possible to modify the width of the NSTextField representing a "Number" in a NSPredicateEditorRowTemplate ? Yes, but not yet in Interface Builder. To do so programatically, get the row template, get

Re: NSDrawNinePartImage draws slowly in CALayer

2009-03-06 Thread Jean-Daniel Dupas
Le 6 mars 09 à 20:42, Jean-Daniel Dupas a écrit : Le 6 mars 09 à 20:33, Sebastian Morsch a écrit : Hello, I wrote a delegate that draws a bezel inside a CALayer using NSDrawNinePartImage. The drawing happens inside the drawLayer:inContext: method and it works well. The only problem is

Re: Newbie query re notifications

2009-03-06 Thread Jean-Daniel Dupas
Le 6 mars 09 à 20:47, Joar Wingfors a écrit : On Mar 6, 2009, at 11:21 AM, Paul Sanders wrote: Yes, that one gets me every time. Why, when you do @selector(oops_i_forgot_the_colon) does the compiler not flag it as an error (or at least a warning). Can you put any old thing in the bracket

Re: EXC_BAD_ACCESS in _class_changeInfo

2009-03-06 Thread Eric Gorr
On Mar 3, 2009, at 11:04 AM, Greg Parker wrote: NSZombie and Guard Malloc are probably your new best friends. Information on NSZombie and other cool stuff can be found here: Technical Note TN2124 Mac OS X Debugging Magic http://developer.apple.com/technotes/tn2004/tn2124.html __

Re: Newbie query re notifications

2009-03-06 Thread Paul Sanders
> I'd suggest using: > -Wundeclared-selector > j o a r Excellent. Thank you. > Of course you can put anything. Else how would you be able to create a > method and a selector at runtime ? So how does the compiler map any old string to a SEL (which is just a number)? Is it some kind of hash (i

Re: Dynamic getting of a property of BOOL type

2009-03-06 Thread Paul Sanders
>From Clark S. Cox III. This answers a question that has kindof been in my mind for a while and I felt it was useful enough to post back to the list. PS: be as blunt as you like :) -- objc_msgSend and friends are special. They expect to be called *as if* they were defined w

Using NSExceptionHandler causes a linker error

2009-03-06 Thread Paul Sanders
I am trying to make use of the services of NSExceptionHandler in my code, but when I do so I get a linker error. Perhaps someone can help. Code: #import ... NSExceptionHandler *nseh = [NSExceptionHandler defaultExceptionHandler]; The linker error is an undefined symbol: .objc_class_name_NSExc

Why is my UIColor white actually gray?

2009-03-06 Thread James Cicenia
Hello - I have a table view with dynamic subclassed cells : - (id)initWithFrame:(CGRect)aRect reuseIdentifier:(NSString *)identifier { if (self = [super initWithFrame:aRect reuseIdentifier:identifier]) { self.selectionStyle = UITableViewCellSelectionStyleNone; [

Re: Why is my UIColor white actually gray?

2009-03-06 Thread Alex Kac
Could it be anti-aliased? On Mar 6, 2009, at 2:57 PM, James Cicenia wrote: Hello - I have a table view with dynamic subclassed cells : - (id)initWithFrame:(CGRect)aRect reuseIdentifier:(NSString *)identifier { if (self = [super initWithFrame:aRect reuseIdentifier:identifier])

Re: Using NSExceptionHandler causes a linker error

2009-03-06 Thread Joar Wingfors
Paul, You need to add the ExceptionHandling.framework to your project, and set it to be part of your target. That's how you tell Xcode to make the target link to it. * Right-click in the Groups & Files pane * Select Add > Existing Frameworks... j o a r On Mar 6, 2009, at

Re: Newbie query re notifications

2009-03-06 Thread Jean-Daniel Dupas
Le 6 mars 09 à 21:25, Paul Sanders a écrit : I'd suggest using: -Wundeclared-selector j o a r Excellent. Thank you. Of course you can put anything. Else how would you be able to create a method and a selector at runtime ? So how does the compiler map any old string to a SEL (which i

Re: NSImage/NSBitmapImageRep color shifts when creating scaled copy

2009-03-06 Thread Kyle Sluder
On Fri, Mar 6, 2009 at 2:21 PM, Steve Christensen wrote: > I'm trying to create a scaled-down copy of a large NSBitmapImageRep (i.e., > 3200x2400 -> 320x240). The smaller image eventually gets passed to OpenGL > for drawing. What I'm finding is that the copy has color shifted. When I > draw the co

Re: Why is my UIColor white actually gray?

2009-03-06 Thread James Cicenia
Hmm, What do you mean? Thanks James On Mar 6, 2009, at 3:00 PM, Alex Kac wrote: Could it be anti-aliased? On Mar 6, 2009, at 2:57 PM, James Cicenia wrote: Hello - I have a table view with dynamic subclassed cells : - (id)initWithFrame:(CGRect)aRect reuseIdentifier:(NSString *)identifier

Re: Why is my UIColor white actually gray?

2009-03-06 Thread Alex Kac
Well if the text is anti-aliased (which it is by default in a UILabel), then the center of the text would be white, but the edges are gray to help make it smooth. If the font is small enough, it can look gray and not pure white. On Mar 6, 2009, at 3:17 PM, James Cicenia wrote: Hmm, What d

How to change the Installer.app path of files in a XCode project

2009-03-06 Thread learnfromforum learnfromforum
Dear all, In the Resources directory of an open source XCode project (developed under Mac 10.4), there are some image files: DotBlue.tif DotGray.tif DotGrayDisabled.tif By checking the Get Info of these files I found they are stored in "/Applications/Utilities/Installer.app/Contents/Re

window wont close with command-w

2009-03-06 Thread Aaron Wallis
Hi there, I've created a preference window for an app i'm working on, and for some reason it won't close when i press command-w? is there something in particular I need to setup for that to happen? Cheers ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: window wont close with command-w

2009-03-06 Thread Nick Zitzmann
On Mar 6, 2009, at 2:27 PM, Aaron Wallis wrote: I've created a preference window for an app i'm working on, and for some reason it won't close when i press command-w? is there something in particular I need to setup for that to happen? Are you sure you have a close menu item, and that it i

Re: Why is my UIColor white actually gray?

2009-03-06 Thread James Cicenia
I don't see any property for antialiasing on or off. How do I turn it off to see? On Mar 6, 2009, at 3:21 PM, Alex Kac wrote: Well if the text is anti-aliased (which it is by default in a UILabel), then the center of the text would be white, but the edges are gray to help make it smooth. If

Re: How to change the Installer.app path of files in a XCode project

2009-03-06 Thread Kyle Sluder
On Fri, Mar 6, 2009 at 3:46 PM, learnfromforum learnfromforum wrote: > But in the Get Info window, there is only "Choose" button for changing the > path of this file. And Installer.app is not a directory so that I can not go > to its sub directories. Installer.app is just as much of a directory

Re: Why is my UIColor white actually gray?

2009-03-06 Thread Kyle Sluder
On Fri, Mar 6, 2009 at 4:37 PM, James Cicenia wrote: > I don't see any property for antialiasing on or off. > > How do I turn it off to see? You don't. Aliased text is more commonly known as "the jaggies" and can be particularly hard to read. --Kyle Sluder __

Re: Why is my UIColor white actually gray?

2009-03-06 Thread David Duncan
On Mar 6, 2009, at 12:57 PM, James Cicenia wrote: [self setImage:[[UIImage imageNamed:@"WF-MyLocBu- DistBack.png"]autorelease]]; Unrelated, but don't do this. You don't have ownership to the results of +imageNamed:, so you should not be releasing or autoreleasing it. -- David Duncan Apple

Re: NSImage/NSBitmapImageRep color shifts when creating scaled copy

2009-03-06 Thread Steve Christensen
On Mar 6, 2009, at 1:15 PM, Kyle Sluder wrote: On Fri, Mar 6, 2009 at 2:21 PM, Steve Christensen wrote: I'm trying to create a scaled-down copy of a large NSBitmapImageRep (i.e., 3200x2400 -> 320x240). The smaller image eventually gets passed to OpenGL for drawing. What I'm finding is that

Re: How to change the Installer.app path of files in a XCode project

2009-03-06 Thread I. Savant
On Fri, Mar 6, 2009 at 3:46 PM, learnfromforum learnfromforum wrote: > In the Resources directory of an open source XCode project (developed under > Mac 10.4), there are some image files: ... > Now, I want to change the directory path of these three .tif filesfrom > "/Applications/Utilities/Ins

loading agent with launchd gets Bus Error

2009-03-06 Thread Rick Mann
If I let launchd launch my user agent, (via .plist file in ~/Library/ LaunchAgents), I get a Bus Error, even if all I do is call NSLog() from main and then return. Also, load or load -w result in "nothing to load" from launchctl. If I launch my agent from the command line or from Xcode, it se

When to release an NSThread instance

2009-03-06 Thread Stuart Malin
I have a main thread method that allocates an NSThread object and inits with initWithTarget:selector:object. I then invoke the NSTask instance with -start. The specified selector is invoked, and there performs a background task that takes some time. When it is done, that method invokes a

Re: How to create a modal dialog that blocks on start-up?

2009-03-06 Thread Graham Cox
On 07/03/2009, at 4:41 AM, Sean McBride wrote: I actually used a DTS incident on this very issue. As you say, it is hard to get exactly right (if you want finesse). In the end, I got about 90% of the way to perfect. I ended up doing the following: - subclassing NSDocumentController - giving

archiving NSPrintInfo created via initWithDictionary crashes

2009-03-06 Thread kvic...@pobox.com
on 10.5.6 the following code snippet: NSPrintInfo* sp = [NSPrintInfo sharedPrintInfo]; NSDictionary* dict = [sp dictionary]; NSPrintInfo* pi = [[NSPrintInfo alloc] initWithDictionary: dict]; NSData* piData = [NSKeyedArchiver archivedDataWithRootObject: pi]; will c

Extreme Crashing from QT Movie Layers in Core Animation

2009-03-06 Thread Seth Willits
I really really really hate to cross-post this, but I'm not sure which list to send this to. I have an extremely simple application playing three QuickTime movies in three QTMovieLayers. When the movie ends I simply restart it from within the notification callback. That and fading the opa

Re: When to release an NSThread instance

2009-03-06 Thread Roland King
if you don't need to reference the thread again you can just release it (and the target object used in initWithTarget:selector:object) as soon as you've called -(void)start on it. You are correct that the thread will exit when the method you are calling finishes and you don't need to call e

Setting 'is package' bit when building a plug-in bundle?

2009-03-06 Thread Graham Cox
I'm implementing a plug-in scheme based on Rainer Brockerhoff's design at http://cocoadevcentral.com/articles/68.php So far it's working fine, but I decided I wanted to use a particular extension for my plug-in files. When I do that, the bundles revert to looking like ordinary folders i

Re: Extreme Crashing from QT Movie Layers in Core Animation

2009-03-06 Thread Sean McBride
Seth Willits (sli...@araelium.com) on 2009-03-06 8:28 PM said: >I'd bet the farm that it's not my fault, so really the only thing I >can think of is a crazy memory smashing bug somewhere in QT or Core >Animation. I assume you've tried with guard malloc, etc. then?... Try the hardware test cd for

Re: Setting 'is package' bit when building a plug-in bundle?

2009-03-06 Thread Michael Vannorsdel
Use FSSetCatalogInfo and set the finderInfo (interpreted as a FolderInfo struct) and add the kHasBundle bit to the finderFlags of the FolderInfo. On Mar 6, 2009, at 8:31 PM, Graham Cox wrote: 'm implementing a plug-in scheme based on Rainer Brockerhoff's design at http://cocoadevcentral.c

Re: Setting 'is package' bit when building a plug-in bundle?

2009-03-06 Thread Michael Vannorsdel
This is the manual way to do it I might add. Not sure why the document type settings are not being used. Sometimes you need to rebuild launch services database. On Mar 6, 2009, at 9:02 PM, Michael Vannorsdel wrote: Use FSSetCatalogInfo and set the finderInfo (interpreted as a FolderInfo

Re: Moving a window offscreen

2009-03-06 Thread Michael Ash
On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann wrote: > Hi All, > > In my application I want to create an image of a document window as a > preview prior to displaying the window to the user. To obtain the CGImage of > a displayed window is simple enough using the CGWindow API as shown below: > > -

Re: Setting 'is package' bit when building a plug-in bundle?

2009-03-06 Thread Kyle Sluder
On Fri, Mar 6, 2009 at 10:31 PM, Graham Cox wrote: > So far it's working fine, but I decided I wanted to use a particular > extension for my plug-in files. When I do that, the bundles revert to > looking like ordinary folders in the Finder, and can be simply opened like > any folder. Make sure th

Fwd: NSOperation and NSAutoreleasePool

2009-03-06 Thread Aaron Wallis
Hey all, I've got a series of NSOperations which process some data for the user. Each of them are created and supplied a large string. In the operations start method the operation finds a suitable plugin (using a plugin manager) to help the data analsysis. Once the plugin is found, the string

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Kyle Sluder
It sounds like you have some sort of memory issue. Since you refer to things like "NSAutorelease objects" (which don't exist) and are apparently calling -retain on an object that you immediately assign to a property, I suggest you go back and re-read the Memory Management Guide. --Kyle Sluder ___

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Aaron Wallis
I've actually found a workaround - it seems that if I use Obj-C 2.0 style properties the objects somehow get released earlier than they should. in my example I used the code: self.delegate = tDelegate where tDelegate is the delegate supplied through the method call. However, if I just use: de

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Roland King
this isn't making sense. You need to get to the bottom of this and not just throw in random code which *seems* to work. For a start how is delegate declared as a property? Show us the definition please, and are you synthesizing it or have you written code for the methods yourself? If you ha

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Aaron Wallis
The property was assigned as: @property (retain) id delegate; when I walk through the code (and log pretty much everything out) I get the following: - (void)processString:(NSString *)tString withDelegate:(id)tDelegate { NSLog(@"1. %@", tDelegate); // I get 0x175930> self.delegate = tDelegate;

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Graham Cox
On 07/03/2009, at 5:02 PM, Roland King wrote: seems probably wrong if delegate is a retained property, that will just extra-retain it. Your new code delegate = tDelegate; doesn't retain it at all, one of the following should be the right way to do it Bearing in mind that typica

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Graham Cox
On 07/03/2009, at 5:18 PM, Aaron Wallis wrote: [delegate release]; delegate = tDelegate; [delegate retain]; What if tDelegate == delegate? You release delegate, which *may* dealloc it. Then you assign tDelegate to it. If tDelegate == delegate (not uncommon that objects are the same) the

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Stephen J. Butler
On Sat, Mar 7, 2009 at 12:18 AM, Aaron Wallis wrote: > The property was assigned as: > @property (retain) id delegate; > > when I walk through the code (and log pretty much everything out) > I get the following: > > - (void)processString:(NSString *)tString withDelegate:(id)tDelegate { > NSLog(@"1

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Aaron Wallis
Thanks for pointing that one out, but it wasn't the cause for my problem. As for retaining the delegate, originally I wasn't, I just took the advice from Roland, but it doesn't break if I don't have it there :D On 07/03/2009, at 5:27 PM, Graham Cox wrote: On 07/03/2009, at 5:18 PM, Aaron W

Re: NSOperation and NSAutoreleasePool

2009-03-06 Thread Kyle Sluder
On Sat, Mar 7, 2009 at 1:31 AM, Aaron Wallis wrote: > Thanks for pointing that one out, but it wasn't the cause for my problem. > As for retaining the delegate, originally I wasn't, I just took the advice > from Roland, but it doesn't break if I don't have it there :D Just because it doesn't brea