AVFoundation joining Audio files
Hi All, In our specific market video app we take videos and merge them together and they are used for advertising. We can add music or a voice over to the video before publishing. Now we have a way of adding a intro to the video that was previously kept in the photo roll. The issue is if we have a intro we can no longer add a mp3 music file to the video. I worked around this by changing the .mp3 files to .caf files, this works only problem is that the app now is huge as the files are 10x bigger than the mp3 files were. I need a way of adding compressed audio to uncompressed audio. Is there a way of doing this in AVFoundation (perhaps AVAudioMix) Can someone guide me in the right direction here please. Thanks in advance Damien ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Application size growing
For completeness sake. I thought I would share the answer. I realised that this was a good problem when I saw others were complaining about the same thing with no answers, it turns out that when capturing the video, iOS stores these files in the /tmp directory and does not remove them immediately or when app is restated or even the phone is restarted for some reason. So I cleared this out also after the video is marked for upload and the problem is completely resolved. Thanks guys for your assistance. Regards Damien On 23/02/2014, at 11:34 AM, Roland King r...@rols.org wrote: On 23 Feb, 2014, at 7:19 am, Jens Alfke j...@mooseyard.com wrote: On Feb 22, 2014, at 2:07 PM, Damien Cooke dam...@smartphonedev.com wrote: The problem is the app is gaining about 200Mb after each movie and the only cure is to delete the app. Where is this all going if I write all my stuff into one place and delete the directory later? If this reproduces in the simulator, you can locate the app’s directory (buried way down in ~/Library) and examine the hierarchy to see where the 200MB is and what the file(s) look like. That should provide a clue. If it only happens on a real device, you can write a bit of code to recursively iterate the directory tree and log the files and amount of space. Or use the Devices Explorer in Xcode for a development version of the app and dump the contents of the app directory, or iExplorer which does a remarkably good job of inspecting most things on a real device (without jailbreaking 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Application size growing
Hi All, I write a video app for the auto industry basically, you shoot several short “segments” of your car and combine them then add a tune in the background. I take them in 1280X720 and then resize them and add the audio using AVFoundation. I store all the files I save into Documents/video and optionally save the final video to the photo roll. After the user has uploaded the video they clear the cache (documents/videos) and move on to the next vehicle The problem is the app is gaining about 200Mb after each movie and the only cure is to delete the app. Where is this all going if I write all my stuff into one place and delete the directory later? Does something I save into the photo roll count towards storage for my app? IS AVFoundation using some caches or creating files in some temporary directory? Anyone else seen anything like this? Regards Damien ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Video bit rate
Hi All, I am taking video on in my iPhone app at 1280x720 this turns out at about 40Mb/min What I want is to drop the bit rate not the size using AVAssetWriter/AVAssetReader, is this possible or even the right way of doing this? I am able to get what I want by dropping the bit rate in an external app so can I achieve this on the phone? Regards Damien ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Unicode chars in string
Hi all, I am pulling my hair out here trying to replace the unicode (r) symbol with \\00ea in a string. Is there a way of doing this as the NSString is a unicode String so it is interpreting it. As convenient that might be to most people it is killing me here. Any suggestions? Damien ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Keychain issues with public key on iOS
Thanks so much Jens, Is there any chance you could share the ComputeSHA1 message with me? I know you said it was only a wrapper for commonCrypto but I am so lost in this stuff I want t check everything. Regards Damien On 09/02/2013, at 4:05 PM, Jens Alfke j...@mooseyard.com wrote: On Feb 8, 2013, at 1:31 PM, Damien Cooke dam...@smartphonedev.com wrote: I am trying to put a public key into the ios keychain so I can get a SecKeyRef to use to verify a signature. Oh dear. Any time I have to deal with the iOS keychain APIs I get either enraged or sick to my stomach or both. Seriously. So I strip the begin and end markers plus remove all the \n (is this correct?) And also base64-decode it, right? It definitely won’t work unless you do that too. (This looks like a PEM-encoded key; to make sure, you could look up the docs on that format. But I think you’ve basically got it right.) The SecItemAdd succeeds but I can never get it out again as SecItemCopyMatching always returns null in the ref pointer but returns errSecSuccess so I am really confused. Yeah, this is a good example of where my rage/ulcer reactions come from. The SecItem API is one of the worst things ever: it’s incredibly vague and under-documented, and just does not seem to behave in reasonable ways or return informative errors. Here’s some code I have for this purpose. It’s been about a year since I’ve worked with it so I’m no longer clear on all the details. One thing to note is that the app this is for is using the SHA-1 digest of the key as the “application tag” property for looking up the key afterwards, thus the usage of the digest in the parameters to SecItemAdd. Also, the weird stuff about converting the persistent ref to a regular one is to work around a bug(?) in the keychain code, where you apparently have to request a persistent ref when adding a new item, but then can’t work with that ref unless you convert it to a regular one. This code is the boiled-down end product of literally about ten cumulative hours of frustration and experimentation, so it may be messier than it needs to be. If someone knows how to do this more elegantly, I’m all ears. —Jens PS: The apple-cdsa list is the appropriate one for talking about this stuff, although I’ve noticed that the Apple engineers there never seem to answer detailed questions about the keychain APIs :-p SHA1Digest digest = ComputeSHA1(keyData); // this is a fn of mine that just calls CommonCrypto NSData* digestData = [NSData dataWithBytes: digest length: sizeof(digest)]; NSMutableDictionary* attrs = [NSMutableDictionary dictionaryWithObjectsAndKeys: (id)kSecClassKey,(id)kSecClass, (id)kSecAttrKeyTypeRSA, (id)kSecAttrKeyType, (id)kSecAttrKeyClassPublic, (id)kSecAttrKeyClass, digestData, (id)kSecAttrApplicationTag, // digestData, (id)kSecAttrApplicationLabel, keyData, (id)kSecValueData, (id)kCFBooleanTrue, (id)kSecReturnPersistentRef, nil]; CFTypeRef keyRef = NULL; OSStatus err = SecItemAdd((CFDictionaryRef)attrs, keyRef); if (err) { if (err != errSecDuplicateItem) return err; // Already have a key with this digest, so look it up to get its ref: [attrs removeObjectForKey: (id)kSecValueData]; [attrs setObject: digestData forKey: (id)kSecAttrApplicationLabel];//?? [attrs removeObjectForKey: (id)kSecReturnPersistentRef]; [attrs setObject: (id)kCFBooleanTrue forKey: (id)kSecReturnRef]; return SecItemCopyMatching((CFDictionaryRef)attrs, (CFTypeRef*)outPublicKey); } // Added it -- now convert the persistent ref to a regular one: NSMutableDictionary* query = [NSMutableDictionary dictionaryWithObjectsAndKeys: (id)kSecClassKey,(id)kSecClass, (id)kSecAttrKeyTypeRSA, (id)kSecAttrKeyType, digestData, (id)kSecAttrApplicationTag, // //(id)keyRef, (id)kSecValuePersistentRef, (id)kCFBooleanTrue, (id)kSecReturnRef, nil]; //CFRelease(keyRef); return SecItemCopyMatching((CFDictionaryRef)query, (CFTypeRef*)outPublicKey); ___ 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: https
Keychain issues with public key on iOS
All, I am trying to put a public key into the ios keychain so I can get a SecKeyRef to use to verify a signature. Now the key loos like this: -BEGIN PUBLIC KEY- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqE28o7Rhg36oaTGpHgIY n1OcRpwFaznSUriAxmvLymRvoVllB/Rbbd7Ap2ALg4hr8i+lZU9bBND9YYbJbpuo QqtM8/c5slZFr9fcp/ERnBu3L1EVhWYi4TPRtsZfy+BFgGrI3u6TJFf5ooAL5m9g 70HthETwoO+Jy62bd8zp972GkUWDfNlrRhvBj/gNxxaBcwKXaJVHre7t2vUaDVMP nJzyuGehDTkB3+Fb+RgoYsDT0BHEK8l76Imwv2uvMwGvWo9viNBCXxkX4GBjHoQJ kfIZ3EpU3zXQ3SD3TP78F3boN0rQUz95ObbzIUTjXokao3+u8u1VXY3pS+ynwaPe ZQIDAQAB -END PUBLIC KEY- So I strip the begin and end markers plus remove all the \n (is this correct?) then I pop it into the keychain. The SecItemAdd succeeds but I can never get it out again as SecItemCopyMatching always returns null in the ref pointer but returns errSecSuccess so I am really confused. If there is any light that anyone could shed on this for me it would be greatly appreciated. Regards Damien ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Auto resize due to personal hotspot blue bar
Hi all, I have a perplexing issue where I think I know the answer but can not make it work I have a custom UINavigation controller with a custom titlebar This is achieved in the UINavigationController subclass in the - (void)viewDidLoad UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,49)]; imageView.image = [UIIMage imageNamed:@some_image]; [self.view addSubview:imageView]; in the same method I added the following self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleTopMargin; this works fine. if I turn on Personal hotspot or put a phone call in the background, I get a 20px extension to the status bar. what happens is the new bar extension pops over my image and the view drops down 20 px. what I wanted was my image in the titlebar to drop down with the view. So I tried to add to the imageView the following: imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleTopMargin; This had no visible effect. So I went to the ViewController that was to populate the navigation controller and set the auto-resize flags on the View to be the same as the UINavigationController subclass. Still no improvement. Can someone please point me in the right direction. Or have I got this right but something is wrong somewhere else? Regards Damien ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
AVAssetWriterInputPixelBufferAdaptor on IOS attempting to write images to a video
HI All, I am attempting to write out an image as a movie well, it will be an array of images but to start with I can't even get one in there. Any help diagnosing my problem would be greatly appreciated. Here is what I am doing: //here is the image NSString *path = [NSString stringWithFormat:@%@/images/0.png,[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]]; NSData *imageData = [[[NSData alloc] initWithContentsOfFile:path] autorelease]; UIImage *uiimage = [UIImage imageWithData:imageData]; //configure the path for the output video NSString *videoPath = [NSString stringWithFormat:@%@/videos/currentVideo.mov,[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]]; NSError *error = nil; //create the writer AVAssetWriter *videoWriter = [[AVAssetWriter alloc] initWithURL:[NSURL fileURLWithPath:videoPath] fileType:AVFileTypeQuickTimeMovie error:error]; NSParameterAssert(videoWriter); //setup the properties for the input NSDictionary *videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:AVVideoCodecH264, AVVideoCodecKey,[NSNumber numberWithInt:640], AVVideoWidthKey,[NSNumber numberWithInt:960], AVVideoHeightKey,nil]; //create the input AVAssetWriterInput* writerInput = [[AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:videoSettings] retain]; NSParameterAssert(writerInput); NSParameterAssert([videoWriter canAddInput:writerInput]); [videoWriter addInput:writerInput]; //configure the properties for the buffer and create the bufferAdaptor NSDictionary *bufferAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:kCVPixelFormatType_32BGRA], kCVPixelBufferPixelFormatTypeKey, nil]; AVAssetWriterInputPixelBufferAdaptor *adaptor = [AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterInput:writerInput sourcePixelBufferAttributes:bufferAttributes]; //create the pixel buffer CVPixelBufferRef pixelBuffer = NULL; CGImageRef cgImage = CGImageCreateCopy([uiimage CGImage]); CFDataRef image = CGDataProviderCopyData(CGImageGetDataProvider(cgImage)); int status = CVPixelBufferCreateWithBytes(NULL, 960, 640, kCVPixelFormatType_32BGRA, (void*)CFDataGetBytePtr(image), CGImageGetBytesPerRow(cgImage), NULL, 0, NULL, pixelBuffer); //write it out [adaptor appendPixelBuffer:pixelBuffer withPresentationTime:CMTimeMake(2, 60)]; It crashes here reporting *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetWriterInputPixelBufferAdaptor appendPixelBuffer:withPresentationTime:] Cannot call method when status is 0' ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Problems linking json-framework with ios application
All, I am building a library to be used by other apps. I have included the json-framework in the library project and used the -ljson flag as directed. Now this all works fine, until my app uses one of the JSON categories that the library implements. if I add the json-framework to the app it works, so it appears I am doing something wrong as the categories and objects created by the json-framework are not being exported. Has anyone done something similar or can anyone see what I am doing wrong? Damien___ 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
TableView deselection issue
Hi All, I have a perplexing yet, probably, very simple problem. I have a tableView that when a cell is selected I pop in a different cell background (just a little pizzazz) only problem is that it is all backfiring on me as my willSelectRowAtIndexPath gets called fine and my funky image gets popped in nicely, yet my willDeselectRowAtIndexPath does not get called and so the image is still there when I get back to the table. I am calling deselectRowAtIndexPath as per documentation. I have my delegate set I have really no idea where to look next. Can anyone assist me please? Damien - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:NO]; AdvancedDetailViewController *advancedDetailController = [[AdvancedDetailViewController alloc] init]; AdditiveEntity *additiveEntity = [[self fetchedResultsController] objectAtIndexPath:indexPath]; [moreAdvancedDetailController setAdditiveEntity:additiveEntity]; // Pass the selected object to the new view controller. [self.navigationController pushViewController:advancedDetailController animated:YES]; [advancedDetailController release]; } - (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@willselectRowAtIndexPath); UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; cell.backgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@selectedTablecellBackground.png]] autorelease]; return indexPath; } - (NSIndexPath *)tableView:(UITableView *)tableView willDeselectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@willDeselectRowAtIndexPath); UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; cell.backgroundView = nil; return indexPath; }___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: core data issues iOS 4.0.2
Fritz, Thanks for the pointer, I had over looked this document in my own search. The issue was that I had deleted the record ok, but just a few lines further down I had referenced one of the fields of the deleted record... (only idiots do that! ) So the clue was from the document you pointed me to and specifically the line Fail to break all relationships from other objects to that object. So I went looking for a mistake like I found. Once again thanks for your time Regards Damien On 31/08/2010, at 10:41 AM, Fritz Anderson wrote: Googling CoreData could not fulfill a fault yields http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreData/Articles/cdTroubleshooting.html as the very first result; it took me three seconds to do this. You don't give enough information to say for sure, but can you tell us whether the second cause for this error (not propagating the deletion into relationships) fits your case? — F On 30 Aug 2010, at 4:40 PM, Damien Cooke wrote: I have been deleting objects with code similar to this. NSManagedObjectContext *context = [[self fetchedResultsController] managedObjectContext]; [context deleteObject:videoEntity]; [managedObjectContext processPendingChanges]; //commit the delete NSError *saveError = nil; if (![context save:saveError]) { NSLog(@CoreData Failure); }else { //all good NSLog(@CoreData delete success); NSLog(@\n\nNumber of objects in store after delete: %d\n\n, [[self.fetchedResultsController fetchedObjects] count]); } This works fine (as far as deleting the entry) however it crashes with a crash like that shown below: I also saw a recommendation to add this: - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller { NSLog(@controllerDidChangeContent); } This seems to make no difference to the crash. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
core data issues iOS 4.0.2
Hi all, I have been deleting objects with code similar to this. NSManagedObjectContext *context = [[self fetchedResultsController] managedObjectContext]; [context deleteObject:videoEntity]; [managedObjectContext processPendingChanges]; //commit the delete NSError *saveError = nil; if (![context save:saveError]) { NSLog(@CoreData Failure); }else { //all good NSLog(@CoreData delete success); NSLog(@\n\nNumber of objects in store after delete: %d\n\n, [[self.fetchedResultsController fetchedObjects] count]); } This works fine (as far as deleting the entry) however it crashes with a crash like that shown below: I also saw a recommendation to add this: - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller { NSLog(@controllerDidChangeContent); } This seems to make no difference to the crash. 2010-08-31 06:52:40.811 ecaster.tv[2072:307] *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x2951d0 x-coredata://38E6A994-7862-4CD3-BDDA-5F0EBB02E7FB/TVVideo/p70'' *** Call stack at first throw: ( 0 CoreFoundation 0x313f4fd3 __exceptionPreprocess + 114 1 libobjc.A.dylib 0x3302f8a5 objc_exception_throw + 24 2 CoreData0x330f4da9 _PFFaultHandlerLookupRow + 1244 3 CoreData0x330f48c5 -[NSFaultHandler fulfillFault:withContext:] + 20 4 CoreData0x330f289d _PF_FulfillDeferredFault + 360 5 CoreData0x330f62af _sharedIMPL_pvfk_core + 58 6 CoreData0x330f64cb _pvfk_11 + 10 7 ecaster.tv 0x00073d31 -[ECDeferedUploadController deleteButtonPressed:] + 384 8 CoreFoundation 0x3137f7ad -[NSObject(NSObject) performSelector:withObject:withObject:] + 24 9 UIKit 0x316c5829 -[UIApplication sendAction:to:from:forEvent:] + 84 10 UIKit 0x316c57c9 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32 11 UIKit 0x316c579b -[UIControl sendAction:to:forEvent:] + 38 12 UIKit 0x316c54ed -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 356 13 UIKit 0x316c5b3b -[UIControl touchesEnded:withEvent:] + 342 14 UIKit 0x316c44ed -[UIWindow _sendTouchesForEvent:] + 368 15 UIKit 0x316c3e67 -[UIWindow sendEvent:] + 262 16 UIKit 0x316bfb5b -[UIApplication sendEvent:] + 298 17 UIKit 0x316bf507 _UIApplicationHandleEvent + 5022 18 GraphicsServices0x329f4147 PurpleEventCallback + 666 19 CoreFoundation 0x313caaab __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26 20 CoreFoundation 0x313cc84f __CFRunLoopDoSource1 + 166 21 CoreFoundation 0x313cd62d __CFRunLoopRun + 520 22 CoreFoundation 0x313768eb CFRunLoopRunSpecific + 230 23 CoreFoundation 0x313767f3 CFRunLoopRunInMode + 58 24 GraphicsServices0x329f36ef GSEventRunModal + 114 25 GraphicsServices0x329f379b GSEventRun + 62 26 UIKit 0x316692a7 -[UIApplication _run] + 402 27 UIKit 0x31667e17 UIApplicationMain + 670 28 ecaster.tv 0x2317 main + 70 29 ecaster.tv 0x22cc start + 40 ) terminate called after throwing an instance of '_NSCoreDataException' ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Core data backed UITableView
Hi all, Here is the dumb question for the day. I have a coredata backed UITableView. I populate a NSFetchedResultsController and use that to source the rows and sections etc. All works well. That is until I go to delete an item from the table. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@commitEditingStyle called); TheEntity *myEntity = (VideoEntity *) [fetchedResultsController objectAtIndexPath:indexPath]; NSManagedObjectContext *context = [[self fetchedResultsController] managedObjectContext]; [context deleteObject:myEntity]; //commit the delete NSError *saveError = nil; if (![context save:saveError]) { NSLog(@CoreData save Failure); }else { //all good removed from coredata //now delete from tableView [self.myTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; } Then I get an error like *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-984.38/UITableView.m:774 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (3) must be equal to the number of rows contained in that section before the update (3), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted).' This appears to mean I need to remove it from the fetchedResultsController before I remove it from the table. So as NSFetchedResultsController has no remove facility I reload it. Is there a more efficient way of achieving this? Regards Damien ___ 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
some advice on asynchronous control please
Hi All, I have a situation where I am using a 3rd party library to manage content on their service. When I delete an entry the method requires a call back all good. Now I need to wait for that call back to be called to know if it was successful or not. In the call back I can set a boolean to indicate success or not but waiting for that to be set is my issue. What is the right way to wait for it? I think while(!done) { [NSThread sleepForTimeInterval:1]; } Just blocks the main thread which is not what I want at all as this also blocks the run loop also. Can anyone give me some guidance on the best practice for this situation? Regards Damien___ 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
NSURLConnection POST issues
Hi All, I have a solution for this problem that I am not at all happy with. I have appended all of my html form variables into a single variable using ||| as the field separators. This is a rubbish solution. I am looking for a more elegant solution that is less like a dodgy hack. Here is the problem and I am sure there is a reasonable and simple explanation for my problem that I have over looked but I can not see it yet. The Java servlet I am connecting to expects 6 variables: String strProdName = request.getParameter(ProdName); String strProdVersion = request.getParameter(ProdVersion); String strProdBuild = request.getParameter(ProdBuild); String strUserEmail = request.getParameter(UserEmail); String strUserComment = request.getParameter(UserComment); String strUserDevice = request.getParameter(UserDevice); here is my code to send this data - (void) transmitMessageToServer { NSMutableData *appendedData = [[NSMutableData alloc] init]; [appendedData appendData:[[[NSString stringWithFormat:@ProdName=%@,[self applicationName]] stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding] dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; [appendedData appendData:[[[NSString stringWithFormat:@ProdVersion=%@,[self productVersion]] stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding]dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; [appendedData appendData:[[[NSString stringWithFormat:@ProdBuild=%@,[self productBuild]] stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding]dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; [appendedData appendData:[[[NSString stringWithFormat:@UserEmail=%@,[self userEmail]] stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding]dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; [appendedData appendData:[[[NSString stringWithFormat:@UserComment=%@,[self userComment]] stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding]dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; [appendedData appendData:[[[NSString stringWithFormat:@UserDevice=%@,[self userDevice]] stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding]dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; NSString *dataLength = [[NSString alloc] initWithFormat:@%d, [appendedData length]]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; [request setURL:[NSURL URLWithString:@http://somesite.com:8080/addcomment;]]; [request setHTTPMethod:@POST]; [request setValue:dataLength forHTTPHeaderField:@Content-Length]; [request setValue:@application/x-www-form-urlencoded forHTTPHeaderField:@Content-Type]; [request setHTTPBody:appendedData]; [appendedData release]; [postLength release]; [request release]; NSURLConnection *messageConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; if(messageConnection) { responseData = [[NSMutableData data] retain]; }else { NSLog(@No network connection available?); } } When I send this all of the data appears as a single string attached to html variable named ProdName. I suspect this is because all of the data is appended together. I have tried many variations including dictionaries etc the problem appears to be that body is NSData and not an Array or collection of some type which would have made more sense to me. (please correct me if I am wrong in my thinking) So how do I send multiple pieces of data using POST and have a non Cocoa aware application separate it at the other end? If some one could assist me understand how this is supposed to work I would be grateful. Or is NSURLConnection and NSMutableRequest the wrong set of classes for this purpose? Regards Damien ___ 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: NSURLConnection POST issues
Thanks Jason, I knew it would be simple. Thank you so much. Regards Damien On 10/01/2010, at 2:35 PM, Jason Foreman wrote: On Jan 9, 2010, at 9:31 PM, Damien Cooke wrote: here is my code to send this data [appendedData appendData:[[[NSString stringWithFormat:@ProdName=%@,[self applicationName]] stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding] dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; [appendedData appendData:[[[NSString stringWithFormat:@ProdVersion=%@,[self productVersion]] stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding]dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]]; Review the info for the application/x-www-form-urlencoded Form content type here: http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4 In brief, you aren't separating your form variables with an character. You're doing this: ProdName=FooProdVersion=Bar whereas you want this: ProdName=FooProdVersion=Bar NSString *dataLength = [[NSString alloc] initWithFormat:@%d, [appendedData length]]; [request setValue:dataLength forHTTPHeaderField:@Content-Length]; I believe this is unnecessary, as it will be calculated automatically from the data passed to -setHTTPBody. Regards, Jason ___ 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: load cell from XIB slows down tableview?
John, I had a similar issue. For me the problem turned out to be that the reusableId was not being set as it was imported from the nib. Thus the call dequeue one was always retuning nil. I solved this by building the cell by hand and calling the correct init method so the reusableid was being set and all works well now. Let me know if there is a better solution. Regards Damien Sent from my iPhone 3GS On 04/01/2010, at 3:33 PM, John Michael Zorko jmzo...@mac.com wrote: Hello, all ... I'm trying to determine why my tableviews scroll so jerkily on non-3GS devices. The datasource only has perhaps 170 records, so I think it may have something to do with how i'm instantiating the cells in -tableView:cellForRowAtIndexPath. In other apps i've done, I create the view for the cell programmatically, and alloc / init the cell if I can't dequeue it. However, in this app, I have the cell's view loaded from a XIB. Is there a better way of defining my cell's view with IB that still results in a performant tableview? - (UITableViewCell *)tableView:(UITableView *)tableViewIn cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellID = @mycellID; MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate]; LogDailyCell *cell = (LogDailyCell *)[tableViewIn dequeueReusableCellWithIdentifier:cellID]; if (nil == cell) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@LogDailyCell owner:self options:nil]; for (id oneObject in nib) { if ([oneObject isKindOfClass:[LogDailyCell class]]) { cell = (LogDailyCell *)oneObject; break; } } } MyObject *act = nil; switch(indexPath.section) { case 0: act = [appDelegate array1ItemAtIndex:indexPath.row]; cell.type = 2; break; case 1: act = [appDelegate array2ItemAtIndex:indexPath.row]; cell.type = 3; break; case 2: act = [appDelegate array3ItemAtIndex:indexPath.row]; cell.type = 4; break; case 3: act = [appDelegate array4ItemAtIndex:indexPath.row]; cell.type = 5; break; } cell.name.text = act.name; cell.label1.text = [NSString stringWithFormat:@%i, act.anNSString]; cell.field1.text = @; cell.field2.text = @; cell.ident = indexPath.row; [cell.deleteButton removeFromSuperview]; return cell; } Regards, John ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/damien%40smartphonedev.com This email sent to dam...@smartphonedev.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
extending automatic core data entity classes
Hi All, I have a problem with core data. Probably caused by my lack of understanding. Below is the header file for the attribute I am bringing in from core data. I want to add a convenience method to this class indicated as - (ADDITIVE_WARNING_TYPE)returnAdditiveWarningByType below. The issue is when this method is called I get the error below iPhone Simulator 3.1 (139.1), iPhone OS 3.1.2 (7D11) *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSManagedObject returnAdditiveWarningByType]: unrecognized selector sent to instance 0x3a2d580' It is called like this in the code AdditiveEntity *additiveEntity = (AdditiveEntity *)[fetchedResultsController objectAtIndexPath:indexPath]; if ([additiveEntity returnAdditiveWarningByType] == ADDITIVE_WARNING_TYPE_WARNING) { } This indicates that despite the fact I have cast the object to an additiveEntity the class I am trying to apply this to is of type NSManagedObject not my class at all. So my questions are am I a complete idiot and have missed something simple? Am I able to add convenience methods to the classes that core data generates for use as the entity classes if so can someone tell me what am I doing wrong? Is there something stopping me from casting the result of [fetchedResultsController objectAtIndexPath:indexPath] to a AdditiveEntity which is a subclass of NSManagedObject anyway? This is a very perplexing problem as I am sure it is something dumb I am doing but can not see it. Thanks in advance for any assistance. Regards Damien typedef enum _ADDITIVE_WARNING_TYPE { ADDITIVE_WARNING_TYPE_NONE = 0 }ADDITIVE_WARNING_TYPE; @interface AdditiveEntity : NSManagedObject { } @property (retain, nonatomic) NSString *identifier; @property (retain, nonatomic) NSString *name; @property (retain, nonatomic) NSString *type; @property (retain, nonatomic) NSString *description; @property (retain, nonatomic) NSString *acknowledgement; @property (retain, nonatomic) NSString *warning; @property (assign) int additive_notification; - (ADDITIVE_WARNING_TYPE)returnAdditiveWarningByType; @end ___ 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 Sounds
Hi all, I may be way off but in my iPhone game I used SystemSoundID and AudioServicesCreateSystemSoundID I am not sure if that is helpful at all but it did not seem to have a delay but it does not support many formats either. So if you are happy to convert your format this may be an option? it looks like this SystemSoundID wrongLetter; AudioServicesCreateSystemSoundID((CFURLRef) [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:@wrongLetter ofType:@aiff]], wrongLetter); AudioServicesPlaySystemSound(wrongLetter); //when finished AudioServicesDisposeSystemSoundID(wrongLetter); Regards Damien On 10/11/2009, at 12:27 PM, Matt Neuburg wrote: On Mon, 9 Nov 2009 14:16:14 -0500, Sean McBride s...@rogue-research.com said: On 11/9/09 10:50 AM, Jens Alfke said: I ran into this too. A decent workaround is to preload the sound: create an NSSound object for the audio file you want to play, set its volume to zero, then play it. After that it's warmed up and will play instantly. I just tried this, and it seems to work well. One catch is that 'play' is asynchronous, so you have to restore the volume to non-0 in the sound:didFinishPlaying: delegate callback. Altogether quite annoying. And this won't help fix the same problem with NSBeep. Correct. I'm already doing various dances to try to prime the pump for my own NSSounds, but I have not found a way to prime the pump for an ordinary NSBeep. 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/damien.cooke%40internode.on.net This email sent to damien.co...@internode.on.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [iPhone] Custom UIView like in iPhone Messages App
Tharindu, I did this by subclassing UITableView and overriding - (void) setBackgroundImage:(UIImage*)image This gives me a static background that the tableView will scroll over the top. Next you need to create a custom cell for your messages and pop them into the UItableView subclass in the method - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath Someone will probably correct my approach if it is inefficient or incorrect. I hope this helps. Let me know if you still can not get there. Regards Damien On 08/11/2009, at 12:12 PM, Tharindu Madushanka wrote: Hi, I am trying to implement a custom ui view with a background image to append chat messages into a scroll view like in iPhone default Messages SMS App. But I have few things to clarify. If its multiple lines how can I remove the image scaling so that it would not look like that background image is scaled ? Could anyone suggest some solution for this. Thank you Tharindu Madushanka tharindufit.wordpress.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/damien.cooke%40internode.on.net This email sent to damien.co...@internode.on.net We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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
Search on Core data Table issue?
Hi All, Not sure if this is the right place (I am sure someone will let me know if it is not) I have a iPhone application that has a UITable view that is backed by core data. I want to perform a reducing search so that only the items starting with the characters entered into the search bar are shown. This is normally done with delegate - (void) searchBar:(UISearchBar *)searchBar textDidChange:(NSString *) searchText no problem. I am a little confused as I am new to Core Data how to do this. One of the big problems as I see it is going to be updating the interface to let it know what to present. I assume an alternative NSFetchedResultsController needs to be sent to the UITableView. So here are my issues: 1) I assume I need to create a NSFetchedResultsController with only the correct items in it then tell the UITableView to use this as the dataSource and reload the table? 2) is there a better way than executing a full sorted fetch and removing those objects that do not conform. ie is there a way of doing a select where type fetch? Thanks in advance and sorry if this is a dumb question. Regards Damien ___ 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 Support for Mail
All, I need to send email from my app. I have chosen EDMessage and added the frameworks to my project but it fails with error 5 can not find the EDCommon image. So I am told this is because the frameworks are designed to be embedded within the project. This is what I need some help with. I checked the apple docs (http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html#/ /apple_ref/doc/uid/20002258-SW1) This was not particularly useful to me as I tried in turn all of the ways to achieve what I want from the docs but I am unable to drag from one project the product to my target's Link Binary With Libraries. I am sure it is almost impossible to assist me unless someone out there has had a similar issue and if that is the case can you please let me know what you did to fix it? Regards Damien On 08/01/2009, at 9:49 AM, Torsten Curdt wrote: EDMessage had fallen into disrepair and would not build when I looked at it last year. I updated the source and merged in SSL and authentication from OPMessageServices, and turned it over to the original EDMessage team. The updated source is now on the web at: http://www.mulle-kybernetik.com/software/EDFrameworks/ You need both EDMessage and EDCommon. The EDMessage framework has an example app included. Both frameworks build 4-way Universal. Are my patches included now? :) I had some problems building it for 10.4. You find a 10.4/10.5 version at http://github.com/tcurdt/edmessage/tree/master ...following the svn trunk via git-svn I have successfully used these frameworks to send mail to both gmail and .mac as well as other ISPs. Same here! A while ago I compared the frameworks and ended up using Pantomime. http://vafer.org/blog/20080604120118 But I ended up having quite some trouble with it. So far the updated EdMessage seems quite reliable. *knock on wood* My new first choice. cheers -- Torsten ___ 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/damien.cooke%40internode.on.net This email sent to damien.co...@internode.on.net We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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: Programatically selecting items in a NSTableView
Thanks Nick, I moved all of my tableview population code to AwakeFromNib and it is all working fine. Thanks so much. Regards Damien On 16/02/2009, at 1:18 PM, Nick Zitzmann wrote: On Feb 15, 2009, at 2:27 PM, Damien Cooke wrote: This does not work and I was wondering if 1: can I programatically select an item in a NSTableView? Well, what you're doing is technically correct, although I'd recommend using NSUInteger instead of unsigned, but that's not the problem... 2: have I done something stupid? 3: This is part of the init of the NSPanel subclass should it be somewhere else (awakeFromNib does not work either). Yes. What you are trying to do breaks MVC separation. If you need to pass select messages to a table view, then you should do that from an NSWindowController subclass, not an NSPanel subclass. In addition, IBOutlets aren't available at initialization time; they are only available once the nib has been loaded and instantiated. Nick Zitzmann http://www.chronosnet.com/ We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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
Programatically selecting items in a NSTableView
Hi All, I have a NSTableView in a dialogue box (NSPanel subclass) I am passing in a value that I want to be the item that is selected when the dialogue opens. I fully populate the Datasource Array then I do this //select the item passed in for(unsigned arrayCounter = 0; arrayCounter [diaMediaItemsArray count]; arrayCounter++) { if([(DCOViewItem *)[diaMediaItemsArray objectAtIndex:arrayCounter] keyID] == itemToSelect) { [diaItemsTableView selectRowIndexes:[NSIndexSet indexSetWithIndex: (unsigned)arrayCounter] byExtendingSelection:NO]; } } This does not work and I was wondering if 1: can I programatically select an item in a NSTableView? 2: have I done something stupid? 3: This is part of the init of the NSPanel subclass should it be somewhere else (awakeFromNib does not work either). Thanks Damien We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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
Transparency with PNG on NSImageView
Hi All, I have what is probably a stupid problem. In my window I have a background NSImageView and I want to pop another much smaller one on top. The one I am putting on top is a png with transparencies. When I do this I get a rectangular image over my background but what I want to see is only the non transparent parts of my image. I have set the background colour of my image via [image setBackgroundColor:[NSColor clearColor]] but I am perplexed with the spectacular lack of any change. I feel I am completely on the wrong path. Can someone point me in the right direction? Regards Damien If you can't be kind, at least have the decency to be vague. ___ 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: Transparency with PNG on NSImageView
I create a new NSImageView and load it with the image then display the NSImageView Damien On 06/02/2009, at 9:13 AM, Randall Meadows wrote: On Feb 5, 2009, at 3:28 PM, Damien Cooke wrote: Hi All, I have what is probably a stupid problem. In my window I have a background NSImageView and I want to pop another much smaller one on top. The one I am putting on top is a png with transparencies. When I do this I get a rectangular image over my background but what I want to see is only the non transparent parts of my image. I have set the background colour of my image via [image setBackgroundColor:[NSColor clearColor]] but I am perplexed with the spectacular lack of any change. How are you drawing the top image? We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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: Transparency with PNG on NSImageView
Thanks David, I am not sure that this will work for me in this instance as the smaller image needs to be in a NSImageView so I can drag n'drop other images in there. Regards Damien On 06/02/2009, at 9:22 AM, David Blanton wrote: I do this to composite one image over another: CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextClearRect(ctx, rect); CGContextDrawImage(ctx, rect, _meterImages[0]); CGContextSetBlendMode (ctx, kCGBlendModeNormal); CGContextDrawImage(ctx, rect, _meterImages[1]); (iPhone example but the only difference I think is UIGraphicsGetCurrentContext) On Feb 5, 2009, at 3:28 PM, Damien Cooke wrote: Hi All, I have what is probably a stupid problem. In my window I have a background NSImageView and I want to pop another much smaller one on top. The one I am putting on top is a png with transparencies. When I do this I get a rectangular image over my background but what I want to see is only the non transparent parts of my image. I have set the background colour of my image via [image setBackgroundColor:[NSColor clearColor]] but I am perplexed with the spectacular lack of any change. I feel I am completely on the wrong path. Can someone point me in the right direction? Regards Damien If you can't be kind, at least have the decency to be vague. ___ 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/airedale%40tularosa.net This email sent to aired...@tularosa.net David Blanton If you can't be kind, at least have the decency to be vague. ___ 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
Enum advice please
Hi all, I have the following code: typedef enum _DCDBTypes { DCOItemType = 0, DCOCategoryType = 1, DCORegionType = 2 }DCDBTypes; It gives me this error message. error: expected specifier-qualifier-list before 'typedef' If I try to use it like this - (void)setItemType:(DCDBTypes) newType; I get this error message error: expected ')' before 'DCDBTypes' I have stared at this piece of code for so long, I know it is something stupid I have assumed or done, please glance over it and point me in the right direction if possible. Regards Damien We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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
Enum advice please (resend not sure if it was delivered ?)
Hi all, I have the following code: typedef enum _DCDBTypes { DCOItemType = 0, DCOCategoryType = 1, DCORegionType = 2 }DCDBTypes; It gives me this error message. error: expected specifier-qualifier-list before 'typedef' If I try to use it like this - (void)setItemType:(DCDBTypes) newType; I get this error message error: expected ')' before 'DCDBTypes' I have stared at this piece of code for so long, I know it is something stupid I have assumed or done, please glance over it and point me in the right direction if possible. Regards Damien We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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: Enum advice please (resend not sure if it was delivered ?)
Jeremy, Thanks, as it turns out if I put it above the @interface statement in the header file it works like a treat as you would I suspect as it should not be part of the class that I was building. Regards Damien On 06/01/2009, at 8:43 PM, Jeremy Pereira wrote: I pasted your code into a simple C program and it compiled no problem. Is it possible that the error is in the previous declaration to the typedef? Bear in mind it might be a problem in a header file. On 5 Jan 2009, at 10:49, Damien Cooke wrote: Hi all, I have the following code: typedef enum _DCDBTypes { DCOItemType = 0, DCOCategoryType = 1, DCORegionType = 2 }DCDBTypes; It gives me this error message. error: expected specifier-qualifier-list before 'typedef' If I try to use it like this - (void)setItemType:(DCDBTypes) newType; I get this error message error: expected ')' before 'DCDBTypes' I have stared at this piece of code for so long, I know it is something stupid I have assumed or done, please glance over it and point me in the right direction if possible. Regards Damien We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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/adc%40jeremyp.net This email sent to a...@jeremyp.net I Remenber When Synthesizers were Analogue Programs were somthing you watched on T.V and a hard drive was from Sydney to Adelaide! ___ 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 a window when pressing a button
Jushin, What I have done in the past with these sort of issues is either load the nib in the button pushed action or depending on how complicated your secondary window is, you could programatically create it like this. myWindow = [[NSWindow alloc] initWithContentRect:myRect styleMask:NSTitledWindowMask|NSResizableWindowMask backing:NSBackingStoreBuffered defer:YES]; Hope that gives you some ideas? Damien On 10/12/2008, at 7:54 AM, Jushin wrote: In my application, I have to open a form window when a user press a button. It is somewhat similar to Apple Mail. In Apple Mail, if you click New Message button from the toolbar, a New Message window is appeared. For now, what I did was something like this: In IB, I added a window (or a panel), and the associated button shows the window by using makeKeyAndOrderFront method when pressed. However, I realized it is not what I want. In this case, a window is already created, and the button only shows or hides the window. What I want is really creating a window when a user presses the button, so that the user can creates multiple windows by pressing the button. I wonder how can I do this. The window will contain form fields to get values for Core Data models. Thanks, ___ 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/damien.cooke%40internode.on.net This email sent to [EMAIL PROTECTED] I Remenber When Synthesizers were Analogue Programs were somthing you watched on T.V and a hard drive was from Sydney to Adelaide! ___ 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 [EMAIL PROTECTED]
Re: Creating a window when pressing a button
Jushin, Here is an example loading from nib within an action method - (IBAction)showMyNewWindow:(id)sender { NSLog(@Loading Nib); if(!myNewWindow) { [NSBundle loadNibNamed:@MyNewWindow owner:self]; } [myNewWindow makeKeyAndOrderFront:nil]; } On 10/12/2008, at 12:16 PM, Damien Cooke wrote: Jushin, What I have done in the past with these sort of issues is either load the nib in the button pushed action or depending on how complicated your secondary window is, you could programatically create it like this. myWindow = [[NSWindow alloc] initWithContentRect:myRect styleMask:NSTitledWindowMask|NSResizableWindowMask backing:NSBackingStoreBuffered defer:YES]; Hope that gives you some ideas? Damien On 10/12/2008, at 7:54 AM, Jushin wrote: In my application, I have to open a form window when a user press a button. It is somewhat similar to Apple Mail. In Apple Mail, if you click New Message button from the toolbar, a New Message window is appeared. For now, what I did was something like this: In IB, I added a window (or a panel), and the associated button shows the window by using makeKeyAndOrderFront method when pressed. However, I realized it is not what I want. In this case, a window is already created, and the button only shows or hides the window. What I want is really creating a window when a user presses the button, so that the user can creates multiple windows by pressing the button. I wonder how can I do this. The window will contain form fields to get values for Core Data models. Thanks, ___ 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/damien.cooke%40internode.on.net This email sent to [EMAIL PROTECTED] I Remenber When Synthesizers were Analogue Programs were somthing you watched on T.V and a hard drive was from Sydney to Adelaide! ___ 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/damien.cooke%40internode.on.net This email sent to [EMAIL PROTECTED] I Remenber When Synthesizers were Analogue Programs were somthing you watched on T.V and a hard drive was from Sydney to Adelaide! ___ 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 [EMAIL PROTECTED]
Re: Child Window issues
Hi All I resolved this by using: [window setLevel: NSWindowLevel]; I hope this helps someone else out there. Damien On 06/12/2008, at 9:05 AM, Damien Cooke wrote: Hi all, In my application I have a main window with a few controls and 4 child windows each contain an image. When I maximise one of the child windows to full screen (depending on which one) one or more of the other three stay in front. This is clearly a window order issue. Is there a way of creating them at the same level? I do not seem to be having any luck using orderFront or orderBack. Can someone point me in the right direction? I create the window like this: oneOfFourWindow = [[DCOMediaViewer alloc] initWithContentRect:oneOfOneImageRectClosed styleMask:NSTitledWindowMask|NSResizableWindowMask backing:NSBackingStoreBuffered defer:YES]; and set the child status like this [appWindow addChildWindow:oneOfFourWindow ordered:NSWindowAbove]; Regards Damien We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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/damien.cooke%40internode.on.net This email sent to [EMAIL PROTECTED] If you can't be kind, at least have the decency to be vague. ___ 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 [EMAIL PROTECTED]
Child Window issues
Hi all, In my application I have a main window with a few controls and 4 child windows each contain an image. When I maximise one of the child windows to full screen (depending on which one) one or more of the other three stay in front. This is clearly a window order issue. Is there a way of creating them at the same level? I do not seem to be having any luck using orderFront or orderBack. Can someone point me in the right direction? I create the window like this: oneOfFourWindow = [[DCOMediaViewer alloc] initWithContentRect:oneOfOneImageRectClosed styleMask:NSTitledWindowMask|NSResizableWindowMask backing:NSBackingStoreBuffered defer:YES]; and set the child status like this [appWindow addChildWindow:oneOfFourWindow ordered:NSWindowAbove]; Regards Damien We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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 [EMAIL PROTECTED]
Preventing a user from moving a window
Hi all, I have an arrangement of windows that I do not want the user to move. What is the best way of doing this. There are several ways I thought of but they are not very elegant. Can someone point me in the right direction? Regards Damien If you can't be kind, at least have the decency to be vague. ___ 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 [EMAIL PROTECTED]
Re: Returning exactly what has been promised
You could return like this return [myWorkingMutableString copy]; This makes a immutable copy returning an NSString. Regards Damien On 23/07/2008, at 2:24 PM, Steve Cronin wrote: Folks; I find if I have a method which returns an NSString for example, that often, in the interior of that method I will use an NSMutableString to construct the string I intend to return. My question concerns the actual final return statement. Is there ANY reason to choose A over B? A) return [NSString stringWithString:myWorkingMutableString]; B) return myWorkingMutableString; It just kinda sticks in my craw me that I 'promised' an NSString and using (B) I don't return one. Yeah I do understand inheritance and that a mutable entity isKindOfClass of the base class I looking for reasons like edge cases, compiler optimization, error trapping, portability, etc.. Is there ANY benefit to the costs associated with the explicit declaration of (A)? Thanks for helping me better understand! Steve ___ 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/damien.cooke%40internode.on.net This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
NSSliderCell subclass?
Hi All, I want to be able to determine the value of the NSSlider whilst sliding it. I am guessing I will have to subclass NSSliderCell but if anyone has an example or some direction as to which methods I need to override I would really appreciate it. Regards Damien We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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 [EMAIL PROTECTED]
Re: NSSliderCell subclass?
Thanks Graham, You are a champion. That saves me a lot of work. I have no idea why I did not spot that in the docs. I am sorry to trouble you. Damien On 14/07/2008, at 8:39 PM, Graham Cox wrote: Just invoke [mySlider setContinuous:YES] and your action method will be called for every value change while sliding live. Did you mean something else? Graham On 14 Jul 2008, at 9:02 pm, Damien Cooke wrote: Hi All, I want to be able to determine the value of the NSSlider whilst sliding it. I am guessing I will have to subclass NSSliderCell but if anyone has an example or some direction as to which methods I need to override I would really appreciate 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 [EMAIL PROTECTED]
Mouse events in NSTextFieldCell
Hi all, I have an NSTableView that lists names of images. I want to pop up a thumbnail image as I roll the mouse over the cells. I thought I could do this by sub-classing the NSTextFieldCell. However I am stumped as to how to get it to acknowledge mouse events obviously I have not enabled it to accept mouse events and I have no idea how to. Having studied the docs I was wondering if someone could point me in the correct direction. Thanks and Regards Damien I Remenber When Synthesizers were Analogue Programs were somthing you watched on T.V and a hard drive was from Sydney to Adelaide! ___ 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 [EMAIL PROTECTED]
Detecting a double click outside the table
Hi all, I have a window that has a custom NSTableView and an image cell. I have used this [tableView setDoubleAction: @selector(doubleAction:)]; to set the double action. The issue is that I have a method in the tableview that the window controller can use to determine if a double click has occurred, I check this in the delegate (BOOL)tableView: (NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex but it only works on the third click because it gets called every time I click. There has to be a better way of detecting the double click in the tableview and telling my controller class this has happened. Can someone point me in the right direction? Regards Damien ___ 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 [EMAIL PROTECTED]
NSArchiver question?
I am getting the following error from this line NSData *data = [NSArchiver archivedDataWithRootObject:viewItem]; -[DCOViewItem encodeWithCoder:]: unrecognized selector sent to instance 0x17fa00 do I need to override this method below for my class DCOViewItem to use the NSArchiver class? (void)encodeWithCoder:(NSCoder *)encoder Regards Damien ___ 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 [EMAIL PROTECTED]
Re: SplashScreen issues
Jens, You make an excellent point. My app does take too long to load. Once I get closer to release I will see what I can do to reduce the load time. Perhaps move some stuff out of the MainMenu.xib. Thanks for your assistance. Regards Damien On 21/06/2008, at 9:11 AM, Jens Alfke wrote: On 20 Jun '08, at 4:13 PM, Damien Cooke wrote: When creating a splash screen what condition do you use to decide when to close your splash screen? Is there some obvious event that is triggered that I can use? Your app delegate's -applicationDidFinishLaunching: method is probably the best place. That's the final callback you're going to get from NSApplication during the launch process; it happens after any documents/URLs are opened. do I use [window orderOut:self] to close it? Or is there a better way? That's how you close a window. That said, I think splash screens are largely unnecessary. Often the presence of a splash screen is a sign that the app launches too slowly. Notice that Photoshop Elements 6 has a splash screen, which stays up for about 30 seconds while it launches, and helpfully shows the names of all the things it's loading. By comparison, Pixelmator comes up in about three seconds on my machine, without showing a splash screen. Guess which app I'm more likely to use? —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 [EMAIL PROTECTED]
SplashScreen issues
Hi all, When creating a splash screen what condition do you use to decide when to close your splash screen? Is there some obvious event that is triggered that I can use? do I use [window orderOut:self] to close it? Or is there a better way? Thanks and Regards Damien ___ 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 [EMAIL PROTECTED]
Linking dependancies
Hi, Here is a dumb question for you :) It is actually more of an XCode question so feel free to let me know if this is the wrong place. I have built a project it has 2 targets one an executable and one a dylib. They both compile fine. I need to link the executable against the dylib but I can not add my dylib to the list of frameworks and libraries. Is there some special trick here because they are part of the same project as I am able to add other libraries that way? Regards Damien We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about. -- Albert Einstein ___ 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 [EMAIL PROTECTED]
Hiding NSImageView
Hi all, I need to be able to display either one or two images on the screen and the choice is made by the user via a button. So I have built my interface with three ImageWells one large ImageWell and also two 1/2 the size I want to be able to turn them on and off with a button but I can find no way of making them transparent or finding any other way of hiding them is eluding me. Can this be done or should I create them programmatically on demand? Regards Damien ___ 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 [EMAIL PROTECTED]
NSTableView and NSImageView issues
I am a newbe to Cocoa so please be gentle, I have a NSTableView that displays a list of books when clicked I capture the index and determine which book has been selected, I have the cover images in a database. To the right of the NSTableView I have an NSImageView, how do I tell the NSImageView to display a new picture and give it enough info so it can look up the image it is supposed to be displaying ie a book id? Thanks so much Damien ___ 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 [EMAIL PROTECTED]
NSXML assistance please
I am porting a tool from Java to Cocoa. I am reasonably new to XML and I am having some difficulties. my Items in the XML look like this: Item Name=01.Image.JPG PhysicalFilePath=C:\Documents and Settings \M01.Image.JPG Title=Bridge Category=Structures SubCategory= Region=South Australia MediaType=Photo Keywords Keywordmulti-laned/Keyword Keywordnon-water-based/Keyword /Keywords /Item I can easily get the keywords out but have found no way of getting the attributes out of the Item tag. Can someone make some suggestions? Regards Damien ___ 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 [EMAIL PROTECTED]