Re: IBOutlet getting messed up in the runtime
And yes, it was the obvious assign rather than retain. Thank you! Ben On Nov 5, 2009, at 5:46 PM, Jonathan del Strother wrote: How is your bad IBOutlet declared? Does it have a @property declaration that's using 'assign' rather than 'retain', perhaps? What happens if you turn on NSZombieEnabled? 2009/11/5 Benjámin Salánki : Disregarding that one sentence i believe my problem is not private api related. Basically i have a text field in a nib that during runtime disappears (i can't describe it better) but never gets dealloced. Plus checking against nil also gives a nice juicy segmentation fault. Plus adding 5 more of the same class of text field they all work as expected. Renaming the troublemaker does not help either Ben Sent from my iPhone On 2009.11.05., at 17:22, Kyle Sluder wrote: On Nov 5, 2009, at 2:42 AM, Benjámin Salánki wrote: What I am trying to accomplish is a Mail plugin for Mac OS X 10.6. All is working fine now, thanks to some method swizzling code and some sleepless nights. This is the kind of stuff you're not allowed to discuss here. --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/maillist%40steelskies.com This email sent to maill...@steelskies.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
NSURLCredential and UTF-8 username
Hi List, I am having problems with NSURLCredential and that the username and password are apparently sent in ISO Latin 1 encoding. At least the guys on the server development side are complaining this is the case. I did not find any information on how the credential is encoded or if it is possible to change it at all. The password I am having trouble with is the following: nővér. I tried making sure the NSURL sent to the NSMutableURLRequest was encoded and escaped properly in UTF-8 and also added charset=utf-8 to the content-type header of the request as I have run out of options where to look. I even tried to encode my NSString using UTF-8 into an NSData object and then creating a new UTF-8 encoded NSString from this data and set the username and password accordingly, but to no avail. The strangest thing is if I try to access the password returned when I receive an authentication challenge ([[challenge proposedCredential] password]) it returns a properly formatted string. Any ideas, pointers are greatly appreciated. Thanks, Ben___ 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
setting the searchResultsTableView of a UISearchDisplayController to grouped style
Hey everyone! I've been trying to use a UISearchDisplayController hooked up in IB with my UITableView and everything works fine except for the fact that I need the resulting table view to be of the UITableViewStyleGrouped style, which I can not currently achieve. Any ideas how to go on about it? Also, I think I might have found a "bug" in the docs. Check out the "Discussion" part. Thanks for any pointers! Ben searchResultsTableView The table view in which the search results are displayed. (read-only) @property(nonatomic, readonly) UITableView *searchResultsTableView Discussion This method creates a new table view if one does not already exist. Availability Available in iPhone OS 3.0 and later. Related Sample Code TableSearch Declared In UISearchDisplayController.h ___ 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
mouse entered/exited in nscollectionviewitem's view
Hi there, I hope someone can help me with this. I have an NSCollectionView set up in IB with a connected NSCollectionViewItem and its View prototype. What I want to do is draw a different colored background for a view in the collection when the user mouses over it. I tried to set it up using tracking areas in the view prototype, but since it's just that - a prototype - the setup code only gets called once and then none of the actually displayed views in the collection handle any of my intended mouse tracking. Could anyone please point me into the right direction where to go on from here? Any help is appreciated. Thanks, Ben Salanki ___ 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: mouse entered/exited in nscollectionviewitem's view
On Jul 24, 2009, at 3:23 PM, Keith Duncan wrote: the setup code only gets called once and then none of the actually displayed views in the collection handle any of my intended mouse tracking. That's probably because your subclass of NSCollectionViewItem isn't getting created for each item. You can override -copyWithZone: to confirm this and fix it if need be. It's also prudent to ask for the mouse moved events to be sent too. Thanks, after doing this I managed to get the results I was looking for! Could anyone please point me into the right direction where to go on from here? Any help is appreciated. Yes, you'll also run into a problem when the user uses the scroll wheel to move around the collection view. The fix for this one is slightly more in depth. Your view under the mouse will first be send -scrollWheel: and it will work it's way up the responder chain to the scroll view from there. I inserted my NSCollectionViewItem subclass into the responder chain between the item view and it's superview so that the controller was sent -scrollWheel: before the scroll view. And how would you go on about doing this? I just spent a couple hours trying to find a workaround myself, but failed. I have the mouse position tracking code up and running, but I guess it does not get called at the right time. Ben In that method I tracked the position of the mouse converting from window coordinates to collection view coordinates and determined which view the mouse was hovering over. Once you've done that it's a simple matter of posting a notification internal to the collection view item subclass to coordinate the hovering state between controllers so that only one is showing the hovering state at a given time. Keith ___ 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: mouse entered/exited in nscollectionviewitem's view
hm, a quick answer to my own question: inserting [self performSelector:@selector(updateTrackingAreas) withObject:nil afterDelay:0.01]; into scrollWheel: seems to fix my problem. Ben On Jul 24, 2009, at 3:23 PM, Keith Duncan wrote: the setup code only gets called once and then none of the actually displayed views in the collection handle any of my intended mouse tracking. That's probably because your subclass of NSCollectionViewItem isn't getting created for each item. You can override -copyWithZone: to confirm this and fix it if need be. It's also prudent to ask for the mouse moved events to be sent too. Could anyone please point me into the right direction where to go on from here? Any help is appreciated. Yes, you'll also run into a problem when the user uses the scroll wheel to move around the collection view. The fix for this one is slightly more in depth. Your view under the mouse will first be send -scrollWheel: and it will work it's way up the responder chain to the scroll view from there. I inserted my NSCollectionViewItem subclass into the responder chain between the item view and it's superview so that the controller was sent -scrollWheel: before the scroll view. In that method I tracked the position of the mouse converting from window coordinates to collection view coordinates and determined which view the mouse was hovering over. Once you've done that it's a simple matter of posting a notification internal to the collection view item subclass to coordinate the hovering state between controllers so that only one is showing the hovering state at a given time. Keith ___ 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
NSSplitView autosave troubles
Dear list, please help me, because this is driving me crazy. I have a simple window set up in IB which contains only an autosized NSSplitView as its content. I add an autosave name for the splitview in IB. Go to Xcode, build and run, everything's fine. Quit the app, relaunch, and my window is empty, the split view is gone. Actually it is not gone, but collapsed. At least that is what I believe I could decipher from the autosave entry in the prefs.plist. Now I did not find anything like this on Google and I can reproduce this in any project of mine on two different machines. I can't believe I am the only one with this, so there's only one explenation left: I am doing something wrong. Please advise. Thanks in advance, Ben Salanki ___ 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: NSSplitView autosave troubles
Yes I have tried that, to no avail. Sent from my iPhone On 2009.07.29., at 3:46, Graham Cox wrote: On 29/07/2009, at 10:50 AM, Benjámin Salánki wrote: please help me, because this is driving me crazy. I have a simple window set up in IB which contains only an autosized NSSplitView as its content. I add an autosave name for the splitview in IB. Go to Xcode, build and run, everything's fine. Quit the app, relaunch, and my window is empty, the split view is gone. Actually it is not gone, but collapsed. At least that is what I believe I could decipher from the autosave entry in the prefs.plist. Now I did not find anything like this on Google and I can reproduce this in any project of mine on two different machines. I can't believe I am the only one with this, so there's only one explenation left: I am doing something wrong. Have you tried putting views into the split panes? I don't know for sure, but I think the split view relies on the frames of the views it holds to establish some of its dimensions, so the problem might simply be that your splitter is empty. --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
[NSImageView animator] - will this animate setImage: ?
Hi all, I was playing around with core animation and was wondering if sending animator to a view, specifically an NSImageView, will it only manage animation of bounds and size and rotation changes or can it too be used for changing the contents of the NSImageView? I am trying to animate the change in the NSImageView, but hence with no luck. Hope I'm not mistaking core animation for what it is not :D Thanks in advance, Ben ___ 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
How to find out if a CAAnimation has ended
Hi there, I have an application which uses CAAnimation. It basically moves drops (moves down the y axis) CALayers (in pairs which move independently from each other) when a key is pressed. I need to be able to determine when the animation has stopped to be able to proceed according to the state of the CALayers (basically I need to remove some of them if a given state for them is reached. If I don't use CABasicAnimation but simply the setPosition: property the layer gets removed the instant the animation would begin because the code does not wait for the animation to end, lacking in visual feedback towards the user). I tried setting the delegate method - (void)animationDidStop: (CAAnimation *)anim finished:(BOOL)flag; but since I need to wait for two animations to stop, this didn't work at first, but then I tried adding a BOOL to my delegate and setting it to true on the first animation end and then proceeding with my code after the second time the delegate received the message which resulted in the appropriate behavior except that right after the animation is finished, it jumps back to the originating state for a split second. CABasicAnimation* bubble1DropAnimation = [CABasicAnimation animation]; bubble1DropAnimation.keyPath = @"position.y"; bubble1DropAnimation.fromValue = [NSNumber numberWithFloat:[[[self currentPair] bubble1] position].y]; bubble1DropAnimation.toValue = [NSNumber numberWithFloat:[self dropPositionForSFBubble:[[self currentPair] bubble1]].y]; bubble1DropAnimation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; bubble1DropAnimation.delegate = [[SFPairDropDelegate alloc] init]; bubble1DropAnimation.removedOnCompletion = NO; [[[self currentPair] bubble1] addAnimation:bubble1DropAnimation forKey:@"pairDrop"]; CABasicAnimation* bubble2DropAnimation = [CABasicAnimation animation]; bubble2DropAnimation.keyPath = @"position.y"; bubble2DropAnimation.fromValue = [NSNumber numberWithFloat:[[[self currentPair] bubble2] position].y]; bubble2DropAnimation.toValue = [NSNumber numberWithFloat:[self dropPositionForSFBubble:[[self currentPair] bubble2]].y]; bubble2DropAnimation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; bubble2DropAnimation.delegate = [[SFPairDropDelegate alloc] init]; bubble2DropAnimation.removedOnCompletion = NO; [[[self currentPair] bubble2] addAnimation:bubble2DropAnimation forKey:@"pairDrop"]; and in the delegate I do - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag; { if(flag) { if(!continues) { continues = YES; } else { [[[NSApp delegate] game] handleDrop]; } } } any ideas what I might be missing or how to proceed on a different path if this is a dead end? thanks in advance, Ben ___ 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
NSNetService won't resolve
Hi all, I have an NSNetService enabled app that acts as both the client and the server on the same machine. My problem is that once I register the service I create and I want to set up the connection the aNetService returned has an empty array for the addresses in - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing now if I call [aNetService setDelegate:self]; [aNetService resolveWithTimeout:5.0]; neither - (void)netServiceDidResolveAddress:(NSNetService *)sender nor - (void)netService:(NSNetService *)sender didNotResolve: (NSDictionary *)errorDict get called even though I set the delegate and everything. I have written some Bonjour based applications before all based on Apple's Picture sharing sample code and I have not faced this problem before. Is there something obvious I'm missing here? Thanks for any input on this matter. Ben ___ 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: NSNetService won't resolve
And obvious it was. Thanks! Ben On 2008.11.03., at 3:31, Marc Krochmal <[EMAIL PROTECTED]> wrote: Hi Benjámin, On Oct 31, 2008, at 10:37 AM, Benjámin Salánki wrote: Hi all, I have an NSNetService enabled app that acts as both the client and the server on the same machine. My problem is that once I register the service I create and I want to set up the connection the aNetService returned has an empty array for the addresses in - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing now if I call [aNetService setDelegate:self]; [aNetService resolveWithTimeout:5.0]; neither - (void)netServiceDidResolveAddress:(NSNetService *)sender nor - (void)netService:(NSNetService *)sender didNotResolve: (NSDictionary *)errorDict get called even though I set the delegate and everything. I have written some Bonjour based applications before all based on Apple's Picture sharing sample code and I have not faced this problem before. Is there something obvious I'm missing here? You need to retain aNetService before resolving. -Marc ___ 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]
embedding an NSCollectionView in another NSCollectionView -> Binding?
Hey everyone, I was trying to embed an NSCollectionView in another NSCollectionView and I am having trouble with the bindings. The main NSCollectionView's content is bound to an NSArrayController and I wanted to bind the embeded NSCollectionView's content to Main Collection View Item's representedObject.contents where contents is an NSMutableArray. Of course this does not work, as I had to find out. So my questions are: 1) can an NSArray which is part of an NSCollectionView's representedObject be bound and used as the content of another (embedded) NSCollectionView (if yes, how?) 2) if not, how would you suggest I do this? Thanks in advance, Ben PS: I used NSCollectionView everywhere even when I was referring to NSCOllectionViewItems... ___ 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]