Re: Best class for pixel-level image processing?
I am writing an application that wants to perform some basic computer vision computation, and I want a class that offers pixel-level access to an image. What would be the best way to approach this? Do something like: MyImageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:pixelsWide pixelsHigh:pixelsHigh bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bitmapFormat:NSAlphaFirstBitmapFormat bytesPerRow:pixelsWide * 4 bitsPerPixel:32]; And later: [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithBitmapImageRep:myImageRep]]; and: [myImageRep representationUsingType:NSJPEGFileType properties:imageProps]; This should get you started. Trygve ___ 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: get the list of controls in a NSView
Hello Thank you. I will try a new way to make connections between Interface builder and xCode Regards Saludos desde mi iPhone Jonathan Chacón Consultor de accesibilidad, usabilidad y nuevas tecnologías Teléfono: 679953948 E-mail: jonathan.cha...@telefonica.net Blog: http://programaraciegas.weblog.discapnet.es Twitter: http://www.twitter.com/Jonathanchacon El 12/02/2010, a las 05:18, Graham Cox graham@bigpond.com escribió: On 12/02/2010, at 3:12 PM, Jonathan Chacón wrote: is there any method to get the list of controls (buttons, labels, splitters, etc) of a NSView? [NSView subViews] --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: get the list of controls in a NSView
and as I believe I mentioned before, you can assign a numeric 'tag' to each view and control in interface builder and you can use the viewWithTag: method of UIView to search for a specific view with a specific tag. That's not a way of coding I think people usually use, you have to manage your own tag mapping (unfortunately you can't use a #define type value to tag views) and there are usually better ways to do this. However if assigning a tag in Interface Builder is an accessible operation where you've found making connections not to be, this may be a good way to find the objects you set up in IB and add the connections to them in your code. On 12-Feb-2010, at 5:28 PM, Jonathan Chacón wrote: Hello Thank you. I will try a new way to make connections between Interface builder and xCode Regards Saludos desde mi iPhone Jonathan Chacón Consultor de accesibilidad, usabilidad y nuevas tecnologías Teléfono: 679953948 E-mail: jonathan.cha...@telefonica.net Blog: http://programaraciegas.weblog.discapnet.es Twitter: http://www.twitter.com/Jonathanchacon El 12/02/2010, a las 05:18, Graham Cox graham@bigpond.com escribió: On 12/02/2010, at 3:12 PM, Jonathan Chacón wrote: is there any method to get the list of controls (buttons, labels, splitters, etc) of a NSView? [NSView subViews] --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/rols%40rols.org This email sent to r...@rols.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: get the list of controls in a NSView
Hello, Thanks for the information about tags identification but I've two questions: How to fetch each control into a NSView array? Can I identify a control using value of name field in the identity tab of the inspector in IB? Saludos desde mi iPhone Jonathan Chacón Consultor de accesibilidad, usabilidad y nuevas tecnologías Teléfono: 679953948 E-mail: jonathan.cha...@telefonica.net Blog: http://programaraciegas.weblog.discapnet.es Twitter: http://www.twitter.com/Jonathanchacon El 12/02/2010, a las 12:17, Roland King r...@rols.org escribió: and as I believe I mentioned before, you can assign a numeric 'tag' to each view and control in interface builder and you can use the viewWithTag: method of UIView to search for a specific view with a specific tag. That's not a way of coding I think people usually use, you have to manage your own tag mapping (unfortunately you can't use a #define type value to tag views) and there are usually better ways to do this. However if assigning a tag in Interface Builder is an accessible operation where you've found making connections not to be, this may be a good way to find the objects you set up in IB and add the connections to them in your code. On 12-Feb-2010, at 5:28 PM, Jonathan Chacón wrote: Hello Thank you. I will try a new way to make connections between Interface builder and xCode Regards Saludos desde mi iPhone Jonathan Chacón Consultor de accesibilidad, usabilidad y nuevas tecnologías Teléfono: 679953948 E-mail: jonathan.cha...@telefonica.net Blog: http://programaraciegas.weblog.discapnet.es Twitter: http://www.twitter.com/Jonathanchacon El 12/02/2010, a las 05:18, Graham Cox graham@bigpond.com escribió: On 12/02/2010, at 3:12 PM, Jonathan Chacón wrote: is there any method to get the list of controls (buttons, labels, splitters, etc) of a NSView? [NSView subViews] --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/rols%40rols.org This email sent to r...@rols.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
Validating unique objects in CoreData
Hello, I would use CoreData in order to mantain an archive of objects: each object contains an attribute called uuid; in the same db only one object can have the same attribute value. This mean I should validate the proposed new object to insert and check if the another object with the same uuid is inside the storage. I've implemented it with a fetch request but it's so slow when there are lots of objects to insert (my db contains around 30,000 objects). Any idea to improve performance of this check? Can CoreData support unique attributes as like key in sql database? Thanks mmc___ 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: Best class for pixel-level image processing?
First: None of the Mac OS X image APIs are set up around completely bare access to pixels. Bare pixel access is at odds with performance. Take caching: In order to cache effectively, the frameworks needs to understand what's changing when, and that cannot happen when people have unmediated pixel access. It would effectively mean no caching. That said, CoreImage _is_ set up around access to pixels, just in a more structured way. You define kernels of processing to be applied, and CoreImage handles applying them. It also composes kernel chains beforehand, applying a composite kernel to an image in one pass when possible. There are lots of predefined image filters that you can chain together to do useful things. There are certain things that you cannot do this way (a histogram, for example), but it's a nice place to start if it sounds like what you need to do. The Quartz Composer app is a nice way to play with CoreImage stuff live. You could also consider OpenCL. This is somewhat similar, but more data oriented and less image oriented, and more flexible. Both CoreImage and OpenCL can use the GPU. Last, you could work in bare memory buffers, do whatever you want to them (but with no particular help from the system), and package up a copy of your buffer as an image when you want to draw it. For this packaging, look at NSBitmapImageRep or CGImage. This is kind of a brute force approach, but it uses the fewest special concepts, and that's attractive. You should realize that the system is not prepared for the bits to mutate behind the back of the framework when doing this. CGImage is immutable. NSBitmapImageRep is implemented using CGImage. These classes are oriented around fast drawing, not modification. -Ken Cocoa Frameworks On Wed, Feb 10, 2010 at 9:11 PM, Alexander Golec alexgolecmailingli...@gmail.com wrote: I am writing an application that wants to perform some basic computer vision computation, and I want a class that offers pixel-level access to an image. What would be the best way to approach this? Alex___ 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/kenferry%40gmail.com This email sent to kenfe...@gmail.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: get the list of controls in a NSView
I don't understand what you mean by 'how to fetch each control into an NSView array'. You can get the subviews of the main view and keep going down finding all views that way recursively calling subviews on each, but it won't really help you as some of the controls make a collection of views up when you instantiate them so you are going to find more than just the top-level views of the controls you instantiated in IB. You really just want to get the objects which you dragged into interface builder. eg you put two buttons and a textfield on a view, you want the two buttons and the textfield. That's why I suggested viewWithTag: method, if you give the text view tag number 1 and the two buttons tags 2 and 3, you can easily find them by calling viewWithTag: with each tag from 1 to 3. No you can't use the name field in IB, that's why I suggested tags, the only piece of information which carries over from IB when your nib is instantiated is the value of the tag field, everything else is just interface builder internal stuff and you can't query it when the nib has been loaded. tags are generally a bit ugly because you have to, as I said, keep your own mapping that tag '2' means button1 but they do work and there is that function to query for them given a top-level view. So if you are unable to hook individual controls up to outlets and actions in IB, this is about the only reasonable way to do it. It's not that hard really, after the nib loads you just iterate through however many tags you have and when you find the view you use a switch statement to set it to the correct instance variable in your code and then hook up the actions. That said, doing this you really aren't gaining much over just instantiating the objects in code in the first place but I know you want to lay things out in IB, so this method will probably work. On 12-Feb-2010, at 7:43 PM, Jonathan Chacón wrote: Hello, Thanks for the information about tags identification but I've two questions: How to fetch each control into a NSView array? Can I identify a control using value of name field in the identity tab of the inspector in IB? Saludos desde mi iPhone Jonathan Chacón Consultor de accesibilidad, usabilidad y nuevas tecnologías Teléfono: 679953948 E-mail: jonathan.cha...@telefonica.net Blog: http://programaraciegas.weblog.discapnet.es Twitter: http://www.twitter.com/Jonathanchacon El 12/02/2010, a las 12:17, Roland King r...@rols.org escribió: and as I believe I mentioned before, you can assign a numeric 'tag' to each view and control in interface builder and you can use the viewWithTag: method of UIView to search for a specific view with a specific tag. That's not a way of coding I think people usually use, you have to manage your own tag mapping (unfortunately you can't use a #define type value to tag views) and there are usually better ways to do this. However if assigning a tag in Interface Builder is an accessible operation where you've found making connections not to be, this may be a good way to find the objects you set up in IB and add the connections to them in your code. On 12-Feb-2010, at 5:28 PM, Jonathan Chacón wrote: Hello Thank you. I will try a new way to make connections between Interface builder and xCode Regards Saludos desde mi iPhone Jonathan Chacón Consultor de accesibilidad, usabilidad y nuevas tecnologías Teléfono: 679953948 E-mail: jonathan.cha...@telefonica.net Blog: http://programaraciegas.weblog.discapnet.es Twitter: http://www.twitter.com/Jonathanchacon El 12/02/2010, a las 05:18, Graham Cox graham@bigpond.com escribió: On 12/02/2010, at 3:12 PM, Jonathan Chacón wrote: is there any method to get the list of controls (buttons, labels, splitters, etc) of a NSView? [NSView subViews] --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/rols%40rols.org This email sent to r...@rols.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: Validating unique objects in CoreData
two questions, neither of which actually answers yours I think. 1) does this uuid need to be something you generate externally and then set onto the object? Each core data object already has an objectID which is guaranteed unique in the database, can you make use of that one instead? You are allowed to keep that and use it to find objects later. 2) Where does the uuid on the object you are inserting come from? If you are setting a UUID on the objects when you are creating them then using one of the uuid_generate functions the UUID generated can be 'reasonably considered unique amongst all UUIDs created on the local system, and among UUIDs created on other systems in the past and in the future' (from the manpage). If you generate them in such a way, you don't have to care about checking them to be unique, they already will be. On 12-Feb-2010, at 7:45 PM, malcom wrote: Hello, I would use CoreData in order to mantain an archive of objects: each object contains an attribute called uuid; in the same db only one object can have the same attribute value. This mean I should validate the proposed new object to insert and check if the another object with the same uuid is inside the storage. I've implemented it with a fetch request but it's so slow when there are lots of objects to insert (my db contains around 30,000 objects). Any idea to improve performance of this check? Can CoreData support unique attributes as like key in sql database? Thanks mmc___ 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/rols%40rols.org This email sent to r...@rols.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: Validating unique objects in CoreData
On Feb 12, 2010, at 2:05 PM, Roland King wrote: 1) does this uuid need to be something you generate externally and then set onto the object? Each core data object already has an objectID which is guaranteed unique in the database, can you make use of that one instead? You are allowed to keep that and use it to find objects later. no, unfortunatly uuid is a string generated externally and set onto newly created object. 2) Where does the uuid on the object you are inserting come from? If you are setting a UUID on the objects when you are creating them then using one of the uuid_generate functions the UUID generated can be 'reasonably considered unique amongst all UUIDs created on the local system, and among UUIDs created on other systems in the past and in the future' (from the manpage). If you generate them in such a way, you don't have to care about checking them to be unique, they already will be. can I generete an unique UUID from my string and take care if it's unique? (something like an hash function?) The program works in this way: it downloads messages from network; each message contains this unique string identifier; i need to create a new object for coredata, check if another object is on storage with the same id, if not I'll put it into storage.___ 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
iPhone: MPMediaPlayerContoller questions (2)
1. I have a bunch of UI living in UIViews that were created in IB. Now a movie needs to run beneath it all. Is there a way I can move those elements above the video easily (I don't want to have to recreate all the UI in code unless I have to)? 2. My app runs in landscape... when the movie plays and completes, it forces the app back to a default portrait mode. Is there somewhere I can set this behavior to stop? I've been seeing this in the Simulator, not on a device yet. Eric ___ 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
Guidance on use of Application Support folder
The recent post regarding Creating an Application Support folder http://lists.apple.com/archives/cocoa-dev/2010/Feb/msg00618.html made me think about that folder. My understanding is that this folder is to be used for information generically usable by the application, but not specific to a given user. I am building an app that needs to store per-user data that is not document specific. I have created a folder under ~/Library for this, and am not using ~/Library/Application Support. Is there guidance from Apple on where such per-user, non-document-specific data is supposed to be stored?___ 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: Guidance on use of Application Support folder
On Feb 12, 2010, at 8:05 AM, Stuart Malin wrote: I am building an app that needs to store per-user data that is not document specific. I have created a folder under ~/Library for this, and am not using ~/Library/Application Support. Is there guidance from Apple on where such per-user, non-document-specific data is supposed to be stored? I would say that's what Application Support is for. There are apps that create their own direct subfolders of ~/Library, but I think that's messy. —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: Creating an Application Support folder
On 2/10/10 10:44 PM, Paul Johnson said: I'm trying to find a best way to create the Application Support folder. I'm rather new at Cocoa so it's taking me a while to do even this simple thing. Since you're new to Cocoa, I'm guessing all the other replies have probably provided the real answers you need. However, I just tried a little test. I renamed my App Support folder then did this: NSSearchPathForDirectoriesInDomains ( NSApplicationSupportDirectory, NSUserDomainMask, YES); It just returned the path, but did not create the folder. This is in contrast to FSFindFolder() which can optionally (attempt to) create the folder for you. So although unlikely, be prepared for the folder to not exist. -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ 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: Guidance on use of Application Support folder
I sorta would agree, Jens, and certainly many apps do put user-specific files here, but the Apple docs specifically say this is NOT how the Application Support folder should be used. ~~~ A support file is any type of file that supports the application but is not required for the application to run. Document templates and sample files are simple examples of support files. However, you might store more application-bound information, such as custom configurations or preset data files for your application’s workspace. In these instances, the information is intrinsically tied to a specific application (as opposed to the user’s data) but is not essential for the application to run. http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html ~~~ In the File System Overview, is this: Table 1 Subdirectories of the Library directory Subdirectory Directory contents Application Support Contains application-specific data and support files such as third-party plug-ins, helper applications, templates, and extra resources that are used by the application but not required for it to operate. This directory should never contain any kind of user data. By convention, all of these items should be put in a subdirectory named after the application. For example, third-party resources for the application MyApp would go in Application Support/MyApp/. Note that required resources should go inside the application bundle itself. http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPFileSystem/Articles/LibraryDirectory.html#//apple_ref/doc/uid/20002282-BAJHCHJI Note the line: This directory should never contain any kind of user data. ~~~ There is some discussion of relevance here: http://www.cocoadev.com/index.pl?ApplicationSupportFolder On Feb 12, 2010, at 11:13 AM, Jens Alfke wrote: On Feb 12, 2010, at 8:05 AM, Stuart Malin wrote: I am building an app that needs to store per-user data that is not document specific. I have created a folder under ~/Library for this, and am not using ~/Library/Application Support. Is there guidance from Apple on where such per-user, non-document-specific data is supposed to be stored? I would say that's what Application Support is for. There are apps that create their own direct subfolders of ~/Library, but I think that's messy. —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: Validating unique objects in CoreData
On 2010 Feb 12, at 03:45, malcom wrote: Any idea to improve performance of this check? Well, 30,000 uuid is only a megabyte or so. I really hate to say this, but, just as a wild and crazy experiment, fetch the uuids from those 30,000 into a giant NSSet, and determine uniqueness by seeing if -member:aUUID returns non-nil. Compare performance with your Core Data validation and let us know the results. ___ 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
Cocoa-based GPS framework?
There used to be an open source Cocoa-based GPS framework for OSX called FourCoordinates, but I can't find it anywhere on the web anymore, just dead links. Is there something more modern that has replaced 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
Re: Validating unique objects in CoreData
On 2/12/10 9:05 PM, Roland King said: 2) Where does the uuid on the object you are inserting come from? If you are setting a UUID on the objects when you are creating them then using one of the uuid_generate functions the UUID generated can be 'reasonably considered unique Or instead of those 'uuid_generate functions': + (NSString*)stringFromUUID { NSString* uuidStr = nil; CFUUIDRef uuid = CFUUIDCreate (kCFAllocatorDefault); if (uuid) { uuidStr = NSMakeCollectable (CFUUIDCreateString (kCFAllocatorDefault, uuid)); CFRelease (uuid); } return uuidStr; } -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ 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-based GPS framework?
If you can support 10.6, I would recommend using Core Location, which is pretty solid from my understanding. -Steven On Fri, Feb 12, 2010 at 11:57 AM, Jonathon Kuo newsli...@autonomy.caltech.edu wrote: There used to be an open source Cocoa-based GPS framework for OSX called FourCoordinates, but I can't find it anywhere on the web anymore, just dead links. Is there something more modern that has replaced 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/steven.degutis%40gmail.com This email sent to steven.degu...@gmail.com -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.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: Guidance on use of Application Support folder
On Fri, Feb 12, 2010 at 8:27 AM, Stuart Malin stu...@zhameesha.com wrote: I sorta would agree, Jens, and certainly many apps do put user-specific files here, but the Apple docs specifically say this is NOT how the Application Support folder should be used. I think you're misreading the documentation. It seems to me that it is telling you not to save user documents there. Templates, user-installed plugins, licenses, and all sorts of other stuff goes (and belongs) in Application Support. The app binary, its required frameworks, its resources, etc. do not. --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: iPhone: MPMediaPlayerContoller questions (2)
On Fri, Feb 12, 2010 at 5:52 AM, Eric E. Dolecki edole...@gmail.com wrote: 1. I have a bunch of UI living in UIViews that were created in IB. Now a movie needs to run beneath it all. Is there a way I can move those elements above the video easily (I don't want to have to recreate all the UI in code unless I have to)? 2. My app runs in landscape... when the movie plays and completes, it forces the app back to a default portrait mode. Is there somewhere I can set this behavior to stop? I've been seeing this in the Simulator, not on a device yet. Please read the iPhone SDK 3.2 documentation, including What's New in iPhone OS 3.2 and the iPhone OS SDK 3.2 beta 2 release notes. --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: Guidance on use of Application Support folder
What has confused me about this is why does CoreDate store it's data in the Application Support folder be default then? On Feb 12, 2010, at 9:27 AM, Stuart Malin wrote: I sorta would agree, Jens, and certainly many apps do put user-specific files here, but the Apple docs specifically say this is NOT how the Application Support folder should be used. ~~~ A support file is any type of file that supports the application but is not required for the application to run. Document templates and sample files are simple examples of support files. However, you might store more application-bound information, such as custom configurations or preset data files for your application’s workspace. In these instances, the information is intrinsically tied to a specific application (as opposed to the user’s data) but is not essential for the application to run. http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html ~~~ In the File System Overview, is this: Table 1 Subdirectories of the Library directory Subdirectory Directory contents Application Support Contains application-specific data and support files such as third-party plug-ins, helper applications, templates, and extra resources that are used by the application but not required for it to operate. This directory should never contain any kind of user data. By convention, all of these items should be put in a subdirectory named after the application. For example, third-party resources for the application MyApp would go in Application Support/MyApp/. Note that required resources should go inside the application bundle itself. http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPFileSystem/Articles/LibraryDirectory.html#//apple_ref/doc/uid/20002282-BAJHCHJI Note the line: This directory should never contain any kind of user data. ~~~ There is some discussion of relevance here: http://www.cocoadev.com/index.pl?ApplicationSupportFolder On Feb 12, 2010, at 11:13 AM, Jens Alfke wrote: On Feb 12, 2010, at 8:05 AM, Stuart Malin wrote: I am building an app that needs to store per-user data that is not document specific. I have created a folder under ~/Library for this, and am not using ~/Library/Application Support. Is there guidance from Apple on where such per-user, non-document-specific data is supposed to be stored? I would say that's what Application Support is for. There are apps that create their own direct subfolders of ~/Library, but I think that's messy. —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/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
Re: Guidance on use of Application Support folder
Licenses belong in /Library/Application Support (no squiggle), IMO. Plugins too, probably. But templates, yes, although perhaps they might be stored in /Library/Application Support at the user's option ('make this template available to all users of this Macintosh'). Depending on what you want to do, take care when running user a restricted account! Got bitten by that one. We now set a few permissions bits in the installer for our own, specific, reasons. What sort of data is it, anyway? Paul Sanders. - Original Message - From: Kyle Sluder kyle.slu...@gmail.com To: Stuart Malin stu...@zhameesha.com Cc: cocoa-dev@lists.apple.com Sent: Friday, February 12, 2010 5:12 PM Subject: Re: Guidance on use of Application Support folder It seems to me that it is telling you not to save user documents there. Templates, user-installed plugins, licenses, and all sorts of other stuff goes (and belongs) in Application Support. The app binary, its required frameworks, its resources, etc. do not. ___ 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: Guidance on use of Application Support folder
On Fri, Feb 12, 2010 at 9:35 AM, Paul Sanders p.sand...@alpinesoft.co.uk wrote: Licenses belong in /Library/Application Support (no squiggle), IMO. Plugins too, probably. But templates, yes, although perhaps they might be stored in /Library/Application Support at the user's option ('make this template available to all users of this Macintosh'). The beauty of the domained folder system is that we can put license files in /Library/Application Support, ~/Library/Application Support, or /Network/Library/Application Support. That was a great boon when I was on the customer side of this equation, and had bundle licenses for some products but an individual license for myself. Each machine (we had 10 workstations) had its own bundle license in /Library/Application Support, but I carried my own licenses in my network-mounted ~/Library/Application Support. Depending on what you want to do, take care when running user a restricted account! Got bitten by that one. We now set a few permissions bits in the installer for our own, specific, reasons. Plea from a former sysadmin: *please* use a PackageMaker package, with the permissions bits set appropriately in the BOM, *not* an installer application! --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: MPMediaPlayerContoller questions (2)
On Fri, 12 Feb 2010 09:16:28 -0800, Kyle Sluder kyle.slu...@gmail.com said: On Fri, Feb 12, 2010 at 5:52 AM, Eric E. Dolecki edole...@gmail.com wrote: 1. I have a bunch of UI living in UIViews that were created in IB. Now a movie needs to run beneath it all. Is there a way I can move those elements above the video easily (I don't want to have to recreate all the UI in code unless I have to)? 2. My app runs in landscape... when the movie plays and completes, it forces the app back to a default portrait mode. Is there somewhere I can set this behavior to stop? I've been seeing this in the Simulator, not on a device yet. Please read the iPhone SDK 3.2 documentation, including What's New in iPhone OS 3.2 and the iPhone OS SDK 3.2 beta 2 release notes. Yes, but I don't think you're allowed to say so. :) So the correct answer is something like Please read mm mfff argh thp. 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: Guidance on use of Application Support folder
We do use a Package Maker package, despite the numerous bugs in Package Maker (grr!) How would I set bits in the BOM for a folder created by my postinstall script? Is it important to do it that way? I just do a chmod, currently, after I create the folder. Paul Sanders. - Original Message - From: Kyle Sluder kyle.slu...@gmail.com To: Paul Sanders p.sand...@alpinesoft.co.uk Cc: Stuart Malin stu...@zhameesha.com; cocoa-dev@lists.apple.com Sent: Friday, February 12, 2010 5:51 PM Subject: Re: Guidance on use of Application Support folder Plea from a former sysadmin: *please* use a PackageMaker package, with the permissions bits set appropriately in the BOM, *not* an installer application! ___ 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: Guidance on use of Application Support folder
On 2/12/10 9:51 AM, Kyle Sluder said: Plea from a former sysadmin: *please* use a PackageMaker package, with the permissions bits set appropriately in the BOM, *not* an installer application! Could you elaborate? We have been thinking to switch AWAY from PackageMaker because it is such a buggy monstrosity. -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ 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: Validating unique objects in CoreData
I've tried to make an alternative method. I'll try to describe it. I would to use a second an auxiliary index where to save my uuid-objectURI; results are better, so I try to make a summary of the problem and the solution. If anyone have a better idea I'll be happy to talk about it :) I've about 30,000 messages taken from network and I need to save all into a Core Data Store in form of a tree. Each message contains an unique identification string and no more than one message can be saved on database with the same id. CoreData at this time does not support uniqueness of attributes and I can't use objectID property to ensure this kind of thing. A first solution is, in pseudo code: - Execute a query to see if uuid string is presents in storage - If it's not present I can make a new NSManagedObject with that uuid and put it into storage, otherwise I'll ignore it (it's already on db) - Execute another query to find the direct parent of this new message, if found I'll link both messages, if not it's a root message This solution has a big problem. With 30k messages I need of 30k query to check if the new message exist on coredata, another 30k to check for parent (plus, I think, another 30k to insert the new object). Over 60k+ queries takes lots of time (a minute or more here). My second solution is to create a second auxiliary NSMutableDictionary where i'll save message uuid as key and NSManagedObjectID's URI rapresentation (the only I can save to NSData) as value for dictionary entry. The result in pseudo code is: - Use objectForKey:uuid to my auxiliary dictionary to see if the message exist in coredata - If yes I'll ignore it. If not i'll put it into the store - Use objectForKey:parentuuid to my auxiliary dictionary to see if the parent of the message is present on coredata. If yes i'll use NSPersistentCoordinator's managedObjectIDForURIRepresentation: to get the NSManagedObject (the parent of the message) and link both parent and child With this solution the entire process takes about 5 seconds to finish (the result dictionary it's around 2mb).___ 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: Guidance on use of Application Support folder
On Fri, Feb 12, 2010 at 10:02 AM, Sean McBride s...@rogue-research.com wrote: On 2/12/10 9:51 AM, Kyle Sluder said: Plea from a former sysadmin: *please* use a PackageMaker package, with the permissions bits set appropriately in the BOM, *not* an installer application! Could you elaborate? We have been thinking to switch AWAY from PackageMaker because it is such a buggy monstrosity. This discussion is veering off into installer-dev territory, but if your app needs an installation script (that is, it can't be installed with a simple drag-install), and I need to deploy it to my workstations, I will seriously consider not buying your application if I cannot drop a .pkg into Remote Desktop or System Image Utility, opening it in PackageMaker along the way to make whatever tweaks I want or need. I spent far too many hours moving from machine to machine installing Adobe products that I actively lobbied against upgrading. --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
NSDateFormatter returns nil
Why is lDateFormatted nil on iPhone simulator 3.1.2 after executing this piece of code? NSString *lDateString = @Wed, 17 Feb 2010 16:02:01; NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDateFormat:@EEE, dd MMM hh:mm:ss]; NSDate *lDateFormatted = [dateFormatter dateFromString: lDateString ]; Any ideas appreciated, Thanks Kristof ___ 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: Guidance on use of Application Support folder
Le 12 févr. 2010 à 19:02, Sean McBride a écrit : On 2/12/10 9:51 AM, Kyle Sluder said: Plea from a former sysadmin: *please* use a PackageMaker package, with the permissions bits set appropriately in the BOM, *not* an installer application! Could you elaborate? We have been thinking to switch AWAY from PackageMaker because it is such a buggy monstrosity. Switching away from Package Maker is fine as long as you maintain the .pkg/.mpkg format. OS X have a couple of nice way to deploy .pkg on many machines (command line tools like installer, Remote Desktop integration, etc.) that are not possible with custom installer. And you are not the only one that want something better than PackageMaker to build package: http://s.sudre.free.fr/Software/Packages.html -- Jean-Daniel ___ 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: Guidance on use of Application Support folder
Elaborate on the bugs? Well, we're getting a bit off topic for this list but it's mainly to do with relocation which we want to disable because it does things like update a copy of the application that has been dragged to the Trash and other such nonsense. PM also throws a wobbly (with no useful error message) if things like the postinstall script have the uchg flag set. That probably won't bother most people but I like to write-protect my release tree after making the final (we hope!) build in case of finger trouble. The way I deal with the relocation issue, apart from turning it off in Package Maker itself (which you have to do every time you save your package definition because PM keeps turning it back on when you're not looking) is to run the following inscrutable 3 lines of shell script after building your package (where $mpkg is the folder containing the built package): awk '/IFPkgPathMappings/ { sub (IFPkgPathMappings, xIFPkgPathMappings, $0); print $0; next } // { print $0 }' $mpkg/Contents/Packages/vinylstudio.pkg/Contents/Info.plist /tmp/no_reloc mv /tmp/no_reloc $mpkg/Contents/Packages/vinylstudio.pkg/Contents/Info.plist rm $mpkg/Contents/Packages/vinylstudio.pkg/Contents/Resources/TokenDefinitions.plist The third line is only needed for Snow Leopard. Mr Google dug it up for me, I forget where. Saved my life. I also hand-edit the various xml files in the .pmdoc folder to remove any absolute references and to delete, in fact, the BOM, with the exception of the top-level folder(s) to be packaged up (PM normally records all the files below that, for some strange reason, but it is evidently redundant information and it made me nervous having stuff recorded in there that might be added to, or removed, after PM had last seen it). This lets me carry my .pmdoc folder essentially unchanged over from one version of the software to the next. I don't let Package Maker near it after that (apart from building the package from the command line). Things like the readme file are kept out-of--line so that they can be edited in TextEdit. In other words, I now have a carefully hand-crafted .pmdoc folder safely checked into version control. When things like the version number change, I just hand-edit the relevant file. I hope never to let PM change these files again. Finally, to get PM to build your package from the command line, you have to specify the --id flag, otherwise it crashes, something like: /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker --id uk.co.alpinesoft.vinylstudio-installer --doc VinylStudio-Installer.pmdoc --out $mpkg Like you, I nearly gave up, but, as of this moment, I think I have the beast under control. Paul Sanders http://www.alpinesoft.co.uk - Original Message - From: Sean McBride s...@rogue-research.com To: Kyle Sluder kyle.slu...@gmail.com; Paul Sanders p.sand...@alpinesoft.co.uk Cc: Stuart Malin stu...@zhameesha.com; cocoa-dev@lists.apple.com Sent: Friday, February 12, 2010 6:02 PM Subject: Re: Guidance on use of Application Support folder Could you elaborate? We have been thinking to switch AWAY from PackageMaker because it is such a buggy monstrosity. ___ 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: Guidance on use of Application Support folder
That looks very interesting, thank you, I will take a look. As you say, it's the package format that matters. You don't seem to be charging a fee. Any licensing issues? Maybe an acknowledgement in the About box. And do the packages it builds install on Tiger? Thanks. Paul Sanders. - Original Message - From: Jean-Daniel Dupas devli...@shadowlab.org To: Sean McBride s...@rogue-research.com Cc: Cocoa Developers cocoa-dev@lists.apple.com Sent: Friday, February 12, 2010 6:22 PM Subject: Re: Guidance on use of Application Support folder Switching away from Package Maker is fine as long as you maintain the .pkg/.mpkg format. OS X have a couple of nice way to deploy .pkg on many machines (command line tools like installer, Remote Desktop integration, etc.) that are not possible with custom installer. And you are not the only one that want something better than PackageMaker to build package: http://s.sudre.free.fr/Software/Packages.html ___ 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: NSDateFormatter returns nil
On 12 Feb 2010, at 12:16 PM, Kristof Van Landschoot wrote: Why is lDateFormatted nil on iPhone simulator 3.1.2 after executing this piece of code? NSString *lDateString = @Wed, 17 Feb 2010 16:02:01; NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDateFormat:@EEE, dd MMM hh:mm:ss]; NSDate *lDateFormatted = [dateFormatter dateFromString: lDateString ]; Any ideas appreciated, Thanks Next investigational step: Try the formatter in reverse. Written in Mail: NSString * formatted = [dateFormatter stringFromDate: [NSDate date]]; NSLog(@It is now %@, formatted); Does it print in the format you expect? — F ___ 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
Noon question about Bonjour
Goal: to have a touch on wifi (the router running out the back of my Mac) running an app. I have a Mac desktop app running. I'd like to send strings back and forth as commands. Now, I checked out the WiTap application. If I run the app on Touches, they see one another (both connected to the same router). If I run the Simulator on the Mac supplying the internet connection to the router itself, it doesn't see the other apps running on the touches. Do I need the Mac app to be running on a laptop connected to the router too to get it to work, or is there a way to tweak the WiTap code to have it work? Ultimately I'll have to adapt the WiTap thing to work for my desktop OS X app. I just don't know if I am making this more complicated than it needs to be? Or is this the right path? Eric ___ 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: Validating unique objects in CoreData
On 2010 Feb 12, at 10:06, malcom wrote: A first solution is ... 60k+ queries takes ... a minute or more. My second solution is to create a second auxiliary NSMutableDictionary ... the entire process takes about 5 seconds to finish So you confirmed what I what I was loathe to say, which is that filtering in memory is much faster than doing Core Data queries. Is 5 seconds fast enough? I'd be pretty happy with that, for searching 30K items. ___ 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-based GPS framework?
Googling around, I see Core Location usage in reference only to the iPhone... Is it only part of the iPhone SDK? Would there be a problem using it in building a MacBook application? Jon On Feb 12, 2010, at 9:11 AM, Steven Degutis wrote: If you can support 10.6, I would recommend using Core Location, which is pretty solid from my understanding. -Steven On Fri, Feb 12, 2010 at 11:57 AM, Jonathon Kuo newsli...@autonomy.caltech.edu wrote: There used to be an open source Cocoa-based GPS framework for OSX called FourCoordinates, but I can't find it anywhere on the web anymore, just dead links. Is there something more modern that has replaced 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
Re: Cocoa-based GPS framework?
It's available for a regular Mac application in the 10.6 SDK. Check your Xcode documentation, you will see it there. On Feb 12, 2010, at 3:46 PM, Jonathon Kuo wrote: Googling around, I see Core Location usage in reference only to the iPhone... Is it only part of the iPhone SDK? Would there be a problem using it in building a MacBook application? Jon On Feb 12, 2010, at 9:11 AM, Steven Degutis wrote: If you can support 10.6, I would recommend using Core Location, which is pretty solid from my understanding. -Steven On Fri, Feb 12, 2010 at 11:57 AM, Jonathon Kuo newsli...@autonomy.caltech.edu wrote: There used to be an open source Cocoa-based GPS framework for OSX called FourCoordinates, but I can't find it anywhere on the web anymore, just dead links. Is there something more modern that has replaced 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/mailist%40ericgorr.net This email sent to mail...@ericgorr.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
Connected Objects being allocated
Once again, I am not understanding some aspect of Objective C and/or Cocoa. I created a simple class that contains two NSTextField objects. I used IB to connect the Controller object with the two text fields. The code follows. This example runs correctly and does copy the value from one text field to the other. #import Cocoa/Cocoa.h @interface Controller : NSObject { IBOutlet NSTextField* textField; IBOutlet NSTextField* copyField; } - (IBAction) buttonTarget: (id) sender; @end #import Controller.h @implementation Controller - (IBAction) buttonTarget: (id) sender { int textValue; textValue = [textField intValue]; [copyField setIntegerValue:textValue]; } @end Now if I extend this to two objects (Controller and View), the resulting code does not execute correctly. Again, I used IB to connect the View object to the two text fields. Using the debugger I find that the two NSTextField objects have not been allocated (both have nil values). The code follows: #import Cocoa/Cocoa.h #import View.h @interface Controller : NSObject { View* view; } - (IBAction) buttonTarget: (id) sender; @end #import Controller.h #import View.h @implementation Controller - (id) init { if (self = [super init]) { view = [[View alloc] init]; } return self; } - (IBAction) buttonTarget: (id) sender { [view copyFieldValue]; } @end #import Cocoa/Cocoa.h @interface View : NSObject { IBOutlet NSTextField* textField; IBOutlet NSTextField* copyField; } - (void) copyFieldValue; @end #import View.h @implementation View - (void) copyFieldValue { [copyField setIntegerValue:[textField intValue]]; } @end I have no idea what I am doing wrong. Any help would be most appreciated. Thanks in advance. Don Klett ___ 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
@distinctUnionOfArrays problem
I am trying to get @distinctUnionOfArrays to work with bindings. I have a Master NSArrayController. This contains an array of NSMutableDictionary objects. Each Dictionary has three NSString keys/fields: Genre, Artist, Album. I set the content of the Master Controller to my NSMutableArray and all is well - the array shows up in an NSTableView. I then have a single-column TableView Genre I have Genre NSArrayController and I try to bind this array controller to the Master Controler with IB: Genre, bound to Master Controller key: arrangedObjects Model Key Path: @distinctUnionofArrays.Genre My goal is to get a list of all the Genres in the Master array with no duplicates... But I get a crash: abort() called *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString count]: unrecognized selector sent to instance 0x10045cc20' *** Call stack at first throw: ( 0 CoreFoundation 0x7fff86827444 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x7fff818b00f3 objc_exception_throw + 45 2 CoreFoundation 0x7fff868801c0 +[NSObject(NSObject) doesNotRecognizeSelector:] + 0 3 CoreFoundation 0x7fff867fa08f ___forwarding___ + 751 4 CoreFoundation 0x7fff867f61d8 _CF_forwarding_prep_0 + 232 5 CoreFoundation 0x7fff867d3a47 -[NSMutableArray addObjectsFromArray:] + 71 6 Foundation 0x7fff859fdba4 -[NSArray(NSKeyValueCoding) _unionOfArraysForKeyPath:] + 112 7 Foundation 0x7fff859fda74 -[NSArray(NSKeyValueCoding) _distinctUnionOfArraysForKeyPath:] + 28 8 Foundation 0x7fff8598d4d7 -[NSArray(NSKeyValueCoding) valueForKeyPath:] + 566 9 Foundation 0x7fff85930db6 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 376 Any ideas? I tired binding in code (rather than IB) and while I made sure to bind Genre to Master after Master already had it setContent, got the same result. ___ 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: get the list of controls in a NSView
On 12/02/2010, at 11:48 PM, Roland King wrote: That's why I suggested viewWithTag: method, if you give the text view tag number 1 and the two buttons tags 2 and 3, you can easily find them by calling viewWithTag: with each tag from 1 to 3. I can't really see the benefit of this - you're assigning a number to each view so you can find it. Each view already has a number - its pointer. So just make an outlet for each view of interest and then you can refer to it directly by name (ivar identifier) that you assign. Much easier. --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: Connected Objects being allocated
On Feb 12, 2010, at 1:31 PM, Donald Klett wrote: Once again, I am not understanding some aspect of Objective C and/or Cocoa. I created a simple class that contains two NSTextField objects. I used IB to connect the Controller object with the two text fields. The code follows. This example runs correctly and does copy the value from one text field to the other. #import Cocoa/Cocoa.h @interface Controller : NSObject { IBOutlet NSTextField* textField; IBOutlet NSTextField* copyField; } - (IBAction) buttonTarget: (id) sender; @end #import Controller.h @implementation Controller - (IBAction) buttonTarget: (id) sender { int textValue; textValue = [textField intValue]; [copyField setIntegerValue:textValue]; } @end Okay, all is groovy so far.What you've left unstated in the explanation above is that the two text fields must have been allocated *somewhere*.I can make a SWAG that you dragged a couple of text fields from IB's palette onto the (content view) of the main window that shows up when you open MainMenu.xib, yes ? If that is the case, you have two (instantiated and correctly * initialised by IB) text fields that you can connect to from your (presumably also instantiated and initialised by IB) Controller object. Now if I extend this to two objects (Controller and View), the resulting code does not execute correctly. Again, I used IB to connect the View object to the two text fields. Using the debugger I find that the two NSTextField objects have not been allocated (both have nil values). The code follows: #import Cocoa/Cocoa.h #import View.h Minor detail here.Use @class forward references in .h files instead of importing the class's .h file in your Controller's .h file.In other words, delete the#import View.h line and add a @class View;line . . . This tells the compiler you'll be referencing the View class in your .h file with an unspoken promise you will include the View.h file in your Controller's .m file . . . @interface Controller : NSObject { View* view; } - (IBAction) buttonTarget: (id) sender; @end #import Controller.h #import View.h @implementation Controller - (id) init { if (self = [super init]) { view = [[View alloc] init]; } return self; } Below, you have View as a sub-class of NSObject.Why? If View is supposed to be a sub-class of NSView, your [[View alloc] init] above needs to be [[View alloc] initWithFrame: . . .] - (IBAction) buttonTarget: (id) sender { [view copyFieldValue]; } @end #import Cocoa/Cocoa.h @interface View : NSObject { IBOutlet NSTextField* textField; IBOutlet NSTextField* copyField; } - (void) copyFieldValue; @end Based on this declaration, do you have a View object instantiated in your MainMenu.xib, and did you then connect the two outlets to the two text fields from that already instantiated object? If so, after then instantiating a View object in your Controller, your Controller is now talking to the wrong View object and the one from the xib is being ignored . . . #import View.h @implementation View - (void) copyFieldValue { [copyField setIntegerValue:[textField intValue]]; } @end I have no idea what I am doing wrong. Any help would be most appreciated. Thanks in advance. I hope this helps a little. One of the more common beginner mistakes is to instantiate an object in the xib, and then instantiate a completely new version in code . . . And as (I think) someone already pointed out, if you have a class whose name is View, anybody reading your code superficially would expect it to *be* something that relates to existing NSView or UIView classes and have View-like behaviour . . . A useful exercise to do is to look at your xib objects and draw a picture of the objects and their connections --- that essentially defines your 'Application Architecture', and a picture can quickly show up anomalies in the object graph --- either orphan objects as I suspect in the case, or objects that aren't really doing anything useful . . . Cheers, . . . . . . . .Henry = iPhone App Development and Developer Education . . . Visit www.nonatomic-retain.com Mac OSX Application Development, Plus a Great Deal More . . . Visit www.trilithon.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: Connected Objects being allocated
Don, Your first snippet of code is great and follows MVC just fine. However, your second snippet breaks away from proper MVC, in the vein of over-thinking your architecture. When in doubt, start simple and extend as needed. In your first snippet, your Controller class is a valid Controller in the MVC sense of things. Just stick it in a NIB file, connect the outlets, and you're all groovy. But here's some things to explicitly avoid: (1) Name classes inappropriately. As mentioned before, View should not be a subclass of NSObject without any view components. It should be a subclass of NSView or something similar (NSControl, NSTableView, etc) (2) We Cocoa coders don't usually instantiate views inside -init, but rather inside a NIB file. Having NIBs loaded automatically for us via NSViewController or NSWindowController is pretty standard and good practice. (3) View classes shouldn't usually have Controller code in it. View classes should be generic and reusable, whereas Controller is specific to a single purpose inside an app (or multiple apps, if it's a shared framework). (4) Try to use a prefix in your class names. I usually use SD, like SDView or SDController or SDButton, for instance. This helps prevent namespace collisions. Not entirely relevant to your question, just throwing it out there. -Steven On Fri, Feb 12, 2010 at 4:31 PM, Donald Klett dskl...@mac.com wrote: Once again, I am not understanding some aspect of Objective C and/or Cocoa. I created a simple class that contains two NSTextField objects. I used IB to connect the Controller object with the two text fields. The code follows. This example runs correctly and does copy the value from one text field to the other. #import Cocoa/Cocoa.h @interface Controller : NSObject { IBOutlet NSTextField* textField; IBOutlet NSTextField* copyField; } - (IBAction) buttonTarget: (id) sender; @end #import Controller.h @implementation Controller - (IBAction) buttonTarget: (id) sender { int textValue; textValue = [textField intValue]; [copyField setIntegerValue:textValue]; } @end Now if I extend this to two objects (Controller and View), the resulting code does not execute correctly. Again, I used IB to connect the View object to the two text fields. Using the debugger I find that the two NSTextField objects have not been allocated (both have nil values). The code follows: #import Cocoa/Cocoa.h #import View.h @interface Controller : NSObject { View* view; } - (IBAction) buttonTarget: (id) sender; @end #import Controller.h #import View.h @implementation Controller - (id) init { if (self = [super init]) { view = [[View alloc] init]; } return self; } - (IBAction) buttonTarget: (id) sender { [view copyFieldValue]; } @end #import Cocoa/Cocoa.h @interface View : NSObject { IBOutlet NSTextField* textField; IBOutlet NSTextField* copyField; } - (void) copyFieldValue; @end #import View.h @implementation View - (void) copyFieldValue { [copyField setIntegerValue:[textField intValue]]; } @end I have no idea what I am doing wrong. Any help would be most appreciated. Thanks in advance. Don Klett ___ 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/steven.degutis%40gmail.com This email sent to steven.degu...@gmail.com -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.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: @distinctUnionOfArrays problem
I am trying to get @distinctUnionOfArrays to work with bindings. I have a Master NSArrayController. This contains an array of NSMutableDictionary objects. Each Dictionary has three NSString keys/fields: Genre, Artist, Album. I set the content of the Master Controller to my NSMutableArray and all is well - the array shows up in an NSTableView. I then have a single-column TableView Genre I have Genre NSArrayController and I try to bind this array controller to the Master Controler with IB: Genre, bound to Master Controller key: arrangedObjects Model Key Path: @distinctUnionofArrays.Genre As a follow-up, this works in code: NSArray* allObjects = [masterController valueForKeyPath:@arrangedObjects.Genre]; NSArray* uniqueObjects = [[NSSet setWithArray:content] allObjects]; I have 10 records, but only 4 types of Genres and I end up with 4 objects as expected in uniqueObjects. I just can't make it do the same thing with bindings. Ultimately, I am trying to build a filter ala iTunes for a large array of NSMutableDictionary. I want to get a list of unique Genres and Albums, then filter Albums based on the selection in Genres and filter the finalArray on the selection in Albums as well. Ideas? ___ 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
NSTokenField: binding + disappearing tokens
Hi there! I am having a bizarre problem with NSTokenField. In Interface Builder, having bound the field's value binding to an NSArrayController containing NSManagedObjects, and passing the value through a ValueTransformer, the field's tokens show up, displaying the proper values. However, when the mouse enters and then leaves, the tokens disappear (unless the mouse leaves by the top of the field). Weird, right? I can find no reason why this should be so. Any thoughts would be vastly appreciated! Peace, andy shamel Here are the configurations: Relevant Core Data Entity info Name: Character Relationship: named seniorArtisan to-one, connected to Character The NSArrayController is set to Entity mode, with the Character entity. Prepares content, managedObjectContext bound to App Delegate The NSTokenField is bound in Interface Builder with default options to the above NSArrayController, Controller Key: selection, Model Key Path: seniorArtisan, and Value Transformer: TokenRelationshipTransformer Here's the TokenRelationshipTransformer's code: + (void)initialize { [TokenRelationshipTransformer setValueTransformer:[[[TokenRelationshipTransformer alloc] init] autorelease] forName:@TokenRelationshipTransformer]; } + (Class)transformedValueClass { return [NSArray class]; } + (BOOL)allowsReverseTransformation { return YES; } - (id)transformedValue:(id)value { NSLog(@transforming value: %@,value); if ([value isKindOfClass:[NSSet class]]) { return [value allObjects]; } else if (value != nil) { return [NSArray arrayWithObject:value]; } else { return nil; } } - (id)reverseTransformedValue:(id)value { NSLog(@reversing value: %i,[value count]); if (value == nil) { return nil; } else if ([(NSArray *)value count] == 1) { NSLog(@reverse transforming 1); return [(NSArray *)value objectAtIndex:0]; } else { NSLog(@reverse transforming more than 1); return [NSSet setWithArray:value]; } return value; } ___ 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
Youtube video upload ussue
Hi All, I have got a very frustrating problem. I am trying to upload video to youtube using GData APIs and am having significant issues. I am sure one of you will have done this previously and I hope you can assist me. I have copied the cocoa sample and just put it in my code to get something working I can customise it later. When this code executes it fails with the following error *** Assertion failure in -[GDataServiceBase fetchObjectWithURL:objectClass:objectToPost:ETag:httpMethod:delegate:didFinishSelector:completionHandler:retryInvocationValue:ticket:](), /Users/damien/damien/projects/google/gdata-objectivec-client-read-only/Source/BaseClasses/GDataServiceBase.m:559 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'GDataHTTPUploadFetcher needed' Ok so I go to the source of the assertion failure // // now that we have all the request header info ready, // create and set up the fetcher for this request // GDataHTTPFetcher* fetcher = nil; if (isUploadingDataChunked) { // hang on to the user's requested chunk size, and ensure it's not tiny NSUInteger uploadChunkSize = [self serviceUploadChunkSize]; if (uploadChunkSize kMinimumUploadChunkSize) { uploadChunkSize = kMinimumUploadChunkSize; } Class uploadClass = NSClassFromString(@GDataHTTPUploadFetcher); GDATA_ASSERT(uploadClass != nil, @GDataHTTPUploadFetcher needed); NSString *uploadMIMEType = [objectToPost uploadMIMEType]; fetcher = [uploadClass uploadFetcherWithRequest:request uploadData:uploadData uploadMIMEType:uploadMIMEType chunkSize:uploadChunkSize]; } else { fetcher = [GDataHTTPFetcher httpFetcherWithRequest:request]; } So it appears the Class uploadClass = NSClassFromString(@GDataHTTPUploadFetcher); line fails. This tells me that there is no instance of the GDataHTTPUploadFetcher class at this time. Ok so what did I miss in my method I can not find any definition of a GDataHTTPUploadFetcher in the sample project. I have provided my method below hoping someone can assist me by comparing mine to theirs and showing me where I have gone wrong. I really appreciate your assistance. here is a stack trace also Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 CoreFoundation 0x028bfde4 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 4 1 libobjc.A.dylib 0x93f5e509 objc_exception_throw + 56 2 CoreFoundation 0x0288001b +[NSException raise:format:arguments:] + 155 3 Foundation 0x00265ef5 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 101 4 eca 0x00029b13 -[GDataServiceBase fetchObjectWithURL:objectClass:objectToPost:ETag:httpMethod:delegate:didFinishSelector:completionHandler:retryInvocationValue:ticket:] + 2205 (GDataServiceBase.m:561) 5 CoreFoundation 0x0283e87d __invoking___ + 29 6 CoreFoundation 0x0283e768 -[NSInvocation invoke] + 136 7 eca 0x0002e7a7 -[GDataServiceGoogle authFetcher:finishedWithData:] + 552 (GDataServiceGoogle.m:249) 8 eca 0x00014816 -[GDataHTTPFetcher connectionDidFinishLoading:] + 651 (GDataHTTPFetcher.m:894) 9 Foundation 0x0020e524 -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading] + 84 10 Foundation 0x0020e493 _NSURLConnectionDidFinishLoading + 147 11 CFNetwork 0x02be0e19 URLConnectionClient::_clientDidFinishLoading(URLConnectionClient::ClientConnectionEventQueue*) + 197 12 CFNetwork 0x02c541b2 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfoXClientEvent, XClientEventParams*, long) + 306 13 CFNetwork 0x02c5447c URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfoXClientEvent, XClientEventParams*, long) + 1020 14 CFNetwork 0x02c5447c URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfoXClientEvent, XClientEventParams*, long) + 1020 15 CFNetwork 0x02bd4f24 URLConnectionClient::processEvents() + 94 16 CFNetwork 0x02bd4dae MultiplexerSource::perform() + 238 17 CoreFoundation 0x0280fd9a CFRunLoopRunSpecific + 3402 18 CoreFoundation 0x0280f048 CFRunLoopRunInMode + 88 19 GraphicsServices0x02f539f1 GSEventRunModal + 217 20 GraphicsServices0x02f53ab6 GSEventRun + 115 21 UIKit 0x00468a98
Re: @distinctUnionOfArrays problem
Did you try: @distinctUnionOfObjects.Genre since valueForKey:@Genre returns an NSString object, not an array. -aaron Same results more-or-less: I set the secondary NSArrayController to be bound to the master with arrangesObjects and @distinctUnionOfObjects.Genre I wish there were an example of a iTunes-like table with say 4 or 5 columns and then two filtering columns, and a final table showing the filtered results with the same 4 or 5 columns of filtered data. That is all I am trying to make it do. Application Specific Information: abort() called *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[_NSControllerTreeProxy 0x10045a4c0 valueForUndefinedKey:]: this class is not key value coding-compliant for the key @distinctUnionOfObjects.' *** Call stack at first throw: ( 0 CoreFoundation 0x7fff86827444 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x7fff818b00f3 objc_exception_throw + 45 2 CoreFoundation 0x7fff8687ea19 -[NSException raise] + 9 3 Foundation 0x7fff859fe17e -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 245 4 Foundation 0x7fff8592d3dd -[NSObject(NSKeyValueCoding) valueForKey:] + 420 5 Foundation 0x7fff85930da3 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 357 6 Foundation 0x7fff85930db6 -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 376 ___ 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: get the list of controls in a NSView
Remember the original poster is blind. He can use interface builder to create and position widgets and it seems that the dialogs allowing you to set position and other attributes (like tag) are accessible but the control drag to hook objects up to outlets or set actions is not accessible, so he can't do it. He is as far as I can tell trying to find a way to locate the objects in interface builder he would have hooked up to outlets if he were able to do so, after the nib has loaded, and then do those hookups in code. I still think just building the interface in code is easier but he wishes to use Interface Builder for whatever piece of the process he can. On 13-Feb-2010, at 5:56 AM, Graham Cox wrote: On 12/02/2010, at 11:48 PM, Roland King wrote: That's why I suggested viewWithTag: method, if you give the text view tag number 1 and the two buttons tags 2 and 3, you can easily find them by calling viewWithTag: with each tag from 1 to 3. I can't really see the benefit of this - you're assigning a number to each view so you can find it. Each view already has a number - its pointer. So just make an outlet for each view of interest and then you can refer to it directly by name (ivar identifier) that you assign. Much easier. --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: @distinctUnionOfArrays problem
It sounds like you are using an NSTreeController as the master not an NSArrayController, so you'll want to do: valueForKeyPath:@childnod...@distinctunionofobjects.genre at least I think so. childNodes will give you an array for all the nodes in your tree. Ok - so I did manage to get it working... Going in the right direction. I have got my original table (4 columns) and I have two filtering columns that are the unique values from the Genre and Album columns of my master table. Album is still not filtered through Genre... I don't think there is a bindings way to build a predicate base on the selection in these two tables though. Ultimately I want to first filter the Albums column by building a predicate filter on the master database's Genre. Does anyone know of examples for this - noting seems to be on Apple's site. Trygve ___ 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: NSDateFormatter returns nil
On Fri, Feb 12, 2010 at 8:21 PM, Fritz Anderson fri...@manoverboard.org wrote: On 12 Feb 2010, at 12:16 PM, Kristof Van Landschoot wrote: Why is lDateFormatted nil on iPhone simulator 3.1.2 after executing this piece of code? NSString *lDateString = @Wed, 17 Feb 2010 16:02:01; NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDateFormat:@EEE, dd MMM hh:mm:ss]; NSDate *lDateFormatted = [dateFormatter dateFromString: lDateString ]; Just to follow up: it needed big HH in the format string instead of small hh, since the hour is 24-hours based. Thanks, kristof ___ 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
warning when setting the delegate of SpeechSynthesizer
Hello everybody, I'm having a difficult time trying to figure out why cocoa gives me a warning when trying to implement a delegate method in my class. I'm writing the SpeakLine application from Aaron Hillegass' book in which the user enters a line of text and there's 2 buttons: Stop and Speak. When the user presses Speak, the speak button should go not enabled and Stop go enable, and when the SpeechSynthesizer finishes the opposite should happen. Anyway, I set the delegate as self in the init method, like so: -(id) init { [super init]; speechSynth = [[NSSpeechSynthesizer alloc] initWithVoice:nil]; [speechSynth setDelegate:self]; return self; } and implement the method didFinishSpeaking like this: -(void) speechSynthesizer:(NSSpeechSynthesizer *)sender didFinishSpeaking:(BOOL)complete { NSLog(@Complete = %d, complete); [startButton setEnabled:YES]; [stopButton setEnabled:NO]; } I get the warning: Class 'AppController' does not implement the 'SpeechSynthesizerDelegate' protocol at the line [speechSynth setDelegate:self]; Is there anything obviously wrong with what I'm doing? I followed the book exactly and still get this warning. Thanks in advance. Martin. ___ 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: warning when setting the delegate of SpeechSynthesizer
OMG, I'm sorry I just found that I should add NSSpeechSynthesizerDelegate next to the class definition. Disregard my last message. (I wonder why he doesn't mention that in the book). Begin forwarded message: From: Martin Beroiz martinber...@gmail.com Date: February 12, 2010 8:19:04 PM CST To: Cocoa Dev cocoa-dev@lists.apple.com Subject: warning when setting the delegate of SpeechSynthesizer Hello everybody, I'm having a difficult time trying to figure out why cocoa gives me a warning when trying to implement a delegate method in my class. I'm writing the SpeakLine application from Aaron Hillegass' book in which the user enters a line of text and there's 2 buttons: Stop and Speak. When the user presses Speak, the speak button should go not enabled and Stop go enable, and when the SpeechSynthesizer finishes the opposite should happen. Anyway, I set the delegate as self in the init method, like so: -(id) init { [super init]; speechSynth = [[NSSpeechSynthesizer alloc] initWithVoice:nil]; [speechSynth setDelegate:self]; return self; } and implement the method didFinishSpeaking like this: -(void) speechSynthesizer:(NSSpeechSynthesizer *)sender didFinishSpeaking:(BOOL)complete { NSLog(@Complete = %d, complete); [startButton setEnabled:YES]; [stopButton setEnabled:NO]; } I get the warning: Class 'AppController' does not implement the 'SpeechSynthesizerDelegate' protocol at the line [speechSynth setDelegate:self]; Is there anything obviously wrong with what I'm doing? I followed the book exactly and still get this warning. Thanks in advance. Martin. ___ 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: warning when setting the delegate of SpeechSynthesizer
Aaron's book came out before Snow Leopard, back when @optional was not available; thus any protocol which declared at least 1 optional method must be an informal protocol. This is not so anymore ever since 10.6's SDK. Thus, NSSpeechSynthesizerDelegate did not exist when the book was written. Steven Degutis Software Engineer Big Nerd Ranch, Inc. http://www.bignerdranch.com/ On Fri, Feb 12, 2010 at 9:22 PM, Martin Beroiz martinber...@gmail.comwrote: OMG, I'm sorry I just found that I should add NSSpeechSynthesizerDelegate next to the class definition. Disregard my last message. (I wonder why he doesn't mention that in the book). Begin forwarded message: From: Martin Beroiz martinber...@gmail.com Date: February 12, 2010 8:19:04 PM CST To: Cocoa Dev cocoa-dev@lists.apple.com Subject: warning when setting the delegate of SpeechSynthesizer Hello everybody, I'm having a difficult time trying to figure out why cocoa gives me a warning when trying to implement a delegate method in my class. I'm writing the SpeakLine application from Aaron Hillegass' book in which the user enters a line of text and there's 2 buttons: Stop and Speak. When the user presses Speak, the speak button should go not enabled and Stop go enable, and when the SpeechSynthesizer finishes the opposite should happen. Anyway, I set the delegate as self in the init method, like so: -(id) init { [super init]; speechSynth = [[NSSpeechSynthesizer alloc] initWithVoice:nil]; [speechSynth setDelegate:self]; return self; } and implement the method didFinishSpeaking like this: -(void) speechSynthesizer:(NSSpeechSynthesizer *)sender didFinishSpeaking:(BOOL)complete { NSLog(@Complete = %d, complete); [startButton setEnabled:YES]; [stopButton setEnabled:NO]; } I get the warning: Class 'AppController' does not implement the 'SpeechSynthesizerDelegate' protocol at the line [speechSynth setDelegate:self]; Is there anything obviously wrong with what I'm doing? I followed the book exactly and still get this warning. Thanks in advance. Martin. ___ 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/steven.degutis%40gmail.com This email sent to steven.degu...@gmail.com -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.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: Replacing model objects using an NSArrayController
On Feb 11, 2010, at 10:33 PM, Quincey Morris wrote: There isn't a replace method for an array controller. If you must do it as a single operation, then solution would be to fetch the original object at the end of editing, update its properties to match the (edited) properties of the copy, then discard the now-temporary object copy. However, your description doesn't completely make sense. There are no objects in an array controller. Instead, think of the array controller as a sorted, filtered perspective on your underlying data. Normally, the array controller is monitoring the underlying data via KVO, so any underlying changes are noticed and it adjusts itself accordingly without your writing any code. You seem to be saying that you've already updated the underlying data model (I have implemented all of the KVC methods in the Manager class ...), in which case you *don't* want to mess with the array controller directly. Basically, there are two approaches to adding, deleting and replacing, when an array controller is involved: 1. Update the data model directly and KVO compliantly, and let the array controller notice the changes via KVO. 2. Do not update the data model directly, but use the array controller methods instead (removeObject:, insertObject:atArrangedObjectIndex:, etc). These methods internally cause the data model to be updated. Pick one. Not both. Method #1 is the cleanest, because it doesn't introduce the array controller (which is really part of your UI glue code) into the data model update, but you *must* ensure that the data model change is made KVO compliantly. Typically, that means making the changes using a mutableArrayValueForKey: proxy object. Method #2 is a convenience when you've not built (or have not been able to build) a clean MVC design into your app, or when you must work with the arrangedObjects order for some reason. Others will likely disagree with me, but I think that there's something a bit smelly about code referring to array controllers. It often indicates a defect in the MVC design. Quincey, Your explanation took a little while to make sense to me, but I finally did have the aha moment. You were right that I was confusing my MVC design, trying to use a controller object to tell another controller object to change the model. I wasn't aware that I could just change the model directly and that KVO would affect the other controller for me. It still seems rather magical how it does that, but I've reworked my code to directly call my replaceObjectInMyArrayAtIndex:withObject: and verified that the changes are now flowing through to the UI just how I wanted. Thank you for helping me through this learning experience; I'm sure I will draw from it again and again. Bill ___ 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: Validating unique objects in CoreData
That's not a horrible solution, except for the feeling that core data ought to let you do what you want without having to implement your own UUID cache. I'm still a bit surprised that a lookup for an object by one attribute is taking so long, over just 30,000 objects. You do have the uuid attribute marked as indexed right? I found http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html whilst hunting around for some examples of core data with big data sets. This guy was working on sets of 1 million objects and doing fetches with indexed properties was taking about 2 seconds, vs non-indexed, 600 seconds. There are some comments at the bottom from an apple engineer too. On 13-Feb-2010, at 2:06 AM, malcom wrote: I've tried to make an alternative method. I'll try to describe it. I would to use a second an auxiliary index where to save my uuid-objectURI; results are better, so I try to make a summary of the problem and the solution. If anyone have a better idea I'll be happy to talk about it :) I've about 30,000 messages taken from network and I need to save all into a Core Data Store in form of a tree. Each message contains an unique identification string and no more than one message can be saved on database with the same id. CoreData at this time does not support uniqueness of attributes and I can't use objectID property to ensure this kind of thing. A first solution is, in pseudo code: - Execute a query to see if uuid string is presents in storage - If it's not present I can make a new NSManagedObject with that uuid and put it into storage, otherwise I'll ignore it (it's already on db) - Execute another query to find the direct parent of this new message, if found I'll link both messages, if not it's a root message This solution has a big problem. With 30k messages I need of 30k query to check if the new message exist on coredata, another 30k to check for parent (plus, I think, another 30k to insert the new object). Over 60k+ queries takes lots of time (a minute or more here). My second solution is to create a second auxiliary NSMutableDictionary where i'll save message uuid as key and NSManagedObjectID's URI rapresentation (the only I can save to NSData) as value for dictionary entry. The result in pseudo code is: - Use objectForKey:uuid to my auxiliary dictionary to see if the message exist in coredata - If yes I'll ignore it. If not i'll put it into the store - Use objectForKey:parentuuid to my auxiliary dictionary to see if the parent of the message is present on coredata. If yes i'll use NSPersistentCoordinator's managedObjectIDForURIRepresentation: to get the NSManagedObject (the parent of the message) and link both parent and child With this solution the entire process takes about 5 seconds to finish (the result dictionary it's around 2mb). ___ 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: Indexed Attributes in Core Data (was Validating unique objects)
On 2010 Feb 12, at 19:06, Roland King wrote: http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html This guy was working on sets of 1 million objects and doing fetches with indexed properties was taking about 2 seconds, vs non-indexed, 600 seconds. Damn. I never knew that Core Data supported indexes in its sqlite databases. There is no mention of it in the Core Data Programming Guide (searched pdf for 'index'). And I had to read Matt Gallagher's blog post three times before I finally found this teeny tiny tidbit: using the checkbox in the XCode Data Model editor I opened a model and, sure enough, there it was. I must have seen that hundreds of times and never realized what it was for. Back to the original topic, malcolm should try this with his uuid. ___ 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: Indexed Attributes in Core Data (was Validating unique objects)
On 13-Feb-2010, at 12:01 PM, Jerry Krinock wrote: On 2010 Feb 12, at 19:06, Roland King wrote: http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html This guy was working on sets of 1 million objects and doing fetches with indexed properties was taking about 2 seconds, vs non-indexed, 600 seconds. Damn. I never knew that Core Data supported indexes in its sqlite databases. There is no mention of it in the Core Data Programming Guide (searched pdf for 'index'). And I had to read Matt Gallagher's blog post three times before I finally found this teeny tiny tidbit: using the checkbox in the XCode Data Model editor I opened a model and, sure enough, there it was. I must have seen that hundreds of times and never realized what it was for. Back to the original topic, malcolm should try this with his uuid. That's right, it's almost not in the documentation anywhere is it, I'd forgotten that. I only started with core data a few weeks ago and messed about with every checkbox I could to see what it did, and I looked for it at the time in the docs and found nothing. There is a mention of an 'isIndexed' property in the NSPropertyDescription class which says that a store can optionally use this information for creating indexes. I can confirm (from looking at the sqllite database) that core data using sqllite appears to create indexes for relationships and for properties marked 'indexed', with the usual caveat that looking at the tables core data makes is entirely unsupported and could change at any time. I can only assume that the queries it sends for fetches with simple properties are such that the sqllite engine can make use of those indexes. ___ 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
UINavigationController inside a TabBarController
I'm not sure what I'm missing but I know it must be big. I started the design of a TabBar-style app and now, I want one of the view to be a navigation one. I did drag a UINavigationController to my xib, put it inside the TabBarView and put my tableview under the navigation controller. When I open the window in IB, I can see my tableview inside the nav controller, in the first tab item but when I compile and go, only the navigation view shows up when I select the tab item. I've been banging my head, trying to find what connection or method I missed, I can't find it. Anybody knows? Thanks in advance! -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries ___ 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: UINavigationController inside a TabBarController
Here's a blog post I wrote last year on how to do this programmatically (which I find much easier to understand than doing it in Interface Builder): http://www.davedelong.com/blog/2009/05/13/adding-uinavigationuitableview-controllers-uitabbarcontroller There's also a sample project and a PDF in my Downloads section. Cheers, Dave On Feb 12, 2010, at 9:34 PM, Laurent Daudelin wrote: I'm not sure what I'm missing but I know it must be big. I started the design of a TabBar-style app and now, I want one of the view to be a navigation one. I did drag a UINavigationController to my xib, put it inside the TabBarView and put my tableview under the navigation controller. When I open the window in IB, I can see my tableview inside the nav controller, in the first tab item but when I compile and go, only the navigation view shows up when I select the tab item. I've been banging my head, trying to find what connection or method I missed, I can't find it. Anybody knows? Thanks in advance! smime.p7s Description: S/MIME cryptographic signature ___ 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-based GPS framework?
On Feb 12, 2010, at 12:11 PM, Steven Degutis wrote: If you can support 10.6, I would recommend using Core Location, which is pretty solid from my understanding. But does Core Location on the Mac (10.6) support hardware GPS? I think not. I have written Lucubrator, a free Snow Leopard app for Mac that uses Core Location, but of course it only uses wifi to locate you (and it does a darn good job). You can download the source code at http://www.quecheesoftware.com/Quechee_Software/Lucubrator.html. -- Bill Cheeseman b...@cheeseman.name ___ 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: UINavigationController inside a TabBarController
Thanks, Dave. I'll have a look though I would prefer to keep as much the UI into IB. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries On Feb 12, 2010, at 20:39, Dave DeLong wrote: Here's a blog post I wrote last year on how to do this programmatically (which I find much easier to understand than doing it in Interface Builder): http://www.davedelong.com/blog/2009/05/13/adding-uinavigationuitableview-controllers-uitabbarcontroller There's also a sample project and a PDF in my Downloads section. Cheers, Dave On Feb 12, 2010, at 9:34 PM, Laurent Daudelin wrote: I'm not sure what I'm missing but I know it must be big. I started the design of a TabBar-style app and now, I want one of the view to be a navigation one. I did drag a UINavigationController to my xib, put it inside the TabBarView and put my tableview under the navigation controller. When I open the window in IB, I can see my tableview inside the nav controller, in the first tab item but when I compile and go, only the navigation view shows up when I select the tab item. I've been banging my head, trying to find what connection or method I missed, I can't find it. Anybody knows? Thanks in advance! ___ 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/laurent.daudelin%40gmail.com This email sent to laurent.daude...@gmail.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: UINavigationController inside a TabBarController
On Feb 12, 2010, at 8:34 PM, Laurent Daudelin wrote: I'm not sure what I'm missing but I know it must be big. I started the design of a TabBar-style app and now, I want one of the view to be a navigation one. I did drag a UINavigationController to my xib, put it inside the TabBarView and put my tableview under the navigation controller. When I open the window in IB, I can see my tableview inside the nav controller, in the first tab item but when I compile and go, only the navigation view shows up when I select the tab item. I've been banging my head, trying to find what connection or method I missed, I can't find it. Your Navigation Controller must be one of the controllers in the Tab Bar Controller's array of View Controllers. Then, the Navigation Controller's Root View Controller must be the Table View Controller. Is that the structure you have? Possibly there is either a class identity that has not been correctly set, or, there might be a Nib Name that is not correctly set.This stuff is notoriously easy to get wrong . . . In IB's List View inspector, go through each of the Tab Bar's list of View Controllers.Make sure their Class identities are the correct type of View Controller, and make sure that their NIB names (if appropriate) are correct. In a simple experiment, I dragged a Tab Bar Controller into a XIB. I deleted one of the (two) View Controllers from the Tab Bar Controller. Then I dragged a Navigation Controller into the XIB, and moved it into the Tab Bar Controller's hierarchy.But the Navigation Controller's Root View Controller's class identity shows up as a simple UIViewController. I had to select that and specifically set its identity to UITableView Controller. Hope This Helps a Little . . . Cheers, . . . . . . . .Henry = iPhone App Development and Developer Education . . . Visit www.nonatomic-retain.com Mac OSX Application Development, Plus a Great Deal More . . . Visit www.trilithon.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: UINavigationController inside a TabBarController
On Feb 12, 2010, at 8:34 PM, Laurent Daudelin wrote: I'm not sure what I'm missing but I know it must be big. I started the design of a TabBar-style app and now, I want one of the view to be a navigation one. I did drag a UINavigationController to my xib, put it inside the TabBarView and put my tableview under the navigation controller. When I open the window in IB, I can see my tableview inside the nav controller, in the first tab item but when I compile and go, only the navigation view shows up when I select the tab item. I've been banging my head, trying to find what connection or method I missed, I can't find it. Anybody knows? Thanks in advance! might this be helpful? http://www.youtube.com/watch?v=LBnPfAtswgw -Kevin The Red Fantasy : http://www.dobermaneditions.com//en/sheet-music-for-guitar/guitar-solo/p17554733.html The Fourth Stream: http://www.dobermaneditions.com//en/sheet-music-for-guitar/guitar-solo/p17554731.html Three River Moments: http://www.henry-lemoine.com/en/catalogue/rechercheFiche.html?cotage=27461 Accessorizer: http://www.kevincallahan.org/software/accessorizer.html Homepage: http://www.kevincallahan.org/ http://www.xeniamara.com -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries ___ 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/kcall%40mac.com This email sent to kc...@mac.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: UINavigationController inside a TabBarController
Thanks, that was helpful but I had already figured it out. After examining the Recipes sample, which does exactly what I wanted to do, I did notice that the sample didn't have a pre-configured tableview. So, I removed my tableview from the view hierarchy and, in viewDidLoad, I did set the tableview to the view pre-configured in IB. Works perfect! Now, if I could find how to get small UISegmentedControls, life would be good. You know, like in Settings-General, there is a small segmented control for the Location Services. It is small and fits well inside the tableview cell. However, the one I put from IB in my cell looks rather large. Is the only way to have it small by subclassing it and overriding its draw method? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries On Feb 12, 2010, at 21:11, Kevin Callahan wrote: On Feb 12, 2010, at 8:34 PM, Laurent Daudelin wrote: I'm not sure what I'm missing but I know it must be big. I started the design of a TabBar-style app and now, I want one of the view to be a navigation one. I did drag a UINavigationController to my xib, put it inside the TabBarView and put my tableview under the navigation controller. When I open the window in IB, I can see my tableview inside the nav controller, in the first tab item but when I compile and go, only the navigation view shows up when I select the tab item. I've been banging my head, trying to find what connection or method I missed, I can't find it. Anybody knows? Thanks in advance! might this be helpful? http://www.youtube.com/watch?v=LBnPfAtswgw -Kevin The Red Fantasy : http://www.dobermaneditions.com//en/sheet-music-for-guitar/guitar-solo/p17554733.html The Fourth Stream: http://www.dobermaneditions.com//en/sheet-music-for-guitar/guitar-solo/p17554731.html Three River Moments: http://www.henry-lemoine.com/en/catalogue/rechercheFiche.html?cotage=27461 Accessorizer: http://www.kevincallahan.org/software/accessorizer.html Homepage: http://www.kevincallahan.org/ http://www.xeniamara.com -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries ___ 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/kcall%40mac.com This email sent to kc...@mac.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: UINavigationController inside a TabBarController
What's the 'style' on the segmented control set to? The 'bar' style is smaller than the 'plain' or 'bordered' styles. On 13-Feb-2010, at 1:54 PM, Laurent Daudelin wrote: Thanks, that was helpful but I had already figured it out. After examining the Recipes sample, which does exactly what I wanted to do, I did notice that the sample didn't have a pre-configured tableview. So, I removed my tableview from the view hierarchy and, in viewDidLoad, I did set the tableview to the view pre-configured in IB. Works perfect! Now, if I could find how to get small UISegmentedControls, life would be good. You know, like in Settings-General, there is a small segmented control for the Location Services. It is small and fits well inside the tableview cell. However, the one I put from IB in my cell looks rather large. Is the only way to have it small by subclassing it and overriding its draw method? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries On Feb 12, 2010, at 21:11, Kevin Callahan wrote: On Feb 12, 2010, at 8:34 PM, Laurent Daudelin wrote: I'm not sure what I'm missing but I know it must be big. I started the design of a TabBar-style app and now, I want one of the view to be a navigation one. I did drag a UINavigationController to my xib, put it inside the TabBarView and put my tableview under the navigation controller. When I open the window in IB, I can see my tableview inside the nav controller, in the first tab item but when I compile and go, only the navigation view shows up when I select the tab item. I've been banging my head, trying to find what connection or method I missed, I can't find it. Anybody knows? Thanks in advance! might this be helpful? http://www.youtube.com/watch?v=LBnPfAtswgw -Kevin The Red Fantasy : http://www.dobermaneditions.com//en/sheet-music-for-guitar/guitar-solo/p17554733.html The Fourth Stream: http://www.dobermaneditions.com//en/sheet-music-for-guitar/guitar-solo/p17554731.html Three River Moments: http://www.henry-lemoine.com/en/catalogue/rechercheFiche.html?cotage=27461 Accessorizer: http://www.kevincallahan.org/software/accessorizer.html Homepage:http://www.kevincallahan.org/ http://www.xeniamara.com -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries ___ 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/kcall%40mac.com This email sent to kc...@mac.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/rols%40rols.org This email sent to r...@rols.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