Re: Core Data : Managed Object Models : Configurations, Versions
I can't answer all your questions off the top of my head, but: On Wed, Jun 16, 2010 at 12:40 AM, Jerry Krinock wrote: > Apparently it is common to "merge" managed object models. When is this done? > > My app's bundle contains three managed object models, but they are for > versioning; a current version and two older versions. When I create an > in-memory store for temporary manipulation, following that Xcode template > code I create a managed object model using [NSManagedObjectModel > mergedModelFromBundles:nil]. > You asked when the merging is done: That's the spot! The mergedModelFromBundles: method creates a big combined model out of all the models your app contains. > Eeek. Is this merging my old and current model versions? > > If so, why doesn't that give me "Can't merge models with same entities" > errors? It's not merging your old and current model versions, because (I assume) you've done the appropriate hand-waving to tell Xcode to deal with your versioned model, giving you all those nice migration features etc. At run-time, CD is smart enough to just grab the latest version of each model it finds. (The exception to that is if you've built with an unversioned model, then told Xcode to add versioning to the model, and then built again without first cleaning; Your old, unversioned model will still be there in the bundle, and will conflict with the versioned model) -- // jack // http://nuthole.com // http://learncocoa.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: Service without Icon or Window?
Thanks, all, for the advice and the pointers Take care, Jay On Jun 15, 2010, at 5:05 PM, Peter Ammon wrote: > > On Jun 15, 2010, at 2:56 PM, Lightning Duck wrote: > >> I need to make an application that runs a bit as a 'service' if you will. >> Not in the sense of running from the "Services" menu but something the tuns >> continually in the background with an Icon in the Dock or a Window of it's >> own, that monitors when files are added or removed from a directory >> >> So basically I have two requirements >> >> Monitor the contents of a directory >> >> Run without visibility? >> >> Can anyone send me to some pointers for how to do either, or both, of these >> tasks? > > It sounds like you want a launchd agent. launchd can launch your program > when certain paths are modified, via the WatchPaths or QueueDirectories info > plist keys. > > The advantage of this approach is that your process does not have to run > continuously in the background: it's launched on-demand, and can exit when > it's finished. > > -Peter ___ > > 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/lightningduck%40me.com > > This email sent to lightningd...@me.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
Problem using NSGradient with dataWithPDFInsideRect
Hi all, I have a view which uses an NSGradient to display part of the view. It displays correctly on screen, but when I use dataWithPDFInsideRect, the PDF doesn't show the gradient correctly. It appears that it doesn't honor the opacity settings of the colors and instead uses solid colors. Is this a known issue? Is there some workaround for this? 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: Problem using NSGradient with dataWithPDFInsideRect
On 17/06/2010, at 12:12 AM, Gideon King wrote: > It appears that it doesn't honor the opacity settings of the colors and > instead uses solid colors. > > Is this a known issue? Is there some workaround for this? PDF doesn't support gradients with transparency. This sucks majorly actually, as it makes true WYSIWYG impossible. A workaround might be to render the gradient to an image but it's less than ideal as it can bloat the PDF size hugely and is no longer resolution independent. I think a more recent version of PDF adds this capability but right now Apple is a version or two behind. --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: Where to noteHeightOfRowsWithIndexesChanged
Thanks for all the responses folks. On 15 Jun 2010, at 7:22 pm, Corbin Dunn wrote: Do the height calculations in the bounds change, and then call the "noteHeight.." method all in the same run loop stack; that will probably fix your problem. Beautiful, works like a dream. Many, many thanks for that, you're a superstar! Even though it is fast, however, a table with 200,000 rows is excessive. There is no way a user can realistically use all those rows without some sort of filtering/searching. I would consider re- doing your UI to have a "more results" button, akin to the Finder spotlight search results. It does have a search, and I would agree, but arbitrary browsing is required (even from the search which just scrolls to the results). Unfortunately it's a PC->Mac port and you'll have to drag me through hot coals before I'll be happy with a Mac version that seems somehow inferior to the PC version. It's an iPhone version next though, so I'll definitely have to re-think the UI for that. Thanks again, Tony Pollard On 15 Jun 2010, at 7:22 pm, Corbin Dunn wrote: On Jun 15, 2010, at 10:55 AM, Jens Alfke wrote: On Jun 15, 2010, at 10:51 AM, Jerry Krinock wrote: I send noteHeightOfRowsWithIndexesChanged: after updating the contents of the array controller to which a table is bound, but I still see little artifacts sometimes. It's in a rarely-used utility view so I've let it slide. But under the conditions you've mentioned, If you can reproduce this, please log a bug. There are usually about 200,000 rows, so calculating the actual height for all rows is not an option (since it takes about 19 seconds). you may have exceeded the capabilities of NSTableView's variable heights I agree. Variable row heights were a late addition to NSTableView (added in 10.3 or 10.4?) and I wouldn’t be surprised if they’re not optimized for huge numbers of rows. The table view is optimized for a huge number of rows -- the implementation in 10.3-10.6 uses a sparse array of row heights, and attempts to lump together equal row heights into a single bucket. This makes it quite fast at computations. Having a lot of non-equal row heights will be more expensive (there is no way around that) as each rowRect computation needs to figure out where to be. Even though it is fast, however, a table with 200,000 rows is excessive. There is no way a user can realistically use all those rows without some sort of filtering/searching. I would consider re- doing your UI to have a "more results" button, akin to the Finder spotlight search results. With respect to: The tableview has variable height rows, and because of a relatively slow data source, resizing and user control of fonts, etc, I don't know the row height in advance. I'm caching the row height, and returning a single-line height if the row is not visible (and the height is not yet known). If the row is visible I calculate the actual height and return that (via the NSTableView heightOfRow delegate). This almost works, but I've not found a good place to put noteHeightOfRowsWithIndexesChanged. I get either overlapping rows or some blank rows during scroll. I've tried NSViewBoundsDidChangeNotification. I've even tried putting it in the heightOfRow delegate (which I know must be wrong), with some re- entrancy control which has given the best results so far (but still displays blank rows sometimes). There are usually about 200,000 rows, so calculating the actual height for all rows is not an option (since it takes about 1 You need to always return the *same* height until you call noteHeightOfRowsWithIndexesChanged. After calling that method, the said indexes can return a new height. Not doing this will cause the types of problems that you see, as the table may (or may not) cache every row height, and expects the same result to be returned for the same row every time (until it was told it changed). Sending the node in some sort of bounds changed notification should be fine -- the problem you are encountering is probably because you are breaking the above rule mentioned. Do the height calculations in the bounds change, and then call the "noteHeight.." method all in the same run loop stack; that will probably fix your problem. corbin ___ 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/tonyp%40neutral.co.uk This email sent to to...@neutral.co.uk ___ 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/
Re: Core Data : Managed Object Models : Configurations, Versions
On 2010 Jun 16, at 02:54, Jack Nutting wrote: > You asked when the merging is done: That's the spot! The > mergedModelFromBundles: method creates a big combined model out of all > the models your app contains. Thank you, Jack. OK, I didn't write that very well. Let me ask it this way: Whereas: Apple seems to recommend that all entities be thrown into a common data model resource and segregated if desired using "configurations" Whereas: There is no need to merge different versions of the same data model resource, and indeed doing so would probably fail due to conflicting entities Then: Why do we have four methods for merging models? Why would a developer want models to be merged at runtime? >> Eeek. Is this merging my old and current model versions? >> >> If so, why doesn't that give me "Can't merge models with same entities" >> errors? > > It's not merging your old and current model versions, because (I > assume) you've done the appropriate hand-waving to tell Xcode to deal > with your versioned model, giving you all those nice migration > features etc. Yes, I have. > At run-time, CD is smart enough to just grab the latest > version of each model it finds. Indeed. But how can I hook into those Core Data Smarts? What method does Core Data use to determine which of the data model resources is the current one? How does that green checkmark in Xcode get packaged into the app? How does Core Data even know that a group of data model resources are different versions of the same model and should not be merged? ___ 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: Where to noteHeightOfRowsWithIndexesChanged
On Jun 16, 2010, at 8:17 AM, Tony P wrote: > Thanks for all the responses folks. > > On 15 Jun 2010, at 7:22 pm, Corbin Dunn wrote: > >> Do the height calculations in the bounds change, and then call the >> "noteHeight.." method all in the same run loop stack; that will probably fix >> your problem. > > Beautiful, works like a dream. Many, many thanks for that, you're a superstar! > >> Even though it is fast, however, a table with 200,000 rows is excessive. >> There is no way a user can realistically use all those rows without some >> sort of filtering/searching. I would consider re-doing your UI to have a >> "more results" button, akin to the Finder spotlight search results. > > It does have a search, and I would agree, but arbitrary browsing is required > (even from the search which just scrolls to the results). Unfortunately it's > a PC->Mac port and you'll have to drag me through hot coals before I'll be > happy with a Mac version that seems somehow inferior to the PC version. It's > an iPhone version next though, so I'll definitely have to re-think the UI for > that. “Inferior” does not mean “fewer things on the screen.” Now is your opportunity to exploit the Mac's less-is-more conventions to better the experience and produce a superior product. This might in turn inform the Windows side of the product, and so forth. --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: Core Data : Managed Object Models : Configurations, Versions
On Jun 16, 2010, at 8:59 AM, Jerry Krinock wrote: > Then: Why do we have four methods for merging models? Why would a developer > want models to be merged at runtime? Frameworks, for one. --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: Where to noteHeightOfRowsWithIndexesChanged
You can't be cavalier about the UI. The Windows version of the application could be in an enterprise setting where lots of users are already accustom to how it works today. Good or bad, consistency outweighs uniqueness. Changing something on an enterprise scale needs to go through a methodical process to get all the people in sync or it could cost you money/downtime. -Tony On Jun 16, 2010, at 9:25 AM, Kyle Sluder wrote: > On Jun 16, 2010, at 8:17 AM, Tony P wrote: > >> Thanks for all the responses folks. >> >> On 15 Jun 2010, at 7:22 pm, Corbin Dunn wrote: >> >>> Do the height calculations in the bounds change, and then call the >>> "noteHeight.." method all in the same run loop stack; that will probably >>> fix your problem. >> >> Beautiful, works like a dream. Many, many thanks for that, you're a >> superstar! >> >>> Even though it is fast, however, a table with 200,000 rows is excessive. >>> There is no way a user can realistically use all those rows without some >>> sort of filtering/searching. I would consider re-doing your UI to have a >>> "more results" button, akin to the Finder spotlight search results. >> >> It does have a search, and I would agree, but arbitrary browsing is required >> (even from the search which just scrolls to the results). Unfortunately it's >> a PC->Mac port and you'll have to drag me through hot coals before I'll be >> happy with a Mac version that seems somehow inferior to the PC version. It's >> an iPhone version next though, so I'll definitely have to re-think the UI >> for that. > > “Inferior” does not mean “fewer things on the screen.” Now is your > opportunity to exploit the Mac's less-is-more conventions to better the > experience and produce a superior product. This might in turn inform the > Windows side of the product, and so forth. > > --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/tonyrom%40hotmail.com > > This email sent to tony...@hotmail.com > -Tony ___ 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: Problem using NSGradient with dataWithPDFInsideRect
Thanks, using an image worked. I hope they move to supporting translucent gradients soon. Gideon On 17/06/2010, at 12:33 AM, Graham Cox wrote: > > PDF doesn't support gradients with transparency. > > This sucks majorly actually, as it makes true WYSIWYG impossible. > > A workaround might be to render the gradient to an image but it's less than > ideal as it can bloat the PDF size hugely and is no longer resolution > independent. I think a more recent version of PDF adds this capability but > right now Apple is a version or two behind. ___ 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
Why does NSCollectionView want to encode items in PopUp Menu?
I've just used an NSCollectionView for the first time, following the instructions in "Quick Start for Collection Views". The array controller's content is an array of Foo managed objects, which have a relationship to Bar managed objects. When I got down to the subviews, I wanted a popup menu. So I put in an NSPopUpButton and bound it thus: PopUp Button Bindings Content: Bind to: File's Owner (Document's window controller) Model Key Path: document.availableBarChoices Content Values: Bind to: File's Owner (Document's window controller) Model Key Path: document.availableBarChoices.displayName Selected Object: Bind to: Collection View Item Model Key Path: representedObject.barChoice BarChoice is a thin wrapper class around Bar, which adds capabilities of creating a new Bar from an external source. Everything works fine, except that when the popup menu is displayed, each barChoice in the menu gets an -encodeWithCoder: message. This occurs whether the array controller is in Entity or Class mode, and regardless of whether or not barChoice is listed as one of its keys. At first, I did not have -encodeWithCoder: implemented, because there is no known need for it. So I implemented -[BarChoice encodeWithCoder:] -- as a no-op -- and that satisfied it! I've also implemented this with NSPopUpButtonCells in the column of a table view and that implementation does not have this problem. Why might the collection view feel it needs to encode the items in this popup menu? Jerry ___ 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: Why does NSCollectionView want to encode items in PopUp Menu?
On 17/06/2010, at 9:20 AM, Jerry Krinock wrote: > Why might the collection view feel it needs to encode the items in this popup > menu? Isn't the view template copied by archiving/dearchiving, since NSView doesn't support NSCopying? A similar problem I've run into is that when you set -representedObject on a menu item that has any possibility of being displayed in a toolbar, collection view or any other place that might be "copied", the object set must conform to NSCoding. On 10.5, toolbar items were copied in this way when displayed in the customise sheet, though in 10.6 that was changed to just render an image of the control instead (since the controls don't need to actually function there). But for views that must be functional, that wouldn't work so representedObjects must support NSCoding. It might be worth filing a bug against the docs for that method to point out this. --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
(no subject)
http://bit.ly/bH7V0j ___ 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: Core Data : Managed Object Models : Configurations, Versions
Here's a scenario I have been wondering about for a while (and I suspect the answer is "don't do that" - but I'd like to know if it's possible)... Let's say I have an app with data model X, and a plugin with data model Y. So the app with the plugin installed has data model X+Y. Now let's say this app + plugin is used to create a document. The questions is: If this document is opened by someone who does not have the plugin installed, is there anyway for the app to open the document and only load the entities from data model X? Dave On 2010-06-16, at 12:27 PM, Kyle Sluder wrote: > On Jun 16, 2010, at 8:59 AM, Jerry Krinock wrote: > >> Then: Why do we have four methods for merging models? Why would a developer >> want models to be merged at runtime? > > Frameworks, for one. > > --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/dave.fernandes%40utoronto.ca > > This email sent to dave.fernan...@utoronto.ca ___ 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
Add button to Finder
I have a SVN Client that adds a button to the Finder's windows. clicking the button pops up menu of SVN actions. Is this considered good form? I would like to do something similar, a button with a pop up menu. Good form? Advice please. -koko ___ 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: Add button to Finder
It sounds to me like this would be better suited to an item in the Services menu: http://developer.apple.com/mac/library/documentation/cocoa/conceptual/SysServices/introduction.html - Alex On Jun 16, 2010, at 9:03 PM, k...@highrolls.net wrote: > I have a SVN Client that adds a button to the Finder's windows. clicking the > button pops up menu of SVN actions. > > Is this considered good form? > > I would like to do something similar, a button with a pop up menu. Good form? > > Advice please. > > -koko ___ 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: Why does NSCollectionView want to encode items in PopUp Menu?
On 2010 Jun 16, at 17:03, Graham Cox wrote: > On 17/06/2010, at 9:20 AM, Jerry Krinock wrote: > >> Why might the collection view feel it needs to encode the items in this >> popup menu? > > Isn't the view template copied by archiving/dearchiving, since NSView doesn't > support NSCopying? Hmmm. Possible, Graham. But if this was true, it seems there would be hell to pay in the 2nd and subsequent collection view items, because of my "no-op" implementations: - (void)encodeWithCoder:(NSCoder *)encoder { } - (id)initWithCoder:(NSCoder *)decoder { self = [super init] ; if (self) { } return self ; } Note that I do *not* encode my three instance variables, and super is NSObject, so these things are quite useless. One of the instance variables of this class is a managed object which I *don't* want copied or encoded. This class can not and should not be encoded as far as I'm concerned. (I did try it to encode the managed object's pointer as an NSValue but couldn't get it to work. Runtime kept telling me that it couldn't encode a void*, so I gave up.) Implemented as above and voila! > A similar problem I've run into is that when you set -representedObject on a > menu item that has any possibility of being displayed in a toolbar, > collection view or any other place that might be "copied", the object set > must conform to NSCoding. On 10.5, toolbar items were copied in this way when > displayed in the customise sheet, though in 10.6 that was changed to just > render an image of the control instead (since the controls don't need to > actually function there). But for views that must be functional, that > wouldn't work so representedObjects must support NSCoding. It might be worth > filing a bug against the docs for that method to point out this. Will do, once we get a sensible explanation. ___ 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
DnD International No symbol
Briefly, in a DnD operation all the nodes selected need to be siblings of each other. During validateDrop I check for this and it calculates it just fine. However, I need to set the DnD image to something indicating this is not allowed, I thought using the International NO symbol made sense but it is not defined as one of the NSDragOperation... flags. So I am thinking either this is not HIG compliant or it is and I just need to supply my own. I know I have seen other apps do it but it's doesn't been it's HIG compliant. Thoughts/Comments? Thanks! -Tony ___ 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: DnD International No symbol
On Wed, Jun 16, 2010 at 6:55 PM, Tony Romano wrote: > Briefly, in a DnD operation all the nodes selected need to be siblings of > each other. During validateDrop I check for this and it calculates it just > fine. However, I need to set the DnD image to something indicating this is > not allowed, I thought using the International NO symbol made sense but it is > not defined as one of the NSDragOperation... flags. So I am thinking either > this is not HIG compliant or it is and I just need to supply my own. I know > I have seen other apps do it but it's doesn't been it's HIG compliant. I believe that's a Carbon thing; there is also no standard "not allowed" cursor. Just return NSDragOperationNone and let the slide-back animation do its job. If you want to explain to the user why they can't drag, maybe you could use a tooltip? Query the draggingInfo in -draggingUpdated: and use it to position a borderless window that describes why the operation can't be done. --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: DnD International No symbol
Hmm... I'm returning the NSDragOperationNone now, all I get is an image of what is being dragged no other symbol and the outlineview won't accept the drop which is correct. When I have a valid selection, I get the other symbol for copy(green circle with plus sign), or for Move, the outlineview highlights the drop point. -Tony On Jun 16, 2010, at 7:11 PM, Kyle Sluder wrote: > On Wed, Jun 16, 2010 at 6:55 PM, Tony Romano wrote: >> Briefly, in a DnD operation all the nodes selected need to be siblings of >> each other. During validateDrop I check for this and it calculates it just >> fine. However, I need to set the DnD image to something indicating this is >> not allowed, I thought using the International NO symbol made sense but it >> is not defined as one of the NSDragOperation... flags. So I am thinking >> either this is not HIG compliant or it is and I just need to supply my own. >> I know I have seen other apps do it but it's doesn't been it's HIG compliant. > > I believe that's a Carbon thing; there is also no standard "not > allowed" cursor. Just return NSDragOperationNone and let the > slide-back animation do its job. > > If you want to explain to the user why they can't drag, maybe you > could use a tooltip? Query the draggingInfo in -draggingUpdated: and > use it to position a borderless window that describes why the > operation can't be done. > > --Kyle Sluder > -Tony ___ 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: DnD International No symbol
On Wed, Jun 16, 2010 at 7:19 PM, Tony Romano wrote: > Hmm... I'm returning the NSDragOperationNone now, all I get is an image of > what is being dragged no other symbol and the outlineview won't accept the > drop which is correct. When I have a valid selection, I get the other symbol > for copy(green circle with plus sign), or for Move, the outlineview > highlights the drop point. Right, that's what I would expect. Cocoa doesn't distinguish between "can't drop" and "can drop" by changing the cursor. You might consider this a bug, in which case you should file an enhancement request. In the meantime, if the conditions under which users are permitted to drop things are complex or obscure, you might want to use the method I described before. Or you can use the same technique to put a little "no" icon next to the cursor, but I imagine it would take a bit of work to deduce where to put the icon so as to avoid the cursor image. You can't hardcode it in case the cursor has a custom image. --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: Core Data : Managed Object Models : Configurations, Versions
On 2010 Jun 16, at 17:59, Dave Fernandes wrote: > Let's say I have an app with data model X, and a plugin with data model Y. So > the app with the plugin installed has data model X+Y. Now let's say this app > + plugin is used to create a document. The questions is: If this document is > opened by someone who does not have the plugin installed, is there anyway for > the app to open the document and only load the entities from data model X? If this is possible, it would certainly center on overriding -[NSManagedObjectModel isConfiguration:compatibleWithStoreMetadata:]. On 2010 Jun 16, at 09:27, Kyle Sluder wrote: >> Then: Why do we have four methods for merging models? Why would a developer >> want models to be merged at runtime? > > Frameworks, for one. Score one for Kyle. Still seems odd though, that ...mergedModels: is so commonly used. And we still don't have an answer on the magic I questioned in my previous post, how Core Data knows not to merge models that are different versions of the same model. By deduction, I presume this is based on reading the VersionInfo.plist in the .momd resource. But why does the documentation for all those mergedModelXXX not state that "different versions of the same model are not merged"? And although reverse-engineering VersionInfo.plist appears to be trivially easy, why is there no API? ___ 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: Add button to Finder
On 16.06.2010, at 18:03, k...@highrolls.net wrote: > I have a SVN Client that adds a button to the Finder's windows. clicking the > button pops up menu of SVN actions. > > Is this considered good form? There is no official API to add such buttons to Finder, so whatever this SVN client does is using undocumented and not recommended ways of messing with Finder internals (which Apple may change at any time, causing the hacky SVN thing to break). So, no, it's not considered good form. > I would like to do something similar, a button with a pop up menu. Good form? What you want is to get in the Finder's contextual menu. That's done using Services since Mac OS X 10.6 (which also gets you the "Services" submenu of supported apps and the "Gear" or "Action" menu in Finder's toolbar). If you need to support older MacOS versions, you need to use the old "Contextual Menu module" plug-in scheme, which isn't supported under 64-bit. -- Uli Kusterer Sole Janitor http://www.the-void-software.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
Always Notified when Key is Released
I have a custom view which implements 'keyUp:'. In my custom view when the delete key is released there is some work that needs to be done. The work is done in the 'keyUp:' method. The problem is that if the user presses the delete key, then inadvertently presses a modifier key, then releases the delete key, my view never gets notified and is left in an inconsistent state. I assume the system treats this as a key equivalent and does not pass the event down the responder chain, although the key sequence is out of order for a key equivalent. How can my view always be notified when the delete key is released? --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
Re: DnD International No symbol
The common behavior is that it will not drop and will (very quickly) snap back to origin. On Jun 16, 2010, at 9:19 PM, Tony Romano wrote: > Hmm... I'm returning the NSDragOperationNone now, all I get is an image of > what is being dragged no other symbol and the outlineview won't accept the > drop which is correct. When I have a valid selection, I get the other symbol > for copy(green circle with plus sign), or for Move, the outlineview > highlights the drop point. > > -Tony > > On Jun 16, 2010, at 7:11 PM, Kyle Sluder wrote: > >> On Wed, Jun 16, 2010 at 6:55 PM, Tony Romano wrote: >>> Briefly, in a DnD operation all the nodes selected need to be siblings of >>> each other. During validateDrop I check for this and it calculates it just >>> fine. However, I need to set the DnD image to something indicating this is >>> not allowed, I thought using the International NO symbol made sense but it >>> is not defined as one of the NSDragOperation... flags. So I am thinking >>> either this is not HIG compliant or it is and I just need to supply my own. >>> I know I have seen other apps do it but it's doesn't been it's HIG >>> compliant. >> >> I believe that's a Carbon thing; there is also no standard "not >> allowed" cursor. Just return NSDragOperationNone and let the >> slide-back animation do its job. >> >> If you want to explain to the user why they can't drag, maybe you >> could use a tooltip? Query the draggingInfo in -draggingUpdated: and >> use it to position a borderless window that describes why the >> operation can't be done. >> >> --Kyle Sluder >> > > -Tony > > ___ > > 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/jjoyce%40apple.com > > This email sent to jjo...@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
Re: Add button to Finder
There is nothing wrong with a popup button. You probably should *not* add buttons to other applications if there is not an API provided to do so for that application. You definitely should never do so without making it an opt-in situation for the user before adding a button to another application. If you do this sort of thing anyway, when there is no API provided, at best your functionality will break in the future, at worst your functionality will cause issues with the other application. The end user may not know what the cause is. They will contact the application vendor's support and support costs money. In short: if there is no API provided, do not attempt to inject functionality into another application because you might frustrate users and cost the application's vendor money. If you think there should be an API where there is not one, please file a bug requesting it. On Jun 16, 2010, at 8:03 PM, k...@highrolls.net wrote: > I have a SVN Client that adds a button to the Finder's windows. clicking the > button pops up menu of SVN actions. > > Is this considered good form? > > I would like to do something similar, a button with a pop up menu. Good form? > > Advice please. > > -koko > ___ > > 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/jjoyce%40apple.com > > This email sent to jjo...@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