[modeator] Re: #macdev/#iphonedev ban, in need of sympathy
Issues with IRC are not directly related to cocoa development and do not belong here. please take these issues elsewhere. On May 2, 2010, at 10:30 PM, Patrick M. Rutkowski wrote: I just got kick/banned from #macdev and #iphondev. I was asking an exceptionally complicated NSStream question in #iphonedev, and though I got a lot of pseudo-answers, nobody really even understood the question to begin with; I hand't even gotten far enough in physically typing out the text explaining the problem, so they couldn't possibly have gotten the point. ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
[modeator] Re: #macdev/#iphonedev ban, in need of sympathy
Having re-read your note, and noticed the language that was pointed out, you have been moderated on this list. This is not the appropriate location for such language. On May 2, 2010, at 10:30 PM, Patrick M. Rutkowski wrote: I just got kick/banned from #macdev and #iphondev. I was asking an exceptionally complicated NSStream question in #iphonedev, and though I got a lot of pseudo-answers, nobody really even understood the question to begin with; I hand't even gotten far enough in physically typing out the text explaining the problem, so they couldn't possibly have gotten the point. After enough trying there, I went to #macdev instead, looking for alternative thoughts. Fortunately, someone there was finally able to understand the question, but only after dozens and dozen of lines of IRCing in a PM. He gave some pointers, and now it's all worked out. However, in the mean time, another user in #macdev started bitching at me about reposting the question when I already supposedly got loads of answers in #iphonedev (which I most definitely did not). I say bitching because he wasn't just politely reminding me that re-posting question is frowned up. His words were of a condensing sort, and he was _bitching_ about it. So, I said fuck you, /ignore, and put him on /ignore Immediately after that, the admin RTFM_FTW banned me, and he's not willing to lift it. I get banned from #iphonedev and #macdev on a very regular basis. Don't quote me on the numbers, but I think it's something like once per month, sometimes maybe more. Every time it's by this abusive admin RTFM_FTW. I've had open disputes with him in the past. Eventually I politely told him that I didn't think we should interact anymore, and then put him on a permanent /ignore in my IRC client. But the bans keep coming anyway :-/ I feel that I'm being discriminated against. The bans keep coming from RTFM_FTW, and from nobody else. I wish I could put some sort of injunction on RTFM_FTW banning me, because I'm certain no other admins would. I'm not really sure what to do here. I'm really missing #macdev/#iphonedev right now :-( -Patrick P.S If you're on here RTFM_FTW, fuck you. Just leave me the fuck alone already. I don't want to talk to you, and you don't want to talk to me; we don't like each other, and that's fine. But stop fucking banning me already, it's an abuse of your position. Feel free to ask another op to ban me, and if that other op feel that it's fit, then I'll be fine with a ban from _them_. But I doubt that's likely to ever happen, because 90% of your reason for banning me is due to the lasting dislike of me that you have from that time I talked back to you earlier this year in #macdev, so just quit it already, please! ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/scott%40cocoadoc.com This email sent to sc...@cocoadoc.com ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [modeator] Re: #macdev/#iphonedev ban, in need of sympathy
and this is what I get for posting at 2:30 on a Sunday night I’m of course the [Moderator] not modeator. ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [iPhone] How to scroll to UITableView footer view
if by footer view, you mean content that is at the end of a table view, I suggest you read the UIScrollView Guide, specifically the issues regarding contentOffset. On May 2, 2010, at 11:14 AM, Scott Andrew wrote: What about making the rect your view's actual bounds. Something like... CGRect footerBounds = [footerView bounds]; CGRect footerRectInTable = [tableView convertRect:footerBounds fromView:footerView]; [tableView scrollToRect:footerRectInTable animated:YES]; This should scroll to the footer view since you are basing it on the footer view's current bounds after you call endUpdate. If all is added and adjusted. Scott On May 1, 2010, at 8:13 PM, Tharindu Madushanka wrote: Actually this doesn't seem to scroll to footer view :( Following is the code I have, i am continuously adding cells. Now I want to scroll to bottom footer view. Following code doesn't seem to scroll to the most bottom footer view. [tableview beginUpdates]; [tableview insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:(chatMessages.count - 1) inSection:0]] withRowAnimation:UITableViewRowAnimationLeft]; [tableview endUpdates]; if (tableview.tableFooterView) [tableview scrollRectToVisible:CGRectMake(0, tableview.contentSize.height+64, 320, 44) animated:YES]; Tharindu Madushanka ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/scottandrew%40roadrunner.com This email sent to scottand...@roadrunner.com ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/scott%40cocoadoc.com This email sent to sc...@cocoadoc.com ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [iPhone] How to scroll to UITableView footer view
contentSize is the correct way to do this. It gives a ‘buffer zone’ at the top and bottom (and sides if you wish) on the scroll view. On May 1, 2010, at 11:04 PM, Luke the Hiesterman wrote: UITableView is a subclass of UIScrollView. So, you can ask for its contentSize and then call scrollRectToVisible:animated: with a rect that lies at the end of the contentSize. Luke On May 1, 2010, at 7:52 PM, Tharindu Madushanka wrote: Hi, How can I scroll to a UITableView footer all the time, while adding cells to table view content. Is there some way similar to scrollToRowAtIndexPath: , to scroll directly into my bottom footer view after adding new cells ? Thank you and Kind Regards, Tharindu Madushanak ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com This email sent to luket...@apple.com ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/scott%40cocoadoc.com This email sent to sc...@cocoadoc.com ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange NSScroller sizing behaviour
Hi Bill, On 1/05/2010, at 6:19 AM, Bill Appleton wrote: hi anyone out there, i have more information on this scroll bar bug if i open more and more text windows the scroll bar (nsscroller) appears on the right or bottom of each one each window has 2 scroll bars, i have verified the 2 sub views, but only one can appear at a time i can't find any graphics clipping problems or something like that i have looked for something that tells the scroll bar to be vertical or horizonta but can't find it, i assume it looks at the width or height just does that automatically i think i can see a horizontal bar stuck in a little piece of the vertical slot, and a vertical bar stuck in the horizontal slot the slots are correct in size, but the bar hasn't re-jiggered to fit the slot does anyone know what is going on? Your problem is unrelated to the NSScroller problem I'm experiencing. However, looking at my code I'm not doing anything special when I create my NSScrollers to make them horizontal or vertical other than giving them the correctly oriented frame rect. For example if the frame rect is wider than it is high then I get a horizontal scroller. I'm not sure that helps, but it might pay to check the your frame rects are correct. Here's a snippet of my creation code. As you can see it's pretty straightforward: m_scroller = [[NSScroller alloc] initWithFrame:boundsRect]; m_nativeControl = m_scroller; if ( m_scroller != nil ) { SetMinValue( inParams.minValue ); SetMaxValue( inParams.maxValue ); SetValue( inParams.initialValue ); [m_scroller setEnabled:YES]; if ( inParams.smallVariant == uctrue ) { [m_scroller setControlSize:NSSmallControlSize]; } [m_nativeControl setAutoresizingMask:NSViewMinYMargin]; [[macWindow contentView] addSubview:m_scroller]; } Regards, Jo___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Value Bindings in IB - Where's the documentation?
Thanks, Ken, the CocoaBindingsRef is what I was looking for - now I'll see if I can work it out from there before looking at the other links you sent :) On 02/05/2010, at 20:27 , Ken Thomases wrote: On May 2, 2010, at 5:14 AM, Brian Bruinewoud wrote: I'm trying to find documentation about what the various bindings in IB actually do. If I look at the documentation for NSArrayController (or any controller) and NSPopUpButton (or any UI control) I don't find what I'm looking for. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/CocoaBindingsRef/CocoaBindingsRef.html I agree that there ought to be links from each class to the corresponding page in that reference. I've run into similar questions to this before, but the particular motivating example at moment is as follows. In a Table, I want a pop-up cell for a given column. The columns in the table are all bound to an NSArrayController which is in turn backed by CoreData. The list of possible values for the column with the pop-up is also meant to be bound to another NSArrayController which is also back by CoreData. I have not yet been able to get this to work. There's documentation for this sort of arrangement in the Cocoa Bindings Programming Topics: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaBindings/Tasks/onerelation.html Also, check here for more examples and discussion: http://homepage.mac.com/mmalc/CocoaExamples/controllers.html Cheers, Ken ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
IB Plugin Container View and child management
Dear list members I have created in IB Plugin based on the Xcode template and everything works fine. If you need the completly boring source to help me out I can upload the full project somewhere. Here's what I'd like to accomplish: I have a custom NSView subclass that is configured to be a container for other objects. Exposing child objects using - (NSArray *)ibDefaultChildren works as expected. Now I want to be able to drag other Library Objects from my IBPlugin inside the container but limiting the objects to certain classes. How does IB determine the possible drop locations for dragged library objects? I have implemented: - (void)ibDidAddToDesignableDocument:(IBDocument *)document { NSObject *parent; parent = [document parentOfObject:self]; NSLog(@ibDidAddToDesignableDocument: %@, document); NSLog(@ parent: %@, parent); // Try to remove ourself when added to the wrong parent if ([parent isKindOfClass:[self class]] == NO) { [document removeObject:self]; NSLog(@removed); } } I assumed (wrongly) that I might be able to check the parent object and remove the just-added instance, but that leads to a nice assertion failure in IB. Is there any way for a object to refuse itself to be dropped in certain locations? Thanks a lot Patrick ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange NSScroller sizing behaviour
Hi, Further to my original post, I've done some more investigation. I wrote a pure Cocoa app (i.e. without my C++ UI framework code getting in the way) and still experienced the resizing problems. The problems seem to effect scrollers which are placed at the bottom or right edges of a window with a resize control, as you would for scrolling window content. A scroller which was away from that area resized as expected. After a bit of messing about I found that placing the scroller inside an NSView and adjusting the scroller frame when the NSView frame changed largely solves the problem. Vertical scrollers seem fine but horizontal ones are sometimes off by a pixel or two after resizing. I can live with it for now. I don't think the NSScroller resizing behaviour is what it should be so will file a bug. In case anyone has a similar problem here is some code to give an idea of what I'm doing. handleFrameDidChange: is a handler for the NSViewFrameDidChangeNotification, where the scroller frame is updated. I should probably also handle the bounds change notification. INTERFACE CODE @interface UCMacNSScrollerView : NSView { NSScroller* m_scroller; } - (id) initWithFrame:(NSRect) frame; - (IBAction) handleAction: (id)sender; - (void) handleFrameDidChange:( NSNotification* ) note; @end IMPLEMENTATION CODE #import UCMacNSScrollerView.h @implementation UCMacNSScrollerView - (id) initWithFrame:(NSRect) frame { self = [super initWithFrame:frame]; if (self) { CGFloat width = NSWidth( frame ); CGFloat height = NSHeight( frame ); NSRect bounds = NSMakeRect( 0, 0, width, height ); m_scroller = [[NSScroller alloc] initWithFrame:bounds]; if ( width = height ) { // NOTE: The NSViewMinYMargin flag here may not apply to you, as I need to deal with the top left origin my UI framework uses [m_scroller setAutoresizingMask:NSViewMinYMargin | NSViewWidthSizable | NSViewMaxXMargin | NSViewMinXMargin]; } else { [m_scroller setAutoresizingMask:NSViewMinYMargin | NSViewHeightSizable | NSViewMaxYMargin]; } [self addSubview:m_scroller]; [m_scroller setTarget:self]; [m_scroller setAction:@selector( handleAction: )]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( handleFrameDidChange: ) name:@NSViewFrameDidChangeNotification object:self]; } return self; } - (IBAction)handleAction: (id)sender { // Handle scroller action here return; } - (void) handleFrameDidChange:( NSNotification* ) note { NSRect frame = [self frame]; NSRect scrollerFrame = [m_scroller frame]; scrollerFrame.origin.x = 0; scrollerFrame.origin.y = 0; scrollerFrame.size = frame.size; [m_scroller setFrame:scrollerFrame]; return; } @end Regards, Jo Meder ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Including UIImageView to Scroll down with UITableView
Hello Guys, I have a View Controller that uses the UITableView delegate but then I want to place above the UITableView, a UIImageView but I can't seem to include it in the scrolling. When I try to scroll down, only the UITableView moves. Anybody knows how I can solve this problem? Thanks, Charisse ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Including UIImageView to Scroll down with UITableView
Your explanation of what you are doing now is incredibly vague (what do you mean by placing a UIImageView above a UITableView?) but I assume the answer you're looking for is to set your image view as the tableHeaderView. It will then appear at the top of the table and scroll along with it. Luke On May 3, 2010, at 6:05 AM, charisse napeÿf1as wrote: Hello Guys, I have a View Controller that uses the UITableView delegate but then I want to place above the UITableView, a UIImageView but I can't seem to include it in the scrolling. When I try to scroll down, only the UITableView moves. Anybody knows how I can solve this problem? Thanks, Charisse ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com This email sent to luket...@apple.com ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSTableView sort with a data source (silly question ?)
Hi, this might be a silly question but, before doing any further implementation, and having found no definite answer, I dare ask it. Is there a way to sort the contents of a NSTableView whose data is provided by a data source, besides sorting at the source itself (via a suitable query)? Thanks, Vincent ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSTableView sort with a data source (silly question ?)
On 04/05/2010, at 1:00 AM, vincent habchi wrote: Hi, this might be a silly question but, before doing any further implementation, and having found no definite answer, I dare ask it. Is there a way to sort the contents of a NSTableView whose data is provided by a data source, besides sorting at the source itself (via a suitable query)? You provide sorted data to the table through the data source. But the table can provide sort descriptors back to you to do this, allowing you to click table headers to pick how the data is sorted. Since the table is a view, of course it is your responsibility to provide the data in a sorted form. Responding to a change in sort descriptors and then actually performing a sort is two lines of code. --Graham ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSTableView sort with a data source (silly question ?)
Le 3 mai 2010 à 17:08, Graham Cox a écrit : this might be a silly question but, before doing any further implementation, and having found no definite answer, I dare ask it. Is there a way to sort the contents of a NSTableView whose data is provided by a data source, besides sorting at the source itself (via a suitable query)? You provide sorted data to the table through the data source. Ok, that's what I was prepared to do. But the table can provide sort descriptors back to you to do this, allowing you to click table headers to pick how the data is sorted. Since the table is a view, of course it is your responsibility to provide the data in a sorted form. Responding to a change in sort descriptors and then actually performing a sort is two lines of code. Well, ideally yes. In my case, it involves adding the selector to respond to the click, and append an auxiliary clause to a SQL request (SORT BY xxx ASC/DESC) and reload data. It's not two lines, but I agree it is not much work either. Thanks for confirming my opinion! Vincent___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Compress / Uncompress
On Sun, May 2, 2010 at 10:09 PM, k...@highrolls.net wrote: If a director is compressed in the Finder, and added to an app's resources, and the app wants to copy the compressed director to a location and uncompress the directory what is the correct process. I have done unzip and uncompress as NSTask but neither yields the result as if the compressed directory was double-clicked in the Finder. Specifically I see now 'unzip' or 'uncompress' results. So, what is the proper tool to undo a Finder 'Compress The ditto command should match the Finder's behavior. Details are available in the man page, but something like 'ditto -x -k yourzipfilehere.zip' should do it. Mike ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Help! (Help Book does not register)
I've got trouble (again) with the Help system... The Help system does not seem to register my Help Books. When trying to display the page with a specific anchor, I get Help Viewer cannot open this content., or it will show the same anchor in the Help Book of the same name in an earlier version of the app. This used to work in earlier versions (or with earlier 10.6 releases). My Info.plist contains: keyCFBundleName/key stringAquamacs/string keyCFBundleHelpBookFolder/key array stringAquamacs Help/string stringEmacs Manual/string stringEmacs Lisp Reference/string /array keyCFBundleHelpBookName/key array stringAquamacs Help/string stringEmacs Manual/string stringEmacs Lisp Reference/string /array The index file of the relevant help document is Resources/Aquamacs Help/index.html, and it contains: META NAME=AppleTitle content=Aquamacs Help (Does each html file have to contain this?) I call [[NSHelpManager sharedHelpManager] openHelpAnchor:inBook:] to register display the help book. I have created an index. Calls to Carbon's Apple Help registration functions don't help. Renaming the help books (without space in folder name) doesn't help. Having only one help book in my Info.plist doesn't help. Also, I still haven't figured out how to allow users to search all help books and not just the last one from within the Help menu. Thanks in advance for your help.___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSPrintOperation Fails to Auto-Paginate?
On May 2, 2010, at 7:57 PM, DairyKnight wrote: I've been working on a tool to print an NSView to a PDF file. I followed Apple's documentation but couldn't get the auto-pagination work. The resulting PDF file is always long and one-page. Hope someone with relevant experience could help me. My code is as follows: PDFOperationWithView doesn't do pagination. Instead you need to set the job disposition to generate a file rather than to output to a printer. Something like this: NSDictionary *printInfoDictionary = [NSDictionary dictionaryWithObjectsAndKeys: NSPrintSaveJob, NSPrintJobDisposition, urlToSave, NSPrintJobSavingURL, // use NSPrintSavePath on 10.5 or below. [NSNumber numberWithBOOL:hideExtension], NSPrintJobSavingFileNameExtensionHidden, // only on 10.6 or above. nil]; NSPrintInfo *printInfo = [[[NSPrintInfo alloc] initWithDictionary:printInfoDictionary] autorelease]; NSPrintOperation *operation = [NSPrintOperation printOperationWithView:view printInfo:printInfo]; -- David Duncan Apple DTS Animation and Printing ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: IB Plugin Container View and child management
Hi Patrick, Currently, there is no API to accomplish this. Please feel free to file an enhancement request. Kevin On 3 May 2010, at 05:33, Patrick Mau wrote: Dear list members I have created in IB Plugin based on the Xcode template and everything works fine. If you need the completly boring source to help me out I can upload the full project somewhere. Here's what I'd like to accomplish: I have a custom NSView subclass that is configured to be a container for other objects. Exposing child objects using - (NSArray *)ibDefaultChildren works as expected. Now I want to be able to drag other Library Objects from my IBPlugin inside the container but limiting the objects to certain classes. How does IB determine the possible drop locations for dragged library objects? I have implemented: - (void)ibDidAddToDesignableDocument:(IBDocument *)document { NSObject *parent; parent = [document parentOfObject:self]; NSLog(@ibDidAddToDesignableDocument: %@, document); NSLog(@ parent: %@, parent); // Try to remove ourself when added to the wrong parent if ([parent isKindOfClass:[self class]] == NO) { [document removeObject:self]; NSLog(@removed); } } I assumed (wrongly) that I might be able to check the parent object and remove the just-added instance, but that leads to a nice assertion failure in IB. Is there any way for a object to refuse itself to be dropped in certain locations? Thanks a lot Patrick ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cathey%40apple.com This email sent to cat...@apple.com ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Ticker Style Scrolling Text
I am writing a small NSStatusItem which displays a NSString in the menu bar and supplies a series of NSMenuItems. As the text to be displayed is occasionally longer than would be permitted on the Menu Bar I would like to animate the text in a Stock Ticker style scrolling animation. Much like you'd see in iTunes when a song is too long to be displayed or how the modem connect NSStatusItem will scroll the words dialing... authentication I tried to simply write text to the menu bar using a Timer writing one character at a time, but the result isn't smooth and due to spacing in between letters can be variable in how much it moves each iteration. I suspect that a custom NSView is set to the NSStatusItem, but I am at a complete loss as to how to pull this off. Any examples of how to: 1. Properly animate the text. 2. Attach the resulting animation to the menu bar would be greatly appreciated. I have googled around extensively and have yet to find a solid example or clue. Thank you, Erik Benoist___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: CoreData in predicate
The manuals for this give the following example: NSPredicate *inPredicate = [NSPredicate predicateWithFormat: @attribute IN %@, aCollection]; It looks like you are missing the attribute... If attribute can vary, you can use a %K and a NSString value representing the attribute name (it is not automatically enclosed in quotes as %@ values are). HTH, Fred On May 2, 2010, at 8:27 AM, Rick Mann wrote: Hi. I have two entities: Mission and Favorite. Favorite has a single relation to Mission. I need to fetch all Mission objects that exist in Favorite. I'm using an NSFetchResultsController. I created an array with all the Mission objects found in the Favorite entity. Then I tried to create a predicate like this: NSPredicate* pred = [NSPredicate predicateWithFormat: @in %@, favoriteMissions]; and use that on a fetch of Mission objects. But it complains that it can't parse that format string. Clearly, this approach isn't going to work. I could store the Mission's key in the Favorite table instead, but that's less elegant. Might be the only way to go. Any suggestions? tia, Rick ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/freimer%40freimer.org This email sent to frei...@freimer.org ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: CoreData in predicate
Unfortunately, there is nothing for the NSPredicate class to go on to assume what object you are talking about. predicateWithFormat is a class method/selector/function. What object is it supposed to assume you mean if one is not supplied? Dan Rowley sent me an email saying you may be able to use self. So, I assume this means: NSPredicate *pred = [NSPredicate predicateWithFormat: @%K in %@, self, favoriteMissions]; HTH, On May 2, 2010, at 9:03 AM, Rick Mann wrote: I saw that, I had hoped that by not specifying an attribute, it would mean the object itself, not an attribute on the object. On May 2, 2010, at 05:58:39, Frederick Reimer wrote: The manuals for this give the following example: NSPredicate *inPredicate = [NSPredicate predicateWithFormat: @attribute IN %@, aCollection]; It looks like you are missing the attribute... If attribute can vary, you can use a %K and a NSString value representing the attribute name (it is not automatically enclosed in quotes as %@ values are). HTH, Fred On May 2, 2010, at 8:27 AM, Rick Mann wrote: Hi. I have two entities: Mission and Favorite. Favorite has a single relation to Mission. I need to fetch all Mission objects that exist in Favorite. I'm using an NSFetchResultsController. I created an array with all the Mission objects found in the Favorite entity. Then I tried to create a predicate like this: NSPredicate* pred = [NSPredicate predicateWithFormat: @in %@, favoriteMissions]; and use that on a fetch of Mission objects. But it complains that it can't parse that format string. Clearly, this approach isn't going to work. I could store the Mission's key in the Favorite table instead, but that's less elegant. Might be the only way to go. Any suggestions? tia, Rick ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/freimer%40freimer.org This email sent to frei...@freimer.org Fred Reimer, CCIE 23812 CISSP 107125 mailto:frei...@freimer.org ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: CoreData in predicate
Wrong assumption; you would actually use SELF in a format string, as it is a reserved word. So @SELF IN %@ I think... Fred Reimer, CCIE 23812 CISSP 107125 mailto:frei...@freimer.org On May 2, 2010, at 4:32 PM, Frederick Reimer wrote: Unfortunately, there is nothing for the NSPredicate class to go on to assume what object you are talking about. predicateWithFormat is a class method/selector/function. What object is it supposed to assume you mean if one is not supplied? Dan Rowley sent me an email saying you may be able to use self. So, I assume this means: NSPredicate *pred = [NSPredicate predicateWithFormat: @%K in %@, self, favoriteMissions]; HTH, On May 2, 2010, at 9:03 AM, Rick Mann wrote: I saw that, I had hoped that by not specifying an attribute, it would mean the object itself, not an attribute on the object. On May 2, 2010, at 05:58:39, Frederick Reimer wrote: The manuals for this give the following example: NSPredicate *inPredicate = [NSPredicate predicateWithFormat: @attribute IN %@, aCollection]; It looks like you are missing the attribute... If attribute can vary, you can use a %K and a NSString value representing the attribute name (it is not automatically enclosed in quotes as %@ values are). HTH, Fred On May 2, 2010, at 8:27 AM, Rick Mann wrote: Hi. I have two entities: Mission and Favorite. Favorite has a single relation to Mission. I need to fetch all Mission objects that exist in Favorite. I'm using an NSFetchResultsController. I created an array with all the Mission objects found in the Favorite entity. Then I tried to create a predicate like this: NSPredicate* pred = [NSPredicate predicateWithFormat: @in %@, favoriteMissions]; and use that on a fetch of Mission objects. But it complains that it can't parse that format string. Clearly, this approach isn't going to work. I could store the Mission's key in the Favorite table instead, but that's less elegant. Might be the only way to go. Any suggestions? tia, Rick ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/freimer%40freimer.org This email sent to frei...@freimer.org Fred Reimer, CCIE 23812 CISSP 107125 mailto:frei...@freimer.org ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Scroll bars in CoreAnimation drawing model
Hi, I am developing a 32 out of process plugin for 64 bit safari using CAOpenGLLayer model(Core Animation). The plugin needs to create some scroll bars and buttons. Earlier in the Carbon event model using QD , I used NewControl to create them. What is the best way to create these controls in CALayer ? How are events for these handled in this model ?. +Sam ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
PMSessionGetDocumentFormatGeneration
Hi All, I was using PMSessionGetDocumentGenerationFormat in one of my app earlier. I now want to port that app to 64 bit, but unfortunately I am not able to find any API that is supported on 64 bit with the same/similar functionality. Please refer http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CorePrintRef/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/c/func/PMSessionGetDocumentFormatGeneration for more details on this API. Any references or any other API which can be used in its place on 64 bit? Thanks in Advance! -Shilpi ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
theme sets with NSUserDefaults
Here's the scenario. In my (OS X) app's preferences, I'd like the user to be able select between sets of preference settings, and I'd like to be able to use NSUserDefaults for this without having to deal with extra plists. Here's an example to illustrate the idea. On the preferences page there is a combo box, where the user can pick a theme or enter the name of a new theme. The settings for the theme are some check buttons which have different states for the different themes. Obviously, the current state is easy with NSUserDefaults. But I can't figure out how to have each theme state stored in NSUserDefaults. Is this possible, or do I just need to forget it and use plists? -- John ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: theme sets with NSUserDefaults
On May 3, 2010, at 6:59 AM, John Stoneham wrote: Here's an example to illustrate the idea. On the preferences page there is a combo box, where the user can pick a theme or enter the name of a new theme. The settings for the theme are some check buttons which have different states for the different themes. Obviously, the current state is easy with NSUserDefaults. But I can't figure out how to have each theme state stored in NSUserDefaults. You can store the theme-specific data in a nested dictionary in the defaults. But I'm not sure if the user-defaults support in bindings knows how to get and set nested items in keypaths. —Jens___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Help! (Help Book does not register)
On Mon, 3 May 2010 11:28:27 -0400, David Reitter david.reit...@gmail.com said: I've got trouble (again) with the Help system... The Help system does not seem to register my Help Books. When trying to display the page with a specific anchor, I get Help Viewer cannot open this content., or it will show the same anchor in the Help Book of the same name in an earlier version of the app. I'd suggest asking about this on the apple-help-authoring list, because, uh, that's what it's for. You'll find that help anchors are pretty broken for most people, I think, so one suggestion is likely to be Don't Do That. Also the fact that you're getting the wrong help book (a frequent problem) suggests you need to hide the earlier version from the Finder and do a flush of the help caches. These are all common topics at apple-help-authoring... m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 7, Issue 496
On May 3, 2010, at 11:55:33, Dan Rowley wrote: Yes, that's what I meant. self in %@. This would evaluate to true in any case where the object exists in the specified set. At least theoretically, as I'm not sure I understood your original question completely. :) I haven't actually tried this, but theoretically simple membership lookups on a set would be much quicker than the same on an array, so you might consider a set of missions instead of an array for this operation. Well, I have an array as a result of a previous query, so that'll have to do. It's small, though, so I'm not too worried. Thanks! D On 5/3/10 11:17 AM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote: Wrong assumption; you would actually use SELF in a format string, as it is a reserved word. So @SELF IN %@ I think... Fred Reimer, CCIE 23812 CISSP 107125 mailto:frei...@freimer.org On May 2, 2010, at 4:32 PM, Frederick Reimer wrote: Unfortunately, there is nothing for the NSPredicate class to go on to assume what object you are talking about. predicateWithFormat is a class method/selector/function. What object is it supposed to assume you mean if one is not supplied? Dan Rowley sent me an email saying you may be able to use self. So, I assume this means: NSPredicate *pred = [NSPredicate predicateWithFormat: @%K in %@, self, favoriteMissions]; HTH, On May 2, 2010, at 9:03 AM, Rick Mann wrote: I saw that, I had hoped that by not specifying an attribute, it would mean the object itself, not an attribute on the object. On May 2, 2010, at 05:58:39, Frederick Reimer wrote: The manuals for this give the following example: NSPredicate *inPredicate = [NSPredicate predicateWithFormat: @attribute IN %@, aCollection]; It looks like you are missing the attribute... If attribute can vary, you can use a %K and a NSString value representing the attribute name (it is not automatically enclosed in quotes as %@ values are). HTH, Fred On May 2, 2010, at 8:27 AM, Rick Mann wrote: Hi. I have two entities: Mission and Favorite. Favorite has a single relation to Mission. I need to fetch all Mission objects that exist in Favorite. I'm using an NSFetchResultsController. I created an array with all the Mission objects found in the Favorite entity. Then I tried to create a predicate like this: NSPredicate* pred = [NSPredicate predicateWithFormat: @in %@, favoriteMissions]; and use that on a fetch of Mission objects. But it complains that it can't parse that format string. Clearly, this approach isn't going to work. I could store the Mission's key in the Favorite table instead, but that's less elegant. Might be the only way to go. Any suggestions? tia, Rick ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Compress / Uncompress
Thanks for the tips ... I will let you know the results when I get there ! -koko On May 3, 2010, at 9:17 AM, Michael Ash wrote: On Sun, May 2, 2010 at 10:09 PM, k...@highrolls.net wrote: If a director is compressed in the Finder, and added to an app's resources, and the app wants to copy the compressed director to a location and uncompress the directory what is the correct process. I have done unzip and uncompress as NSTask but neither yields the result as if the compressed directory was double-clicked in the Finder. Specifically I see now 'unzip' or 'uncompress' results. So, what is the proper tool to undo a Finder 'Compress The ditto command should match the Finder's behavior. Details are available in the man page, but something like 'ditto -x -k yourzipfilehere.zip' should do it. Mike ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net This email sent to k...@highrolls.net ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Ticker Style Scrolling Text
Hi Erik, I think one way to go would be CoreAnimation ... At least I'm using it in my iTunes Menubar Controller Playwatch. CATextLayer, CAScrollLayer and CABasicAnimation are the Classes that might be helpful. But CoreAnimation is rather complex. There might be ways to implement it with a normal NSView contained in a NSScrollView. And yes, you would have to implement at least one custom NSView. regards, Joachim http://www.aquarius-software.de/AQUARIUS-software_en/PlaywatchFeatures.html Am 03.05.2010 um 00:58 schrieb Erik Benoist: I am writing a small NSStatusItem which displays a NSString in the menu bar and supplies a series of NSMenuItems. As the text to be displayed is occasionally longer than would be permitted on the Menu Bar I would like to animate the text in a Stock Ticker style scrolling animation. Much like you'd see in iTunes when a song is too long to be displayed or how the modem connect NSStatusItem will scroll the words dialing... authentication I tried to simply write text to the menu bar using a Timer writing one character at a time, but the result isn't smooth and due to spacing in between letters can be variable in how much it moves each iteration. I suspect that a custom NSView is set to the NSStatusItem, but I am at a complete loss as to how to pull this off. Any examples of how to: 1. Properly animate the text. 2. Attach the resulting animation to the menu bar would be greatly appreciated. I have googled around extensively and have yet to find a solid example or clue. Thank you, Erik Benoist___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev%40deelen.de This email sent to cocoa-...@deelen.de ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Ticker Style Scrolling Text
Erik, If you haven't checked out Quartz Composer, do so. If my memory is correct, the QCTV sample code includes a news ticker that may be exactly what you are looking for. regards, douglas On May 3, 2010, at 3:59 PM, Joachim Deelen wrote: Hi Erik, I think one way to go would be CoreAnimation ... At least I'm using it in my iTunes Menubar Controller Playwatch. CATextLayer, CAScrollLayer and CABasicAnimation are the Classes that might be helpful. But CoreAnimation is rather complex. There might be ways to implement it with a normal NSView contained in a NSScrollView. And yes, you would have to implement at least one custom NSView. regards, Joachim http://www.aquarius-software.de/AQUARIUS-software_en/PlaywatchFeatures.html Am 03.05.2010 um 00:58 schrieb Erik Benoist: I am writing a small NSStatusItem which displays a NSString in the menu bar and supplies a series of NSMenuItems. As the text to be displayed is occasionally longer than would be permitted on the Menu Bar I would like to animate the text in a Stock Ticker style scrolling animation. Much like you'd see in iTunes when a song is too long to be displayed or how the modem connect NSStatusItem will scroll the words dialing... authentication I tried to simply write text to the menu bar using a Timer writing one character at a time, but the result isn't smooth and due to spacing in between letters can be variable in how much it moves each iteration. I suspect that a custom NSView is set to the NSStatusItem, but I am at a complete loss as to how to pull this off. Any examples of how to: 1. Properly animate the text. 2. Attach the resulting animation to the menu bar would be greatly appreciated. I have googled around extensively and have yet to find a solid example or clue. Thank you, Erik Benoist___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev%40deelen.de This email sent to cocoa-...@deelen.de ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/douglas_welton%40earthlink.net This email sent to douglas_wel...@earthlink.net ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
What happens after adding an object to a NSMutableDictionary
Hello, I want to add an Object to a NSMutableDictionary: if(!parsedClasses) parsedClasses = [[NSMutableDictionary alloc] initWithObjectsAndKeys:oneClass,[oneClass objectAtIndex:0],nil]; else [parsedClasses setObject:[oneClass retain] forKey:[oneClass objectAtIndex:0]]; After this I remove all objects and keys from the NSMutableArray oneClass to fill it again with other objects. [oneClass removeAllObjects]; When I try to access the the objects of parsedClass I see that every object is nil. What happens after I adding an oneClass MutableArray Object to the parsedClasses MutableDictionary and how can I preserve the oneClass objects in parsedClasses after removing all objects? Dominic ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: What happens after adding an object to a NSMutableDictionary
On May 3, 2010, at 2:39 PM, Dominic Dauer wrote: Hello, I want to add an Object to a NSMutableDictionary: if(!parsedClasses) parsedClasses = [[NSMutableDictionary alloc] initWithObjectsAndKeys:oneClass,[oneClass objectAtIndex:0],nil]; else [parsedClasses setObject:[oneClass retain] forKey:[oneClass objectAtIndex:0]]; After this I remove all objects and keys from the NSMutableArray oneClass to fill it again with other objects. [oneClass removeAllObjects]; When I try to access the the objects of parsedClass I see that every object is nil. This is not possible, or your description is inaccurate. Dictionaries cannot contain nil values, but -objectForKey: will return nil if the key doesn't exist. Anyway, are you sure that oneClass is non-nil in you code? Have you stepped through the code using the debugger to see if the values are what you expect, and are being added to the dictionary properly? What happens after I adding an oneClass MutableArray Object to the parsedClasses MutableDictionary and how can I preserve the oneClass objects in parsedClasses after removing all objects? NSDictionary copies keys and retains objects, so you should never lose them if an owning collection releases them. Also, objects are not automatically removed from a collection when their reference becomes invalid (completely released). Chances are, they are not getting added to the dictionary at all. Chances are, oneClass is nil. HTH, Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
My program causes MacBook Pro to use NVidia graphics processor
Hi, I've had a query from a user of my software, and he says that when he runs it, his MacBook Pro switches to use the NVidia graphics chip. I haven't done anything in my program to specifically force that (and I'm not sure whether it is possible to in normal Cocoa code). Is there something that I specific I may have in my application that would force it to use that graphics card? Is there some way this user could run my program and force it to use the other graphics processor? Thanks Gideon ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My program causes MacBook Pro to use NVidia graphics processor
Not particularly. I mean it is a graphics based program, but we don't have animations going on while the program is just sitting there, and we don't use any opengl or anything like that. Even when the user is interacting with it, it's just normal screen redraws - nothing I would have thought would be particularly taxing graphically. I'm a bit mystified as to why the machine would think that it needs the most advanced graphics chip available. Regards Gideon On 04/05/2010, at 7:55 AM, Junio Gonçalves Vitorino wrote: I don't believe that this can be possible. Your software require some complex graphic process? ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Selecting an object based on the value of one of its attributes
Roland, the application in question uses Core Data. To build a dictionary as you suggest, I will need to wait until the array controller loads its content, then iterate over all members of the array, putting the property in question and the array index into the dictionary. How can I know immediately (without any user action) that the content has finished loading? I can't use awakeFromNib, as the content has not yet been loaded when that method is called. --Lynn On Apr 27, 2010, at 8:06 PM, Roland King wrote: Graham Cox wrote: On 28/04/2010, at 12:37 PM, Lynn Barton wrote: Newbie question: Consider an array of dictionary objects, all of the same class. One of the ivars of that class is an NSString which is unique for each instance. Does there already exist a method that will identify the one dictionary object that has a given value of that ivar, without me having to write code to examine all of the objects one by one? I have searched the documentation without finding such a method. Lynn Barton You could use NSPredicate to filter your collection based on your unique string property being equal to the one sought. If they are unique it will return exactly one item (or none, if it doesn't exist). See [NSArray filteredArrayUsingPredicate:] It's unclear whether that would be actually any faster than doing a linear search yourself - it might be slower, in that it wouldn't return as soon as it found the item, but would always check every element. --Graham I think that as Graham suggests that would be slower than searching yourself, but it is a method and it does exist and it's free, so you could try that and if it's fast enough for you, that's great. Actually iterating the list however yourself is very simple and possibly only the same number of lines of code as making a predicate. (code typed in mail) YourObject *found = nil; for( YourObject *obj in yourArrayOfObjects ) if( [ [ obj thePropertyYouWant ] isEqualToString:yourThing ] ) { found = obj; break; } // if found isn't nil, you found one, if it is, you failed. Finally - are these all your objects and are you always looking for the same property of them? If so instead of dumping them into an array you could build a dictionary of them as you insert them, keyed by that string property, then go look it up later when you want it. ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Windows following the menubar in Cocoa
Using Xcode 3.1.3 (or 2.5), I created a standard Carbon application with a single document window. After running the application, I use the Display System Preferences to move the menubar from one display to another one. The document window for the Carbon application followed the menubar and moved to the other display. Doing the same thing, but this time with the default Cocoa application, the document window does not automatically move. Is there a way to configure a Cocoa window so it will follow the menubar to another display? I'm assuming there isn't as I have not seen such an option...unless I missed something. I assume the appropriate way to handle this in Cocoa is to respond to NSApplication's -applicationDidChangeScreenParameters: delegate method and move the window myself. ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Selecting an object based on the value of one of its attributes
On Mon, May 3, 2010 at 3:24 PM, Lynn Barton lynnbar...@mac.com wrote: Roland, the application in question uses Core Data. To build a dictionary as you suggest, I will need to wait until the array controller loads its content, then iterate over all members of the array, putting the property in question and the array index into the dictionary. How can I know immediately (without any user action) that the content has finished loading? I can't use awakeFromNib, as the content has not yet been loaded when that method is called. This sounds like something that should be happening at the model layer, not at the controller layer. --Kyle Sluder ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My program causes MacBook Pro to use NVidia graphics processor
On May 3, 2010, at 2:46 PM, Gideon King wrote: Hi, I've had a query from a user of my software, and he says that when he runs it, his MacBook Pro switches to use the NVidia graphics chip. I haven't done anything in my program to specifically force that (and I'm not sure whether it is possible to in normal Cocoa code). Is there something that I specific I may have in my application that would force it to use that graphics card? I've read in reviews that the new MBPs will switch graphics chips based on the frameworks apps link against. So your app may be linking (directly or transitively) one of the trigger frameworks. I don't know what's on that list besides, of course. OpenGL. You can set the environment variable DYLD_PRINT_LIBRARIES when starting your app, and all the libraries loaded will be spewed to stderr as it launches. —Jens___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Windows following the menubar in Cocoa
On May 3, 2010, at 3:31 PM, Eric Gorr wrote: Using Xcode 3.1.3 (or 2.5), I created a standard Carbon application with a single document window. After running the application, I use the Display System Preferences to move the menubar from one display to another one. The document window for the Carbon application followed the menubar and moved to the other display. Doing the same thing, but this time with the default Cocoa application, the document window does not automatically move. I suspect this is done to Carbon apps to keep them from breaking, since otherwise the window's global coordinates would change behind its back. Back in the day (during OS X 10.0 development) there were a lot of problems with having non-app code move Carbon windows, which is one reason why they're not draggable while the app is busy. So in short, this is a workaround, not a feature. I wouldn't expect an app window to move to follow the menu bar. But maybe your app has some special behavior that makes that behavior desirable? Your idea of the NSApp delegate call seems like a good way to implement that. —Jens___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Windows following the menubar in Cocoa
On May 3, 2010, at 3:31 PM, Eric Gorr wrote: Is there a way to configure a Cocoa window so it will follow the menubar to another display? Is it even a good idea? Seems like there's more to be done than just move a window (like maybe not moving it if it won't fit, resizing it etc). I'm assuming there isn't as I have not seen such an option...unless I missed something. I assume the appropriate way to handle this in Cocoa is to respond to NSApplication's -applicationDidChangeScreenParameters: delegate method and move the window myself. Yes. Just remember that the screen with the menu bar is not the main screen (as it was in the old days), it's the first screen in the array returned by +[NSScreen screens]. _murat ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My program causes MacBook Pro to use NVidia graphics processor
He sends a system profile with the program running and another without it running. Without the program running, it is as follows: Graphics/Displays: NVIDIA GeForce GT 330M: Chipset Model: NVIDIA GeForce GT 330M Type: GPU Bus: PCIe PCIe Lane Width: x16 VRAM (Total): 512 MB Vendor: NVIDIA (0x10de) Device ID: 0x0a29 Revision ID: 0x00a2 ROM Revision: 3532 gMux Version: 1.9.21 Displays: Display Connector: Status: No Display Connected Display Connector: Status: No Display Connected Intel HD Graphics: Chipset Model: Intel HD Graphics Type: GPU Bus: Built-In VRAM (Total): 288 MB Vendor: Intel (0x8086) Device ID: 0x0046 Revision ID: 0x0012 gMux Version: 1.9.21 Displays: Color LCD: Resolution: 1680 x 1050 Pixel Depth: 32-Bit Color (ARGB) Main Display: Yes Mirror: Off Online: Yes Built-In: Yes And with it running, it is: Graphics/Displays: NVIDIA GeForce GT 330M: Chipset Model: NVIDIA GeForce GT 330M Type: GPU Bus: PCIe PCIe Lane Width: x16 VRAM (Total): 512 MB Vendor: NVIDIA (0x10de) Device ID: 0x0a29 Revision ID: 0x00a2 ROM Revision: 3532 gMux Version: 1.9.21 Displays: Color LCD: Resolution: 1680 x 1050 Pixel Depth: 32-Bit Color (ARGB) Main Display: Yes Mirror: Off Online: Yes Built-In: Yes Display Connector: Status: No Display Connected Intel HD Graphics: Chipset Model: Intel HD Graphics Type: GPU Bus: Built-In VRAM (Total): 288 MB Vendor: Intel (0x8086) Device ID: 0x0046 Revision ID: 0x0012 gMux Version: 1.9.21 Displays: Display Connector: Status: No Display Connected The only other interesting thing I see in the second one is an entry called IOUserClientCreator which identifies my program - not sure if this means that my program forced it to use the mode it is using. I have not verified any of this independently, and I am only assuming that running my program is the only thing that has changed, and that it is not just a temporary switch while the application is starting up or something like that...I'll do what I can to check that, but I think from the replies so far it appears that the operating system chooses what it chooses and you can't control that directly. Anyway, I don't think that I'll spend a lot of time on this since there is a new version of the program that links against different libraries etc due out next week. I'll see if this user still has the problem with that version. I see from Jens' reply, that I could try DYLD_PRINT_LIBRARIES, but it would perhaps not be very useful until I know what I am looking for, and we're not going to update the old version of the application anyway. If anyone does know if it is specific libraries that do this, and can provide a list, maybe I can check the new application against that list and possibly make some changes if required. Thanks for the quick replies. Regards Gideon On 04/05/2010, at 8:26 AM, GMail Account wrote: How does the user know it's your program, and that it's starting the GPU? On Monday, May 3, 2010, Gideon King gid...@novamind.com wrote: Not particularly. I mean it is a graphics based program, but we don't have animations going on while the program is just sitting there, and we don't use any opengl or anything like that. Even when the user is interacting with it, it's just normal screen redraws - nothing I would have thought would be particularly taxing graphically. I'm a bit mystified as to why the machine would think that it needs the most advanced graphics chip available. Regards Gideon On 04/05/2010, at 7:55 AM, Junio Gonçalves Vitorino wrote: I don't believe that this can be possible. Your software require some complex graphic process? ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40gavineadie.com This email sent to arch...@gavineadie.com ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Ticker Style Scrolling Text
In regards to both of these (and especially the QC option). Would it be possible to add those to the NSMenu as with a setView? I'd like to avoid using setView to maintain backward compatibility, but if its the only way I can cut off anyone below 10.5 (when custom views were added to the NSMenuItem API). Either way thanks for the replies! -Erik On May 3, 2010, at 2:25 PM, douglas welton wrote: Erik, If you haven't checked out Quartz Composer, do so. If my memory is correct, the QCTV sample code includes a news ticker that may be exactly what you are looking for. regards, douglas On May 3, 2010, at 3:59 PM, Joachim Deelen wrote: Hi Erik, I think one way to go would be CoreAnimation ... At least I'm using it in my iTunes Menubar Controller Playwatch. CATextLayer, CAScrollLayer and CABasicAnimation are the Classes that might be helpful. But CoreAnimation is rather complex. There might be ways to implement it with a normal NSView contained in a NSScrollView. And yes, you would have to implement at least one custom NSView. regards, Joachim http://www.aquarius-software.de/AQUARIUS-software_en/PlaywatchFeatures.html Am 03.05.2010 um 00:58 schrieb Erik Benoist: I am writing a small NSStatusItem which displays a NSString in the menu bar and supplies a series of NSMenuItems. As the text to be displayed is occasionally longer than would be permitted on the Menu Bar I would like to animate the text in a Stock Ticker style scrolling animation. Much like you'd see in iTunes when a song is too long to be displayed or how the modem connect NSStatusItem will scroll the words dialing... authentication I tried to simply write text to the menu bar using a Timer writing one character at a time, but the result isn't smooth and due to spacing in between letters can be variable in how much it moves each iteration. I suspect that a custom NSView is set to the NSStatusItem, but I am at a complete loss as to how to pull this off. Any examples of how to: 1. Properly animate the text. 2. Attach the resulting animation to the menu bar would be greatly appreciated. I have googled around extensively and have yet to find a solid example or clue. Thank you, Erik Benoist___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev%40deelen.de This email sent to cocoa-...@deelen.de ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/douglas_welton%40earthlink.net This email sent to douglas_wel...@earthlink.net ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Compress / Uncompress [solved]
Tip o' the hat to Michael ... ditto is the tool for which I was looking ! -koko On May 3, 2010, at 9:17 AM, Michael Ash wrote: On Sun, May 2, 2010 at 10:09 PM, k...@highrolls.net wrote: If a director is compressed in the Finder, and added to an app's resources, and the app wants to copy the compressed director to a location and uncompress the directory what is the correct process. I have done unzip and uncompress as NSTask but neither yields the result as if the compressed directory was double-clicked in the Finder. Specifically I see now 'unzip' or 'uncompress' results. So, what is the proper tool to undo a Finder 'Compress The ditto command should match the Finder's behavior. Details are available in the man page, but something like 'ditto -x -k yourzipfilehere.zip' should do it. Mike ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net This email sent to k...@highrolls.net ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My program causes MacBook Pro to use NVidia graphics processor
On May 3, 2010, at 5:59 PM, Gideon King wrote: I see from Jens' reply, that I could try DYLD_PRINT_LIBRARIES, but it would perhaps not be very useful until I know what I am looking for, and we're not going to update the old version of the application anyway. If anyone does know if it is specific libraries that do this, and can provide a list, maybe I can check the new application against that list and possibly make some changes if required. If you posted the results to the list, it could be very useful, as someone may see something in there that they recognize. Charles___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My program causes MacBook Pro to use NVidia graphics processor
On 04/05/2010, at 10:14 AM, Charles Srstka wrote: If you posted the results to the list, it could be very useful, as someone may see something in there that they recognize. OK - in case it is useful, here are the results of running the app with that setting, and sorting the output and removing duplicates. The first group is the ones that were loaded at startup, and the second group are the new ones that were loaded as I played with the app for a while. /Applications/NovaMind Platinum.app/Contents/Frameworks/ILCrashReporter.framework/Versions/A/Resources/CrashReporter.app/Contents/MacOS/CrashReporter /Applications/NovaMind Platinum.app/Contents/MacOS/../Frameworks/ILCrashReporter.framework/Versions/A/ILCrashReporter /Applications/NovaMind Platinum.app/Contents/MacOS/../Frameworks/iMediaBrowser.framework/Versions/A/iMediaBrowser /Applications/NovaMind Platinum.app/Contents/MacOS/../Frameworks/LinkBack.framework/Versions/A/LinkBack /Applications/NovaMind Platinum.app/Contents/MacOS/../Frameworks/NMFoundation.framework/Versions/A/NMFoundation /Applications/NovaMind Platinum.app/Contents/MacOS/../Frameworks/PSMTabBarControl.framework/Versions/A/PSMTabBarControl /Applications/NovaMind Platinum.app/Contents/MacOS/../Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa /Applications/NovaMind Platinum.app/Contents/MacOS/../Frameworks/Sparkle.framework/Versions/A/Sparkle /Applications/NovaMind Platinum.app/Contents/MacOS/NovaMind Platinum /Library/Application Support/NovaMind/Suggesterator.bundle/Contents/MacOS/Suggesterator /Library/InputManagers/1PasswdIM/1PasswdIM.bundle/Contents/MacOS/1PasswdIM /Library/InputManagers/SpeedDownload Enhancer/SpeedDownloadEnhancer.bundle/Contents/MacOS/SpeedDownloadEnhancer /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera /System/Library/Extensions/ATIRadeonX2000GLDriver.bundle/Contents/MacOS/ATIRadeonX2000GLDriver /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage /System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ColorSync.framework/Versions/A/Resources/ColorSyncDeprecated.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXCoreImage.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
Undo Action Message
I have a core data document based application. The standard 'Undo' menu sends an 'undo:' action message to the first responder. The message is passed along the responder chain to the window's delegate which is an NSPersistentDocument instance and then apparently to the NSManagedObjectContext instance. How does the 'undo:' action message actually get to the managed object context instance's 'undo' method? NSPersistentDocument and NSDocument are in the responder chain but do not have an 'undo:' method. NSManagedObjectContext is not in the responder chain but has an 'undo' method. However 'undo' is not the same as 'undo:'. --Richard ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Core Data Versioning: Non-trivial Value Expressions?
When doing Core Data versioning, when creating a Mapping Model, when writing Custom Value Expressions, I understand that the syntax to be used is that described in the Predicate Programming Guide Predicate Format String Syntax. But I can't figure out how to do non-trivial mappings like these... Example 1: Old data model attribute type is an Integer16. I want to map this to a Boolean which is NO if the old value was 0 and YES if != 0. Example 2: Old and new data model attribute types are both String. If the string is Joe, I want to map it to Jose; else, map the original value. It seems like the concept of mapping should support stuff like this, but I can't find any such examples. In MigratingDepartmentAndEmployees, all I see is mapping from one attribute name to another. Relations get a complicated expression like this generated automatically: FUNCTION($manager, destinationInstancesForEntityMappingNamed:sourceInstances: , EmployeeToEmployee, $source.employees) but I have no idea where that FUNCTION keyword comes from (it's not listed as a reserved word in the Predicate Programming Guide). It seems like I should be able to make my own FUNCTION to implement the stuff I need in my examples. Is this possible? Thanks, Jerry Krinock ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Undo Action Message
On May 3, 2010, at 7:25 PM, Richard Somers wrote: How does the 'undo:' action message actually get to the managed object context instance's 'undo' method? Just found the answer to my own question in the documentation. NSResponder does some behind the scenes message sending using more than just the 'undo:' action message. When the first responder of an application receives an undo or redo message, NSResponder goes up the responder chain looking for a next responder that returns an NSUndoManager object from undoManager. http://developer.apple.com/mac/library/documentation/cocoa/conceptual/UndoArchitecture/Articles/UsingUndoAppKit.html --Richard ___ 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)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com