Table view cell getting deselected in popover

2012-11-16 Thread Rick Mann
I have a UITableViewCell in a UINavController in a UISplitView. When in 
portrait, the selected cell gets deselected at some point after dismissing the 
popover containing the table view. Even though I implemented 
-didDeselectRowAtIndexPath: and -didUnhighlightRowAtIndexPath: (which get 
called during normal interaction with the table), they're not getting called 
during popover dismissal. Nor is the table being reloaded.

Something else is deselecting the selected row. I don't want it to do that.

I can select a row, see it turn blue, dismiss the popover, watch it slide off 
the screen (row still selected), bring the popover back, and see the row 
deselected.

Anyone see this, and know of a workaround? Thanks.

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Data fetch performance

2012-11-16 Thread Mike Abdullah

On 12 Nov 2012, at 14:15, Joerg Simon  wrote:

> This summs it up really nicely:
> 
> http://wbyoung.tumblr.com/post/27851725562/core-data-growing-pains
> 
> Links to radar bug reports are within the blog post.
> 
> The conclusion it is not usable does not hold under iOS6, since nested 
> contexts work quite wonderfully there, but it shows problems under iOS5.
> 
> Generally if you use performBlock and not performBlockAndWhait and do not use 
> a fetched results controller at all and some other tricks, you can get it 
> working quite well also under iOS5, but actually the code you produce is 
> uglier than doing it manually the "old way" using thread confinment and merge 
> by hand. At least in my experience.
> 
> But under iOS6 nested contexts rock!

So to summarise:

- Child contexts synchronously route through their parent to perform fetches. 
The author thinks this is a mistake; I consider it an expected consequence of 
the design

- "Making changes into a parent context can be slow" with no mention of a radar 
or details of any possible fix

- Child contexts in iOS5/OS X 10.7 are pretty buggy when it comes to 
propogating changes *down* from their parent. This is where iOS 6/OS X 10.8 
appears to have improved matters.


___

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: Table view cell getting deselected in popover

2012-11-16 Thread Fritz Anderson
On 16 Nov 2012, at 3:15 AM, Rick Mann  wrote:

> I have a UITableViewCell in a UINavController in a UISplitView. When in 
> portrait, the selected cell gets deselected at some point after dismissing 
> the popover containing the table view. Even though I implemented 
> -didDeselectRowAtIndexPath: and -didUnhighlightRowAtIndexPath: (which get 
> called during normal interaction with the table), they're not getting called 
> during popover dismissal. Nor is the table being reloaded.
> 
> Something else is deselecting the selected row. I don't want it to do that.
> 
> I can select a row, see it turn blue, dismiss the popover, watch it slide off 
> the screen (row still selected), bring the popover back, and see the row 
> deselected.
> 
> Anyone see this, and know of a workaround? Thanks.

I assume the master view (within the nav controller) is a 
UITableViewController? Have you tried setting the controller's . 
clearsSelectionOnViewWillAppear to NO?

— F

-- 
Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- 



___

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: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread davelist

On Nov 15, 2012, at 8:22 PM, Rick Mann wrote:

> 
> On Nov 15, 2012, at 17:04 , Kyle Sluder  wrote:
> 
>> Override -didChangeValueForKey:?
> 
> Apparently we are strongly discouraged from overriding those methods. :-)
> 
> -- 
> Rick

Is this documented? What would be wrong with overriding it, calling [super 
didChangeValueForKey:] and then doing whatever else you need to do?

I'm not saying that's the right thing to do - just trying to understand why 
that wouldn't be a good idea?

Dave

___

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: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Kyle Sluder
On Nov 16, 2012, at 9:29 AM, davel...@mac.com wrote:

> 
> On Nov 15, 2012, at 8:22 PM, Rick Mann wrote:
> 
>> 
>> On Nov 15, 2012, at 17:04 , Kyle Sluder  wrote:
>> 
>>> Override -didChangeValueForKey:?
>> 
>> Apparently we are strongly discouraged from overriding those methods. :-)
>> 
>> -- 
>> Rick
> 
> Is this documented? What would be wrong with overriding it, calling [super 
> didChangeValueForKey:] and then doing whatever else you need to do?

>From the NSManagedObject docs:

> As with any class, you are strongly discouraged from overriding the key-value 
> observing methods such as willChangeValueForKey: and 
> didChangeValueForKey:withSetMutation:usingObjects:. 


Two theories as to why:

- People might forget to call super.
- KVO checks to see if -didChangeValueForKey: is overridden, and if not it 
calls the IMP directly, bypassing ObjC message dispatch.

--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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Dave Reed

On Nov 16, 2012, at 12:37 PM, Kyle Sluder wrote:

> On Nov 16, 2012, at 9:29 AM, davel...@mac.com wrote:
> 
>> 
>> On Nov 15, 2012, at 8:22 PM, Rick Mann wrote:
>> 
>>> 
>>> On Nov 15, 2012, at 17:04 , Kyle Sluder  wrote:
>>> 
 Override -didChangeValueForKey:?
>>> 
>>> Apparently we are strongly discouraged from overriding those methods. :-)
>>> 
>>> -- 
>>> Rick
>> 
>> Is this documented? What would be wrong with overriding it, calling [super 
>> didChangeValueForKey:] and then doing whatever else you need to do?
> 
> From the NSManagedObject docs:
> 
>> As with any class, you are strongly discouraged from overriding the 
>> key-value observing methods such as willChangeValueForKey: and 
>> didChangeValueForKey:withSetMutation:usingObjects:. 
> 
> Two theories as to why:
> 
> - People might forget to call super.
> - KVO checks to see if -didChangeValueForKey: is overridden, and if not it 
> calls the IMP directly, bypassing ObjC message dispatch.
> 
> --Kyle Sluder

Ok, thanks for the info. Forgetting to call super doesn't seem like it would 
cause Apple to "strongly discourage" as there are lots of methods in various 
Cocoa frameworks where you do need to call super, but I wondered if there were 
some hidden performance optimizations or if it somehow might break something. 
I'm just trying to learn - not argue with you.

Thanks,
Dave

___

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


NSMapTable thread safety (with with ARC and weak objects)

2012-11-16 Thread James Montgomerie
How thread safe is NSMapTable?

I know that's a pretty nebulous question, so more concretely:

Let's assume I'm using ARC.  If I create an NSMapTable with "[NSMapTable 
strongToWeakObjectsMapTable]", is it safe to put objects into it that might be 
referenced from, and perhaps deallocated on, a background thread?  
Specifically, might I get a half-deallocated or retain-count-zero object back 
from -objectForKey: if a 'right' race condition happens?  

Does the answer to this change if I guarantee that the NSMapTable itself (but 
not the objects it contains) will be used only on the a single thread?

Jamie.


___

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: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Jerry Krinock
Either make the dependent property as Sean suggested, or write custom setters 
to post or enqueue a notification.  Either is appropriate in different 
situations.

But, indeed, don't second-guess Apple's "strong" recommendations.  I always 
think of those as, "There is some ugly stuff going on under the hood here that 
you'd rather not want to find out about."


___

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: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Rick Mann

On Nov 16, 2012, at 2:31 , Mike Abdullah  wrote:

> Why are you trying to avoid "a bunch of" these calls? Is it just to save 
> yourself typing?

Typing, and code maintenance. I generally have UI that displays all (or some 
subset of) the properties of one of my entities. I'd like that UI to update if 
anything updates one of the models. But if there are a dozen properties, then 
that's a dozen -addObserver and -removeObserver calls, in each place where 
there might be UI associated with it. If I later add a new property to the 
entity, I have to be sure to KVO, it, too. If I remove a bit of the UI, I have 
to remember to remove the call (not strictly, but I like keeping my code clean).

Being able to subscribe once for all changes to a single object makes these 
problems go away.

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Bugs with parentViewController?

2012-11-16 Thread Rick Mann
I'm finding that parentViewController is nil for all the 
UINavigationControllers embedded in my hierarchy (via storyboard). In my case, 
they're embedded in UISplitViewControllers.

I wrote bugs about this, but I wanted to check to see if others are seeing 
that, or if I've failed to do something properly.

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting notified of any change to a specific NSManagedObject?

2012-11-16 Thread Kyle Sluder
On Fri, Nov 16, 2012, at 02:00 PM, Rick Mann wrote:
> 
> On Nov 16, 2012, at 2:31 , Mike Abdullah 
> wrote:
> 
> > Why are you trying to avoid "a bunch of" these calls? Is it just to save 
> > yourself typing?
> 
> Typing, and code maintenance. I generally have UI that displays all (or
> some subset of) the properties of one of my entities. I'd like that UI to
> update if anything updates one of the models. But if there are a dozen
> properties, then that's a dozen -addObserver and -removeObserver calls,
> in each place where there might be UI associated with it. If I later add
> a new property to the entity, I have to be sure to KVO, it, too. If I
> remove a bit of the UI, I have to remember to remove the call (not
> strictly, but I like keeping my code clean).
> 
> Being able to subscribe once for all changes to a single object makes
> these problems go away.

FWIW, in an app I worked on that does not use Core Data but otherwise
has model objects with a dozen or so properties that are interesting to
a single observer, I wrote a few handy macros to walk over a static C
array of keypaths:

https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniBase/OBUtilities.h#L247

Then when I start observing a new model object, I can do something like
this:

static NSString interestingKeypaths[] = {@"keyPathOne", @"keyPathTwo"};
static void *ctx = &ctx;

- (void)_startObservingModelObject:(NSObject *obj) {
  OB_FOR_IN(keyPath, interestingKeyPaths)
[obj addObserver:self forKeyPath:keyPath options:0 context:ctx];
}

- (void)_stopObservingModelObject:(NSObject *obj) {
  OB_FOR_IN(keyPath, interestingKeyPaths)
[obj removeObserver:self context:ctx];
}

--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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSMapTable thread safety (with with ARC and weak objects)

2012-11-16 Thread Quincey Morris
On Nov 16, 2012, at 09:53 , James Montgomerie  wrote:

> How thread safe is NSMapTable?
> 
> I know that's a pretty nebulous question, so more concretely:
> 
> Let's assume I'm using ARC.  If I create an NSMapTable with "[NSMapTable 
> strongToWeakObjectsMapTable]", is it safe to put objects into it that might 
> be referenced from, and perhaps deallocated on, a background thread?  
> Specifically, might I get a half-deallocated or retain-count-zero object back 
> from -objectForKey: if a 'right' race condition happens?  
> 
> Does the answer to this change if I guarantee that the NSMapTable itself (but 
> not the objects it contains) will be used only on the a single thread?

It's a mutable collection, and it's listed in the thread safety guide as 
"unsafe".

Specifically, that means you shouldn't be modifying a map table (in the sense 
of adding, replacing or deleting objects) while a different thread might be 
accessing the map table, not even just reading it. This is not a memory 
management issue, but rather a data integrity issue.

As for the objects themselves, what do you mean by "half-deallocated" or 
"retain-count-zero"? If an object is strongly referenced in the map table 
(whether as a key or a value), its lifetime can't end before it's removed from 
the table. If an object is ARC-weakly referenced, the reference can go to zero 
at any time, but that happens in a thread-safe manner. Anyway, because this is 
ARC, if you get a non-nil value from the table, the referenced object is kept 
alive while you have the reference (until the end of the referencing scope, 
assuming you do nothing to prolong the lifetime beyond that point).


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


IB>Button>Attributes>Position almost works

2012-11-16 Thread N!K
This is probably trivial, but I haven't been able to find a reference in a 
couple of textbooks, Apple, Google or a place  in IB Preferences.

IB>Button>Attributes>Position allows you to position the button's text in 
various positions relative to the button. It shows



When I click any one of them, I see a slight movement in the IB window in the 
proper direction, maybe a pixel or two, but never enough to move the text 
outside of the button. (BTW, other attributes respond correctly and the rest of 
IB seems to be functioning.) I'm using Xcode 3.3, OSX 10.6, IB 3.2.4.

Is there a way to set the distance the text should be moved, in order to 
resemble the choices shown above?

Thanks in advance, 

Nick


___

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: Table view cell getting deselected in popover

2012-11-16 Thread Rick Mann

On Nov 16, 2012, at 7:06 , Fritz Anderson  wrote:

> On 16 Nov 2012, at 3:15 AM, Rick Mann  wrote:
> 
>> I have a UITableViewCell in a UINavController in a UISplitView. When in 
>> portrait, the selected cell gets deselected at some point after dismissing 
>> the popover containing the table view. Even though I implemented 
>> -didDeselectRowAtIndexPath: and -didUnhighlightRowAtIndexPath: (which get 
>> called during normal interaction with the table), they're not getting called 
>> during popover dismissal. Nor is the table being reloaded.
>> 
>> Something else is deselecting the selected row. I don't want it to do that.
>> 
>> I can select a row, see it turn blue, dismiss the popover, watch it slide 
>> off the screen (row still selected), bring the popover back, and see the row 
>> deselected.
>> 
>> Anyone see this, and know of a workaround? Thanks.
> 
> I assume the master view (within the nav controller) is a 
> UITableViewController? Have you tried setting the controller's . 
> clearsSelectionOnViewWillAppear to NO?

Ah. While unchecked in IB, it was still being set to true. Programmatically 
setting it to false fixed the issue. Yet another feature that one is not led to 
by the docs (a "See -[UITableViewController clearsSelectionOnViewWillAppear] 
next to the selection-related delegate methods would've helped).

Thanks a ton!

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Bugs with parentViewController?

2012-11-16 Thread Fritz Anderson
On 16 Nov 2012, at 4:14 PM, Rick Mann  wrote:

> I'm finding that parentViewController is nil for all the 
> UINavigationControllers embedded in my hierarchy (via storyboard). In my 
> case, they're embedded in UISplitViewControllers.
> 
> I wrote bugs about this, but I wanted to check to see if others are seeing 
> that, or if I've failed to do something properly.

Are you sure UISplitViewController is a parent controller, and not a presenting 
controller? As of iOS 5, a presented controller will return nil for the parent 
(if there is no parent), instead of the presenting controller, as it had 
before. It may be you're looking for .presentingViewController. Try it.

— F

-- 
Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- 



___

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: Bugs with parentViewController?

2012-11-16 Thread Rick Mann

On Nov 16, 2012, at 17:04 , Fritz Anderson  wrote:

> Are you sure UISplitViewController is a parent controller, and not a 
> presenting controller? As of iOS 5, a presented controller will return nil 
> for the parent (if there is no parent), instead of the presenting controller, 
> as it had before. It may be you're looking for .presentingViewController. Try 
> it.

Yeah, I tried that, too. It was also nil. I thought "presenting" was how modal 
VCs were displayed, and this certainly isn't a modal VC, it's one of the 
UISplitViewController's normal child VCs.

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Getting a .icns file from IconRef data

2012-11-16 Thread John Brownie
If I use TISGetInputSourceProperty to get the kTISPropertyIconImageURL 
property of a keyboard layout, it returns nil, so I get the 
kTISPropertyIconRef property, which gives me an IconRef. I can turn that 
into an NSImage with -initWithIconRef, but what I really want to do is 
to write out a file in the .icns format. I have not been able to find 
documentation on how to do that step. Lack of internet access has also 
complicated things, but a search just now didn't throw up anything that 
looked helpful.


Thanks for pointers to documentation or just how to do it!

John
--
John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg
Summer Institute of Linguistics  | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea | Papua New Guinea
___

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: Getting a .icns file from IconRef data

2012-11-16 Thread Kyle Sluder
On Nov 16, 2012, at 6:56 PM, John Brownie  wrote:

> If I use TISGetInputSourceProperty to get the kTISPropertyIconImageURL 
> property of a keyboard layout, it returns nil, so I get the 
> kTISPropertyIconRef property, which gives me an IconRef. I can turn that into 
> an NSImage with -initWithIconRef, but what I really want to do is to write 
> out a file in the .icns format. I have not been able to find documentation on 
> how to do that step. Lack of internet access has also complicated things, but 
> a search just now didn't throw up anything that looked helpful.

Look into CGImageDestination (aka ImageIO). If that doesn't help, you might be 
stuck using the old Carbon resource manager functions.

--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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting a .icns file from IconRef data

2012-11-16 Thread Ken Thomases
On Nov 16, 2012, at 9:20 PM, Kyle Sluder wrote:

> On Nov 16, 2012, at 6:56 PM, John Brownie  wrote:
> 
>> If I use TISGetInputSourceProperty to get the kTISPropertyIconImageURL 
>> property of a keyboard layout, it returns nil, so I get the 
>> kTISPropertyIconRef property, which gives me an IconRef. I can turn that 
>> into an NSImage with -initWithIconRef, but what I really want to do is to 
>> write out a file in the .icns format. I have not been able to find 
>> documentation on how to do that step. Lack of internet access has also 
>> complicated things, but a search just now didn't throw up anything that 
>> looked helpful.
> 
> Look into CGImageDestination (aka ImageIO). If that doesn't help, you might 
> be stuck using the old Carbon resource manager functions.

You don't need the Resource Manager.  There's the Icon Family API for this: 
SetIconFamilyData().

You should be aware that a bug was introduced to Snow Leopard with its last 
major update (10.6.8), such that the CGImageDestination API produces corrupt 
ICNS files.  So, if you are maintaining compatibility with that version of the 
OS, you probably want to use the Icon Family API instead, even though it's 
obsolete and deprecated.

Regards,
Ken


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


WWDC videos vs. slides?

2012-11-16 Thread Rick Mann
Hi. Does anyone know the difference between WWDC videos and slides? I can't 
quite figure it out, but when I was downloading on my iPad, I got audio with no 
video. Then I tried something else and got video. Now I'm on the Mac, and I 
think what's called "slides" is actually video. Not sure.

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: WWDC videos vs. slides?

2012-11-16 Thread Jonathan Hull
The video is an actual video (it plays at the top of the window, and can also 
be downloaded).  The slides are a Keynote presentation.

Thanks,
Jon

On Nov 16, 2012, at 8:28 PM, Rick Mann  wrote:

> Hi. Does anyone know the difference between WWDC videos and slides? I can't 
> quite figure it out, but when I was downloading on my iPad, I got audio with 
> no video. Then I tried something else and got video. Now I'm on the Mac, and 
> I think what's called "slides" is actually video. Not sure.
> 
> -- 
> Rick
> 
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/jhull%40gbis.com
> 
> This email sent to jh...@gbis.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: WWDC videos vs. slides?

2012-11-16 Thread Rick Mann

On Nov 16, 2012, at 20:43 , Jonathan Hull  wrote:

> The video is an actual video (it plays at the top of the window, and can also 
> be downloaded).  The slides are a Keynote presentation.

Somehow I got some kind of audio-only thing. It just shows a WWDC logo, and 
plays the audio. It's almost useless, since you can't see the code or diagrams 
they're talking about (on iPad).

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: WWDC videos vs. slides?

2012-11-16 Thread Jonathan Hull
Sounds like a glitch.  I think that has happened to me a couple of times.  
Reloading the page (or possibly restarting Safari) should fix it.  Worst case, 
you should be able to download it on your iPad and watch it in your video app.

Thanks,
Jon


On Nov 16, 2012, at 8:54 PM, Rick Mann  wrote:

> 
> On Nov 16, 2012, at 20:43 , Jonathan Hull  wrote:
> 
>> The video is an actual video (it plays at the top of the window, and can 
>> also be downloaded).  The slides are a Keynote presentation.
> 
> Somehow I got some kind of audio-only thing. It just shows a WWDC logo, and 
> plays the audio. It's almost useless, since you can't see the code or 
> diagrams they're talking about (on iPad).
> 
> -- 
> Rick
> 
> 
> 
> 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: WWDC videos vs. slides?

2012-11-16 Thread Rick Mann

On Nov 16, 2012, at 21:08 , Jonathan Hull  wrote:

> Sounds like a glitch.  I think that has happened to me a couple of times.  
> Reloading the page (or possibly restarting Safari) should fix it.  Worst 
> case, you should be able to download it on your iPad and watch it in your 
> video app.

Something went horribly wrong on the iPad. It's actually very hard to get at 
the WWDC videos (you have to log into the dev website, then drill down, then 
open in iTunes, and if you leave iTunes you have start all over; it's 
marginally better on the desktop). After a while they all started to fail, and 
no amount of retrying fixed it.

I'm now downloading them on the desktop, I'll sync later.

-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Getting a .icns file from IconRef data

2012-11-16 Thread John Brownie

Ken Thomases wrote:

On Nov 16, 2012, at 9:20 PM, Kyle Sluder wrote:


Look into CGImageDestination (aka ImageIO). If that doesn't help, you might be 
stuck using the old Carbon resource manager functions.

You don't need the Resource Manager.  There's the Icon Family API for this: 
SetIconFamilyData().

You should be aware that a bug was introduced to Snow Leopard with its last 
major update (10.6.8), such that the CGImageDestination API produces corrupt 
ICNS files.  So, if you are maintaining compatibility with that version of the 
OS, you probably want to use the Icon Family API instead, even though it's 
obsolete and deprecated.


Thanks, this is what I needed. I'm targetting 10.7, so 
CGImageDestination is what I want. IconRef -> NSImage 
->CGImageDestination seems to work, at least from a quick test.


John
--
John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg
Summer Institute of Linguistics  | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea | Papua New Guinea
___

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: Bugs with parentViewController?

2012-11-16 Thread Rick Mann
On a lark, I decided to take a look at the childViewControllers in my SVC 
subclass (that I created to work around another issue). They were populated. So 
I investigated further. Seems the parentViewController is not nil any more. WTF.

Updates as events warrant.

-- 
Rick

On Nov 16, 2012, at 17:04 , Fritz Anderson  wrote:

> On 16 Nov 2012, at 4:14 PM, Rick Mann  wrote:
> 
>> I'm finding that parentViewController is nil for all the 
>> UINavigationControllers embedded in my hierarchy (via storyboard). In my 
>> case, they're embedded in UISplitViewControllers.
>> 
>> I wrote bugs about this, but I wanted to check to see if others are seeing 
>> that, or if I've failed to do something properly.
> 
> Are you sure UISplitViewController is a parent controller, and not a 
> presenting controller? As of iOS 5, a presented controller will return nil 
> for the parent (if there is no parent), instead of the presenting controller, 
> as it had before. It may be you're looking for .presentingViewController. Try 
> it.
> 
>   — F
> 
> -- 
> Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- 
> 
> 


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bugs with parentViewController?

2012-11-16 Thread Rick Mann
More info:

In my SVC subclass -viewDidLoad, the parent/child relationships are set up 
correctly.

By the time -viewWillAppear in my nav controller's root VC is called (the first 
time the split view is displaying the popover), the SVC-UINavController 
parent/child relationship has been broken.

I put a UINavController subclass in there to break on 
-removeFromParentViewController, but it never gets called, even though that 
navcontroller's parentViewController property is nulled.

-- 
Rick

On Nov 16, 2012, at 17:04 , Fritz Anderson  wrote:

> On 16 Nov 2012, at 4:14 PM, Rick Mann  wrote:
> 
>> I'm finding that parentViewController is nil for all the 
>> UINavigationControllers embedded in my hierarchy (via storyboard). In my 
>> case, they're embedded in UISplitViewControllers.
>> 
>> I wrote bugs about this, but I wanted to check to see if others are seeing 
>> that, or if I've failed to do something properly.
> 
> Are you sure UISplitViewController is a parent controller, and not a 
> presenting controller? As of iOS 5, a presented controller will return nil 
> for the parent (if there is no parent), instead of the presenting controller, 
> as it had before. It may be you're looking for .presentingViewController. Try 
> it.
> 
>   — F
> 
> -- 
> Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- 
> 
> 


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bugs with parentViewController?

2012-11-16 Thread Kyle Sluder
On Nov 16, 2012, at 9:57 PM, Rick Mann  wrote:

> More info:
> 
> In my SVC subclass -viewDidLoad, the parent/child relationships are set up 
> correctly.
> 
> By the time -viewWillAppear in my nav controller's root VC is called (the 
> first time the split view is displaying the popover), the SVC-UINavController 
> parent/child relationship has been broken.

Highly unlikely, but are you sure you're not accidentally initializing two 
instances of your view controller, only one of which is correctly inserted into 
the view controller hierarchy?

--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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Bugs with parentViewController?

2012-11-16 Thread Rick Mann

On Nov 16, 2012, at 22:16 , Kyle Sluder  wrote:

> On Nov 16, 2012, at 9:57 PM, Rick Mann  wrote:
> 
>> More info:
>> 
>> In my SVC subclass -viewDidLoad, the parent/child relationships are set up 
>> correctly.
>> 
>> By the time -viewWillAppear in my nav controller's root VC is called (the 
>> first time the split view is displaying the popover), the 
>> SVC-UINavController parent/child relationship has been broken.
> 
> Highly unlikely, but are you sure you're not accidentally initializing two 
> instances of your view controller, only one of which is correctly inserted 
> into the view controller hierarchy?

Given that -viewDidLoad only gets called once, I'm pretty sure that there's 
only one. Also, there's only one in the storyboard.


-- 
Rick




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com