Re: Cocoa-dev Digest, Vol 10, Issue 602

2013-09-24 Thread Sal Conigliaro
You can also use a Safari extension I wrote to search Apple's site directly: 

http://www.erinedesign.com/extensions/

> 
> You can use Google to search Apple's dev site...
> site:https://developer.apple.com   iTunes
> 
> 
> You can also use it to search the archive for this list...
> site:http://lists.apple.com/archives/cocoa-dev iTunes
> 
> 
> Jeff
> 
> 
> 
>> Found it now, thanks. It's ok I am an Apple Mac and iOS Developer. The Apple
> Developer site Search Engine sucks - I did a lot of different searches for 
> iTunes 11.1 and it found zilch!!
___

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

How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ben Staveley-Taylor
Does anyone know how to get the volume ID number to use in a reference URL?

I am working with file reference URLs as returned by - (NSURL 
*)fileReferenceURL. These have this textual form:

  file:///.file/id=./
  e.g. file:///.file/id=6571367.2773272/

I want to compose a reference URL for a file whose file_id I know. I know the 
textual path of the volume it is on (e.g "/Volumes/Bob"). I can't figure out 
how to get the volume ID to use from the volume name or path

So far I have tried

NSURL *vol = [NSURL urlWithString:@"/Volumes/Bob"]; 
id volId;

[vol getResourceValue:&volId
forKey: NSURLVolumeIdentifierKey
error:&err];

But can't see how to use the opaque volId object result;

Also I have tried FSGetCatalogInfo, even though it is deprecated, and using the 
FSVolumeRefNum or nodeID fields, but these don't give me the number I need 
either.

Thanks,

Ben Staveley-Taylor


___

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

How is one supposed to use a UIPageViewController in a storyboard?

2013-09-24 Thread Rick Mann
Storyboards let me drop in a UIPageViewController, but the Xcode 5 template 
creates it programmatically instead.

UIPageViewController seems very clunky. On the surface, it looks similar to 
UITableViewController, but in fact, it behaves very differently. There's no 
view associated with it, nor can you add a view to it (in the storyboard 
editor).

How is one supposed to use a UIPageViewController instantiated in IB?

-- 
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: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ken Thomases
On Sep 23, 2013, at 11:14 AM, Ben Staveley-Taylor wrote:

> Does anyone know how to get the volume ID number to use in a reference URL?
> 
> I am working with file reference URLs as returned by - (NSURL 
> *)fileReferenceURL. These have this textual form:
> 
>  file:///.file/id=./
>  e.g. file:///.file/id=6571367.2773272/
> 
> I want to compose a reference URL for a file whose file_id I know.

Why would you want to do that?

In any case, it's not supported.  From "NSURL and CFURL Release Notes: File 
Reference URLs" 
:

"The syntax of a file reference URL should be considered opaque, and may change 
from release to release."


> I know the textual path of the volume it is on (e.g "/Volumes/Bob"). I can't 
> figure out how to get the volume ID to use from the volume name or path

I hesitate to suggest this, but have you tried creating an NSURL for a file 
path on the volume and then asking it for its file-reference-URL form?


> So far I have tried
> 
>   NSURL *vol = [NSURL urlWithString:@"/Volumes/Bob"]; 
>   id volId;
> 
>   [vol getResourceValue:&volId
>   forKey: NSURLVolumeIdentifierKey
>   error:&err];
> 
> But can't see how to use the opaque volId object result;

It's opaque by design.  It's only useful for comparing to another volume's 
identifier with -isEqual:.  That's it.  It's for when you have two URL objects 
and you want to determine if they're on the same volume.

-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

Re: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ben Staveley-Taylor
Thanks, Ken.

The reason I want to do this is to discover the textual path of a file given 
its file ID (and a volume name). The only way I could come up with to do this 
was to create a file reference NSURL and then convert it to a file path URL 
with [NSURL filePathURL]. If there is a better way to do that then that would 
be great.

You're right, if I create a file reference URL for the volume then I can see 
the volume ID number I need in its absolute string so that is a workaround for 
now. But as you have now pointed out the URL format is supposed to be opaque, 
so that is clearly a fragile solution.

So I suppose my real question is how to find the path for a file by its id (its 
fileSystemFileNumber attribute). I am aware that a file might have multiple 
paths if there are hard links to it.

-- Ben.


On 24 Sep 2013, at 09:04, Ken Thomases  wrote:

> On Sep 23, 2013, at 11:14 AM, Ben Staveley-Taylor wrote:
> 
>> Does anyone know how to get the volume ID number to use in a reference URL?
>> 
>> I am working with file reference URLs as returned by - (NSURL 
>> *)fileReferenceURL. These have this textual form:
>> 
>> file:///.file/id=./
>> e.g. file:///.file/id=6571367.2773272/
>> 
>> I want to compose a reference URL for a file whose file_id I know.
> 
> Why would you want to do that?
> 
> In any case, it's not supported.  From "NSURL and CFURL Release Notes: File 
> Reference URLs" 
> :
> 
> "The syntax of a file reference URL should be considered opaque, and may 
> change from release to release."
> 
> 
>> I know the textual path of the volume it is on (e.g "/Volumes/Bob"). I can't 
>> figure out how to get the volume ID to use from the volume name or path
> 
> I hesitate to suggest this, but have you tried creating an NSURL for a file 
> path on the volume and then asking it for its file-reference-URL form?
> 
> ...

> -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

Re: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ken Thomases
On Sep 24, 2013, at 3:24 AM, Ben Staveley-Taylor wrote:

> The reason I want to do this is to discover the textual path of a file given 
> its file ID (and a volume name).

> So I suppose my real question is how to find the path for a file by its id 
> (its fileSystemFileNumber attribute).

How is it that you've come to have a file ID and volume name and nothing else?  
This sounds like a situation where you should have stored bookmark data but 
stored something less useful.

I believe one solution is the searchfs() routine.  Of course, that's a 
potentially slow or expensive operation.  In theory, I suppose, searching for a 
file by its ID should be no slower than converting a file reference URL to a 
file path URL.

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

iOS 7 -wantsFullScreenLayout confusion?

2013-09-24 Thread Dave
Hi All,

I have an app that overrides wantsFullScreenLayout in the Navigation Controller 
and in the Root View Controller (all other App VCs inherit from this VC). I 
added a check for iOS 7 (see code below) and to test it put a breakpoint in 
each of the two methods, however the Breakpoint never gets hit (nor do I see 
the log info), which has confused me, as I expected it to stop on the 
breakpoint more or less straight after App Launch.

Is this expected? Is wantsFullScreenLayout actually being called in iOS 7? If 
not can I just leave it in without the OS Version number check?

Here is the code: 


- (BOOL) wantsFullScreenLayout
{
NSLog(@"NavigationController - wantsFullScreenLayout 
");

if ([LTWAppUtilities getiOSMajorVersionNumber] < 7) //Breakpoint 
Here
return NO;

return [super wantsFullScreenLayout];
}



- (BOOL) wantsFullScreenLayout
{
NSLog(@"RootViewController - wantsFullScreenLayout 
");

if ([LTWAppUtilities getiOSMajorVersionNumber] < 7) //Breakpoint 
Here
return NO;

return [super wantsFullScreenLayout];
}

Thanks a lot
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: Developer Site Safari PlugIn

2013-09-24 Thread Dave

On 20 Sep 2013, at 06:52, Sal Conigliaro  wrote:

> You can also use a Safari extension I wrote to search Apple's site directly: 
> 
> http://www.erinedesign.com/extensions/

Thanks a lot - works a treat!

All the Best
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

Multiple Storyboard Files

2013-09-24 Thread Dave
Hi,

What is the best way to handle having more than one Storyboard in an 
application?

It looks like I will need two files now, one for iOS < 7 and one for iOS >= 7. 
The current file is stored in:

en.lproj// Folder
MainStoryboard_iPhone. storyboard
InfoPlist.strings

Do I duplicate the whole folder "en.lproj" or just the "MainStoryboard_iPhone. 
storyboard" file in the folder?

I can't seem to find an example project that has > 1 Storyboard File.

All the Best
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: iOS 7 -wantsFullScreenLayout confusion?

2013-09-24 Thread Roland King
Isn't called anymore. I think that's in the WWDC talk and possibly the iOS 7 
transition guide. 

> On 24 Sep, 2013, at 5:27 pm, Dave  wrote:
> 
> Hi All,
> 
> I have an app that overrides wantsFullScreenLayout in the Navigation 
> Controller and in the Root View Controller (all other App VCs inherit from 
> this VC). I added a check for iOS 7 (see code below) and to test it put a 
> breakpoint in each of the two methods, however the Breakpoint never gets hit 
> (nor do I see the log info), which has confused me, as I expected it to stop 
> on the breakpoint more or less straight after App Launch.
> 
> Is this expected? Is wantsFullScreenLayout actually being called in iOS 7? If 
> not can I just leave it in without the OS Version number check?
> 
> Here is the code: 
> 
> 
> - (BOOL) wantsFullScreenLayout
> {
> NSLog(@"NavigationController - wantsFullScreenLayout 
> ");
> 
> if ([LTWAppUtilities getiOSMajorVersionNumber] < 7)//Breakpoint Here
>return NO;
>
> return [super wantsFullScreenLayout];
> }
> 
> 
> 
> - (BOOL) wantsFullScreenLayout
> {
> NSLog(@"RootViewController - wantsFullScreenLayout 
> ");
> 
> if ([LTWAppUtilities getiOSMajorVersionNumber] < 7)//Breakpoint Here
>return NO;
>
> return [super wantsFullScreenLayout];
> }
> 
> Thanks a lot
> 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/rols%40rols.org
> 
> This email sent to r...@rols.org

___

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

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

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

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

Re: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ben Staveley-Taylor
You're right, I should really be storing bookmark data, but I am working on the 
Mac side of a cross-platfrom product and the full bookmark information is not 
available to me without a lot of invasive work.

searchfs() sounds like what I need. Thanks very much for the advice.

-- Ben.


On 24 Sep 2013, at 09:54, Ken Thomases  wrote:

> On Sep 24, 2013, at 3:24 AM, Ben Staveley-Taylor wrote:
> 
>> The reason I want to do this is to discover the textual path of a file given 
>> its file ID (and a volume name).
> 
>> So I suppose my real question is how to find the path for a file by its id 
>> (its fileSystemFileNumber attribute).
> 
> How is it that you've come to have a file ID and volume name and nothing 
> else?  This sounds like a situation where you should have stored bookmark 
> data but stored something less useful.
> 
> I believe one solution is the searchfs() routine.  Of course, that's a 
> potentially slow or expensive operation.  In theory, I suppose, searching for 
> a file by its ID should be no slower than converting a file reference URL to 
> a file path URL.
> 
> 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

Re: Multiple Storyboard Files

2013-09-24 Thread Alex Zavatone
Just the file within the folder.

But what do you want to do with this file?  Localize to another language, or 
make a larger size, or what?

On Sep 24, 2013, at 5:45 AM, Dave wrote:

> Hi,
> 
> What is the best way to handle having more than one Storyboard in an 
> application?
> 
> It looks like I will need two files now, one for iOS < 7 and one for iOS >= 
> 7. The current file is stored in:
> 
> en.lproj  // Folder
>   MainStoryboard_iPhone. storyboard
>   InfoPlist.strings
> 
> Do I duplicate the whole folder "en.lproj" or just the 
> "MainStoryboard_iPhone. storyboard" file in the folder?
> 
> I can't seem to find an example project that has > 1 Storyboard File.
> 
> All the Best
> 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/zav%40mac.com
> 
> This email sent to z...@mac.com


___

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

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

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

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

Re: Multiple Storyboard Files

2013-09-24 Thread Dave

On 24 Sep 2013, at 12:15, Alex Zavatone  wrote:

> Just the file within the folder.
> 
> But what do you want to do with this file?  Localize to another language, or 
> make a larger size, or what?

I'm having to change this file for iOS 7 and I'm not sure if this will break on 
iOS < 7, so I thought I'd save the Storyboard file now and if necessary load a 
different file depending on the iOS version. At the moment, the changes I've 
made seem to work on both, but with the state of XCode and iOS 7 at the moment, 
I'm just hedging my bets!

Thanks a lot
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

[ANN] .NET/MONO -> ObjC code generation with Dubrovnik

2013-09-24 Thread jonat...@mugginsoft.com
see https://github.com/ThesaurusSoftware/Dubrovnik

Dubrovnik is a framework and set of tools to assist with interfacing Obj-C to 
.NET/Mono.
The framework provides Obj-C access to the embedded Mono API and the code 
generator reflects on managed assemblies to produce Obj-C source.
This largely automates the binding process.

This project might be of interest to anyone who needs to interface an Obj-C app 
to a .NET/Mono backend.
We are currently using it to help interface to an existing EntityFramework 6 
powered .NET engine.

Jonathan











___

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: Multiple Storyboard Files

2013-09-24 Thread Alex Zavatone
So, what you can do is duplicate and rename the file and then pick that file as 
the one to use from the main window after you click on your project file in the 
Navigator pane for a quick test.

I like that approach though.  It seems we can't be too careful in this area.  
Sure seems safest to keep a version that you know works.  Good luck and please 
let us know if there are any issues you might run in to that we would need to 
know about.  

Cheers.



On Sep 24, 2013, at 7:52 AM, Dave wrote:

> 
> On 24 Sep 2013, at 12:15, Alex Zavatone  wrote:
> 
>> Just the file within the folder.
>> 
>> But what do you want to do with this file?  Localize to another language, or 
>> make a larger size, or what?
> 
> I'm having to change this file for iOS 7 and I'm not sure if this will break 
> on iOS < 7, so I thought I'd save the Storyboard file now and if necessary 
> load a different file depending on the iOS version. At the moment, the 
> changes I've made seem to work on both, but with the state of XCode and iOS 7 
> at the moment, I'm just hedging my bets!
> 
> Thanks a lot
> 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/zav%40mac.com
> 
> This email sent to z...@mac.com


___

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

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

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

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

Re: Alternate to scrollPoint?

2013-09-24 Thread Steve Mills
On Sep 23, 2013, at 17:02:46, Steve Mills  wrote:

> We have a situation where we want to call scrollPoint on our view that's in a 
> scroll view. It appears that scrollPoint does not immediately cause the 
> scroll to happen. Right after we call scrollPoint, we need to ask the view 
> for its new scroll location to see if it actually changed. At this point, it 
> has not scrolled yet, so it breaks this code that used to work in Carbon.
> 
> It appears that scrollPoint is causing an animation to be queued, even though 
> we tried to disable it like so:
> 
>   [CATransaction begin];
>   [CATransaction setValue:(id)kCFBooleanTrue 
> forKey:kCATransactionDisableActions];
>   [CATransaction setAnimationDuration:0];
>   [view scrollPoint:pos];
>   [CATransaction commit];
> 
> The animation is in our way. I found a workaround that seems to work, which 
> is to simply call this instead of all that:
> 
>   [[[view enclosingScrollView] contentView] setBoundsOrigin:pos]; 
> 
> Is this a viable workaround? Can anyone foresee any problems with it? Is 
> there a better way to make scrollPoint work *right now*?

No takers? Time is of the essence and I'd be grateful for any help here.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157




___

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: Alternate to scrollPoint?

2013-09-24 Thread Kyle Sluder
> On Sep 23, 2013, at 3:02 PM, Steve Mills  wrote:
> 
> We have a situation where we want to call scrollPoint on our view that's in a 
> scroll view. It appears that scrollPoint does not immediately cause the 
> scroll to happen. Right after we call scrollPoint, we need to ask the view 
> for its new scroll location to see if it actually changed. At this point, it 
> has not scrolled yet, so it breaks this code that used to work in Carbon.

Yeah, NSScrollView animations are annoying and unpredictable. Is suggest filing 
a radar asking for better control over and feedback about them.

> 
> It appears that scrollPoint is causing an animation to be queued, even though 
> we tried to disable it like so:
> 
>[CATransaction begin];
>[CATransaction setValue:(id)kCFBooleanTrue 
> forKey:kCATransactionDisableActions];
>[CATransaction setAnimationDuration:0];
>[view scrollPoint:pos];
>[CATransaction commit];

Did you try wrapping your call to -scrollPoint: in an NSAnimationContext with 
allowsImplicitAnimation=NO? 

> 
> The animation is in our way. I found a workaround that seems to work, which 
> is to simply call this instead of all that:
> 
>[[[view enclosingScrollView] contentView] setBoundsOrigin:pos]; 
> 
> Is this a viable workaround? Can anyone foresee any problems with it? Is 
> there a better way to make scrollPoint work *right now*?

Since scrolling is defined to be performed by translating the bounds.origin of 
the clip view, this should be fine. But I wonder if it will interfere with your 
previously mentioned pseudo-scrolling (which would be another reason to abandon 
that approach and adopt one that doesn't fight the framework).
 
--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: Alternate to scrollPoint?

2013-09-24 Thread Steve Mills
On Sep 24, 2013, at 08:25:06, Kyle Sluder  wrote:

> Did you try wrapping your call to -scrollPoint: in an NSAnimationContext with 
> allowsImplicitAnimation=NO? 

Sadly, that's 10.8 only, and I need to support 10.7. Plus, we're not layer 
backed right now due to performance problems with drawing layer tiles.

> Since scrolling is defined to be performed by translating the bounds.origin 
> of the clip view, this should be fine. But I wonder if it will interfere with 
> your previously mentioned pseudo-scrolling (which would be another reason to 
> abandon that approach and adopt one that doesn't fight the framework).


Possibly, but it's all being checked out. Seems like some parts of the scroller 
are broken without my scroller subclass and now other parts are broken with it. 
Arg. Thanks again for helping out, Kyle.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157




___

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

Casting objects in NSCountedSet

2013-09-24 Thread Koen van der Drift
In my app I am using a 3rd party framework, and I have subclassed (objB) one of 
the classes (objA) for additional functionality. 

At one point I am getting an NSCountedSet from the framework with objects objA. 
 When I enumerate these, I'd like to cast them as objB, to access the 
additional functionality (doSomethingNew).  But whatever I try, the objects are 
always casted as objA.

 NSCountedSet *cs = [framework countSymbols];

for (objB *obj in cs)
{
NSDictionary *ec = [objB doSomethingNew];  <<== throws error, 
because objA doesn't know about doSomethingNew

//  etc
}


or:

 NSCountedSet *cs = [framework countSymbols];

for (id *obj in cs)
{
NSDictionary *ec = [((ObjB*) obj) doSomethingNew];  <<== throws 
error, because objA doesn't know about doSomethingNew

//  etc
}


Is it possible what I am trying to do?

- Koen.
___

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: Casting objects in NSCountedSet

2013-09-24 Thread Kyle Sluder
On Sep 24, 2013, at 8:38 AM, Koen van der Drift  
wrote:

> In my app I am using a 3rd party framework, and I have subclassed (objB) one 
> of the classes (objA) for additional functionality. 
> 
> At one point I am getting an NSCountedSet from the framework with objects 
> objA.  When I enumerate these, I'd like to cast them as objB, to access the 
> additional functionality (doSomethingNew).  But whatever I try, the objects 
> are always casted as objA.
> 
> NSCountedSet *cs = [framework countSymbols];
> 
>for (objB *obj in cs)
>{
>NSDictionary *ec = [objB doSomethingNew];  <<== throws error, 
> because objA doesn't know about doSomethingNew
> 
>//etc
>}
> 
> 
> or:
> 
> NSCountedSet *cs = [framework countSymbols];
> 
>for (id *obj in cs)
>{
>NSDictionary *ec = [((ObjB*) obj) doSomethingNew];  <<== throws 
> error, because objA doesn't know about doSomethingNew
> 
>//etc
>}
> 
> 
> Is it possible what I am trying to do?

No, this doesn't make sense. Casting just tells the compiler "I know better 
than you and can guarantee you this expression is actually of this type". It 
doesn't "convert" objects from one type to another—how would it even do that?

--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: Cocoa-dev Digest, Vol 10, Issue 612

2013-09-24 Thread Rick Aurbach
Dave,

In my app, I use 10 storyboards; I find it much easier to group things together 
into a storyboard of reasonable size containing logically-grouped elements, 
rather than trying to put everything into one mammoth storyboard.

Anyway, there are a few things I try to keep in mind when doing this (although 
I'm sure other readers could add to the list):

(1) Create all of the storyboards within you localized directory structure. You 
want to be able to localize all of them, not just MainStoryboard.
(2) IB-defined segues only work between objects in the same storyboard. If you 
want to segue from an object (a view controller or a button or whatever) in one 
storyboard to a object on another, you must do so programmatically. (On the 
other hand, this isn't all that hard to do.)
(3) If you're really going to build OS-dependent COMPLETE sets of storyboards, 
you need to think carefully about application launch. (Since I can't think of 
any easy way to get OS-dependence into the appropriate info.plist entry…) What 
you might do is to create an initial view controller that was OS-independent 
and then manually embed your OS-dependent controllers into it…

HTH.

On Sep 24, 2013, at 6:59 AM, cocoa-dev-requ...@lists.apple.com wrote:

> Message: 7
> Date: Tue, 24 Sep 2013 10:45:27 +0100
> From: Dave 
> To: "cocoa-dev@lists.apple.com Users" 
> Subject: Multiple Storyboard Files
> Message-ID: 
> Content-Type: text/plain; charset=us-ascii
> 
> Hi,
> 
> What is the best way to handle having more than one Storyboard in an 
> application?
> 
> It looks like I will need two files now, one for iOS < 7 and one for iOS >= 
> 7. The current file is stored in:
> 
> en.lproj// Folder
>MainStoryboard_iPhone. storyboard
>InfoPlist.strings
> 
> Do I duplicate the whole folder "en.lproj" or just the 
> "MainStoryboard_iPhone. storyboard" file in the folder?
> 
> I can't seem to find an example project that has > 1 Storyboard File.
> 
> All the Best
> Dave

Cheers,

Rick Aurbach
Aurbach & Associates, Inc.


___

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

configuring Xcode to place products in different locations based on selected Architecture

2013-09-24 Thread Abdul Sowayan
Hi folks,

I have an existing project that I’d like to transition from 32-bit to 64-bit. 
The current project places the results of builds such as a static library in a 
folder that I shall call “Output”

In Xcode, I see a drop down menu that allows me to select which architecture to 
builds for “My Mac 32-bit” and “My Mac 64-bit”.

I am not interested in building a universal binary.

Here is what I’m trying to do but couldn’t figure out.

1- When “My Mac 32-bit” is selected and I build, I want my library libFoo.a to 
be placed in the folder “Output/32/“
2- When “My Mac 64-bit” is selected and I build, I want my library libFoo.a to 
be placed in the folder “Output/64/“


Is this possible?

Thanks
Abdul



___

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: Casting objects in NSCountedSet

2013-09-24 Thread Koen van der Drift

On Sep 24, 2013, at 11:52 AM, Kyle Sluder  wrote:

> No, this doesn't make sense. Casting just tells the compiler "I know better 
> than you and can guarantee you this expression is actually of this type". It 
> doesn't "convert" objects from one type to another—how would it even do that?

That's interesting, I've used casting before, eg:

myClass *obj = (myClass*)[myArray objectAtIndex: index];

and never ran into this.


So besides hacking the framework, is there a way to accomplish this?

- Koen.
___

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: Casting objects in NSCountedSet

2013-09-24 Thread Paul Scott
No, you should be able to cast, as the method is found dynamically at run-time. 
Simple test program shows this.

I created a new project and edited the AppDelegate.h as here:

#import 

@interface SYNAppDelegate : NSObject 

@property (assign) IBOutlet NSWindow *window;

@end

@interface ObjectA : NSObject {

}

- (NSInteger)doSomethingNew;

@end

@interface ObjectB : ObjectA

- (NSInteger)doSomethingOld;

@end

And edited the AppDelegate.m as here:

#import "SYNAppDelegate.h"

@implementation SYNAppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
id obj = [[ObjectB alloc] init];
NSInteger i = [((ObjectB*) obj) doSomethingNew];

}

@end

@implementation ObjectA

- (NSInteger) doSomethingNew {
return 1;
}

@end

@implementation ObjectB

@end

Setting a breakpoint on the shows that variable i is set to 1 as expected, with 
no runtime failure.

Paul


On Sep 24, 2013, at 8:52 AM, Kyle Sluder  wrote:

> On Sep 24, 2013, at 8:38 AM, Koen van der Drift  
> wrote:
> 
>> In my app I am using a 3rd party framework, and I have subclassed (objB) one 
>> of the classes (objA) for additional functionality. 
>> 
>> At one point I am getting an NSCountedSet from the framework with objects 
>> objA.  When I enumerate these, I'd like to cast them as objB, to access the 
>> additional functionality (doSomethingNew).  But whatever I try, the objects 
>> are always casted as objA.
>> 
>> NSCountedSet *cs = [framework countSymbols];
>> 
>>   for (objB *obj in cs)
>>   {
>>   NSDictionary *ec = [objB doSomethingNew];  <<== throws error, 
>> because objA doesn't know about doSomethingNew
>> 
>>   //etc
>>   }
>> 
>> 
>> or:
>> 
>> NSCountedSet *cs = [framework countSymbols];
>> 
>>   for (id *obj in cs)
>>   {
>>   NSDictionary *ec = [((ObjB*) obj) doSomethingNew];  <<== throws 
>> error, because objA doesn't know about doSomethingNew
>> 
>>   //etc
>>   }
>> 
>> 
>> Is it possible what I am trying to do?
> 
> No, this doesn't make sense. Casting just tells the compiler "I know better 
> than you and can guarantee you this expression is actually of this type". It 
> doesn't "convert" objects from one type to another—how would it even do that?
> 
> --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/pscott%40skycoast.us
> 
> This email sent to psc...@skycoast.us

--
Paul Scott
psc...@skycoast.us



smime.p7s
Description: S/MIME cryptographic signature
___

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

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

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

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

Re: Casting objects in NSCountedSet

2013-09-24 Thread Kyle Sluder
On Sep 24, 2013, at 9:26 AM, Koen van der Drift  
wrote:

> 
> On Sep 24, 2013, at 11:52 AM, Kyle Sluder  wrote:
> 
>> No, this doesn't make sense. Casting just tells the compiler "I know better 
>> than you and can guarantee you this expression is actually of this type". It 
>> doesn't "convert" objects from one type to another—how would it even do that?
> 
> That's interesting, I've used casting before, eg:
> 
> myClass *obj = (myClass*)[myArray objectAtIndex: index];
> 
> and never ran into this.

That will work fine if the objects in the array are actually instances of 
myClass. In your case, the objects in the set are instances of the superclass, 
and no amount of casting will convert them to instances of the subclass.

> 
> 
> So besides hacking the framework, is there a way to accomplish this?

If your additional methods don't override any methods of the superclass, you 
could convert the subclass to a category. You can even add per-instance storage 
using associated objects.

--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: Casting objects in NSCountedSet

2013-09-24 Thread Kyle Sluder
On Sep 24, 2013, at 9:29 AM, Paul Scott  wrote:

> No, you should be able to cast, as the method is found dynamically at 
> run-time. Simple test program shows this.

Your app does not demonstrate Koen's situation, in which he receives a set of 
ObjectA instances from the framework.

--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: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Charles Srstka
On Sep 24, 2013, at 3:54 AM, Ken Thomases  wrote:

> I believe one solution is the searchfs() routine.  Of course, that's a 
> potentially slow or expensive operation.  In theory, I suppose, searching for 
> a file by its ID should be no slower than converting a file reference URL to 
> a file path URL.

Ironically, searchfs() was the example I was going to pipe in and suggest he 
might have been using, as an example of how he might be stuck with a file ID 
that he's trying to convert to a URL. The trouble with searchfs() is that if 
you try to ask it to return ATTR_CMN_FULLPATH, it immediately bails out with 
EINVAL. The source code for XNU reveals what attributes it will let you request:

/*
 * Fail requests for attributes that HFS does not support for the
 * items that match the search criteria.  Note that these checks
 * are for the OUTBOUND attributes to be returned (not search criteria).
 */
if ((ap->a_returnattrs->commonattr & ~HFS_ATTR_CMN_VALID) ||
(ap->a_returnattrs->volattr != 0) ||
(ap->a_returnattrs->dirattr & ~HFS_ATTR_DIR_VALID) ||
(ap->a_returnattrs->fileattr & ~HFS_ATTR_FILE_VALID) ||
(ap->a_returnattrs->forkattr != 0)) {
return (EINVAL);
}
And in the header:

#define HFS_ATTR_CMN_VALID  \
(ATTR_CMN_NAME | ATTR_CMN_DEVID |   \
 ATTR_CMN_FSID | ATTR_CMN_OBJTYPE | \
 ATTR_CMN_OBJTAG | ATTR_CMN_OBJID | \
 ATTR_CMN_OBJPERMANENTID | ATTR_CMN_PAROBJID |  \
 ATTR_CMN_SCRIPT | ATTR_CMN_CRTIME |\
 ATTR_CMN_MODTIME | ATTR_CMN_CHGTIME |  \
 ATTR_CMN_ACCTIME | ATTR_CMN_BKUPTIME | \
 ATTR_CMN_FNDRINFO |ATTR_CMN_OWNERID |  \
 ATTR_CMN_GRPID | ATTR_CMN_ACCESSMASK | \
 ATTR_CMN_FLAGS | ATTR_CMN_USERACCESS | \
 ATTR_CMN_FILEID | ATTR_CMN_PARENTID )
#define HFS_ATTR_DIR_VALID  \
(ATTR_DIR_LINKCOUNT | ATTR_DIR_ENTRYCOUNT | ATTR_DIR_MOUNTSTATUS)
#define HFS_ATTR_FILE_VALID   \
(ATTR_FILE_LINKCOUNT |ATTR_FILE_TOTALSIZE |   \
 ATTR_FILE_ALLOCSIZE | ATTR_FILE_IOBLOCKSIZE |\
 ATTR_FILE_CLUMPSIZE | ATTR_FILE_DEVTYPE |\
 ATTR_FILE_DATALENGTH | ATTR_FILE_DATAALLOCSIZE | \
 ATTR_FILE_RSRCLENGTH | ATTR_FILE_RSRCALLOCSIZE)

Indeed, the only allowed attribute that uniquely identifies the file, so far as 
I can tell, is the file ID, leaving you with exactly the conundrum that Ben is 
in now. The only way that I've found to get from the results of searchfs() to a 
decent path or URL usable by any other API on the system is to either:

1. Use the private fsgetpath SPI, which is what FSCatalogSearch seems to do, or:

2. Build a reference NSURL from scratch.

Both of these are pretty bad, but of the two, building the NSURL seems the less 
evil. If there's an actually good way to get from the results of searchfs() to 
something actually usable, I'd be very interested to hear what it is myself. 
It's pretty clear, however, that searchfs() is *not* going to be the answer to 
Ben's question. It's also pretty clear that searchfs() is a near-useless API 
since the only way to get usable results from it is essentially to hack 
something, but that's a problem for another thread.

Charles

___

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: Casting objects in NSCountedSet

2013-09-24 Thread Paul Scott
On Sep 24, 2013, at 9:29 AM, Paul Scott  wrote:

>> No, you should be able to cast, as the method is found dynamically at 
>> run-time. Simple test program shows this.
> 
> Your app does not demonstrate Koen's situation, in which he receives a set of 
> ObjectA instances from the framework.

You are correct; I thought he was getting a set of ObjectB instances. I missed 
that important detail.

--
Paul Scott
psc...@skycoast.us



smime.p7s
Description: S/MIME cryptographic signature
___

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

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

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

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

Re: Casting objects in NSCountedSet

2013-09-24 Thread Koen van der Drift

On Sep 24, 2013, at 12:37 PM, Kyle Sluder  wrote:

> If your additional methods don't override any methods of the superclass, you 
> could convert the subclass to a category. You can even add per-instance 
> storage using associated objects.

Good call for the category, that should be easy to implement.  

Thanks for the explanation.

- Koen.



___

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: View hierarchy, documentation, and origin location.

2013-09-24 Thread Peter Teeson
Let me try again to clarify my lack of understanding.
(0) I created a new Document project.
 All I did in IB Inspector pane was to make the window size 500, 500
and Center Horizontally and Vertically

(1) I added a sub-class of NSButtonCell with a class name of  Class (it will be 
used as the prototype cell)
 (I understand about the convention of 3 char Class prefix but for this 
project I don't need it)
 All I did was add
[self setEnabled:YES];
[self setState:NSOffState];
 to it's init method

(2) I added a sub-class of NSMatrix with a class name of Matrix.
 I overrode - (void)drawRect:(NSRect)dirtyRect
   and for now just added to it the statement [super drawRect:dirtyRect];

(3) In Document.h I added @property Matrix *theMatrix
 In Document.m I added this code in method
- (void)windowControllerDidLoadNib:(NSWindowController *)aController {
[super windowControllerDidLoadNib:aController];
// Get the initial content view size so as to
// (a)compute where to place the matrix and
// (b)what size to make the matrix cells

// Local vars for this method
NSWindow *theWindow = [aController window];
NSView  *theContentView = theWindow.contentView;
NSRect frame =[theContentView frame];
NSRect bounds = [theContentView bounds];

NSRect  theContentFrame = theContentView.frame;
NSRect  theMatrixFrame = NSInsetRect(theContentFrame, 40.0, 40.);
Cell* protoCell = [Cell new];

// Instance vars   
_theMatrix = [[Matrix alloc]initWithFrame:theMatrixFrame 
mode:NSListModeMatrix prototype:protoCell 
numberOfRows:3 numberOfColumns:3];

[theContentView addSubview:_theMatrix];   
}

(4) Running the code produces a window centred horizontally and vertically on 
the screen, as desired,
but with the matrix drawn at the top left of the content view but with the 
origin inset by 40.0, 40.0 from the top left.

Based on my reading of the docs I anticipated that it would be drawn at the 
bottom left with the origin inset by 40.0, 40.0 from the bottom left.
Here are quotes from the View Programming Guide 2013-08-08
"By default, the graphics environment origin (0.0,0.0) is located in the lower 
left,…." page 11  
"The frame rectangle defines the view's location and size in the superview 
using the superview’s coordinate system.
The bounds rectangle defines the interior coordinate system that is used when 
drawing the contents of the view, including the origin and scaling." page 12
"The content view acts as the root of the visible view hierarchy in a window." 
Page 17 

(5) The values of the frame and bounds rects are as follows:
 Document windowControllerDidLoadNib
Frame 0 ,0, 500, 500; Bounds 0, 0, 500, 500

  Matrix drawRect:(NSRect)dirtyRect
Frame 40, 40, 420, 420; Bounds 0, 0, 40, 40

(6) So I must be missing something in my understanding of the documentation.
My thinking is that since the window's contentView is a View and it's graphics 
environment origin is 0.0, 0.0 located in the lower left
the matrix should have been drawn with a lower left origin.

Why am I wrong?

(In pre-OS X days QuickDraw origin was top left based if I recall correctly).


___

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: View hierarchy, documentation, and origin location.

2013-09-24 Thread Gary L. Wade
The object you created has an inset of 40, and since NSMatrix organizes its 
cells from the top left, that is what you are seeing, regardless of whether or 
not NSMatrix returns YES for -isFlipped. If this is a matter of personal 
discovery, override -isFlipped in your class and have it return NO to see if it 
changes anything for your own satisfaction. If you must override NSMatrix for 
some extra drawing, use the value of -isFlipped to know whether top left or 
bottom left is the origin.
--
Gary L. Wade (Sent from my iPhone)
http://www.garywade.com/

On Sep 24, 2013, at 9:47 AM, Peter Teeson  wrote:

> Let me try again to clarify my lack of understanding.
> (0) I created a new Document project.
> All I did in IB Inspector pane was to make the window size 500, 500
>and Center Horizontally and Vertically
> 
> (1) I added a sub-class of NSButtonCell with a class name of  Class (it will 
> be used as the prototype cell)
> (I understand about the convention of 3 char Class prefix but for this 
> project I don't need it)
> All I did was add
>[self setEnabled:YES];
>[self setState:NSOffState];
> to it's init method
> 
> (2) I added a sub-class of NSMatrix with a class name of Matrix.
> I overrode - (void)drawRect:(NSRect)dirtyRect
>   and for now just added to it the statement [super drawRect:dirtyRect];
> 
> (3) In Document.h I added @property Matrix *theMatrix
> In Document.m I added this code in method
> - (void)windowControllerDidLoadNib:(NSWindowController *)aController {
>[super windowControllerDidLoadNib:aController];
>// Get the initial content view size so as to
>// (a)compute where to place the matrix and
>// (b)what size to make the matrix cells
> 
>// Local vars for this method
>NSWindow *theWindow = [aController window];
>NSView  *theContentView = theWindow.contentView;
>NSRect frame =[theContentView frame];
>NSRect bounds = [theContentView bounds];
> 
>NSRect  theContentFrame = theContentView.frame;
>NSRect  theMatrixFrame = NSInsetRect(theContentFrame, 40.0, 40.);
>Cell* protoCell = [Cell new];
> 
>// Instance vars   
>_theMatrix = [[Matrix alloc]initWithFrame:theMatrixFrame 
>mode:NSListModeMatrix prototype:protoCell 
>numberOfRows:3 numberOfColumns:3];
> 
>[theContentView addSubview:_theMatrix];   
> }
> 
> (4) Running the code produces a window centred horizontally and vertically on 
> the screen, as desired,
> but with the matrix drawn at the top left of the content view but with the 
> origin inset by 40.0, 40.0 from the top left.
> 
> Based on my reading of the docs I anticipated that it would be drawn at the 
> bottom left with the origin inset by 40.0, 40.0 from the bottom left.
> Here are quotes from the View Programming Guide 2013-08-08
> "By default, the graphics environment origin (0.0,0.0) is located in the 
> lower left,…." page 11  
> "The frame rectangle defines the view's location and size in the superview 
> using the superview’s coordinate system.
> The bounds rectangle defines the interior coordinate system that is used when 
> drawing the contents of the view, including the origin and scaling." page 12
> "The content view acts as the root of the visible view hierarchy in a 
> window." Page 17 
> 
> (5) The values of the frame and bounds rects are as follows:
> Document windowControllerDidLoadNib
> Frame 0 ,0, 500, 500; Bounds 0, 0, 500, 500
> 
>  Matrix drawRect:(NSRect)dirtyRect
> Frame 40, 40, 420, 420; Bounds 0, 0, 40, 40
> 
> (6) So I must be missing something in my understanding of the documentation.
> My thinking is that since the window's contentView is a View and it's 
> graphics environment origin is 0.0, 0.0 located in the lower left
> the matrix should have been drawn with a lower left origin.
> 
> Why am I wrong?
> 
> (In pre-OS X days QuickDraw origin was top left based if I recall correctly).
> 
> 
> ___
> 
> 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/garywade%40desisoftsystems.com
> 
> This email sent to garyw...@desisoftsystems.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

iOS7 UITextField Placeholder Trickery?????

2013-09-24 Thread Dave
Hi,

Has anyone else noticed that Placeholder text in UITextFields's is very dim in 
iOS7? It looks ok in iOS 6, but in 7 it can hardly be seen?

I found this hack:

[self.pNameTextField setValue:[UIColor blackColor] 
forKeyPath:@"_placeholderLabel.textColor"];

Which seems to work, but it is still washed out looking, but it should do?

is there a better way of doing this then the above code? Or better still am I 
missing something that makes Placeholder or UITextField's different in iOS 7?

Thanks a lot

All the Best
Dave

On 24 Sep 2013, at 13:20, Alex Zavatone  wrote:

> So, what you can do is duplicate and rename the file and then pick that file 
> as the one to use from the main window after you click on your project file 
> in the Navigator pane for a quick test.
> 
> I like that approach though.  It seems we can't be too careful in this area.  
> Sure seems safest to keep a version that you know works.  Good luck and 
> please let us know if there are any issues you might run in to that we would 
> need to know about.  
> 
> Cheers.
> 
> 
> 
> On Sep 24, 2013, at 7:52 AM, Dave wrote:
> 
>> 
>> On 24 Sep 2013, at 12:15, Alex Zavatone  wrote:
>> 
>>> Just the file within the folder.
>>> 
>>> But what do you want to do with this file?  Localize to another language, 
>>> or make a larger size, or what?
>> 
>> I'm having to change this file for iOS 7 and I'm not sure if this will break 
>> on iOS < 7, so I thought I'd save the Storyboard file now and if necessary 
>> load a different file depending on the iOS version. At the moment, the 
>> changes I've made seem to work on both, but with the state of XCode and iOS 
>> 7 at the moment, I'm just hedging my bets!
>> 
>> Thanks a lot
>> 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/zav%40mac.com
>> 
>> This email sent to z...@mac.com
> 


___

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

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

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

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

Re: View hierarchy, documentation, and origin location.

2013-09-24 Thread Dave
On 24 Sep 2013, at 18:26, Gary L. Wade  wrote:

> The object you created has an inset of 40, and since NSMatrix organizes its 
> cells from the top left, that is what you are seeing, regardless of whether 
> or not NSMatrix returns YES for -isFlipped. If this is a matter of personal 
> discovery, override -isFlipped in your class and have it return NO to see if 
> it changes anything for your own satisfaction. If you must override NSMatrix 
> for some extra drawing, use the value of -isFlipped to know whether top left 
> or bottom left is the origin.
> --
> Gary L. Wade (Sent from my iPhone)
> http://www.garywade.com/
> 

Great answer!



___

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: ***UNCHECKED*** How is one supposed to use a UIPageViewController in a storyboard?

2013-09-24 Thread Fritz Anderson
On 24 Sep 2013, at 3:03 AM, Rick Mann  wrote:

> UIPageViewController seems very clunky. On the surface, it looks similar to 
> UITableViewController, but in fact, it behaves very differently. There's no 
> view associated with it, nor can you add a view to it (in the storyboard 
> editor).

That is correct. The data source for the page-view controller must feed view 
controllers to the page controller on demand. The page-view controller does not 
know, and does not care, what kind of view controller it gets from any one 
request. You may have different view controllers that go into pages. The design 
has to allow for this.

Create XIBs or Storyboard scenes with your page-layout views. That's the best 
you can do.

— F


___

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

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

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

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

Re: ***UNCHECKED*** How is one supposed to use a UIPageViewController in a storyboard?

2013-09-24 Thread Rick Mann
What is "***UNCHECKED***"?

On Sep 24, 2013, at 10:38 , Fritz Anderson  wrote:

> On 24 Sep 2013, at 3:03 AM, Rick Mann  wrote:
> 
>> UIPageViewController seems very clunky. On the surface, it looks similar to 
>> UITableViewController, but in fact, it behaves very differently. There's no 
>> view associated with it, nor can you add a view to it (in the storyboard 
>> editor).
> 
> That is correct. The data source for the page-view controller must feed view 
> controllers to the page controller on demand. The page-view controller does 
> not know, and does not care, what kind of view controller it gets from any 
> one request. You may have different view controllers that go into pages. The 
> design has to allow for this.

> Create XIBs or Storyboard scenes with your page-layout views. That's the best 
> you can do.

I think you're missing what I meant. Of course it's different, in the sense 
that it provides view controllers instead of views. But it's incredibly 
cumbersome to use as a first-class citizen in a storyboard. In my case, it's a 
child of a tab view controller. But there's no way in IB to specify anything 
about the fixed view hierarchy if you instantiate it in IB (that I can see).

Perhaps you might think to create a UIViewController that you subclass. Okay, 
now let's put a container view into it, and then embed a UIPageViewController 
in that.

Well, container views are fairly useless in IB, because there's no outlet for 
the embedded view in the containing view controller. You'd have to iterate the 
children to find a UIPageViewController, but what if you have more than one? 
Cumbersome. And there's no way to wire the dataSource and delegate back to the 
containing view controller.

I'm having trouble seeing the utility of putting a UIPageViewController in a 
storyboard for anything but a quick demo app, and then only if you can subclass 
it (which the docs say you can do in 7 but imply you can't do in 6). Now we're 
even more like a UITableViewController, except you can't have a view hierarchy 
in the UIPageViewController.

Cumbersome.



-- 
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: View hierarchy, documentation, and origin location.

2013-09-24 Thread Peter Teeson
On 2013-09-24, at 1:26 PM, Gary L. Wade wrote:
> The object you created has an inset of 40, and since NSMatrix organizes its 
> cells from the top left,
> that is what you are seeing, regardless of whether or not NSMatrix returns 
> YES for -isFlipped.
> If this is a matter of personal discovery, override -isFlipped in your class 
> and have it return NO
> to see if it changes anything for your own satisfaction. If you must override 
> NSMatrix for some extra
> drawing, use the value of -isFlipped to know whether top left or bottom left 
> is the origin.
> --
> Gary L. Wade (Sent from my iPhone)
> http://www.garywade.com/

Thank you sir! Finally someone with a clear answer that I can understand.
I did exactly what you suggested and lo and behold the matrix is drawn at the 
bottom left of the contentView.
Must not have properly understood the docs wrt isFlipped. Will go back and read 
again.

Thank you for helping to educate me.

Peter.

P.S. I do understand the cell indexing order beginning at top left in the 
NSMatrix frame/bounds.
That has been the conventional way since forever. {0,0}..{0,n}, {1,0}.. 
{1,n},…{m,0}… {m,n}
where m is #rows -1 and n is #cols -1 (i.e. zero origin indexing)
___

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

iOS7 Controls

2013-09-24 Thread Gordon Apple
I really don¹t like to do posts like this, but I think it is warranted.  My
motivation is to find out how others are coping with this.  Admittedly, I¹m
late to the party, only upgrading after the release.  There were only a few
features I thought I might add in my iPad apps for iOS7, so I just let it
slide.  Now, I¹m looking at issues I thought would never be a problem.

iOS7 has a lot of great stuff, especially at its core.  However, its UI is
downright fugly, especially standard controls.  There is always some
consternation about change, but that is not what this is about.  Usability
is a strong component.  Sliders look terrible, Segmented controls look like
something a 5-yr-old might draw.  The original B&W Mac did better.  Pickers
are downright unusable. No borders and you can¹t even see a division between
columns. Scrollable views don¹t give any indication that they are
scrollable.   If popovers don¹t have enough color contrast, you¹d never know
they were there (no borders).  Also, a lot of apps are having issues with
handling the status bar.  Some of this might work on an iPhone, but just
doesn¹t look good on an iPad.  IMHO, if this is Joe Ivy¹s doing, he should
get the same treatment as the guy at MS that was responsible for Windows 8.
This all seems to be going the wrong direction.

I¹ve started at least embedding pickers and tables in bordered views. Not
ideal, but better than nothing. I¹m thinking about abandoning segmented
controls for a bordered view containing buttons.  Other than doing a whole
slew of custom controls, how are others dealing with these issues?
___

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: iOS7 Controls

2013-09-24 Thread Alex Kac
Some of us like it. I admit it took a few weeks to get used to it, but once I 
did I really like it. So how did I deal with it? I embraced it.

On Sep 24, 2013, at 2:22 PM, Gordon Apple  wrote:

> I really don¹t like to do posts like this, but I think it is warranted.  My
> motivation is to find out how others are coping with this.  Admittedly, I¹m
> late to the party, only upgrading after the release.  There were only a few
> features I thought I might add in my iPad apps for iOS7, so I just let it
> slide.  Now, I¹m looking at issues I thought would never be a problem.
> 
> iOS7 has a lot of great stuff, especially at its core.  However, its UI is
> downright fugly, especially standard controls.  There is always some
> consternation about change, but that is not what this is about.  Usability
> is a strong component.  Sliders look terrible, Segmented controls look like
> something a 5-yr-old might draw.  The original B&W Mac did better.  Pickers
> are downright unusable. No borders and you can¹t even see a division between
> columns. Scrollable views don¹t give any indication that they are
> scrollable.   If popovers don¹t have enough color contrast, you¹d never know
> they were there (no borders).  Also, a lot of apps are having issues with
> handling the status bar.  Some of this might work on an iPhone, but just
> doesn¹t look good on an iPad.  IMHO, if this is Joe Ivy¹s doing, he should
> get the same treatment as the guy at MS that was responsible for Windows 8.
> This all seems to be going the wrong direction.
> 
> I¹ve started at least embedding pickers and tables in bordered views. Not
> ideal, but better than nothing. I¹m thinking about abandoning segmented
> controls for a bordered view containing buttons.  Other than doing a whole
> slew of custom controls, how are others dealing with these issues?
> ___
> 
> 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/alex%40webis.net
> 
> This email sent to a...@webis.net

Alex Kac - President and Founder
Web Information Solutions, Inc.

"Forgiveness is not an occasional act: it is a permanent attitude." 
-- Dr. Martin Luther King





___

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: iOS7 Controls

2013-09-24 Thread Markus Spoettl

On 9/24/13 10:22 PM, Gordon Apple wrote:

I¹ve started at least embedding pickers and tables in bordered views. Not
ideal, but better than nothing. I¹m thinking about abandoning segmented
controls for a bordered view containing buttons.  Other than doing a whole
slew of custom controls, how are others dealing with these issues?


I find embedding a picker (date or other) as a dynamically expanding row in a 
table is a much much better way of presentation than showing it as a secondary 
overlay or alert style or pushed-in/out dialog-thing. You can see how that works 
in the Calendar app when adding an event (start/end date). I realize that works 
only if you have a table you present your data in.


Generally I would recommend to give yourself time to let it sink in a little. 
Some things are pretty nice and overall I find it's great for smaller teams 
because there is less need for elaborate graphics, backgrounds, gazillions of 
supporting images and so forth.


Regards
Markus
--
__
Markus Spoettl
___

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

Mail.app's split view

2013-09-24 Thread Rick Mann
Is iPad Mail's split view a standard thing that other apps can easily implement?

I've noticed that swiping to the right to go back up the navigation controller 
hierarchy only works if you begin the swipe off the screen. However, in our 
iPad app that uses popover controllers, you can't do this (it dismisses the 
popover controller instead).

What I'm wondering is if I should change my popover (which was the appropriate 
standard UI since the iPad came out) to slide in from the left. Problem is, we 
also have a popover on the right, and I don't see any way for that one to 
support swipe-to-the-right-to-go-up.

iOS 7's UI is so broken and inconsistent.

-- 
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: Mail.app's split view

2013-09-24 Thread Kyle Sluder
On Tue, Sep 24, 2013, at 02:21 PM, Rick Mann wrote:
> Is iPad Mail's split view a standard thing that other apps can easily
> implement?

Yes. It's a UISplitViewController.

> I've noticed that swiping to the right to go back up the navigation
> controller hierarchy only works if you begin the swipe off the screen.

This is called the "interactive pop gesture" (also known as the
"universal back gesture"), and it is implemented by default by
UINavigationController. The gesture recognizer is exposed by the
interactivePopGestureRecognizer property.

> However, in our iPad app that uses popover controllers, you can't do this
> (it dismisses the popover controller instead).

My educated guess is that some other gesture recognizer is canceling the
interactive pop gesture. Probably whatever UIPopoverController uses to
automatically dismiss popovers when the user taps outside of them.

> What I'm wondering is if I should change my popover (which was the
> appropriate standard UI since the iPad came out) to slide in from the
> left. Problem is, we also have a popover on the right, and I don't see
> any way for that one to support swipe-to-the-right-to-go-up.

UISplitViewController has been the standard control for implementing
Mail-like UIs since iOS first shipped for the iPad. Since iOS 6,
UISplitViewController's secondary view controller has been displayed
with a sliding animation, not a popover (see the iOS 6 release notes).

> iOS 7's UI is so broken and inconsistent.

This doesn't sound like an iOS problem at all. It sounds like you were
using the wrong UI elements since at least iOS 6, and arguably since the
you first implemented the feature.

Either that or the user interface you're implementing isn't like Mail's
user interface.

--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: iOS7 Controls

2013-09-24 Thread Alex Zavatone
I'm with you, Gordon.  I just bought a new iPad before 7 came out so I do not 
have to use iOS 7, unless it is in the simulator.

It looks too feminine and juvenile for me to feel comfortable using.  I'll just 
leave my opinion at that.

I've already seen people who feel burned that they thought they could restore 
their iDevice from a backup back to iOS 6 but can't.

In any case, I'm restoring the things that were removed, like button 
backgrounds on alert text, borders around buttons (nav bar back button), non 
nauseating color scheme.  A one pixel border below the status bar, etc.

I have pretty strong negative opinions on iOS 7, but from a usability 
perspective, it sure creates a lot of work for those of us who care about 
usability, readability, and not burning our eyes out with glaring colors on an 
almost 100% white background.



On Sep 24, 2013, at 4:22 PM, Gordon Apple wrote:

> I really don¹t like to do posts like this, but I think it is warranted.  My
> motivation is to find out how others are coping with this.  Admittedly, I¹m
> late to the party, only upgrading after the release.  There were only a few
> features I thought I might add in my iPad apps for iOS7, so I just let it
> slide.  Now, I¹m looking at issues I thought would never be a problem.
> 
> iOS7 has a lot of great stuff, especially at its core.  However, its UI is
> downright fugly, especially standard controls.  There is always some
> consternation about change, but that is not what this is about.  Usability
> is a strong component.  Sliders look terrible, Segmented controls look like
> something a 5-yr-old might draw.  The original B&W Mac did better.  Pickers
> are downright unusable. No borders and you can¹t even see a division between
> columns. Scrollable views don¹t give any indication that they are
> scrollable.   If popovers don¹t have enough color contrast, you¹d never know
> they were there (no borders).  Also, a lot of apps are having issues with
> handling the status bar.  Some of this might work on an iPhone, but just
> doesn¹t look good on an iPad.  IMHO, if this is Joe Ivy¹s doing, he should
> get the same treatment as the guy at MS that was responsible for Windows 8.
> This all seems to be going the wrong direction.
> 
> I¹ve started at least embedding pickers and tables in bordered views. Not
> ideal, but better than nothing. I¹m thinking about abandoning segmented
> controls for a bordered view containing buttons.  Other than doing a whole
> slew of custom controls, how are others dealing with these issues?
> ___
> 
> 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/zav%40mac.com
> 
> This email sent to z...@mac.com


___

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

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

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

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

Re: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Charles Srstka
On Sep 24, 2013, at 4:47 PM, Ken Thomases  wrote:

> I was not aware of those limitations.  Thanks for enlightening me.  It looks, 
> though, like you could reconstruct a path by working your way back from the 
> item through its ancestors, getting each name along the way, using 
> ATTR_CMN_NAME and ATTR_CMN_PARENTID.  Not graceful, but should work.

Is there a way to get those attributes of the parent without doing searchfs() 
all over again? Because if you had to do an entire drive search for every 
ancestor, that would quite likely take a *long* time to complete.

Charles

___

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: Mail.app's split view

2013-09-24 Thread Rick Mann

On Sep 24, 2013, at 14:46 , Kyle Sluder  wrote:

> On Tue, Sep 24, 2013, at 02:21 PM, Rick Mann wrote:
>> Is iPad Mail's split view a standard thing that other apps can easily
>> implement?
> 
> Yes. It's a UISplitViewController.
> 
>> I've noticed that swiping to the right to go back up the navigation
>> controller hierarchy only works if you begin the swipe off the screen.
> 
> This is called the "interactive pop gesture" (also known as the
> "universal back gesture"), and it is implemented by default by
> UINavigationController. The gesture recognizer is exposed by the
> interactivePopGestureRecognizer property.
> 
>> However, in our iPad app that uses popover controllers, you can't do this
>> (it dismisses the popover controller instead).
> 
> My educated guess is that some other gesture recognizer is canceling the
> interactive pop gesture. Probably whatever UIPopoverController uses to
> automatically dismiss popovers when the user taps outside of them.
> 
>> What I'm wondering is if I should change my popover (which was the
>> appropriate standard UI since the iPad came out) to slide in from the
>> left. Problem is, we also have a popover on the right, and I don't see
>> any way for that one to support swipe-to-the-right-to-go-up.
> 
> UISplitViewController has been the standard control for implementing
> Mail-like UIs since iOS first shipped for the iPad. Since iOS 6,
> UISplitViewController's secondary view controller has been displayed
> with a sliding animation, not a popover (see the iOS 6 release notes).
> 
>> iOS 7's UI is so broken and inconsistent.
> 
> This doesn't sound like an iOS problem at all. It sounds like you were
> using the wrong UI elements since at least iOS 6, and arguably since the
> you first implemented the feature.
> 
> Either that or the user interface you're implementing isn't like Mail's
> user interface.

Sorry, I conflated my use of popovers with the split view controller. It used 
to be that the master view in a split view controller appeared in a popover. We 
use a popover for a different reason, although it's similar in a lot of ways. 
The primary reason we don't use a split view controller is that we want the 
detail to fill the screen, and changing items in the master is a relatively 
rare operation (and hence, the master list doesn't need to be visible all the 
time; it needs to be out of the way).

The inconsistency I'm referring to in this case is that a right swipe must be 
started outside the item, but a left swipe cannot be started outside the item. 
Moreover, right-swipe is NOT universal, because it doesn't work (by default) in 
lots of situations. Maybe it only doesn't work in popovers, but I'm not doing 
anything special in my popovers (other than preventing a bunch of them from 
stacking), so the default behavior is inconsistent (and broken).

-- 
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: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ken Thomases
On Sep 24, 2013, at 4:55 PM, Charles Srstka wrote:

> On Sep 24, 2013, at 4:47 PM, Ken Thomases  wrote:
> 
>> I was not aware of those limitations.  Thanks for enlightening me.  It 
>> looks, though, like you could reconstruct a path by working your way back 
>> from the item through its ancestors, getting each name along the way, using 
>> ATTR_CMN_NAME and ATTR_CMN_PARENTID.  Not graceful, but should work.
> 
> Is there a way to get those attributes of the parent without doing searchfs() 
> all over again?

No, I don't expect so.

> Because if you had to do an entire drive search for every ancestor, that 
> would quite likely take a *long* time to complete.

I don't think that searchfs() _necessarily_ does a true full-drive search.  
Given a unique file ID (ATTR_CMN_FILEID) in the search criteria, the file 
system implementation could very well return in constant time.  As I said 
earlier, logically it could be as fast as resolving a file reference URL to a 
file path URL, since that's what that amounts to.

That said, I haven't investigated either by reading the source or by running 
tests.

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

Re: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Charles Srstka
On Sep 24, 2013, at 5:05 PM, Ken Thomases  wrote:

>> Because if you had to do an entire drive search for every ancestor, that 
>> would quite likely take a *long* time to complete.
> 
> I don't think that searchfs() _necessarily_ does a true full-drive search.  
> Given a unique file ID (ATTR_CMN_FILEID) in the search criteria, the file 
> system implementation could very well return in constant time.  As I said 
> earlier, logically it could be as fast as resolving a file reference URL to a 
> file path URL, since that's what that amounts to.
> 
> That said, I haven't investigated either by reading the source or by running 
> tests.

In the extremely informal, non-scientific test I just ran, searching by 
ATTR_CMN_OBJID took approximately 10 seconds, and searching by ATTR_CMN_FILEID 
took about 15.6 seconds. I think it goes without saying that spending 10-15 
seconds per ancestor in the file system hierarchy, per search result, is not a 
viable solution.

Charles

___

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: How to discover the volume id to use in a File Reference URL

2013-09-24 Thread Ken Thomases
On Sep 24, 2013, at 11:41 AM, Charles Srstka wrote:

> On Sep 24, 2013, at 3:54 AM, Ken Thomases  wrote:
> 
>> I believe one solution is the searchfs() routine.  Of course, that's a 
>> potentially slow or expensive operation.  In theory, I suppose, searching 
>> for a file by its ID should be no slower than converting a file reference 
>> URL to a file path URL.
> 
> Ironically, searchfs() was the example I was going to pipe in and suggest he 
> might have been using, as an example of how he might be stuck with a file ID 
> that he's trying to convert to a URL. The trouble with searchfs() is that if 
> you try to ask it to return ATTR_CMN_FULLPATH, it immediately bails out with 
> EINVAL. The source code for XNU reveals what attributes it will let you 
> request:
> 
> /*
>* Fail requests for attributes that HFS does not support for the
>* items that match the search criteria.  Note that these checks
>* are for the OUTBOUND attributes to be returned (not search criteria).
>*/
>   if ((ap->a_returnattrs->commonattr & ~HFS_ATTR_CMN_VALID) ||
>   (ap->a_returnattrs->volattr != 0) ||
>   (ap->a_returnattrs->dirattr & ~HFS_ATTR_DIR_VALID) ||
>   (ap->a_returnattrs->fileattr & ~HFS_ATTR_FILE_VALID) ||
>   (ap->a_returnattrs->forkattr != 0)) {
>   return (EINVAL);
>   }
> And in the header:
> 
> #define HFS_ATTR_CMN_VALID\
>   (ATTR_CMN_NAME | ATTR_CMN_DEVID |   \
>ATTR_CMN_FSID | ATTR_CMN_OBJTYPE | \
>ATTR_CMN_OBJTAG | ATTR_CMN_OBJID | \
>ATTR_CMN_OBJPERMANENTID | ATTR_CMN_PAROBJID |  \
>ATTR_CMN_SCRIPT | ATTR_CMN_CRTIME |\
>ATTR_CMN_MODTIME | ATTR_CMN_CHGTIME |  \
>ATTR_CMN_ACCTIME | ATTR_CMN_BKUPTIME | \
>ATTR_CMN_FNDRINFO |ATTR_CMN_OWNERID |  \
>ATTR_CMN_GRPID | ATTR_CMN_ACCESSMASK | \
>ATTR_CMN_FLAGS | ATTR_CMN_USERACCESS | \
>ATTR_CMN_FILEID | ATTR_CMN_PARENTID )
> #define HFS_ATTR_DIR_VALID\
>   (ATTR_DIR_LINKCOUNT | ATTR_DIR_ENTRYCOUNT | ATTR_DIR_MOUNTSTATUS)
> #define HFS_ATTR_FILE_VALID \
>   (ATTR_FILE_LINKCOUNT |ATTR_FILE_TOTALSIZE |   \
>ATTR_FILE_ALLOCSIZE | ATTR_FILE_IOBLOCKSIZE |\
>ATTR_FILE_CLUMPSIZE | ATTR_FILE_DEVTYPE |\
>ATTR_FILE_DATALENGTH | ATTR_FILE_DATAALLOCSIZE | \
>ATTR_FILE_RSRCLENGTH | ATTR_FILE_RSRCALLOCSIZE)
> 
> Indeed, the only allowed attribute that uniquely identifies the file, so far 
> as I can tell, is the file ID, leaving you with exactly the conundrum that 
> Ben is in now. The only way that I've found to get from the results of 
> searchfs() to a decent path or URL usable by any other API on the system is 
> to either:
> 
> 1. Use the private fsgetpath SPI, which is what FSCatalogSearch seems to do, 
> or:
> 
> 2. Build a reference NSURL from scratch.
> 
> Both of these are pretty bad, but of the two, building the NSURL seems the 
> less evil. If there's an actually good way to get from the results of 
> searchfs() to something actually usable, I'd be very interested to hear what 
> it is myself. It's pretty clear, however, that searchfs() is *not* going to 
> be the answer to Ben's question. It's also pretty clear that searchfs() is a 
> near-useless API since the only way to get usable results from it is 
> essentially to hack something, but that's a problem for another thread.

I was not aware of those limitations.  Thanks for enlightening me.  It looks, 
though, like you could reconstruct a path by working your way back from the 
item through its ancestors, getting each name along the way, using 
ATTR_CMN_NAME and ATTR_CMN_PARENTID.  Not graceful, but should work.

Cheers,
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

Re: Casting objects in NSCountedSet

2013-09-24 Thread Roland King
Casting doesn't change what an object is, if your objects are As then they are 
As and all your cast is doing is lying about it so the compiler allows you to 
call a method without complaining, but the call will fail. If you want Bs you 
need to create Bs. 

> On 24 Sep, 2013, at 11:38 pm, Koen van der Drift  
> wrote:
> 
> In my app I am using a 3rd party framework, and I have subclassed (objB) one 
> of the classes (objA) for additional functionality. 
> 
> At one point I am getting an NSCountedSet from the framework with objects 
> objA.  When I enumerate these, I'd like to cast them as objB, to access the 
> additional functionality (doSomethingNew).  But whatever I try, the objects 
> are always casted as objA.
> 
> NSCountedSet *cs = [framework countSymbols];
> 
>for (objB *obj in cs)
>{
>NSDictionary *ec = [objB doSomethingNew];  <<== throws error, 
> because objA doesn't know about doSomethingNew
> 
>//etc
>}
> 
> 
> or:
> 
> NSCountedSet *cs = [framework countSymbols];
> 
>for (id *obj in cs)
>{
>NSDictionary *ec = [((ObjB*) obj) doSomethingNew];  <<== throws 
> error, because objA doesn't know about doSomethingNew
> 
>//etc
>}
> 
> 
> Is it possible what I am trying to do?
> 
> - Koen.
> ___
> 
> 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/rols%40rols.org
> 
> This email sent to r...@rols.org

___

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

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

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

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

Re: How is one supposed to use a UIPageViewController in a storyboard?

2013-09-24 Thread Fritz Anderson
On 24 Sep 2013, at 1:42 PM, Rick Mann  wrote:

> What is "***UNCHECKED***"?

I beg pardon. The virus checker on my mail server went on strike, and is 
decorating subject lines to let me know. I'll respond to the substance of your 
message soon.

— F


___

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

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

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

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

Re: iOS7 Controls

2013-09-24 Thread Luther Baker
On Tue, Sep 24, 2013 at 4:51 PM, Alex Zavatone  wrote:

> I'm with you, Gordon.  I just bought a new iPad before 7 came out so I do
> not have to use iOS 7, unless it is in the simulator.
>
> It looks too feminine and juvenile for me to feel comfortable using.  I'll
> just leave my opinion at that.
>

Great! :)


> I've already seen people who feel burned that they thought they could
> restore their iDevice from a backup back to iOS 6 but can't.
>

We've never been able to do this except via hacky backdoor methods. Best
practice has always been to keep a few devices hanging around that you
don't upgrade. This isn't anything new or remotely related to an iOS7
upgrade.


> In any case, I'm restoring the things that were removed, like button
> backgrounds on alert text, borders around buttons (nav bar back button),
> non nauseating color scheme.  A one pixel border below the status bar, etc.
>

While you are free to do this - in general, reverting to the UI of yore is
not the best practice to embrace. "Resistance is futile. :)" I think you
will be surprised at the problems you will create for yourself trying to do
things the old way with the new SDK ... but I'm sure you'll write often to
tell us all about! it :)

Learning how to deal with things like the new status bar / navigation bar
paradigm is going to be critical for your future projects.


> I have pretty strong negative opinions on iOS 7, but from a usability
> perspective, it sure creates a lot of work for those of us who care about
> usability, readability, and not burning our eyes out with glaring colors on
> an almost 100% white background.


As alluded to in some of the other posts, some of the others of _us_ that
care about usability, readability, dynamic text, full screen views, fewer
shadows and performance are finding good times ahead as we embrace the
platform and learn how to maximize the toolset - instead of fighting with
it. Your mileage may vary.

Regardless, a little humility in times of change never hurt anyone. Try to
remember that we don't all notice brilliance when it is staring us in the
face :)

http://www.finearttips.com/2011/10/10-famous-artists-who-died-before-their-art-was-recognized/

Cheers!
-Luther





>
>
> On Sep 24, 2013, at 4:22 PM, Gordon Apple wrote:
>
> > I really don¹t like to do posts like this, but I think it is warranted.
>  My
> > motivation is to find out how others are coping with this.  Admittedly,
> I¹m
> > late to the party, only upgrading after the release.  There were only a
> few
> > features I thought I might add in my iPad apps for iOS7, so I just let it
> > slide.  Now, I¹m looking at issues I thought would never be a problem.
> >
> > iOS7 has a lot of great stuff, especially at its core.  However, its UI
> is
> > downright fugly, especially standard controls.  There is always some
> > consternation about change, but that is not what this is about.
>  Usability
> > is a strong component.  Sliders look terrible, Segmented controls look
> like
> > something a 5-yr-old might draw.  The original B&W Mac did better.
>  Pickers
> > are downright unusable. No borders and you can¹t even see a division
> between
> > columns. Scrollable views don¹t give any indication that they are
> > scrollable.   If popovers don¹t have enough color contrast, you¹d never
> know
> > they were there (no borders).  Also, a lot of apps are having issues with
> > handling the status bar.  Some of this might work on an iPhone, but just
> > doesn¹t look good on an iPad.  IMHO, if this is Joe Ivy¹s doing, he
> should
> > get the same treatment as the guy at MS that was responsible for Windows
> 8.
> > This all seems to be going the wrong direction.
> >
> > I¹ve started at least embedding pickers and tables in bordered views. Not
> > ideal, but better than nothing. I¹m thinking about abandoning segmented
> > controls for a bordered view containing buttons.  Other than doing a
> whole
> > slew of custom controls, how are others dealing with these issues?
> > ___
> >
> > 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/zav%40mac.com
> >
> > This email sent to z...@mac.com
>
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/lutherbaker%40gmail.com
>
> This email sent to lutherba...@gmail.com
>
___

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

Please do not post admin requests or moderator comments to the list.
C

Re: How is one supposed to use a UIPageViewController in a storyboard?

2013-09-24 Thread Fritz Anderson

On 24 Sep 2013, at 1:42 PM, Rick Mann  wrote:

> On Sep 24, 2013, at 10:38 , Fritz Anderson  wrote:
> 
>> On 24 Sep 2013, at 3:03 AM, Rick Mann  wrote:
>> 
>>> UIPageViewController seems very clunky. On the surface, it looks similar to 
>>> UITableViewController, but in fact, it behaves very differently. There's no 
>>> view associated with it, nor can you add a view to it (in the storyboard 
>>> editor).
>> 
>> That is correct. The data source for the page-view controller must feed view 
>> controllers to the page controller on demand. The page-view controller does 
>> not know, and does not care, what kind of view controller it gets from any 
>> one request. You may have different view controllers that go into pages. The 
>> design has to allow for this.
> 
>> Create XIBs or Storyboard scenes with your page-layout views. That's the 
>> best you can do.
> 
> I think you're missing what I meant. Of course it's different, in the sense 
> that it provides view controllers instead of views. But it's incredibly 
> cumbersome to use as a first-class citizen in a storyboard. In my case, it's 
> a child of a tab view controller. But there's no way in IB to specify 
> anything about the fixed view hierarchy if you instantiate it in IB (that I 
> can see).

I often do miss what people mean; I have almost no common sense. Let's see if I 
misunderstand you further…

We've done this, but with only one per-page view controller, and without an 
outer wrapping container like a nav or tab controller. I don't think the 
principles are different for the purposes of this discussion.

In a split view, the detail view's root scene belongs to an unexciting 
UIViewController. The view contains a toolbar, and a container view that embeds 
a page-view controller.

Split view
   Master (nav controller)
   Detail (view controller)
  Toolbar (owned by the vc)
  Container (embed segue to page-view controller)
 Page-view controller (detail view controller is data source)

... and that's where the hierarchy dead-ends. You can't put anything inside the 
page-view controller's scene, because so far as application developers are 
concerned, page-view controllers _don't have any views_ of their own.

We do the layout for the pages in orphan scenes in the same storyboard. No link 
to the page-view scene is possible.

(continuing the above hierarchy:)
TextPageViewController
IllustrationPageViewController
...


As I understand it, you're unhappy that you can't drag anything into the 
page-view scene as some kind of default controller managing a default content 
view. Am I right?

It's an interesting idea, and maybe someone can think of a way around my 
objection: The page-view controller is a scene. The (proposed-default) 
page-content controller is also a scene. You then have two controllers, with 
two scenes, in one place. I don't see how to disentangle it, and developers who 
want more than one possible page type will still have to add orphan scenes for 
the more-than-one controllers.

> Perhaps you might think to create a UIViewController that you subclass. Okay, 
> now let's put a container view into it, and then embed a UIPageViewController 
> in that.
> 
> Well, container views are fairly useless in IB, because there's no outlet for 
> the embedded view in the containing view controller. You'd have to iterate 
> the children to find a UIPageViewController, but what if you have more than 
> one? Cumbersome. And there's no way to wire the dataSource and delegate back 
> to the containing view controller.

Put an identifier on the embed segue, and listen for it in the parent 
controller's prepareForSegue:sender:. The segue that comes into the method will 
get you the contained controller.

> I'm having trouble seeing the utility of putting a UIPageViewController in a 
> storyboard for anything but a quick demo app, and then only if you can 
> subclass it (which the docs say you can do in 7 but imply you can't do in 6). 
> Now we're even more like a UITableViewController, except you can't have a 
> view hierarchy in the UIPageViewController.

We agree: you cannot have a view hierarchy in a UIPageViewController. That's 
not a quirk of Interface Builder; it reflects the fact that there is no such 
thing as a view hierarchy in a UIPageViewController. For consistency's sake, 
its scene looks like a view, but it isn't.

I'm surprised it's subclassable; my memory was that it wasn't, and I beat up on 
a junior programmer for doing it. But he was using the page-view controller as 
its own data source, and besides he needed a beating on general principles.

— F


___

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

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

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

This email sen

Re: How is one supposed to use a UIPageViewController in a storyboard?

2013-09-24 Thread Rick Mann

On Sep 24, 2013, at 17:14 , Fritz Anderson  wrote:

> Put an identifier on the embed segue, and listen for it in the parent 
> controller's prepareForSegue:sender:. The segue that comes into the method 
> will get you the contained controller.

Ah, that's how to get at it.

> I'm surprised it's subclassable; my memory was that it wasn't, and I beat up 
> on a junior programmer for doing it. But he was using the page-view 
> controller as its own data source, and besides he needed a beating on general 
> principles.

It's subclassable in the same way UITableViewController is subclassable, and I 
think it makes a lot of sense for it to be its own datasource and delegate, 
just like a UITableViewController is usually for a UITableView.

Perhaps there should be a UIPageView to make the analogy more complete.

The problem I have is that I have to create the thing programmatically to make 
it useful. But a more capable IB would let me do this all in IB. One thing it 
would need to support is wiring IBOutlets across scenes. There can also be a 
distinction between static and dynamic page view content (in which case the 
static content could be entirely specified in IB, and dynamic view controller 
template scenes could be specified).


-- 
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: iOS7 Controls

2013-09-24 Thread Rick Mann

On Sep 24, 2013, at 17:04 , Luther Baker  wrote:

> While you are free to do this - in general, reverting to the UI of yore is
> not the best practice to embrace. "Resistance is futile. :)" I think you
> will be surprised at the problems you will create for yourself trying to do
> things the old way with the new SDK ... but I'm sure you'll write often to
> tell us all about! it :)

Despite Apple apparently doing that in the iPad settings app (to get the older 
grouped table view appearance).

-- 
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: iOS7 Controls

2013-09-24 Thread Rick Mann

On Sep 24, 2013, at 17:04 , Luther Baker  wrote:

> As alluded to in some of the other posts, some of the others of _us_ that
> care about usability, readability, dynamic text, full screen views, fewer
> shadows and performance are finding good times ahead as we embrace the
> platform and learn how to maximize the toolset - instead of fighting with
> it. Your mileage may vary.

The new UI is worse overall (there might be a small handful of improvements 
here and there). The lack of shadows deemphasizes layering (like in the 
swipe-to-reveal, which I didn't understand at first). The thin font weight 
makes it harder to determine if something is enabled or disabled (I ran into 
this during Apple ID sign in). Moving the text for buttons in UITableViewCells 
from center to left-justified deemphasizes their nature as being buttons, 
further adding to confusion. I've also found it hard to know that something 
should be tapped because it doesn't *look* like a button.

Things that were clearly buttons in toolbars before are now barely readable. 
iOS 7 is creating a great deal of extra work, especially because now we must 
support two OSes with substantial differences.

Studies have shown that the cognitive load is higher for outlines vs filled-in 
shapes.

I'm finding performance on my iPad 3rd gen to be much worse on iOS 7 than it 
was in iOS 6. Scrolling is frequently jerky and jumpy. Shadows and gradients 
did not diminish readability or usability, and (as I mentioned) frequently 
enhanced it.

-- 
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: iOS7 Controls

2013-09-24 Thread Alex Kac
Maybe its just me, but the iPad settings don’t look like iOS 6 settings. The 
only thing I see is that on the right its iOS 7 style, with an inset of the 
white. Its not the same thing as going back to iOS 6 style. That’s a stylistic 
minor difference and Apple even encourages you to customize the look to your 
needs - as long as you follow what I call the “ethos” of iOS 7. 

On Sep 24, 2013, at 6:32 PM, Rick Mann  wrote:

> 
> On Sep 24, 2013, at 17:04 , Luther Baker  wrote:
> 
>> While you are free to do this - in general, reverting to the UI of yore is
>> not the best practice to embrace. "Resistance is futile. :)" I think you
>> will be surprised at the problems you will create for yourself trying to do
>> things the old way with the new SDK ... but I'm sure you'll write often to
>> tell us all about! it :)
> 
> Despite Apple apparently doing that in the iPad settings app (to get the 
> older grouped table view appearance).
> 
> -- 
> 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/alex%40webis.net
> 
> This email sent to a...@webis.net

Alex Kac - President and Founder
Web Information Solutions, Inc.

"Patience is the companion of wisdom."
--Anonymous





___

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: iOS7 Controls

2013-09-24 Thread Rick Mann

On Sep 24, 2013, at 17:55 , Alex Kac  wrote:

> Maybe its just me, but the iPad settings don’t look like iOS 6 settings. The 
> only thing I see is that on the right its iOS 7 style, with an inset of the 
> white. Its not the same thing as going back to iOS 6 style. That’s a 
> stylistic minor difference and Apple even encourages you to customize the 
> look to your needs - as long as you follow what I call the “ethos” of iOS 7. 

Yes, it's not precisely the iOS 6 look. But iOS 7 effectively nullified the 
difference between regular and grouped table views, and the the Settings app 
restored most of the elements: the rounded corners, the inset edges, the 
section labeling.

Where I had a lot of grouped table views, now my UI looks abysmal, and footer 
text that I used to use as help text is very confusing because it seems 
disconnected with what it refers to.


-- 
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: View hierarchy, documentation, and origin location.

2013-09-24 Thread Peter Teeson
As a final experiment, in my Matrix class I overrode initWithFrame……
and as the first and only line of the override had this:
BOOL f = [super isFlipped];

Lo and behold it returned YES which is definitely not the default.
I stopped the execution.

So from this I conclude that NSMatrix IS flipping the coordinates 
probably because of the zero origin indexing of the cells.

Of course with the help from the comments here and 20/20 hindsight
I should have done this first. 

It would be nice if the documentation for NSMatrix mentioned that in the 
Overview.
For example "NSMatrix uses flipped coordinates" would have saved everyone 
from my noise.

But thanks anyway because now I do have a deeper understanding.
We learn from our mistakes.

Peter
___

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

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

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

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

UIPageViewController page index woes

2013-09-24 Thread Rick Mann
I've implemented the two page index methods in the dataSource, but I'm not 
getting a page indicator. Where does it appear, near the bottom? I see my 
methods are being called.

I also don't know how to determine the current page index. 
-presentationIndexForPageViewController: should return an NSInteger, but I 
don't know how to tell which view controller is currently being shown. I'm not 
even sure why I have to implement this, since just telling it the total count 
should be enough for it to figure things out.

Any ideas? The example code doesn't use the page index.

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: View hierarchy, documentation, and origin location.

2013-09-24 Thread Peter Teeson

On 2013-09-24, at 9:05 PM, Peter Teeson wrote:
> It would be nice if the documentation for NSMatrix mentioned that in the 
> Overview.
> For example "NSMatrix uses flipped coordinates" would have saved everyone 
> from my noise.


15073135 Documentation Enhancement request filed in bugreporter
___

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: iOS7 Controls

2013-09-24 Thread David Rowland
I'm happy to embrace iOS7, but Apple's own software offers a caution.

The weather app is almost unreadable - tiny, thin type in white on a light blue 
background. The calendar won't present a list view unless you are searching. 
The calculator in scientific mode uses tiny type on "buttons" that can easily 
support something larger. Can you see the difference between the square root 
and cube root symbols without a magnifier?

 The clock and compass are better. I presume that iBooks and Pages will lose 
their wood and satin.

David


On Sep 24, 2013, at 5:04 PM, Luther Baker  wrote:

> On Tue, Sep 24, 2013 at 4:51 PM, Alex Zavatone  wrote:
> 
>> I'm with you, Gordon.  I just bought a new iPad before 7 came out so I do
>> not have to use iOS 7, unless it is in the simulator.
>> 
>> It looks too feminine and juvenile for me to feel comfortable using.  I'll
>> just leave my opinion at that.
>> 
> 
> Great! :)
> 
> 
>> I've already seen people who feel burned that they thought they could
>> restore their iDevice from a backup back to iOS 6 but can't.
>> 
> 
> We've never been able to do this except via hacky backdoor methods. Best
> practice has always been to keep a few devices hanging around that you
> don't upgrade. This isn't anything new or remotely related to an iOS7
> upgrade.
> 
> 
>> In any case, I'm restoring the things that were removed, like button
>> backgrounds on alert text, borders around buttons (nav bar back button),
>> non nauseating color scheme.  A one pixel border below the status bar, etc.
>> 
> 
> While you are free to do this - in general, reverting to the UI of yore is
> not the best practice to embrace. "Resistance is futile. :)" I think you
> will be surprised at the problems you will create for yourself trying to do
> things the old way with the new SDK ... but I'm sure you'll write often to
> tell us all about! it :)
> 
> Learning how to deal with things like the new status bar / navigation bar
> paradigm is going to be critical for your future projects.
> 
> 
>> I have pretty strong negative opinions on iOS 7, but from a usability
>> perspective, it sure creates a lot of work for those of us who care about
>> usability, readability, and not burning our eyes out with glaring colors on
>> an almost 100% white background.
> 
> 
> As alluded to in some of the other posts, some of the others of _us_ that
> care about usability, readability, dynamic text, full screen views, fewer
> shadows and performance are finding good times ahead as we embrace the
> platform and learn how to maximize the toolset - instead of fighting with
> it. Your mileage may vary.
> 
> Regardless, a little humility in times of change never hurt anyone. Try to
> remember that we don't all notice brilliance when it is staring us in the
> face :)
> 
> http://www.finearttips.com/2011/10/10-famous-artists-who-died-before-their-art-was-recognized/
> 
> Cheers!
> -Luther
> 
> 
> 
> 
> 
>> 
>> 
>> On Sep 24, 2013, at 4:22 PM, Gordon Apple wrote:
>> 
>>> I really don¹t like to do posts like this, but I think it is warranted.
>> My
>>> motivation is to find out how others are coping with this.  Admittedly,
>> I¹m
>>> late to the party, only upgrading after the release.  There were only a
>> few
>>> features I thought I might add in my iPad apps for iOS7, so I just let it
>>> slide.  Now, I¹m looking at issues I thought would never be a problem.
>>> 
>>> iOS7 has a lot of great stuff, especially at its core.  However, its UI
>> is
>>> downright fugly, especially standard controls.  There is always some
>>> consternation about change, but that is not what this is about.
>> Usability
>>> is a strong component.  Sliders look terrible, Segmented controls look
>> like
>>> something a 5-yr-old might draw.  The original B&W Mac did better.
>> Pickers
>>> are downright unusable. No borders and you can¹t even see a division
>> between
>>> columns. Scrollable views don¹t give any indication that they are
>>> scrollable.   If popovers don¹t have enough color contrast, you¹d never
>> know
>>> they were there (no borders).  Also, a lot of apps are having issues with
>>> handling the status bar.  Some of this might work on an iPhone, but just
>>> doesn¹t look good on an iPad.  IMHO, if this is Joe Ivy¹s doing, he
>> should
>>> get the same treatment as the guy at MS that was responsible for Windows
>> 8.
>>> This all seems to be going the wrong direction.
>>> 
>>> I¹ve started at least embedding pickers and tables in bordered views. Not
>>> ideal, but better than nothing. I¹m thinking about abandoning segmented
>>> controls for a bordered view containing buttons.  Other than doing a
>> whole
>>> slew of custom controls, how are others dealing with these issues?
>>> ___
>>> 
>>> 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/Unsubscrib

Re: View hierarchy, documentation, and origin location.

2013-09-24 Thread Ken Thomases
On Sep 24, 2013, at 8:33 PM, Peter Teeson wrote:

> On 2013-09-24, at 9:05 PM, Peter Teeson wrote:
>> It would be nice if the documentation for NSMatrix mentioned that in the 
>> Overview.
>> For example "NSMatrix uses flipped coordinates" would have saved everyone 
>> from my noise.
> 
> 15073135 Documentation Enhancement request filed in bugreporter

Why would they document an implementation detail?  What if they found it 
necessary to change it in the future?  What use of this information could 
callers sensibly make?

Furthermore, I contend that the fact that NSMatrix uses a flipped coordinate 
system is irrelevant to the observation that its cell at row 0, column 0 
appears in the top-left corner of its frame.  You've repeatedly quoted 
documentation about the view's coordinate system.  But nowhere is it documented 
that cell (0, 0) has to appear at or near view coordinate (0, 0).  You keep 
failing to understand the distinction between the cell (row, column) 
coordinates and the view (x, y) coordinates.  NSMatrix can calculate the (x, y) 
coordinates however it likes.  By using a negative coefficient in the right 
place, the y coordinates could decrease as the row index increases.  The 
implementers apparently decided (for the particular version of the framework 
you've empirically tested) that that calculation was easier or more 
maintainable when the matrix used a flipped coordinate system, but a) that may 
be different from other versions of the framework and b) is not necessary.

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

Re: iOS7 Controls

2013-09-24 Thread Gary L. Wade
Sounds like you should write up some UI/Usability bugs at 
http://bugreport.apple.com/
--
Gary L. Wade (Sent from my iPhone)
http://www.garywade.com/

On Sep 24, 2013, at 5:54 PM, David Rowland  wrote:

> The weather app is almost unreadable - tiny, thin type in white on a light 
> blue background. The calendar won't present a list view unless you are 
> searching. The calculator in scientific mode uses tiny type on "buttons" that 
> can easily support something larger. Can you see the difference between the 
> square root and cube root symbols without a magnifier?

___

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: iOS7 Controls

2013-09-24 Thread Luther Baker
On Tue, Sep 24, 2013 at 7:39 PM, Rick Mann  wrote:

>
> On Sep 24, 2013, at 17:04 , Luther Baker  wrote:
>
> > As alluded to in some of the other posts, some of the others of _us_ that
> > care about usability, readability, dynamic text, full screen views, fewer
> > shadows and performance are finding good times ahead as we embrace the
> > platform and learn how to maximize the toolset - instead of fighting with
> > it. Your mileage may vary.
>
> The new UI is


better overall. I just finished an app completely rewritten using native
components and the final app looks much cleaner, easier to use and more
consistent with the underlying OS.


> The lack of shadows


results in a much cleaner and less cluttered interface. It is also
relatively unheard of and will take several rounds of current old school
designers to get the hang of leveraging in their own applications.


> The thin font weight


looks modern and is generally more appealing to read. I want to open and
use several apps that never got a second glance before ... WEATHER!


> Moving the text for buttons in UITableViewCells from center to
> left-justified deemphasizes their nature as being buttons, further adding
> to confusion.


Buttons in cells? You mean the detailed disclosure "i" or the Delete
textual button?

I've also found it hard to know that something should be tapped because it
> doesn't *look* like a button.
>

How do you manage to use webpages?

It doesn't the affordance  that
we're all so very used it ... but that doesn't make it bad.


> iOS 7 is creating a great deal of extra work, especially because now we
> must support two OSes with substantial differences.


Well known right? This can be said about absolutely EVERY major UI upgrade
on any system where anyone wants to be backward compatible.


> Studies have shown that the cognitive load is higher for outlines vs
> filled-in shapes.


> I'm finding performance on my iPad 3rd gen to be much worse on iOS 7 than
> it was in iOS 6. Scrolling is frequently jerky and jumpy. Shadows and
> gradients did not diminish readability or usability, and (as I mentioned)
> frequently enhanced it.
>

Have you optimized your app for iOS7 ... or just deployed it out of the box
from a iOS6 tuned code base? I'm running a pretty beefy app, written for 7
on an old iPhone 4 ... (no parallax effect) that is downright zippy.

I don't know how iOS7 will fare, but it is here - and unlike coding which
can often be judged as very black and white, UI and UX is much less
tangible. This cocoa dev mailing list is a developers list. I find all
these UI UX threads amusing since traditionally, we all know that
developers generally make lousy designers.

Good luck as you pick a course through this, opportunity!
-Luther
___

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: iOS7 Controls

2013-09-24 Thread Bradley O'Hearne
> On Tue, Sep 24, 2013 at 7:39 PM, Rick Mann  wrote:
> 
>> On Sep 24, 2013, at 17:04 , Luther Baker  wrote:
>> 
>> The new UI is
> 
> better overall. 

I won't render a "better" or "worse", or even a "like" or "dislike". I've been 
repeatedly reminded of the fact that beauty is in the eye of the beholder, and 
there will inevitably be people strewn across the like-it-don't-like-it 
spectrum. Aesthetic preference is highly subjective -- some will like it and 
others hate it. Also, there's some that will like anything new and different, 
and there are others that will hate anything new and different. 

I will render this much of an opinion, that I couldn't be more in favor of the 
general design philosophy, of promoting content and demoting chrome. I 
personally prefer minimalism, and so a cleaner and less cluttered presentation 
is a more pleasing aesthetic for me. That said, I think there is a fairly 
objective point that can be made: in the effort to un-clutter and minimize the 
chrome, the recognizability of controls and intuitiveness of function has been 
made, in places, more ambiguous. My limited observation of long-time iPhone 
users who have upgraded to iOS 7 is that things they were used to doing weren't 
made more intuitive, but less so -- they couldn't figure out how to do it 
anymore, and had to hunt, play around, in order to get their bearings again on 
how to do things they've always done. Whether it unfolds as a minor adjustment 
for a short time and then more efficient use, or consistent confusion remains 
to be seen. 

I find all this pretty interesting, as having followed iOS design guidelines 
from the beginning (original iPhone SDK), there are a few points which Apple 
has done a complete 180 on in iOS 7: 

1. Maximizing iconification in your app. Prior to iOS 7, Apple strongly 
recommended representing control functions using universally recognizable 
icons. Icons not only can transcend language barriers, but they also help 
minimize and make consistent real estate used by controls. iOS 7 now trends 
away from icons, and design guidelines now recommend text. This seems a bit 
interesting that Apple would change course on this, as universal design (think 
airports, freeways, bathrooms, and any other heavily traveled international 
venue) tend to trend away from text and more toward symbolization. 

2. Minimization of text for controls. Prior to iOS 7, Apple recommended 
minimizing text in your app, with the philosophy that the design should imply 
its function without need for explanation. Somewhat the inverse of 
iconification, using text by definition is presents function controls that are 
inconsistent in size used, and whose meaning is pinned to a particular 
language, and therefore must be translated for universal understanding. But in 
addition, following the theme of intuitive distinction between controls and 
content, using text, especially without borders or varied texture, causes the 
control text to blend with content text, which starts to defeat the goal of 
being highly intuitive, with recognizable metaphors that are understood at a 
glance.

Whether these reversals are good or bad, I suppose that's for users to decide. 
For me personally, I prefer screen design to be universally recognizable at a 
glance  -- what the logical divisions of the screen are, what are controls, 
what is content, where one begins, and one ends. Aesthetic preferences aside, I 
can't reach the conclusion that IOS 7 has further distilled these things for 
the user (nor have I observed this to be the case with the few who have given 
me their iOS 7 feedback), but rather has blurred them. In certain areas, it may 
feel cleaner because the chrome isn't so heavy (and I believe this is generally 
the case where the content isn't text-heavy), but in others (usually where the 
content is text-heavy, like Mail), it feels very text-heavy and my eye has to 
work to identify what text is content and what text are controls, and the 
dividing lines for each screen element. 

Anyway, I didn't intend to come down on any side of the I-like/don't-like 
debate, but I do think there are some things which can be said about the iOS 7 
design changes which aren't entirely subjective.  

Brad



___

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

MODERATOR: End of Thread (was Re: iOS7 Controls)

2013-09-24 Thread Chris Hanson
Please remember that the cocoa-dev list is for technical discussion of Cocoa 
and Cocoa Touch development, and keep the discussion on-topic.

  -- Chris Hanson
 cocoa-dev co-mod


___

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