State restoration Debugging

2016-10-10 Thread Alex Kac
I’m curious if anyone has some helpful hints when state restoration doesn’t 
work. I have the following situation:

UIWindow subclass
-UITabViewController subclass

Each tab has:
—UISplitViewController subclass
—UINavigationController subclass
-UIVC Master subclass
-UIVC Detail subclass

Its all in code - no storyboard. I’m creating the window, tab, split, in the 
willFinishLaunching so that its all ready for state restoration. I have the 
restoration identifiers setup. I have the detail view controller conforming to 
UIViewControllerRestoration and viewControllerWithRestorationIdentifierPath 
does get called. I’m creating the detail VC, and I’m seeing it all get decoded 
properly. 

I’ve read every article I can find on state restoration, the docs, etc… and I 
just can’t find anything that provides common reasons for it not working. Here 
is what’s driving me crazy: I got it all working once. Then I went to apply it 
to another tab and its View controllers, and I’ve never gotten it to work again.

I’ve always hated working with state restoration, and I’m about to go 
old-school.


Alex Kac


___

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

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: Replacement for CGContextSelectFont ?

2016-09-15 Thread Alex Kac
One thing you might consider is just using an attributed string:

NSAttributedString* attrString = [[NSAttributedString alloc] 
initWithString:@"Text" attributes:@[NSFontAttributeName:[NSFont 
fontWithName:@"Times" size:16]]];
[attrString drawAtPoint:somePoint];

Something like that, at least. 

> On Sep 15, 2016, at 12:53 AM, Gabriel Zachmann  wrote:
> 
> I am trying to "resurrect" some old code.
> 
> There are several deprecated functions in it.
> 
> One of them is CGContextSelectFont() . I looked at the documentation , where 
> it just says I should use Core Text.
> I also googled, but it is not clear to me , how I can replace it.
> 
> The snippet of code is this:
> 
>   CGContextSetShouldAntialias( ctxt, TRUE );
>   CGContextSetTextDrawingMode (ctxt, kCGTextFill);
>   CGContextSetRGBFillColor( ctxt, 1.0, 1.0, 1.0, 1.0 );
>   CGContextSelectFont( ctxt, "Times", saver_.fontSize_, 
> kCGEncodingMacRoman );
>   CGColorRef blue = CGColorCreateGenericRGB( 0.0, 0.0, 1.0, 1.0 );
>   CGContextSetShadowWithColor( ctxt, CGSizeMake(0,0), 10, blue );
>   float offset = 7.0f;
>   if ( theLayer.bounds.size.height > 900 )
>   offset = 15.0f;
>   CGContextShowTextAtPoint( ctxt, theLayer.bounds.origin.x + offset, 
> theLayer.bounds.origin.y + offset, str, strlen(str) );
>   CFRelease( blue );  
> 
> I would appreciate any hints about how I can replace this function. Any 
> pointers and insights will be highly appreciated.
> 
> Best regards, 
> Gabriel.
> 
> 

Alex Kac


___

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

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: Toolbar hiding on rotation?

2016-08-29 Thread Alex Kac
I figured it out :) Maybe its just monday morning fresh brain, I don’t know.

It turns out that the issue was that I am using a UISplitViewController AND the 
delegate methods:

-(UIViewController 
*)primaryViewControllerForCollapsingSplitViewController:(UISplitViewController 
*)splitViewController 

I was passing the view controller itself - not its parent navigation controller.


> On Aug 29, 2016, at 11:29 AM, Alex Kac  wrote:
> 
> I thought so as well. This is a pretty major project - 1600 classes, Mac/iOS 
> targets, and several third party libraries - so its quite possible somewhere 
> somehow there is something I’m unaware of, but that’s why I’m asking for help 
> in leads. I would think if its my code or even third party code, somewhere 
> “setToolbarHidden:” or “setTOolbarHidden:animated:” would be called, but its 
> not. Only other way I can think of it going away is some internal UIKit 
> methods or someone traversing the view hierarchy and removing the toolbar 
> view itself.
> 
> Relevant code:
> 
> to show the toolbar:
> navController.toolbarHidden = false
> 
> class PIMainViewNavigationController: UINavigationController {
> }
> 
> literally empty subclass because we look for specific view controllers that 
> are this class name (easy filter). However if I get rid of this class and 
> just use UINavigationController, I still have the same problem. No other 
> extensions on UINavigationController that *I*’m using. 
> 
> I’m pretty certain its some code somewhere doing this then…I just can’t 
> figure out what. So I’m hoping perhaps someone else has an idea where else to 
> look so I can identify it? Maybe I should try putting a breakpoint on 
> removeFromSuperview?
> 
>> On Aug 29, 2016, at 11:06 AM, David Duncan  wrote:
>> 
>> 
>>> On Aug 29, 2016, at 9:57 AM, Alex Kac  wrote:
>>> 
>>> I have a UINavigationController and UIViewController root that I set the 
>>> toolbarItems on. I obviously also tell it not to hide the toolbar. Great! 
>>> Works perfectly. But when I rotate, the toolbar is hidden - even if I 
>>> rotate back to portrait. I've set all the "hides*" properties such as 
>>> hidesBarsWhenVerticallyCompact to false (they were already false - but I 
>>> tried anyway), and it still hides the toolbar. I’ve put breakpoints 
>>> everywhere including symbolic ones for the toolbar hidden 
>>> properties/methods in UIKit. Since we are using a navigationcontroller 
>>> subclass, I even tried overriding the toolbar methods so that they can't 
>>> get set to true (hiding that is) and it still hides the toolbar. 
>>> 
>>> In some ways, I'm okay with it hiding going in landscape, but I'm not OK 
>>> with it not coming back when you go to portrait. The view debugger also 
>>> shows the toolbar is completely gone. So something in UIKit is removing the 
>>> toolbar view and never bringing it back - nothing I do can bring it back. 
>>> This is obviously disconcerting. My next step will be to just creating my 
>>> own toolbar instead of using Apple’s navcontroller toolbar, but if I can 
>>> get it to work, that’s my preference.
>>> 
>>> Any ideas?
>> 
>> This sounds suspect, as this is not the default behavior at all – that is, 
>> you can create a brand new project and configure a navigation controller to 
>> show the toolbar and it won’t hide it on its own.
>> 
>> What methods are you using to hide/show the toolbar? What other overrides 
>> are on your subclass? Any other libraries you have in your project, or 
>> categories on UINavigationController?
>> 
>> --
>> David Duncan
>> 
> 
> 
> Alex Kac - El capitán
> 


Alex Kac - El capitán


___

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

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: Toolbar hiding on rotation?

2016-08-29 Thread Alex Kac
I thought so as well. This is a pretty major project - 1600 classes, Mac/iOS 
targets, and several third party libraries - so its quite possible somewhere 
somehow there is something I’m unaware of, but that’s why I’m asking for help 
in leads. I would think if its my code or even third party code, somewhere 
“setToolbarHidden:” or “setTOolbarHidden:animated:” would be called, but its 
not. Only other way I can think of it going away is some internal UIKit methods 
or someone traversing the view hierarchy and removing the toolbar view itself.

Relevant code:

to show the toolbar:
navController.toolbarHidden = false

class PIMainViewNavigationController: UINavigationController {
}

literally empty subclass because we look for specific view controllers that are 
this class name (easy filter). However if I get rid of this class and just use 
UINavigationController, I still have the same problem. No other extensions on 
UINavigationController that *I*’m using. 

I’m pretty certain its some code somewhere doing this then…I just can’t figure 
out what. So I’m hoping perhaps someone else has an idea where else to look so 
I can identify it? Maybe I should try putting a breakpoint on 
removeFromSuperview?

> On Aug 29, 2016, at 11:06 AM, David Duncan  wrote:
> 
> 
>> On Aug 29, 2016, at 9:57 AM, Alex Kac  wrote:
>> 
>> I have a UINavigationController and UIViewController root that I set the 
>> toolbarItems on. I obviously also tell it not to hide the toolbar. Great! 
>> Works perfectly. But when I rotate, the toolbar is hidden - even if I rotate 
>> back to portrait. I've set all the "hides*" properties such as 
>> hidesBarsWhenVerticallyCompact to false (they were already false - but I 
>> tried anyway), and it still hides the toolbar. I’ve put breakpoints 
>> everywhere including symbolic ones for the toolbar hidden properties/methods 
>> in UIKit. Since we are using a navigationcontroller subclass, I even tried 
>> overriding the toolbar methods so that they can't get set to true (hiding 
>> that is) and it still hides the toolbar. 
>> 
>> In some ways, I'm okay with it hiding going in landscape, but I'm not OK 
>> with it not coming back when you go to portrait. The view debugger also 
>> shows the toolbar is completely gone. So something in UIKit is removing the 
>> toolbar view and never bringing it back - nothing I do can bring it back. 
>> This is obviously disconcerting. My next step will be to just creating my 
>> own toolbar instead of using Apple’s navcontroller toolbar, but if I can get 
>> it to work, that’s my preference.
>> 
>> Any ideas?
> 
> This sounds suspect, as this is not the default behavior at all – that is, 
> you can create a brand new project and configure a navigation controller to 
> show the toolbar and it won’t hide it on its own.
> 
> What methods are you using to hide/show the toolbar? What other overrides are 
> on your subclass? Any other libraries you have in your project, or categories 
> on UINavigationController?
> 
> --
> David Duncan
> 


Alex Kac - El capitán


___

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

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

Toolbar hiding on rotation?

2016-08-29 Thread Alex Kac
I have a UINavigationController and UIViewController root that I set the 
toolbarItems on. I obviously also tell it not to hide the toolbar. Great! Works 
perfectly. But when I rotate, the toolbar is hidden - even if I rotate back to 
portrait. I've set all the "hides*" properties such as 
hidesBarsWhenVerticallyCompact to false (they were already false - but I tried 
anyway), and it still hides the toolbar. I’ve put breakpoints everywhere 
including symbolic ones for the toolbar hidden properties/methods in UIKit. 
Since we are using a navigationcontroller subclass, I even tried overriding the 
toolbar methods so that they can't get set to true (hiding that is) and it 
still hides the toolbar. 
 
In some ways, I'm okay with it hiding going in landscape, but I'm not OK with 
it not coming back when you go to portrait. The view debugger also shows the 
toolbar is completely gone. So something in UIKit is removing the toolbar view 
and never bringing it back - nothing I do can bring it back. This is obviously 
disconcerting. My next step will be to just creating my own toolbar instead of 
using Apple’s navcontroller toolbar, but if I can get it to work, that’s my 
preference.

Any ideas?
___

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

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

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

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

Re: Core Data or not

2016-08-09 Thread Alex Kac
Anyone considered using Realm? We are extremely heavy CoreData users with our 
own “DataStore” class to manage all the intricacies of CoreData, threading, 
merging, migration, and so on.

After 5-6 years of CoreData, my next project I’m seriously considering not 
using CoreData. Its turned into quite a nice system - no doubt, but there are 
many behaviors with it that I end up fighting and I feel like I am constantly 
working around. Over the years its gotten better, but there are still issues 
with performance and highly complicated schemas.

I haven’t tried Realm, but I’ve delved into their docs every few weeks to see 
how its progressing and I don’t know if we’d be trading one set of problems for 
another, but it looks promising.

> On Aug 9, 2016, at 1:34 AM, Britt Durbrow 
>  wrote:
> 
> In general, I agree with what’s been said so far.
> 
> 

Alex Kac - El capitán


___

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

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

Reading in one window's frame auto-save size for another?

2016-08-01 Thread Alex Kac
I have a popover that can be detached and turned into a window. When the window 
is resized, its size/position is saved. Great! However I want the popover to be 
the same size as the detached window when the user reopens that popover. 

Is there safe/compatible code to read in a window’s auto-save size so I can 
apply it to another window?


Alex Kac - El capitán



___

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

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: Yosemite NSCollectionView appropriate for spreadsheet-like view?

2016-05-03 Thread Alex Kac
There is the old NSCollectionView and the new. You have to use the new delegate 
methods and so on. Its the same class, but behind the scenes the new collection 
view is literally the UICollectionView from iOS ported over (syslog even says 
UICollectionView…). Its not *at all obvious*.

I know I worked with it a few months ago and it was reusing the cells.

> On May 3, 2016, at 1:23 PM, Jens Alfke  wrote:
> 
> 
>> On May 3, 2016, at 12:08 PM, thatsanicehatyouh...@me.com wrote:
>> 
>> I should have been more specific - my understanding was that 
>> NSCollectionView from 10.11 onward did not do this... which Alex Kac just 
>> beat me to mentioning! I was curious if anyone was aware of limitations of 
>> this scope with that caveat.
> 
> I dunno — I have a Mac app using NSCollectionView, and before I sent my post, 
> I experimentally added some logging to the -init method of the NSView 
> subclass that draws the cells. I opened a window with a few hundred items 
> (about four or five screenfuls) and saw that all of the views got initialized 
> at the moment the window opened.
> 
> This is on 10.11.4, and I built the app with Xcode 7.3, so I should be 
> getting whatever the latest behavior is.
> 
> Is there some particular way I have to configure the collection view to get 
> the lazy-loading behavior?
> 
> 


Alex Kac - El capitán


___

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

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: Yosemite NSCollectionView appropriate for spreadsheet-like view?

2016-05-03 Thread Alex Kac
10.11 CollectionView reuses views and doesn’t create 100,000 cells. So that 
could be appropriate.

> On May 3, 2016, at 12:53 PM, Jens Alfke  wrote:
> 
> 
>> On May 1, 2016, at 9:06 AM, thatsanicehatyouh...@me.com wrote:
>> 
>> As I've been thinking about this problem it occurred to me that the new(ish) 
>> NSCollectionView might be a viable replacement in this case. Before I go 
>> down the rabbit hole, is it reasonable to use to create a spreadsheet-like 
>> view?
> 
> No, because it eagerly creates a view for every item in the collection. So if 
> you have a spreadsheet with 100,000 cells, it’s going to create 100,000 
> NSViews when the window opens.
> 
> NSMatrix may work better because it uses only a single view, but IIRC it 
> still preallocates an NSCell for every item. Also I think it’s been 
> deprecated.
> 
> I suspect you’ll need a custom view that uses cells or some other 
> lightweight-view design pattern to avoid consuming resources for items that 
> aren’t currently visible. (Of course, someone else may have already 
> implemented that custom view, either as open source or commercially.)
> 
> —Jens
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/alex%40webis.net
> 
> This email sent to a...@webis.net


Alex Kac - El capitán


___

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

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: NSTimer after Sleep

2016-04-29 Thread Alex Kac
When the Mac sleeps, the timer sleeps as well and delays the fire time. I wrote 
my own class for this sort of thing and when it gets the wakeup notification, 
it re-schedules the timer or executes it immediately. It has a lot more options 
for that behavior (maybe it should skip, for example).

> On Apr 29, 2016, at 3:23 AM, Gerriet M. Denkmann  wrote:
> 
> OS X 10.11.4; Xcode Version 7.3 (7D175).
> 
> self.timer = [ NSTimer scheduledTimerWithTimeInterval: 900 … repeats: YES ];
> self.timer.fireDate = [ NSDate dateWithTimeIntervalSinceNow:  ];
> 
> works fine without sleep.
> 
> But:
> fireDate: Fri 29 Apr 2016 15:06:14 +0700 in 37.03 min +900 sec
> 
> Fri 29 Apr 2016 14:38:39 +0700 Wake. 
> fireDate: Fri 29 Apr 2016 15:06:14 +0700 in 27.57 min +900 sec
> 
> Fri 29 Apr 2016 14:55:10 +0700 Wake. 
> fireDate: Fri 29 Apr 2016 15:06:14 +0700 in 11.05 min +900 sec
> 
> Fri 29 Apr 2016 15:08:35 +0700 Wake. 
> fireDate: Fri 29 Apr 2016 15:06:14 +0700 LATE 141.8 sec +900 sec
> 
> Fri 29 Apr 2016 15:26:31 +0700 Check. 
> fireDate: Fri 29 Apr 2016 15:06:14 +0700 LATE 1217.8 sec +900 sec
> 
> I would expect the timer to fire rather soon now, but it never does.
> The timer is not nil, is not invalid and has the correct fire time.
> 
> What am I doing wrong?
> 
> Gerriet.


Alex Kac - El capitán


___

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

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: Thoughts on autolayout

2016-04-21 Thread Alex Kac
I’ve come to really like autolayout. I follow a similar set of steps that you 
do, but I’ve begun to use the Preview assistant to help me get my constraints 
right. It lets me test them in every language including the pseudo double 
length. Its fantastic. 


> On Apr 21, 2016, at 1:49 PM, Bill Cheeseman  wrote:
> 
> 
>> On Apr 21, 2016, at 3:19 PM, Charles Srstka  wrote:
>> 
>> Am I the only one who likes autolayout?
> 
> 
> No, I like it, too. I developed an approach that I'm comfortable with, and if 
> I stick to it I can get the job done quickly. Of course, trying to accomplish 
> something I haven't done before requires a little more thought, but I find 
> that I can figure it out pretty quickly. It almost comes natural now.
> 
> I use IB exclusively. My approach goes like this, on a one-window-at-a-time 
> or one-view-at-a-time basis:
> 
> 1. Drag all the views and controls onto the canvas and drop them more or less 
> where I want them to end up. Don't waste any time trying to align them or 
> make them the right size exactly -- just get position and size approximately 
> right and move on. Leave it looking a little ragged. Above all, don't create 
> any constraints yet.
> 
> 2. Write enough of the application code to get a sense whether the layout 
> needs to be changed. Change it as needed, but again don't waste any time 
> getting it exactly right and don't create any constraints yet.
> 
> 3. When the design feels like its ready to be frozen, create the constraints. 
> DO NOT move the controls and views into the exact place they belong and then 
> add constraints -- instead, do it the other way around: create the 
> constraints first and then tell the controls and views to obey them. It will 
> be much easier to see that they all moved into the right place, because they 
> will all move a relatively short distance. More on this step below.
> 
> 4. Every time you tell a window or view to obey new constraints, watch very 
> carefully. If the controls and views move or resize in unexpected ways, or 
> disappear completely, immediately choose undo to get back to where you were 
> (with all the controls and views in approximately the right locations). Then 
> figure out which constraint you left out or got wrong, and fix it. Repeatedly 
> undo and fix as needed.
> 
> 5. When you think you're done, lock the constraints down and do a lot of 
> window resizing, divider dragging, and so on to test them.
> 
> More on step 3. I create constraints the way I read: start at the top left 
> corner, move item by item to the right, then move down one "row" and start at 
> the left again, and so on until I reach the bottom right corner. This leads 
> to some useful consistencies to help my brain figure out why something went 
> wrong. (a) For example, it is often only the leftmost button in the top "row" 
> of controls that needs a top constraint to the superview; the other buttons 
> in that "row" will have their vertical dimension controlled by baseline or 
> center alignment, or something similar. (b) Horizontal constraints are easily 
> made complete, because I account for each piece one step at a time from left 
> to right: leading constraint, width constraint, trailing constraint, etc. (c) 
> I don't worry about hugging priorities and the like until all else fails, 
> because the default priorities are designed to be right for most situations.
> 

Alex Kac - El capitán


___

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

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

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

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

Re: Getting displayName out of font file

2016-02-26 Thread Alex Kac
Are you wanting this for any arbitrary font? I believe you can “install” a font 
just for your application - and then use the NSFont methods to get it.

http://stackoverflow.com/questions/5283572/custom-font-in-a-cocoa-application

> On Feb 26, 2016, at 10:31 AM, Jens Alfke  wrote:
> 
> If this functionality exists it would probably be down in the CoreText 
> framework. Take a look there. 
> 
> —Jens 
> 
>> On Feb 26, 2016, at 2:16 AM, Gerriet M. Denkmann  
>> wrote:
>> 
>> I have a file “Some Font.ttf” and I want to know the displayName of this 
>> font, which might be “Some-Font” or “Nice Font” or anything else.
>> Or nil if this is not a well-formatted font file.
>> I do NOT want to install the font nor do anything with it.
>> 
>> Short of reverse-engeneering the ttf format (which probably would be rather 
>> too much): is there a way to get this?
>> 
>> Ideally I would line to do:
>> NSFont *font = [ NSFont fontFromFilePath: @“/path/to/Some Font.ttf” ];
>> NSString *displayName = font.displayName;//font.fontName would 
>> probably also do
>> 
>> but this seems not to exist.

Alex Kac - El capitán


___

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

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 record screen in iOS

2016-01-21 Thread Alex Kac
Is there a reason you can’t use ReplayKit:

https://developer.apple.com/library/ios/documentation/ReplayKit/Reference/RPScreenRecorder_Ref/index.html#//apple_ref/occ/cl/RPScreenRecorder

I’ve been thinking of exploring this for support purposes (i.e let the user hit 
a button to record the screen and send us the video), but to be honest I 
haven’t even spent 2 seconds looking at ReplayKit beyond what I saw at WWDC…so 
not sure if that’s possible. 

> On Jan 21, 2016, at 7:45 PM, ico  wrote:
> 
> Hi,
> I know I can do this with QuickTime, but the problem is you need a computer
> with you to do so, I want the users can do it whenever they want.
> ReplayKit maybe the choice, I will take a look.
> 
> For the sandboxing reason, I know it possibly not to get it done. However,
> what if there is some dark magic like private API, I use them to develop
> the app and not to upload it
> to app store, I just distribute the app to the users who want to use it, is
> there any chance?
> 
> Thank you.
> 
> 
> On Thu, 21 Jan 2016 at 00:41 Hunter Hillegas 
> wrote:
> 
>> Building a general purpose iOS app to do this is not possible for
>> sandboxing/privacy reasons.
>> 
>> For your own apps, you can embed ReplayKit or you can connect to the Mac
>> and use QuickTime to record the screen.
>> 
>>> On Jan 20, 2016, at 1:21 AM, ico  wrote:
>>> 
>>> Hi All,
>>> Is it possible to develop an app that can run in the background and
>> record
>>> the user's device screen. For example, user can use this app to record a
>>> video how they play a game and post the video on the web etc.
>>> 
>>> Anyone can point me to the right direction to get it done?
>>> Thanks a lot.
>> 
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> 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/jche128%40gmail.com
>> 
>> This email sent to jche...@gmail.com
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/alex%40webis.net
> 
> This email sent to a...@webis.net


Alex Kac - El capitán


___

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

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

NSTableView/NSOutlineView row/view overlay

2016-01-18 Thread Alex Kac
Given a set of rows in an NSOutlineView, I want to add some “handles” that show 
up when you hover over a row. These handles would half cover the bottom of the 
view that is being hovered, and half cover the top of the row below it.

Does anyone have any tips or anything to point me to how that might be done? My 
only thought is to add the hover to my superview, and then figure out where to 
add the subviews to that superview above the tableview…but I fear it wouldn’t 
work so well during resize or scrolling.
___

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

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: Looking at moving part of our iOS app become an iOS framework to be used in other apps.

2016-01-15 Thread Alex Kac
I created a singleton called “” that I moved all of that to. That 
way even my windows, my logging, my push, everything that is shared between my 
OS X and iOS code and extensions would use that instead of the App Delegate. 
With that in place, very little if anything calls the app delegate anymore.

> On Jan 15, 2016, at 2:31 PM, Alex Zavatone  wrote:
> 
> And this framework would be utilized by other applications.
> 
> However, a good amount of app startup and config is triggered in the 
> appDelegate, same as push notification, opening the app via URLs and other 
> appDelegate related tasks would conflict with the appDelegate of the app 
> using the framework.
> 
> Is there a set of standard operating practices that are available online to 
> review for this type of app restructuring?
> 
> Thanks in advance.
> 
> - Alex Zavatone
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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 - El capitán


___

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

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: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Alex Kac
Actually there is - the identifier. You set the NIB *and* the identifier.  And 
I was able to make it work right after I sent the email (isn’t that how it is 
always?) It seems that my “isNarrow” property wasn’t being set by the time the 
view was loading where we were initializing it. I wasn’t able to send a 
confirmation right away as my wife called me for dinner.


So confirmation: multiple views in a single NIB works.


> On Jan 14, 2016, at 4:05 PM, Quincey Morris 
>  wrote:
> 
> On Jan 14, 2016, at 14:38 , Alex Kac mailto:a...@webis.net>> 
> wrote:
>> 
>>  I can’t seem to get a good answer to if this should work or not (having 
>> multiple cellViews in one NIB).
> 
> No. There are 2 top level objects in your nib, but there’s nothing that tells 
> the table view machinery which one to use. (Normally, you’d use outlets in 
> File’s Owner to tell them apart, or iterate through them yourself, looking 
> for — say — a view tag. But there’s nothing that going to make NSTableView do 
> that.)
> 
> Instead, you should use two NIBs with different names and one view each.
> 

Alex Kac - El capitán


___

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

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

NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Alex Kac
I have a NIB with two views that I want to use depending on circumstances. I 
call one “weatherCell” and one “weatherCellNarrow”. 

I register it like this:

- (NSString*)identifierForWeatherCell {
return _narrowView ? @"weatherCellNarrow":@"weatherCell";
}



nib = [[NSNib alloc] initWithNibNamed:@"WeatherCell" bundle:nil];
[self.outlineView registerNib:nib forIdentifier:self.identifierForWeatherCell];


WeatherCell* weatherCell = [outlineView 
makeViewWithIdentifier:self.identifierForWeatherCell owner:nil];

IB images:




The problem is that no matter the order of views in IB, the only one that works 
is “weatherCell” and not the narrow one - it just comes back nil. Reading the 
docs and stack overflow, I can’t seem to get a good answer to if this should 
work or not (having multiple cellViews in one NIB). Based on my initial 
tests…I’d say no. However the fact that ONE of them does work makes me curious 
if anyone else has ever gotten it to work.
___

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

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: CG Error with popovers - known issue?

2016-01-01 Thread Alex Kac
We’ve seen the same issue. So its definitely an OS X issue.

>> On 31 Dec 2015, at 9:32 AM, Jonathan Mitchell  
>> wrote:
>> 
>> I am seeing the exact same issue with NSPopover on 10.11.
>> The stack trace is identical.
>> Did you manage to make any further progress with this?
>> 
> 
> 
> Not really. I was able to determine that the error is triggered when a 
> popover’s edge changes (say from bottom to left and vice versa) but otherwise 
> my own code has no influence on it.
> 


___

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

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

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

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

Frameworks in the Helper LoginItems app

2015-12-23 Thread Alex Kac
I’ve got an app with a helper in the Contents/Library/LoginItems path. Both use 
AFNetworking.framework. I currently install AFNetworking.framework in the main 
app’s Framework path. I would like the helper to use AFNetworking from the main 
app’s Framework’s folder. 

I’ve tried setting the run path search path to something like 
@executable_path/../../../../../Frameworks

but it still doesn’t run - coming back to me with an error that it can’t load 
the dynamic library AFNetworking. As mostly an iOS developer for the last 8 
years, how Xcode handles frameworks and how to get embedded stuff like this to 
work isn’t really something I have a lot of experience with. So I’m hoping 
perhaps someone has some help?

Here is the screenshot of my build phases with the frameworks. I’d love to get 
some direction. Google doesn’t help much here unfortunately because the 
terminology I think is too vague.

https://www.dropbox.com/s/wa0o6n9sfa08kns/Screenshot%202015-12-23%2016.30.07.png?dl=0
___

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

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

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

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

Re: Best Control for a Matrix these days?

2015-12-03 Thread Alex Kac
On El Capitan, NSCollectionView gives you the most control over row/column 
layout possible since it mirrors iOS and you can write your own collection 
layout flow.

> On Dec 3, 2015, at 11:54 AM, Lee Ann Rucker  wrote:
> 
> That doesn't give you enough control over row/column layout. How about nested 
> NSStackViews?
> 
> 
> NSCollectionView
> --
> Gary L. Wade (Sent from my iPad)
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.garywade.com_&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=ie7S-J__EKnfyVOBV7-jV2rZ--p47O6vkyTklpDM3h4&m=Ovx3p7ZngLjpJw59NjTdXanjpTLNJOtQ2jbtXQvp1LU&s=bN3Fn68sVADDHN4nV5L5JDZKhAD1-eJgMxuVVWacYjg&e=
> 
>>  

___

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

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: Swift circular imports

2015-11-03 Thread Alex Kac
Well, I guess I’m back to using extensions instead of subclassing:
"However, note that you cannot subclass a Swift class in Objective-C.”

I had assumed that meant a native non-NSObject based Swift class…but I was 
wrong. So there…learned something new today.

So never mind!

> On Nov 3, 2015, at 10:07 AM, Alex Kac  wrote:
> 
> I’ve got a bit of a foggy head this morning so perhaps I’m just not thinking 
> clearly. We are moving our code from Obj-C to swift. All new code is in 
> Swift. We are hitting an issue with a circular import however.
> 
> So here is an example:
> 
> App Delegate is still in ObjC, but all new code is written in an extension in 
> Swift. The goal is to move more and more code into Swift and eventually turn 
> it around where the app delegate is a Swift class with an objective C 
> extension.
> 
> The App Delegate.swift refers to classes that are written in Objective C - 
> our main View Controllers.
> We are writing a new super class for our main view controllers in Swift, but 
> the view controllers themselves are still ObjC (for now). 
> 
> So you have a Swift extension, calling an objective C subclass of a swift 
> super class.
> 
> Hopefully you see the problem: Swift has to compile first to generate its 
> -Swift.h file, but it can’t compile since the header for the main view 
> controllers refer to a Swift super class (so no forward declarations), and 
> the main view controller headers don’t work until the -Swift file is 
> generated.
> 
> So I’m curious if anyone else has had to hit that scenario and what was your 
> solution (besides rewriting everything into Swift…which is kind of what I’ve 
> been doing, but now I’ve hit large classes I’m not into that yet).
> 
> 
> Also, how do I change my email address for this list without 
> unsubscribing/resubscribing - or is that the only way?
> 
> 


Alex Kac - El capitán


___

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

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

Swift circular imports

2015-11-03 Thread Alex Kac
I’ve got a bit of a foggy head this morning so perhaps I’m just not thinking 
clearly. We are moving our code from Obj-C to swift. All new code is in Swift. 
We are hitting an issue with a circular import however.

So here is an example:

App Delegate is still in ObjC, but all new code is written in an extension in 
Swift. The goal is to move more and more code into Swift and eventually turn it 
around where the app delegate is a Swift class with an objective C extension.

The App Delegate.swift refers to classes that are written in Objective C - our 
main View Controllers.
We are writing a new super class for our main view controllers in Swift, but 
the view controllers themselves are still ObjC (for now). 

So you have a Swift extension, calling an objective C subclass of a swift super 
class.

Hopefully you see the problem: Swift has to compile first to generate its 
-Swift.h file, but it can’t compile since the header for the main view 
controllers refer to a Swift super class (so no forward declarations), and the 
main view controller headers don’t work until the -Swift file is generated.

So I’m curious if anyone else has had to hit that scenario and what was your 
solution (besides rewriting everything into Swift…which is kind of what I’ve 
been doing, but now I’ve hit large classes I’m not into that yet).


Also, how do I change my email address for this list without 
unsubscribing/resubscribing - or is that the only way?



___

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

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 debug [NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] crash

2015-10-21 Thread Alex Kac
Our app is using a custom split view controller that we're getting rid of for 
the next major release, but for the CURRENT release we still have it. The 
problem I have is that on iOS 9 we're seeing the above when we hide the master 
view and show it a few times over and over agian.
 
Its random where it ends up crashing, but it always EXC_BAD_ACCESS. So…I fire 
up Instruments and Zombies…no issues. Does not crash. I try it with Runtime 
address sanitization, and finally the regular stuff. When using the any of the 
above - it does not crash ever. When turning it off (and of course running in 
Release mode), it crashes after a few tries.
 
• #1  
• 0x00010c54d398 in -[NSObject(NSKeyValueObserverNotification) 
willChangeValueForKey:] ()  
• #2  
• 0x00010f171bb9 in CAAnimation_setter(CAAnimation*, unsigned int, 
_CAValueType, void const*) ()  
• #3  
• 0x00010f16b6de in -[CAPropertyAnimation setKeyPath:] ()  
• #4  
• 0x00010f16b412 in +[CAPropertyAnimation animationWithKeyPath:] () 
 
• #5  
• 0x00010d0e7c04 in +[UIViewSpringAnimationState 
defaultSpringAnimationForKey:mass:stiffness:damping:velocity:] ()  
• #6  
• 0x00010d0e7de2 in -[UIViewSpringAnimationState 
_defaultAnimationForKey:] ()  
• #7  
• 0x00010d0e7a8b in -[UIViewSpringAnimationState 
animationForLayer:forKey:forView:] ()  
• #8  
• 0x00010ca572cc in -[UIViewAnimationState 
actionForLayer:forKey:forView:] ()  
• #9  
• 0x00010ca77686 in +[UIView(Animation) 
_defaultUIViewActionForLayer:forKey:] ()  
• #10  
• 0x00010ca853a6 in -[UIView(CALayerDelegate) 
actionForLayer:forKey:] ()  
• #11  
• 0x00010f18a9fc in -[CALayer actionForKey:] ()  
• #12  
• 0x00010f1861c6 in actionForKey(CALayer*, CA::Transaction*, 
NSString*) ()  
• #13  
• 0x00010f186154 in CA::Layer::begin_change(CA::Transaction*, 
unsigned int, objc_object*&) ()  
• #14  
• 0x00010f187839 in CA::Layer::set_position(CA::Vec2 
const&, bool) ()  
• #15  
• 0x00010f187959 in -[CALayer setPosition:] ()  
• #16  
• 0x00010f187fbd in -[CALayer setFrame:] ()  
• #17  
• 0x00010cf30311 in __26-[_UILabelLayer setFrame:]_block_invoke ()  
• #18  
• 0x00010cf3016f in -[_UILabelLayer 
_setFrameOrBounds:settingAction:] ()  
• #19  
• 0x00010cf302b3 in -[_UILabelLayer setFrame:] ()  
• #20  
• 0x00010ca6d3f7 in -[UIView(Geometry) setFrame:] ()  
• #21  
• 0x00010cc2d7e6 in -[UILabel setFrame:] ()  
 
I'm quite sure its my bug somewhere having to do with memory…but I'm at a loss 
where to move forward with this. I'd love some ideas…


___

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

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

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

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

Re: questions on WebView for Mac apps

2015-09-30 Thread Alex Kac
Are you sure you’ve looked at WKWebView in its entirety? I was looking at 
converting a UIWebView and WKWebView seems to have 10x MORE API than UIWebView. 
Its just sprinkled about in a lot more classes and delegates. This is a great 
resource:

<http://nshipster.com/wkwebkit/>

> On Sep 30, 2015, at 12:59 PM, Jens Alfke  wrote:
> 
> 
>> On Sep 30, 2015, at 10:43 AM, Conrad Shultz  wrote:
>> 
>> WKWebVew is the preferred API.
>> 
>> If WKWebView is missing API that prevents you from adopting it (on either 
>> iOS or OS X) please file a bug at https://bugreport.apple.com 
>> <https://bugreport.apple.com/>.
> 
> Really? WKWebView has like ¼ the API surface area of WebView. It’s abundantly 
> obvious that it provides significantly less functionality — surely Apple 
> doesn’t need developers to tell it that. I realize that WKWebView is more 
> secure, and it's a step up from UIWebView, but it is in no way a replacement 
> for WebView. It’s like Garage Band vs Final Cut Pro.
> 
> (Speaking of apps, this reminds me uncomfortably of what Apple’s done to the 
> iWork apps (and before that, to iMovie and Aperture) — update them by 
> removing massive amounts of functionality. Two years later I still can’t use 
> the latest version of Pages, because it’s missing independent left/right-page 
> margin settings.)
> 
> —Jens
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/alex%40webis.net
> 
> This email sent to a...@webis.net


Alex Kac - El capitán

Alex Kac - El capitán


___

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

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: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Alex Kac
OK I found the best solution :) 

Leave the MainMenu in the NIB. It won't be displayed, but all the actions will 
be handled properly.

> On Sep 28, 2015, at 3:38 PM, Ken Thomases  wrote:
> 
> On Sep 28, 2015, at 4:22 PM, Alex Kac  wrote:
>> 
>> I guess I need more help than that. Here is what I’ve got:
>> 
>> NSViewController - with a NIB that has a plain NSView, with an NSTextField 
>> in it. Using an NSPopover, the NSViewController is the content for the 
>> popover.
>> 
>> My only two classes are the NSApplication delegate, and the 
>> NSViewController. Neither -keyDown nor -performKeyEquivalent: get called 
>> there. I’m reading this:
>> https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/HandlingKeyEvents.html
> 
> Use a custom view class.  You can replace the "plain NSView" in your 
> description above with a custom subclass of NSView.  Or you can use a custom 
> subclass of NSTextField.  Either will work.  The search for a view which 
> handles a key equivalent goes through the entire view hierarchy of a window, 
> not just the responder chain or anything like that.
> 
> There's a sample implementation here 
> <http://web.archive.org/web/20100126000339/http://www.cocoarocket.com/articles/copypaste.html>.
>   That code uses [[self window] firstResponder] as the "to" parameter for 
> calls to -[NSApplication sendAction:to:from:], but you can just pass nil to 
> target the first responder.
> 
> The code is also a bit too strict in checking the event's modifierFlags.  It 
> will fail to invoke the edit actions if Caps Lock is down, for example.  I 
> would write that as:
> 
> if ((event.modifierFlags & (NSShiftKeyMask | NSControlKeyMask | 
> NSAlternateKeyMask | NSCommandKeyMask)) == NSCommandKeyMask) …
> 
> 
>> From reading there, since I have no NSWindow, and no NSMenu, there is no 
>> key-view loop or NSApplication has nothing to send me the command key 
>> equivalents for.
> 
> There is a window for the popover, it's just private to the popover 
> implementation.  There is a key-view loop.  If a popover has multiple text 
> fields, for example, you can tab from one to the next.
> 
>> I’m wondering if perhaps I need to use a global monitor for events while the 
>> popover is up, and remove it when its dismissed. 
>> 
>> I don’t mind handling the events myself and processing them - but beyond 
>> using a global monitor for events, I’m not sure how to set them up and get 
>> them in my NSViewController…
> 
> A global event monitor is for events *not* targeted at your application.  A 
> local event monitor is for events targeted at your application.  But neither 
> should be necessary for this purpose.
> 
> Regards,
> Ken
> 


Alex Kac - El capitán


___

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

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: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Alex Kac
OK I think I found something:

http://cocoa.thedizzyheights.com/2010/07/cut-copy-and-paste-in-lsuielement-applications/
http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-without-an-edit-menu

I’m going to try that now.

> On Sep 28, 2015, at 3:22 PM, Alex Kac  wrote:
> 
> I guess I need more help than that. Here is what I’ve got:
> 
> NSViewController - with a NIB that has a plain NSView, with an NSTextField in 
> it. Using an NSPopover, the NSViewController is the content for the popover.
> 
> My only two classes are the NSApplication delegate, and the NSViewController. 
> Neither -keyDown nor -performKeyEquivalent: get called there. I’m reading 
> this:
> https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/HandlingKeyEvents.html
> 
> From reading there, since I have no NSWindow, and no NSMenu, there is no 
> key-view loop or NSApplication has nothing to send me the command key 
> equivalents for. I’m wondering if perhaps I need to use a global monitor for 
> events while the popover is up, and remove it when its dismissed. 
> 
> I don’t mind handling the events myself and processing them - but beyond 
> using a global monitor for events, I’m not sure how to set them up and get 
> them in my NSViewController…
> 
>> On Sep 28, 2015, at 2:30 PM, Jens Alfke  wrote:
>> 
>> 
>>> On Sep 28, 2015, at 1:05 PM, Alex Kac >> <mailto:a...@webis.net>> wrote:
>>> 
>>> The problem is that without a menu bar, none of the CMD key functions for 
>>> text fields works now. Stuff like cut, copy paste. So with that in mind, 
>>> how do I enable that to work?
>> 
>> You may need to capture the key events (possibly in your view’s 
>> -performKeyEquivalent:) and process them yourself.
>> 
>> —Jens
> 
> Alex Kac - El capitán
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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 - El capitán


___

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

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: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Alex Kac
I guess I need more help than that. Here is what I’ve got:

NSViewController - with a NIB that has a plain NSView, with an NSTextField in 
it. Using an NSPopover, the NSViewController is the content for the popover.

My only two classes are the NSApplication delegate, and the NSViewController. 
Neither -keyDown nor -performKeyEquivalent: get called there. I’m reading this:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/HandlingKeyEvents.html

From reading there, since I have no NSWindow, and no NSMenu, there is no 
key-view loop or NSApplication has nothing to send me the command key 
equivalents for. I’m wondering if perhaps I need to use a global monitor for 
events while the popover is up, and remove it when its dismissed. 

I don’t mind handling the events myself and processing them - but beyond using 
a global monitor for events, I’m not sure how to set them up and get them in my 
NSViewController…

> On Sep 28, 2015, at 2:30 PM, Jens Alfke  wrote:
> 
> 
>> On Sep 28, 2015, at 1:05 PM, Alex Kac > <mailto:a...@webis.net>> wrote:
>> 
>> The problem is that without a menu bar, none of the CMD key functions for 
>> text fields works now. Stuff like cut, copy paste. So with that in mind, how 
>> do I enable that to work?
> 
> You may need to capture the key events (possibly in your view’s 
> -performKeyEquivalent:) and process them yourself.
> 
> —Jens

Alex Kac - El capitán


___

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

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

Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Alex Kac
I have a Cocoa helper app with no menu bar (since its a helper). It has a menu 
status item that brings down a popover and an NSTextField:
https://www.dropbox.com/s/n0iot0it3dfw2mb/Screenshot%202015-09-28%2014.04.21.png?dl=0

The problem is that without a menu bar, none of the CMD key functions for text 
fields works now. Stuff like cut, copy paste. So with that in mind, how do I 
enable that to work?

---
Alex Kac - El capitán



___

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

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

DockTile Plugin: Failed to set up extra plugin. file:///Applications/Informant.app/ Plugin in quarantine

2015-09-17 Thread Alex Kac
So interestingly, the plugin works fine on my El Capitan install, but not my 
Yosemite install. On my Yosemite install, I checked the code-signing:
codesign --verify --deep --verbose=2 Informant.app

and the end result is:
Informant.app: valid on disk
Informant.app: satisfies its Designated Requirement

I’ve also tried: spctl -a -t exec -vv 
Informant.app/Contents/PlugIns/PIDockTilePlugin.docktileplugin/
Informant.app/Contents/PlugIns/PIDockTilePlugin.docktileplugin/: accepted
source=Developer ID
origin=Developer ID Application: Web Information Solutions, Inc. (WZC4362K6S)

So I’m curious - what else am I doing wrong here?
___

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

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

DockTile plugin + Sandbox + App Groups

2015-09-08 Thread Alex Kac
If you have a Docktile plugin - it runs in the com.apple.dock.extra process, 
not under yours. So it doesn’t have simple access to your NSUserDefaults. If 
your app is sandboxed and using App Groups for its preferences files, I can’t 
find any way to get the docktile plugin to actually read a preference or not. 

I’m thinking of using the keychain perhaps…but it feels wrong. 

Does anyone else have any ideas?
___

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

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

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

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

Re: Close Modal window after sheet ends

2015-08-24 Thread Alex Kac
I’ve also tried this…and the code in the dispatch_async never gets called. I’ve 
seen other code on github that does something similar so obviously it *should* 
work.

- (IBAction)enterRegCode:(id)sender {

registrationWindowController = [[RegistrationWindow alloc] 
initWithWindowNibName:@"RegistrationWindow"];

__weak PIIntroWindowController* weakSelf = self;

[self.window beginSheet:registrationWindowController.window 
completionHandler:^(NSModalResponse returnCode) {
registrationWindowController = nil;

if (returnCode == 1)
{
quitMeansCloseWindow = YES;
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@“Do I get called?”);
});
}

}];

}


> On Aug 24, 2015, at 11:41 AM, Alex Kac  wrote:
> 
> I’ve got a modal window which opens a sheet to let the user enter a 
> registration code. If the Reg code is accepted, I want to close the window 
> after the sheet ends. However it doesn’t. I’ve tried a ton of different 
> things and I believe it has something to do with the runLoop because dispatch 
> timers, async, etc… do not work in the completionHandler at all. Neither does 
> performSelector:afterDelay:. Nothing that seems to use a timer works. 
> 
> Here is how I present the main window:
> [[NSApplication sharedApplication] 
> runModalForWindow:introSheetController.window];
> 
> and then when the user selects “Enter Registration Code”:
> 
> - (IBAction)enterRegCode:(id)sender {
>   
>   registrationWindowController = [[RegistrationWindow alloc] 
> initWithWindowNibName:@"RegistrationWindow"];
>   
>   [self.window beginSheet:registrationWindowController.window 
> completionHandler:^(NSModalResponse returnCode) {
>   registrationWindowController = nil;
> 
>   if (returnCode == 1)
>   {
>   [[NSApplication sharedApplication] stopModal];
>   [self.window close]; 
>   //[self.window orderOut:nil]
>   }
>   }];
> }
> 
> What do you think? I think I know what’s wrong, but I’ve tried enough things 
> that don’t work that I’m sure its something basic and simple.


___

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

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

Close Modal window after sheet ends

2015-08-24 Thread Alex Kac
I’ve got a modal window which opens a sheet to let the user enter a 
registration code. If the Reg code is accepted, I want to close the window 
after the sheet ends. However it doesn’t. I’ve tried a ton of different things 
and I believe it has something to do with the runLoop because dispatch timers, 
async, etc… do not work in the completionHandler at all. Neither does 
performSelector:afterDelay:. Nothing that seems to use a timer works. 

Here is how I present the main window:
[[NSApplication sharedApplication] 
runModalForWindow:introSheetController.window];

and then when the user selects “Enter Registration Code”:

- (IBAction)enterRegCode:(id)sender {

registrationWindowController = [[RegistrationWindow alloc] 
initWithWindowNibName:@"RegistrationWindow"];

[self.window beginSheet:registrationWindowController.window 
completionHandler:^(NSModalResponse returnCode) {
registrationWindowController = nil;

if (returnCode == 1)
{
[[NSApplication sharedApplication] stopModal];
[self.window close]; 
//[self.window orderOut:nil]
}
}];
}

What do you think? I think I know what’s wrong, but I’ve tried enough things 
that don’t work that I’m sure its something basic and simple.
___

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

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: Sharing Prefs between Main and Helper App

2015-08-12 Thread Alex Kac
Maybe its just Xcode and El Cap…I thought it was working too, but just
now it wasn't. I did a clean and now it seems to be working again…

On Wed, Aug 12, 2015 at 4:58 PM, Sean McBride  wrote:
> On Wed, 12 Aug 2015 15:50:35 -0600, Alex Kac said:
>
>>I have an OS X app signed with Developer ID. It is NOT sandboxed (I
>>suppose I could, but I'd prefer to stay away from that for a bit
>>longer).
>>
>>I need my helper and main app to share prefs. There must be a simple
>>way to do this for now. I know that initWithSuite works with App
>>Groups and sandbox…but again I don't want to be sandboxed just yet.
>
> I suspect initWithSuite works without App Sandbox too...
>
> Cheers,
>
> --
> 
> Sean McBride, B. Eng s...@rogue-research.com
> Rogue Researchwww.rogue-research.com
> Mac Software Developer  Montréal, Québec, Canada



-- 
Alex Kac - President and Founder

Web Information Solutions, 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

Sharing Prefs between Main and Helper App

2015-08-12 Thread Alex Kac
I have an OS X app signed with Developer ID. It is NOT sandboxed (I
suppose I could, but I'd prefer to stay away from that for a bit
longer).

I need my helper and main app to share prefs. There must be a simple
way to do this for now. I know that initWithSuite works with App
Groups and sandbox…but again I don't want to be sandboxed just yet.

So what do most people do here for this?

___

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

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

User Default Controller in NIB - subclass to use the suite instead

2015-08-06 Thread Alex Kac
We use NSUserDefaults(initWithSuite:) in our app so that our helper
apps, plugins all can share the same preferences. We also use the User
Default controller in our NIBs to bind settings to it.

I'd like to use a subclass of this which would use the suite instead
of standardUserDefaults. At least thats the best way I can fathom to
do this.

Does anyone else have a better solution or a way to subclass it?
___

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

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

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

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

Re: User Default Controller in NIB - subclass to use the suite instead

2015-08-06 Thread Alex Kac
Also, we're now using Swift…which won't let you reassign self.

On Thu, Aug 6, 2015 at 9:23 AM, Alex Kac  wrote:
> I just realized I asked this question a year ago in September. At the
> time I didn't really get a good answer, which is why we're back at it
> today. One thing I don't remember was if the addSuiteNamed and
> removeSuiteNamed option worked…
>
> On Thu, Aug 6, 2015 at 9:19 AM, Alex Kac  wrote:
>> We use NSUserDefaults(initWithSuite:) in our app so that our helper
>> apps, plugins all can share the same preferences. We also use the User
>> Default controller in our NIBs to bind settings to it.
>>
>> I'd like to use a subclass of this which would use the suite instead
>> of standardUserDefaults. At least thats the best way I can fathom to
>> do this.
>>
>> Does anyone else have a better solution or a way to subclass it?
>
>
>
> --
> Alex Kac - President and Founder
>
> Web Information Solutions, Inc.



-- 
Alex Kac - President and Founder

Web Information Solutions, 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

Re: User Default Controller in NIB - subclass to use the suite instead

2015-08-06 Thread Alex Kac
I just realized I asked this question a year ago in September. At the
time I didn't really get a good answer, which is why we're back at it
today. One thing I don't remember was if the addSuiteNamed and
removeSuiteNamed option worked…

On Thu, Aug 6, 2015 at 9:19 AM, Alex Kac  wrote:
> We use NSUserDefaults(initWithSuite:) in our app so that our helper
> apps, plugins all can share the same preferences. We also use the User
> Default controller in our NIBs to bind settings to it.
>
> I'd like to use a subclass of this which would use the suite instead
> of standardUserDefaults. At least thats the best way I can fathom to
> do this.
>
> Does anyone else have a better solution or a way to subclass it?



-- 
Alex Kac - President and Founder

Web Information Solutions, 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

Helper App - xcode

2015-07-17 Thread Alex Kac
Perhaps I'm using the wrong search terminology - but what is the
correct method to essentially add a helper app to an existing app?

Specifically, I'm looking to:
a) Have it faceless (I know how to do that)
b) Option to run at launch if the user wants it to (I think I know how
to do that) - 
(http://stackoverflow.com/questions/11292058/how-to-add-a-sandboxed-app-to-the-login-items)
c) Have it be part of the main app bundle.

This is for Yosemite and up, Mac App Store - or not.

So c is my real question. The way I would think to do it is to add the
helper app to the Copy Bundle Resources phase.

Comments?
___

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

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

Accessibility

2015-07-01 Thread Alex Kac
Our app shows up in the Accessibility section of System Preferences:
Allow the apps below to control your computer.

Any idea why?
___

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

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: Swift and parameter names

2015-06-24 Thread Alex Kac
As I wrote above, where you are assigning a type at that moment - no. Its
quite obvious. You're doing it right there where its obvious. Frankly, I
don't see the two things as being the two sides of the same coin. In one
case the type is seen pretty obviously because you're assigning it. In the
other you're passing arguments and its not obvious in most cases.

On Wed, Jun 24, 2015 at 4:35 PM, Rick Mann  wrote:

>
> > On Jun 24, 2015, at 15:25 , Alex Kac  wrote:
> >
> > I guess I cannot agree with you, Rick. I love the fact that Objective-C
> and now Swift require parameter names. I prefer verbose function names,
> parameters, etc.. than obtuse ones. I don't want to have to infer. I want
> it to be explicit. Infering types works because let myAttribString =
> NSMutableAttributableString() is very clear. That's my two cents.
>
> Again, I'm just asking for the option. I'm not saying it should be removed
> from the language.
>
> Let me ask you this: do you also feel like you should specify variable
> types?
>
>
> --
> Rick Mann
> rm...@latencyzero.com
>
>
>


-- 

*Alex Kac - **President and Founder*

*Web Information Solutions, 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

Re: Swift and parameter names

2015-06-24 Thread Alex Kac
I guess I cannot agree with you, Rick. I love the fact that Objective-C and
now Swift require parameter names. I prefer verbose function names,
parameters, etc.. than obtuse ones. I don't want to have to infer. I want
it to be explicit. Infering types works because let myAttribString =
NSMutableAttributableString() is very clear. That's my two cents.

On Wed, Jun 24, 2015 at 4:13 PM, Rick Mann  wrote:

>
> > On Jun 24, 2015, at 14:53 , Greg Parker  wrote:
> >
> > Swift's design is that the API author gets to choose what the call site
> looks like. Allowing the caller to choose whether to specify names or not
> hurts readability because of the inconsistency. It's bad for different
> calls to the same method to look too different.
>
> I guess I disagree with this assertion. Generally, in a given body of
> code, the usage will be consistent, and of course there are the billions of
> lines of existing (C) code where no parameter names are specified.
>
> > If you as the author of a function think that the names are not useful,
> or conversely think that the first parameter should also be named, then you
> can write your function that way. Conversely, if you think the caller
> should be allowed to specify names or not then you can write two overloads,
> one of which simply calls the other. (I did something like this at one
> point for CGRect's initializers, allowing any of CGRect(1, 2, 3, 4) or
> CGRect(x:1, y:2, w:3, h:4) or CGRect(x:1, y:2, width:3, height:4). I don't
> remember if that arrangement survived.)
>
> Again, this allows the author of the function to dictate, but not the
> caller.
>
> We call many more functions than we write, so this increases the burden.
>
> The default naming rule is clearly a holdover from Objective-C, and really
> seems to make little sense. If part of the argument is "most functions have
> only one parameter," then I'd say the rule should be based on number of
> parameters, not first-vs-rest.
>
> I strikes me as terribly inconsistent as it is, and terribly burdensome. I
> *rarely* find improvement to naming the parameters at the call site. Maybe
> I'm just better at naming the variables I pass as arguments.
>
> > On Jun 24, 2015, at 14:42 , Jens Alfke  wrote:
> >
> > There isn’t always enough information, when there are optional
> parameters. Without keywords it can be ambiguous which parameters have been
> omitted.
> >
> > Also, can’t functions be overloaded by using different parameter names,
> the way methods can?
>
> Which is why I was careful to state "If there's enough information
> available…." Obviously if there is not (given the arguments and their types
> supplied), then specifying one or more parameter names would be a fine way
> to discriminate.
>
> But to ALWAYS require them is IMO not necessary. Why is it considered okay
> to infer types? Wouldn't it be more clear if you had to specify types? I
> don't see this discussion as substantially different.
>
> One possibility I raised in the Radar bug I filed was to make it an option
> that can be passed to the compiler. If the call can be unambiguously
> discriminated without parameter names, then the option would allow them to
> be omitted.
>
> --
> Rick Mann
> rm...@latencyzero.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/alex%40webis.net
>
> This email sent to a...@webis.net
>



-- 

*Alex Kac - **President and Founder*

*Web Information Solutions, 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

Re: Cannot create an NSPersistentStoreCoordinator with a nil model

2015-05-11 Thread Alex Kac
Yeah, I'm adding that to my code now. Thank you :)

On Mon, May 11, 2015 at 2:10 PM, Ryan Dignard
 wrote:
> It may be advantage to log whether the model file exists and if it does
> exist if the permissions are correct.
>
> On Mon, May 11, 2015 at 1:06 PM, Alex Kac  wrote:
>>
>> So I've only seen this on OS X crashlytics, but one of my engineers
>> says he's seen some logs on iOS as well. So I'm not calling it an OS X
>> only issue yet.
>>
>> It would be interesting to see if this happens only on updates or new
>> installs though… Great idea! Thanks.
>>
>> On Mon, May 11, 2015 at 2:03 PM, Mike Abdullah 
>> wrote:
>> >
>> >
>> >> On 11 May 2015, at 21:43, Alex Kac  wrote:
>> >>
>> >> We have an app that's out in the wild, and as always there are weird
>> >> issues that sometimes show up then. This seems like it should never
>> >> happen or always happen.
>> >>
>> >> The crash is here:
>> >>
>> >> http://crashes.to/s/f382ed6e4ef
>> >>
>> >> Obviously we have a working model…its been shipped and working in
>> >> hundreds of thousands of iOS and OS X devices. But for a small number
>> >> of people, this is the crash they get.
>> >>
>> >> I'd like to either catch the error and display something to the user,
>> >> so I plan to do a @try/catch there for OS X, but ideally I'd like to
>> >> know if anyone has seen edge cases that might cause this?
>> >
>> > We occasionally see this with corrupted copies of the app that are
>> > missing the model and several other resource files. I _think_ it’s a bug in
>> > the Sparkle updater, but have basically zero proof, and have never been 
>> > able
>> > to repro it ourselves to track down.
>> >
>>
>>
>>
>> --
>> Alex Kac - President and Founder
>>
>> Web Information Solutions, 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/conceptuallyflawed%40gmail.com
>>
>> This email sent to conceptuallyfla...@gmail.com
>
>



-- 
Alex Kac - President and Founder

Web Information Solutions, 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

Re: Cannot create an NSPersistentStoreCoordinator with a nil model

2015-05-11 Thread Alex Kac
So I've only seen this on OS X crashlytics, but one of my engineers
says he's seen some logs on iOS as well. So I'm not calling it an OS X
only issue yet.

It would be interesting to see if this happens only on updates or new
installs though… Great idea! Thanks.

On Mon, May 11, 2015 at 2:03 PM, Mike Abdullah  wrote:
>
>
>> On 11 May 2015, at 21:43, Alex Kac  wrote:
>>
>> We have an app that's out in the wild, and as always there are weird
>> issues that sometimes show up then. This seems like it should never
>> happen or always happen.
>>
>> The crash is here:
>>
>> http://crashes.to/s/f382ed6e4ef
>>
>> Obviously we have a working model…its been shipped and working in
>> hundreds of thousands of iOS and OS X devices. But for a small number
>> of people, this is the crash they get.
>>
>> I'd like to either catch the error and display something to the user,
>> so I plan to do a @try/catch there for OS X, but ideally I'd like to
>> know if anyone has seen edge cases that might cause this?
>
> We occasionally see this with corrupted copies of the app that are missing 
> the model and several other resource files. I _think_ it’s a bug in the 
> Sparkle updater, but have basically zero proof, and have never been able to 
> repro it ourselves to track down.
>



-- 
Alex Kac - President and Founder

Web Information Solutions, 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

Cannot create an NSPersistentStoreCoordinator with a nil model

2015-05-11 Thread Alex Kac
We have an app that's out in the wild, and as always there are weird
issues that sometimes show up then. This seems like it should never
happen or always happen.

The crash is here:

http://crashes.to/s/f382ed6e4ef

Obviously we have a working model…its been shipped and working in
hundreds of thousands of iOS and OS X devices. But for a small number
of people, this is the crash they get.

I'd like to either catch the error and display something to the user,
so I plan to do a @try/catch there for OS X, but ideally I'd like to
know if anyone has seen edge cases that might cause this?

___

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

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

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

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

Re: Core Data sync between iOS and Mac apps

2015-05-10 Thread Alex Kac
 the document option enabled and
> to ensure that both apps use the same container.
> >
> > On the Mac the documents should show up in the normal open sheet just
> like they do for TextEdit and Preview documents that are in the cloud.
> >
> > These guides are a good starting point:
> > Document Based App Programming Guide for Mac
> > Document Based App Programming Guide for iOS
> > iCloud Design Guide
> > iCloud Programming Guide For Core Data
> >
> > Thanks,
> > Mike Swan
> > ETCP Certified Entertainment Electrician
> > 347-451-5418
> > theMikeSwan.com
> >
> >> On May 5, 2015, at 8:54 PM, cocoa-dev-requ...@lists.apple.com wrote:
> >>
> >> Message: 3
> >> Date: Tue, 05 May 2015 17:31:23 -0400
> >> From: davel...@mac.com
> >> To: CocoaDev 
> >> Subject: Core Data sync between iOS and Mac apps
> >>
> >> I'm looking into options for building an iOS and Mac app that can
> sync/share Core Data between them. I'm well aware of the issues with Core
> Data iCloud syncing in iOS 5 and 6 and that it is supposedly better so I'm
> willing to try it. The apps can have deployment targets of iOS 8 and
> greater and OS X 10.10. I don't expect they'll be ready to release before
> iOS 9 and 10.11 (or whatever it's called) are out. The apps will be
> "document-based" in that the user can open different data files each which
> should sync separately.
> >>
> >> The most detail explanation I can find of iCloud Core Data syncing is
> WWDC 2013 session 207 (which apparently also applies to iOS 8) and the
> objc.io issue: http://www.objc.io/issue-10/icloud-core-data.html
> >>
> >> I looked into Ensembles (http://www.ensembles.io) a bit last year and
> bought a "support package. I'm also aware of BSManagedDocument (but haven't
> tried using it). And I've seen this
> http://ossh.com.au/design-and-technology/software-development/ but I
> didn't see any accompanying code.
> >>
> >> I'm comfortable with Objective-C, Swift, and Core Data locally, but not
> syncing Core Data.
> >>
> >> Is there someone where that I should look for that describes the steps
> in detail including setting the proper entitlements, etc. in Xcode 6?
> >>
> >> I assume now that the iOS synced data would show up in the iCloud Drive
> on the Mac - correct - or am I missing something that it is only for iCloud
> Documents, not Core Data sync? I don't quite understand how
> URLForUbiquityContainer comes into play on the Mac if the files now appear
> local on the Mac. After the user chooses File -> Open would they navigate
> to the iCloud Drive and select the file? If so, how does the code then use
> URLForUbiquityContainer.
> >>
> >> Pointers to any documentation or tutorials or recommendations would be
> appreciated.
> >>
> >> Thanks,
> >> Dave Reed
>
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> 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.*
___

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

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

NSStatusItem, Popover and NSTextField make responder

2015-04-17 Thread Alex Kac
I have a popover that is opened on tapping a menu status item. In the
popover I have a text field that I’d like to have become active when
the popover is open.

When the app is in the foreground and you tap on the status item it
does become active. When its in the background, it does not. In beta,
we’re getting reports from users that they are expecting it to and
other apps do.

Now I’ve been in the iOS world for a few years and the OS X world only
a few months, but I used to work in what is now Carbon and I’ve been
lurking here for years so I’ve got a few ideas, but so far none of
them are working.

I’d love to hear some tips if you have any. I thought it was something
with run-loop modes but I haven’t had any luck with that.

___

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

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

NSTableView content height

2015-04-14 Thread Alex Kac
I’m failing to find the proper way to do this. Given an NSTableView, I’d
like to size its parent view to the height of all the rows/content/headers
of that table view so that there is no scrolling.

Someone suggested:

[_scrollView.documentView frame].size.height


But that does not work for me. I’d love to get a better suggestion.

-- 

*Alex Kac - **President and Founder*

*Web Information Solutions, 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

NSCheckbox right click in an NSOutlineView

2015-04-01 Thread Alex Kac
I have an NSCheckbox in a view based NSOutlineView. I want to support
Control-click for the right click menu when a user control-clicks on the
cell. Right click works perfectly already per the standard NSOutlineView.
However because the NSCheckbox is eating the click, it doesn't do a right
click menu when you control-click.

https://www.dropbox.com/s/zjt5heg0mgotatd/Screenshot%202015-04-01%2008.34.26.png?dl=0

I've been trying different things, but via SO it seems like people subclass
NSButton to check for the control click:

- (void) mouseDown:(NSEvent *)theEvent

{

if ((theEvent.modifierFlags & NSControlKeyMask) == NSControlKeyMask)

{

// [[self nextResponder] rightMouseDown:theEvent];

}

else

[super mouseDown:theEvent];

}


However I now need to figure out how to get to the parent where a
rightMouseDown brings up the menu. I'm sure this can't be all that uncommon
- so what's the best way to handle this?
___

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

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

NSOutlineView - separator lines

2015-03-26 Thread Alex Kac
I'm trying to get rid of NSOutlineView horizontal separator lines.
I've tried the following with no luck.

self.outlineView.gridStyleMask = NSTableViewGridNone;
self.outlineView.gridColor = [NSColor clearColor];
self.outlineView.intercellSpacing = NSZeroSize;

https://www.dropbox.com/s/f6eteh5wgrou5kh/Screenshot%202015-03-27%2000.31.00.png?dl=0

https://www.dropbox.com/s/4eha0ohbf9id0xb/Screenshot%202015-03-27%2000.34.14.png?dl=0

Its possible its getting overwritten elsewhere, but so far I haven't
found anything.

So…any tips? :D

___

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

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

NSTextField with a NSTableView completion list - suggestions for text field

2015-03-20 Thread Alex Kac
I have a few places where I’d like to have essentially an NSTextField with an 
auto-complete - but its not a combo-box. The closest I can come up with what 
I’m looking for is the Apple Calendar location field where it brings up a 
search auto-complete. A few things are that it looks like a standard text field 
and you can type any text you want, but you can also select something from the 
completion list. The completion list is also an attributed string or a table 
cell that lets us customize the look just like it:

https://www.dropbox.com/s/w61ztjlwzv414l6/Screenshot%202015-03-19%2015.47.05.png?dl=0

So what are my best options here? This also needs to work IN a Popover, so 
having a popover come under the text field doesn’t work either. I’ve looked at 
NSSearchField and this is not a search field. Its a suggestion box which is 
different both in its purpose and aesthetics.

I’m sure its just a simple “do this and this”. Maybe its just a text field with 
a NSTableView in my view that is hidden until its needed. That’s fine, but I 
want to make sure I’m doing it right. Thanks.
___

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

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

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

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

NSStatusItem Popover doesn't work in Full Screen mode

2015-03-13 Thread Alex Kac
If I have a NSStatusItem which brings up a popover when tapped, it works 
normally and it works in Full Screen mode if our app is the one being shown. 
But if you are in full screen mode with another app, it doesn’t show up.

I’d like to get some ideas on what to do here. 

-(void) statusItemSelected:(NSButton*)sender
{
if (informantStatusPopover.isShown)
{
[informantStatusPopover close];
informantStatusPopover = nil;
}
else
{
PIMenuItemTodayViewController* focusViewSidebar = 
[[PIMenuItemTodayViewController alloc] 
initWithNibName:@"PIMenuItemTodayViewController" bundle: [NSBundle mainBundle]];

informantStatusPopover = [[NSPopover alloc] init];
informantStatusPopover.contentViewController = focusViewSidebar;
informantStatusPopover.contentSize = NSMakeSize(320, 480);
informantStatusPopover.behavior = NSPopoverBehaviorTransient;
informantStatusPopover.delegate = self;

[informantStatusPopover showRelativeToRect:[sender frame] 
ofView:sender preferredEdge:NSMinYEdge];
}
}


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: NSScrollview general question

2015-03-04 Thread Alex Kac
I’ve personally set it to Always for now - I just got tired of having to first 
do a quick two finger scroll on my MBPr to get to the thumb to drag it and half 
the time having it fade out before I got to it. 

I lived with scrollers on my screen since the 1980s - I think I will live with 
it :) 

> Certainly, setting it to "always" does address the issue. I just don't think 
> either the system default setting nor the way the auto setting prioritises 
> the trackpad are good decisions.



___

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

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: Exception on launch when clicking on an NSUserNotification

2015-02-27 Thread Alex Kac
*** -[NSKeyedUnarchiver decodeObjectForKey:]: data to unarchive contains class 
(NSArray) which has not been allowed

However - the only array I’m setting is the additionalActions - a Yosemite 
property (this is on Yosemite of course). 
// An array of NSUserNotificationAction objects that describe the different 
actions that can be taken on a notification in addition to the default action 
described by actionButtonTitle
@property (copy) NSArray *additionalActions NS_AVAILABLE(10_10, NA);

And yup that is it. If I comment out the additionalActions, it works. I guess 
time to file a bug… # 19986044



> On Feb 27, 2015, at 9:35 AM, Kyle Sluder  wrote:
> 
> On Thu, Feb 26, 2015, at 08:49 PM, Alex Kac wrote:
>> It would be a fantastic clue! Except … its not printed in the console, or
>> in the xcode console, or anywhere. So I have no idea. My guess is that
>> the OS is swallowing the exception for launch purposes, which does me no
>> good.
> 
> You're trapped at objc_exception_throw. You can select frame 0 and print
> the first argument (`po $rdi` on x86-64).
> 
> --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/alex%40webis.net
> 
> This email sent to a...@webis.net

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

"It is useless for sheep to pass a resolution in favor of vegetarianism while 
wolves remain of a different opinion."
-- William Randolph Inge






___

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

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: Exception on launch when clicking on an NSUserNotification

2015-02-27 Thread Alex Kac
As I have written several times now - I have no user data.  If the limit is 1k 
and it hits that with less than 100 characters for a title and informative 
string and an ID - then that’s a real bug. I really don’t think I’m hitting 
that.

It would make NSUserNotifications pretty useless for everyone.

> On Feb 26, 2015, at 11:04 PM, Graham Cox  wrote:
> 
> 
>> On 27 Feb 2015, at 4:27 pm, Alex Kac  wrote:
>> 
>> What’s not shown above is the identifier - which is a 64 character string, 
>> and the sound name which is a 10 character string. I’m pretty sure that’s 
>> not more than 1k
> 
> 
> Right, but it's the resulting archive that has to come in under 1K (a 
> ridiculously small limit!). Archives include all sorts of stuff on top of the 
> actual string content - complete class names for all classes involved, all 
> the keys and a fairly complex structure. You might want to just archive your 
> user data with keyed archiver and check the resulting length of the NSData.
> 
> --Graham
> 
> 

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

"If at first you don't succeed, skydiving is not for you."
-- Francis Roberts






___

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

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: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Alex Kac
On OS X (this is OS X, not iOS - hence NSUserNotification and not 
UILocalNotification), when you start an app by tapping on a notification, 
because you haven’t had a chance yet to register the delegate of the 
NSUserNotificationCenter (this has nothing to do with NSNotificationCenter), 
the OS passes in the notification as part of the notification on launch:

> NSApplicationLaunchUserNotificationKey
> The following key is an NSUserNotification object that will be present in the 
> notification userInfo dictionary of the 
> NSApplicationDidFinishLaunchingNotification notification if your app was 
> launched because a user activated a notification in the Notification Center.
> 
> Available in OS X v10.8 and later.


Second, as you can see in the printed object below, the length of the strings 
are:
 { title: "Test" informativeText: "9:55 PM" actionButtonTitle: “Snooze”

What’s not shown above is the identifier - which is a 64 character string, and 
the sound name which is a 10 character string. I’m pretty sure that’s not more 
than 1k. And yes, I’ve gone through all the documentation, I’ve gone through 
EVERY SINGLE property of NSUserNotification in the headers and in the docs to 
make sure I’m not putting something in there I shouldn’t be. 

AND remember - this WORKS if the app is running and it delivers the 
notification to the - (void)userNotificationCenter:(NSUserNotificationCenter 
*)center didActivateNotification:(NSUserNotification *)notification method. 

It only fails on startup with the notification in didFinishLaunching. 

I do believe there is something I am doing wrong…I just can’t figure out what. 
In my other reply on this, I also posted my code as well and with the info 
above, you can see what text I posted. This is why its so frustrating. I am 
getting no meaningful error, the data I’m giving it - as far as I can tell - is 
correct. 

What I’ll start doing is cutting it down to the basics - no action, no 
informative text, no sound - and just start from the very very minimum and see 
what happens…

> On Feb 26, 2015, at 9:12 PM, Graham Cox  wrote:
> 
> OK, I may be having a massive misunderstanding about how iOS works (as 
> compared with Mac OS), but the NSUserNotification you post is, as far as I'm 
> aware, completely unrelated to the NSNotification that is passed to 
> -applicationWill/DidFinishLaunching.
> 
> The latter is just a notification that the application created internally, 
> and as a convenience passed to its delegate before or after broadcasting it 
> using NSNotificationCenter.
> 
> The user notification you post just triggers the notification system. I 
> realise it's pretty confusing with everything being called more or less the 
> same thing, but they are totally different. The userInfo you pass in your 
> user notificaiton will not turn up in the app delegate's did launch 
> notification. (Unless, that is, iOS is documented to do that. Mac OS 
> definitely doesn't).
> 



___

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

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: Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Alex Kac
It would be a fantastic clue! Except … its not printed in the console, or in 
the xcode console, or anywhere. So I have no idea. My guess is that the OS is 
swallowing the exception for launch purposes, which does me no good.

I thought so too that it would have a problem decoding an archived object - 
however as I wrote in my original email:

1: I am not using any custom objects. Only NSStrings. I have tested with both 
having a userInfo (again with an NSString), and without. In fact, I’m no longer 
using userInfo - same issue.
2: It unarchives just fine if the app is already running - it only fails when 
it launches the app.

NSUserNotification *localNotif = [[NSUserNotification alloc] init];
localNotif.deliveryDate = [NSDate 
dateWithTimeIntervalSinceReferenceDate:alarmNotification.timeToFire]; 

localNotif.soundName = soundFile;
localNotif.title = title;
localNotif.informativeText = moreInfo;
[localNotif setHasActionButton: YES];
[localNotif setActionButtonTitle: LOC(@"Snooze")];
localNotif.identifier = [NSString 
stringWithFormat:@"Alarm-%@",stringInformantID] ;


//set the repeat and category
if ([localNotif 
respondsToSelector:@selector(setAdditionalActions:)])
{
NSMutableArray* additionalActions = 
[NSMutableArray array];
[additionalActions 
addObject:[NSUserNotificationAction actionWithIdentifier:@"Snooze1" 


  title:[NSString stringWithFormat:LOC(@"Snooze for %@"), 
StringForDuration(60)]]];
[additionalActions 
addObject:[NSUserNotificationAction actionWithIdentifier:@"Snooze5" 


  title:[NSString stringWithFormat:LOC(@"Snooze for %@"), 
StringForDuration(5*60)]]];
[additionalActions 
addObject:[NSUserNotificationAction actionWithIdentifier:@"Snooze15" 


  title:[NSString stringWithFormat:LOC(@"Snooze for %@"), 
StringForDuration(15* 60)]]];
[additionalActions 
addObject:[NSUserNotificationAction actionWithIdentifier:@"Snooze30" 


  title:[NSString stringWithFormat:LOC(@"Snooze for %@"), 
StringForDuration(30* 60)]]];
[additionalActions 
addObject:[NSUserNotificationAction actionWithIdentifier:@"Snooze60" 


  title:[NSString stringWithFormat:LOC(@"Snooze for %@"), 
StringForDuration(60* 60)]]];
[additionalActions 
addObject:[NSUserNotificationAction actionWithIdentifier:@"Snooze120" 


  title:[NSString stringWithFormat:LOC(@"Snooze for %@"), 
StringForDuration(120* 60)]]];
[additionalActions 
addObject:[NSUserNotificationAction actionWithIdentifier:@"Snooze86400" 


  title:[NSString stringWithFormat:LOC(@"Snooze for %@"), 
StringForDuration(kSecondsPerDay)]]];
[additionalActions 
addObject:[NSUserNotificationAction actionWithIdentifier:@"Snooze172800" 


  title:[NSString stringWithFormat:LOC(@"Snooze for %@"), 
StringForDuration(kSecondsPerDay*2)]]];

localNotif.additionalActions = 
additionalActions;
}

[[NSUserNotificationCenter defaultUserNotificationCenter] scheduleNotification: 
localNotif];

Re: How to prevent app activation on NSUserNotification action

2015-02-26 Thread Alex Kac
Yes, I understand how notifications work. Since Apple’s calendar and Reminder 
apps don’t launch when you hit snooze, I was hoping to do the same for us. My 
guess was that their notifications were being created by a background process 
so when you hit snooze, its not calling the actual Reminders/Calendars app - 
but I wanted to be sure.

> On Feb 26, 2015, at 7:33 PM, Jens Alfke  wrote:
> 
> 
>> On Feb 26, 2015, at 6:11 PM, Alex Kac > <mailto:a...@webis.net>> wrote:
>> 
>> If my app is currently hidden and a user notification occurs and the user 
>> taps on the action button (in my case "Snooze"); how do I prevent the app 
>> from coming to the foreground?
> 
> I don’t think you can. Activating the app when the user clicks the 
> notification is just part of how the notifications UI works. The notification 
> isn’t even being displayed by your app (there’s some system process that 
> manages them).
> 
> —Jens

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

"I am not young enough to know everything."
--Oscar Wilde




___

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

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

Exception on launch when clicking on an NSUserNotification

2015-02-26 Thread Alex Kac
On another NSUserNotification note, I create an NSUserNotification with a 
sound, title, informative text,  action items, and in some cases a userInfo 
dictionary. If my app is running and I tap on it - it works fine. I get the 
notification activation delegate call, and all is good. I’ve also tested this 
with no userInfo dictionary.
 
However I'm having a problem on launching the app by tapping on the 
notification. My app gets an applicationWillFinishLaunching, and then gets an 
exception before it hits applicationDidFinishLaunching. 
 
https://www.dropbox.com/s/nmf6qr97su43plh/Screenshot%202015-02-25%2021.38.37.png?dl=0

I can continue, and the app then runs…but no 
NSApplicationLaunchUserNotificationKey in the notification.
NSConcreteNotification 0x612555d0 {name = 
NSApplicationDidFinishLaunchingNotification; object = ; userInfo = {
NSApplicationLaunchIsDefaultLaunchKey = 0;
}}

I am debugging the launch by using XCode's "Wait for executable to be launched" 
option in the scheme, then tapping on my notification to launch the app.
 
There is no info in the console.
 
The notification being scheduled is:
 { title: "Test" informativeText: "9:55 PM" 
actionButtonTitle: "Snooze" next delivery date: 2015-02-26 04:54:47 + }

I am using 10.10 action item (snooze options). I’ve Googled this with no luck. 
My only guess was that there was something in the notification that wasn’t 
decodeable…but I’ve checked every property of the notification just to be sure 
I didn’t do something stupid and its all good. 

So…does anyone have ideas where to go from here?
___

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

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 prevent app activation on NSUserNotification action

2015-02-26 Thread Alex Kac
If my app is currently hidden and a user notification occurs and the user taps 
on the action button (in my case "Snooze"); how do I prevent the app from 
coming to the foreground? If the user hits Snooze I don't want the app to come 
to the foreground. I put a breakpoint on all my show window methods or 
what-not, none of them are being called - only the didActivate method of 
notification.





___

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

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: UIColor in CoreData database into NSColor

2015-02-20 Thread Alex Kac
Since we’ll be changing future databases to store the data as our own “PIColor” 
that can be made into an NSColor/UIColor, the issue isn’t all that important 
for long/term/future - but simply backups made already from the last 5 years.

So if there is a way that we can get it working 9 times out of 10 - just to 
convert backups - then I’m OK with that.

> On Feb 20, 2015, at 2:48 PM, Quincey Morris 
>  wrote:
> 
> On Feb 20, 2015, at 11:15 , Alex Kac mailto:a...@webis.net>> 
> wrote:
>> 
>> So with that in mind, has anyone tackled a conversion process of reading in 
>> UIColor data into NSColor via CoreData?
> 
> I suspect that *really* solving this is going to be impossible.
> 
> When you say “UIColor data”, do you mean the data resulting from archiving a 
> UIColor object, or did you use something else to put it in the CoreData 
> store? If it’s archived, you could try following the suggestion in the last 
> response in this thread:
> 
>   
> http://stackoverflow.com/questions/3292836/create-uicolor-from-nscolor-data 
> <http://stackoverflow.com/questions/3292836/create-uicolor-from-nscolor-data>
> 
> That is to say, treat the raw data as a string, and then pick the components 
> out of the string.
> 
> The trouble you’re going to have is that a UIColor may not always be 
> represented as components, since some standard colors may have an arbitrary 
> enum—is representation. You also have to deal with possible alternate 
> representations that might have been saved by the iOS app running on older 
> versions of iOS. Even if you have components, you really need to match 
> colorspaces as well.
> 
> This makes me think you can get as far as getting NSColors that are at least 
> similar to the UIColors, though sometimes they may not be exactly the same.
> 

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

UIColor in CoreData database into NSColor

2015-02-20 Thread Alex Kac
We have a CoreData database on iOS that we want our users to be able to restore 
in our OS X app from backups. It uses UIColor while our desktop app uses 
NSColor for now. The correct method for us is to save our color info in a 
non-platform specific way…but people have database backups where its going to 
stay a UIColor - its a backup and we can’t go and change those.

So with that in mind, has anyone tackled a conversion process of reading in 
UIColor data into NSColor via CoreData?
___

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

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: licence key validation method

2015-01-12 Thread Alex Kac
We just implemented a bunch of license code in our upcoming app and we went 
with CocoaFob. I updated it a bit as I don’t think its been updated in a bit, 
but honestly its not hard. The foundation of the code is good, so it works. 
Just my two cents.

> On Jan 12, 2015, at 7:09 AM, Roland King  wrote:
> I’m sure it all helps. I don’t know the answer here but I am trying to ask 
> questions which might point to a solution. 
> 
> 

Alex Kac - President and Founder
Web Information Solutions, 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

Re: NSImage glowing

2014-11-06 Thread Alex Kac
Thank you guys. This has helped a lot. I have a much better understanding of 
this now.

> On Nov 5, 2014, at 7:40 PM, Lee Ann Rucker  wrote:
> 
> 
> On Nov 5, 2014, at 5:53 PM, Wim Lewis  wrote:
> 
>> 
>> On Nov 5, 2014, at 3:43 PM, Alex Kac  wrote:
>>> BUT, in this case I’m just trying to get the glow on selected images, so 
>>> when I look at the code below all I see is that we’re getting the bitmap 
>>> and drawing it. I’m not understanding how that gets a glow.
>> 
>> 
>> It’s applied by NSButtonCell, which knows that if it’s in the selected state 
>> and its image is marked as a template image (or some set of conditions like 
>> that), then it should apply the glow when drawing.
>> 
>> I take it you’re trying to get this effect in some place other than inside a 
>> button? It’s not unreasonable to use an NSCell instance elsewhere— that’s 
>> essentially what cells are for, to abstract away some of the drawing 
>> behavior from the control view that uses them.
>> 
>> I think NSButtonCell uses NSSetFocusRingStyle() to provide the actual 
>> effect, but there may be additional magic in there.
> 
> If it's the blue that toolbar buttons apply to template images, it's not 
> using that - I don't know what it is, but they were only fuzzy in the first 
> OS that used them, and even then they used something else. There's also an 
> etched effect it gets, depending on which OS you're in. I sent Alex a sample 
> app that puts everything together.
> 
> But yes, for fuzzy blue around an icon, all you have to do is call 
> NSSetFocusRingStyle before drawing it. This doesn't change the icon colors, 
> though.
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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.

"I am not young enough to know everything."
--Oscar Wilde





___

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

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: NSImage glowing

2014-11-05 Thread Alex Kac
Yeah, I need to look at that original message. I’ve been doing iOS stuff for 
years and so OS X stuff is a bit foreign to me. I only hit the OS X stuff 
intermittently - i.e. when my team needs some specific UI stuff which is ironic 
in a way. We’re all iOS developers learning OS X.

So, can you help me understand what the below code does? So I have this class:

@interface MiniTabBarButton : NSButton

@property(strong) NSTabViewItem *tabViewItem;

@end

and we create the button:

NSImage* iconImage = [(id )tabViewItem.identifier icon];
[iconImage setTemplate:YES];
newButton.image = iconImage;

So with that in mind, remember I don’t even really know what NSButton provides 
(again, I understand UIButtons really well - and I do have some understanding 
of NSButton custom drawing to some degree as I did write a subclass for the 
checkbox style:
@interface CalendarFilterCheckbox : NSButtonCell

BUT, in this case I’m just trying to get the glow on selected images, so when I 
look at the code below all I see is that we’re getting the bitmap and drawing 
it. I’m not understanding how that gets a glow.

Sorry for being dense, but I do learn quickly. I just am like a blind man at 
first.

> On Nov 4, 2014, at 12:48 PM, Lee Ann Rucker  wrote:
> 
> If you want the same blue highlight that NSButton applies to template images, 
> you can get the NSButtonCell to draw it into a graphics context and get an 
> image that way - I answered this when you asked about buttons specifically 
> back in June. (My bug requesting an NSImage method to do that is still open 
> and presumably unloved) Once you've got your buttonCell configured, do this:
> 
> 
>   NSRect bounds = NSZeroRect;
>   bounds.size = [template size];
> 
>   NSBitmapImageRep *bmpImageRep =
>  [NSBitmapImageRep imageRepWithSize:bounds.size scale:scale]; // Utility 
> wrapper around imageRepWith32bitBuffer
> 
>   [NSGraphicsContext saveGraphicsState];
>   NSGraphicsContext *bitmapContext =
>  [NSGraphicsContext graphicsContextWithBitmapImageRep:bmpImageRep];
>   [NSGraphicsContext setCurrentContext:bitmapContext];
> 
>   [buttonCell drawImage:template withFrame:bounds inView:nil];
> 
>   [NSGraphicsContext restoreGraphicsState];
>   return bmpImageRep;
> 
> 
> On Nov 4, 2014, at 10:41 AM, Alex Kac  wrote:
> 
>> I have an NSImage that looks like  in a mini-toolbar - kind of like Xcode. 
>> 
>> Now of course I can just create a hand-drawn selected version, but I like 
>> doing things like that in code. So I’d like to have code that takes the 
>> NSImage and makes it glow like Xcode here:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.dropbox.com_s_by642iw7xosnki7_Screenshot-25202014-2D11-2D04-252011.40.18.png-3Fdl-3D0&d=AAIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=ie7S-J__EKnfyVOBV7-jV2rZ--p47O6vkyTklpDM3h4&m=lUNK2PEwQXtoqjBGMWU6Y3iSwSvLFO0mx-2wI6kiSNg&s=PSrnj94BQRWKM8dFv5gi7Tz3a3NH1_5gmiUvJHsFfP4&e=
>>  
>> 
>> I’ve Googled this and I see a bunch of stuff, that I can’t get working at 
>> all. Most articles were for iOS and some repsonders even said “if I was 
>> using an NSImage, this would be easy - but for iOS you do…”. 
>> 
>> So… can anyone point me to the right place?
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> 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://urldefense.proofpoint.com/v2/url?u=https-3A__lists.apple.com_mailman_options_cocoa-2Ddev_lrucker-2540vmware.com&d=AAIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=ie7S-J__EKnfyVOBV7-jV2rZ--p47O6vkyTklpDM3h4&m=lUNK2PEwQXtoqjBGMWU6Y3iSwSvLFO0mx-2wI6kiSNg&s=QsN7f2Wy2w3J4nIWtViq9WfFRo-Fwf46hQqveR8coB0&e=
>>  
>> 
>> This email sent to lruc...@vmware.com
> 

Alex Kac - President and Founder
Web Information Solutions, Inc.
"To educate a person in mind and not in morals is to educate a menace to 
society."
-- Theodore Roosevelt







___

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

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

NSImage glowing

2014-11-04 Thread Alex Kac
I have an NSImage that looks like  in a mini-toolbar - kind of like Xcode. 

Now of course I can just create a hand-drawn selected version, but I like doing 
things like that in code. So I’d like to have code that takes the NSImage and 
makes it glow like Xcode here:
https://www.dropbox.com/s/by642iw7xosnki7/Screenshot%202014-11-04%2011.40.18.png?dl=0

I’ve Googled this and I see a bunch of stuff, that I can’t get working at all. 
Most articles were for iOS and some repsonders even said “if I was using an 
NSImage, this would be easy - but for iOS you do…”. 

So… can anyone point me to the right place?

___

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

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

Toolbar icons, yosemite

2014-10-18 Thread Alex Kac
I’m learning about toolbar buttons/icons on Yosemite (probably not much 
different than before, but…I’m an iOS guy so its new for me). I have a few 
basic, 101-style questions that I hope somebody can point me to the right place 
for:

1. How do you do a popup menu button like the sidebar icon within Preview or 
other system apps?
https://www.dropbox.com/s/37ec5us2f91j0k3/Screenshot%202014-10-18%2016.12.49.png?dl=0

2. Does anyone have a good set of assets either free or for purchase for 
non-system provided, but standard icons like the sidebar icon used in Preview 
and in other places throughout OS X?
___

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

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: NSOutlineView not lazy when expanding items :(

2014-09-16 Thread Alex Kac
Just wait - next year we’ll have a “Modern AppKit” rewritten for Swift and to 
be more like UIKit. I keep hoping.

> On Sep 16, 2014, at 5:48 PM, Jerry Krinock  wrote:
> 
> Weird that here we are with the Apple Watch and Swift, and old NSOutlineView 
> still doesn’t work as it should.

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

"I am not young enough to know everything."
--Oscar Wilde





___

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

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: NSUserDefaultsController in a NIB when not using standardUserDefaults

2014-09-08 Thread Alex Kac
Thanks. I’ll let you know when I can try it out later tonight.

> On Sep 8, 2014, at 3:40 PM, Jerry Krinock  wrote:
> 
> 
> On 2014 Sep 08, at 11:09, Alex Kac  wrote:
> 
>> Is there a better way?
> 
> How about redirecting standardUserDefaults, by sending it -addSuiteNamed: and 
> -removedSuiteNamed: during launching?
> ___


___

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

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: NSUserDefaultsController in a NIB when not using standardUserDefaults

2014-09-08 Thread Alex Kac
Hi Alex. Xcode will also complain if you don’t call super. You must call super 
and assign it to self…but then it seems that you are free to re-assign self - 
which I kinda get - the parent class might be doing important stuff in 
super…maybe there’s a more primitive init method I can override.

Ideally though, we don’t even do this. Ideally, there is a better way to handle 
a custom suite for bindings with a NIB.


> On Sep 8, 2014, at 1:15 PM, Alex Zavatone  wrote:
> 
> Stupid question, but what happens if you don't assign the first self to the 
> result of the call, but just call [super initWithCoder: coder]?
> 
> Do you need the result of that call, since you immediately override it?
> 
> 
> Sent from my iPad
> 
> On Sep 8, 2014, at 2:09 PM, Alex Kac  wrote:
> 
>> This feels like there should be an easy answer...
>> 
>> We are no longer using standardUserDefaults since we want to someday offer a 
>> widget for our app that will require accessing our app's preferences..so 
>> we're using NSUserDefaults with a custom suiteName.
>> 
>> *The question is*:  in the NIBs for our Preference panes, we had various UI 
>> elements bound to NSUserDefaultsController.  The normal 
>> NSUserDefaultsController in IB is set to only use standardUserDefaults.  Is 
>> there any way to have it use our userdefaults instead?
>> 
>> I did come up with one way - but I don't I love it.  I made a subclass of 
>> NSUserDefaultsController and in the initWithCoder method, I tell it to use 
>> our defaults...of course, I have to first call super or else I'll get a 
>> compiler warning (which feels like a waste and causes me to re-assign 
>> self)...so here's what I have now:
>> 
>> - (instancetype)initWithCoder:(NSCoder *)coder
>> {
>>self = [super initWithCoder: coder]
>>self = (MyUserDefaultsController *)[[NSUserDefaultsController alloc] 
>> initWithDefaults: myUserDefaults initialValues:nil];
>> 
>>return self;
>> }
>> 
>> 
>> Is there a better way?
>> 
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> 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

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

My wife and I do a lot of things together including Halo 3 and firearm 
training. She's awesome.








___

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

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

NSUserDefaultsController in a NIB when not using standardUserDefaults

2014-09-08 Thread Alex Kac
This feels like there should be an easy answer...
 
We are no longer using standardUserDefaults since we want to someday offer a 
widget for our app that will require accessing our app's preferences..so we're 
using NSUserDefaults with a custom suiteName.
 
*The question is*:  in the NIBs for our Preference panes, we had various UI 
elements bound to NSUserDefaultsController.  The normal 
NSUserDefaultsController in IB is set to only use standardUserDefaults.  Is 
there any way to have it use our userdefaults instead?
 
I did come up with one way - but I don't I love it.  I made a subclass of 
NSUserDefaultsController and in the initWithCoder method, I tell it to use our 
defaults...of course, I have to first call super or else I'll get a compiler 
warning (which feels like a waste and causes me to re-assign self)...so here's 
what I have now:
 
- (instancetype)initWithCoder:(NSCoder *)coder
{
 self = [super initWithCoder: coder];
 self = (MyUserDefaultsController *)[[NSUserDefaultsController alloc] 
initWithDefaults: myUserDefaults initialValues:nil];

 return self;
}

 
Is there a better way?


___

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

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

Looking for OS X 10.9 and above contract developer with immediate availability

2014-07-06 Thread Alex Kac
Hey guys! We’re in need of an experienced OS X UI developer who is fluent with 
Core Animation and creating custom views. Some background first. 

We have been working on a desktop port of our iOS app for awhile, but because 
we are a very small team we also get a lot of distractions so we’re not getting 
there as fast as we’d like. Plus we’re spending a lot of time just trying to 
figure out things that an experienced OS X developer probably knows already. 

We are looking for someone to help us out in the following areas:
Some major pieces like:

1) Build out our custom Day View for our app - one that we’d normally build 
using a UICollectionView and a custom flow layout on iOS. This includes some 
custom drawing, custom views coordinated with keyboard/mouse interaction, drag 
and drop, editing of the elements on screen by dragging handles, a never-ending 
horizontal scroll by column, etc..
2) Help us finish out some of our popover editors. 
3) Adding spotlight search and building out or own search pane
4) Printing
5) Our Today View panels that live in our sidebar
6) Helping us get our map functionality working in the editors and other 
places. This includes picking locations in the location field of the editor 
(auto-complete) via Apple’s location searches, map editors to pick locations, 
and to show a map of a specific day’s events and their locations

Some small things like :
1) We’re using custom checkboxes, but we don’t want to lose the Yosemite look 
of a custom animation when you check/uncheck the box.
2) Status items with global hotkeys
3) Some code review to make sure we’re doing things right

We haven’t moved to Swift/Xcode 6 yet and we’re open to Swift in the future, 
but not with our tight deadlines just yet. We are Mavericks + only.

We’ve got a budget and a timeline in mind, and we’re looking for someone who 
has immediate availability and time to knock these items out over the next 4-6 
weeks. Cost and time are based in what we can fit into our budget. We’ve been 
talking to a couple developers already, but we want to make sure we find the 
right one. Another thing that’s important to us is that you fit how we work. 
We’re iterative, so we like to see, adjust, see, adjust. We’re not great with 
super detailed specs so asking us questions on details you come up with, and 
again - being iterative - is important to us. Sometimes we find the best ideas 
as we’re working with our designs in real-time. 

If you’re interested - please email me directly at alex_...@mac.com or 
a...@webis.net - and I can share a lot more details with you. Make sure to let 
me know your location (its nice to know timezone differences), availability, 
and your hourly rate. We’re estimating about 140-200 hours for this job. Sample 
code, projects, or App Store apps you’ve written or were majorly involved in 
would be nice references.



___

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

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

NSButton, Templates, images…

2014-06-24 Thread Alex Kac
I’m sure I’m missing something simple. Reading the docs, reading some 
stack-overflow comments, and a few posts on this list from years ago, it seems 
like I am missing something.

I have an NSButton with an image. I’d like to have the button look etched when 
unselected - and tinted blue when selected just like the Xcode mini-tabbar here:
https://www.dropbox.com/s/b1f9kxe5ww25ep7/Screenshot%202014-06-24%2016.24.55.png

I’m doing this in code, not in IB. I’m using an NSButton subclass:
[self setButtonType: NSToggleButton];
[self setBordered: NO];
[self setTitle: @""];
[self.cell setImageScaling: NSImageScaleProportionallyDown];
self.bezelStyle = NSShadowlessSquareBezelStyle;
self.focusRingType = NSFocusRingTypeNone;


And on the image, we’re setting the setTemplate:YES property on it. 
[iconImage setTemplate:YES];

According to several posts on this list, a bezel-less NSButton that’s a toggle 
button, should give me what I’m looking for, but its not. The obvious other 
option is to just create an alternate image…which I’m not against, but it just 
seems like it would be better to use a built-in system if one exists - or does 
one?

___

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

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 app restarting from screen one. Why?

2014-06-19 Thread Alex Kac
Recently I hit the same issue. It was working just fine one day, and then the 
next - every app from Mail to Safari to 3rd party apps - all were losing their 
UI state when I’d switch between them. On an iPhone 5s. Reboot fixed it for now.

On Jun 19, 2014, at 5:19 AM, Jonathan Hull  wrote:

> My guess would be that Jens is correct.  Your app is likely being killed by 
> the system while it is in the background. I tend to run a lot of apps at once 
> and switch between them often, so I run into this all the time.  
> 
> When your app is backgrounded, you should save your UI state and restore it 
> when you get relaunched.  It will appear to the user as if the app was 
> running the whole time.
> 
> Thanks,
> Jon
> 

Alex Kac - President and Founder
Web Information Solutions, 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

Re: Simple question? NSButton/checkbox color

2014-06-06 Thread Alex Kac
We’re a calendar app. Look at Apple’s calendar app :) 
https://www.dropbox.com/s/n2pizcdjsuzlk51/Screenshot%202014-06-06%2010.33.40.png

That said, I’m not sold on the idea that this is the best way either…I have 
other ideas that I think are better than what Appel does, but as a last resort 
we want to follow what they did.

On Jun 6, 2014, at 10:30 AM, Quincey Morris 
 wrote:

> OTOH, I can’t help saying that colorizing checkboxes doesn’t sound like a 
> fruitful approach to UI design.


___

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

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: Simple question? NSButton/checkbox color

2014-06-06 Thread Alex Kac
That was the way I was expecting to have to go. I just wanted to make sure I 
wasn’t missing a better way since right now my AppKit knowledge/experience is 
pretty thin.

On Jun 6, 2014, at 2:05 AM, Lee Ann Rucker  wrote:

> There's no supported way to do it and never has been; back in the day when 
> Java's compatibility test had a "set button color", the MacLookAndFeel got an 
> exemption because it's just not possible.
> 
> If you look in the Calendar app bundle it has grayscale checkbox images, 
> which they probably colorize with code specific to Calendar - so even Apple 
> is "using images to mimic the UI" - and since it's specific to the OS it 
> ships with, it doesn't have to worry about mismatches if it runs on a 
> different one.
> 
> 
> - Original Message -
> From: "Alex Kac" 
> To: "SevenBits" 
> Cc: "Cocoa-Dev" 
> Sent: Thursday, June 5, 2014 10:42:48 PM
> Subject: Re: Simple question? NSButton/checkbox color
> 
> OK maybe I’m not being clear. We need to have a checkbox that can be colored, 
> exactly the same way that the Calendar app on both color their checkboxes for 
> the calendar they are representing. Right now the only way I can think of 
> doing that is to create a checkbox image, and color it, and use that. 
> Obviously if we do that, we have to have different images for Mavericks and 
> Yosemite. So we have to mimic Yosemite. 
> 
> I’d prefer NOT to have to create mimicked checkbox images. That’s what I’m 
> trying to prevent. I’m asking all the AppKit gurus here if there is a better 
> way, a more proper way, to color a checkbox control without having to use 
> images to mimic the UI of the OS we’re running on.
> 
> On Jun 5, 2014, at 6:38 PM, SevenBits  wrote:
> 
>> On Jun 5, 2014, at 8:32 PM, Alex Kac  wrote:
>> 
>>> I’m still learning AppKit after many years on iOS :)
>>> 
>>> Given an NSButton based checkbox…what’s the best way to get a colored 
>>> check? I think we’re just going to have to use a custom image that we 
>>> create - which is fine just annoying as we’ll also have to match Yosemite - 
>>> but if there is a better way, I’m all for it. 
>> 
>> Why mimic Yosemite? Just use the pre-Yosemite look on < 10.10, and the 
>> Yosemite theme on >= 10.10.
>> 
>> It’ll be great to have this new interface be implemented as an NSAppearance, 
>> so our apps that use custom drawing can fall back on a legacy appearance if 
>> the Yosemite look is not supported yet. Anyone know how this new-UI issue 
>> will be handled? Without breaking NDA, could someone indicate if this is 
>> like iOS 7, where the interface you get depends on the toolkit you link 
>> against.
>> 
> 
> Alex Kac - President and Founder
> Web Information Solutions, Inc.
> 
> “Don't forget until too late that the business of life is not business but 
> living.”
> -- B.C. Forbes,
> 
> 
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.com&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0A&m=DShi9mvJqH2rPq9TzcpBlepgV0kKVHzLB5ubcAwsMow%3D%0A&s=4b6656ae3389e22b2997323ad779cf16443c5361290c42a0ad26132f4ccd6b5f
> 
> This email sent to lruc...@vmware.com

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

"The person who is not hungry says that the coconut has a hard shell."
-- African Tribal Saying







___

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

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: Simple question? NSButton/checkbox color

2014-06-05 Thread Alex Kac
OK maybe I’m not being clear. We need to have a checkbox that can be colored, 
exactly the same way that the Calendar app on both color their checkboxes for 
the calendar they are representing. Right now the only way I can think of doing 
that is to create a checkbox image, and color it, and use that. Obviously if we 
do that, we have to have different images for Mavericks and Yosemite. So we 
have to mimic Yosemite. 

I’d prefer NOT to have to create mimicked checkbox images. That’s what I’m 
trying to prevent. I’m asking all the AppKit gurus here if there is a better 
way, a more proper way, to color a checkbox control without having to use 
images to mimic the UI of the OS we’re running on.

On Jun 5, 2014, at 6:38 PM, SevenBits  wrote:

> On Jun 5, 2014, at 8:32 PM, Alex Kac  wrote:
> 
>> I’m still learning AppKit after many years on iOS :)
>> 
>> Given an NSButton based checkbox…what’s the best way to get a colored check? 
>> I think we’re just going to have to use a custom image that we create - 
>> which is fine just annoying as we’ll also have to match Yosemite - but if 
>> there is a better way, I’m all for it. 
> 
> Why mimic Yosemite? Just use the pre-Yosemite look on < 10.10, and the 
> Yosemite theme on >= 10.10.
> 
> It’ll be great to have this new interface be implemented as an NSAppearance, 
> so our apps that use custom drawing can fall back on a legacy appearance if 
> the Yosemite look is not supported yet. Anyone know how this new-UI issue 
> will be handled? Without breaking NDA, could someone indicate if this is like 
> iOS 7, where the interface you get depends on the toolkit you link against.
> 

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

“Don't forget until too late that the business of life is not business but 
living.”
-- B.C. Forbes,





___

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

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

Simple question? NSButton/checkbox color

2014-06-05 Thread Alex Kac
I’m still learning AppKit after many years on iOS :)

Given an NSButton based checkbox…what’s the best way to get a colored check? I 
think we’re just going to have to use a custom image that we create - which is 
fine just annoying as we’ll also have to match Yosemite - but if there is a 
better way, I’m all for it. 

Something like this:
 

is what I’m after. 


___

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

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: ARC Retain Cycles

2014-04-26 Thread Alex Kac
At least for me, I do think in terms of how autorelease works. Its second 
nature. The moment I see a loop of any kind, I think about a temporary pool of 
objects and if I should do something about it. I just simply have no issues 
with autorelease and think of it as a great feature that I use with or without 
ARC. 

You’re a programmer - you’re supposed to know what happens under the hood. 
That’s part and parcel of developing good, optimized software.

On Apr 26, 2014, at 11:32 AM, Dave  wrote:

> If the OS didn’t allocate autoreleased objects there wouldn’t be a problem at 
> all, it does though so it becomes neccessary to have to worry about cleaning 
> up after the OS.! You can twist the language any way you like, but the 
> problem is autorelease, not anything else. 
> 
> Autorelease is really the pits IMO, use it at your peril, it’s just a shame 
> the OS pollutes an otherwise well *managed* memory scheme. 
> 
> Before I converted to ARC and merged in some code, it worked without any 
> drains and didn’t use 150 MB. The introduction or side effect autorelease 
> behind the scenes caused an otherwise fine loop into a memory hogger. Using 
> auto release caused me to have to profile the app carefully and find the 
> problem. This probably took 1 to 1.5 days to do, if the OS didn’t use 
> autorelease, I wouldn’t have had to spend that time finding and cleaning up 
> after the OS!
> 
> Really, what OS other, makes you clean up after it?

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

My wife and I do a lot of things together including Halo 3 and firearm 
training. She's awesome.








___

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

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 navigation bar height

2014-04-16 Thread Alex Kac
topLayoutGuide is what you want.

https://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/topLayoutGuide

The topLayoutGuide property comes into play when a view controller is frontmost 
onscreen. It indicates the highest vertical extent for content that you don't 
want to appear behind a translucent or transparent UIKit bar (such as a status 
or navigation bar). This property implements the UILayoutSupport protocol and 
you can employ it as a constraint item when using the NSLayoutConstraint class.

The value of this property is, specifically, the value of the length property 
of the object returned when you query this property. This value is constrained 
by either the view controller or by its enclosing container view controller 
(such as a navigation or tab bar controller), as follows:

• A view controller not within a container view controller constrains 
this property to indicate the bottom of the status bar, if visible, or else to 
indicate the top edge of the view controller's view.
• A view controller within a container view controller does not set 
this property's value. Instead, the container view controller constrains the 
value to indicate:
• The bottom of the navigation bar, if a navigation bar is 
visible
• The bottom of the status bar, if only a status bar is visible
• The top edge of the view controller’s view, if neither a 
status bar nor navigation bar is visible
If a container navigation controller’s navigation bar is visible and opaque, 
the navigation controller lays out the frontmost view controller’s view so its 
top edge abuts the bottom of the navigation bar. In this case, the value of 
this property is 0.

Query this property within your implementation of the viewDidLayoutSubviews 
method.


On Apr 16, 2014, at 8:30 PM, ico  wrote:

>   1.
> 
>   UINavigationController will alter the height of its UINavigationBar to
> --
> 
> My problem is, I have a UITabBarController with 3 tabs, and each tabs is a

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

"Champions aren't made in the gyms. Champions are made from something they have 
deep inside of them - a desire, a dream, a vision. They have last-minute 
stamina, they have to be a little faster, they have to have the skill, and the 
will. But the will must be stronger than the skill." 
-- Muhammad Ali






___

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

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: NSLayoutManager subclass - change the bounds of an attributed string

2014-03-22 Thread Alex Kac
So I tried this…and didn’t do anything. 

On Mar 23, 2014, at 12:15 AM, Alex Kac  wrote:
> 
> My best guess is 
> - (CGRect)boundingRectForGlyphRange:(NSRange)glyphRange 
> inTextContainer:(NSTextContainer *)container;


___

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

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

NSLayoutManager subclass - change the bounds of an attributed string

2014-03-22 Thread Alex Kac
I’m learning here as I go using TextKit on iOS (and soon for OS X). I’ve 
created an attributed name for an NSAttributedString that essentially i want 
drawn as a background rounded rect for the text in the attributed string. To do 
this I’ve subclasses NSLayoutManager and used that for UITextView. And it works 
fine in general. 

https://www.dropbox.com/s/l7j3wbnaz4r7coi/Screenshot%202014-03-23%2000.11.32.png

However the problem of course is that I’d like the bounds of the text when 
using this attribute to increase so that it looks nicer. Now I’m a bit lost. 
I’m unsure if I’m supposed to subclass other methods in NSLayoutManager to do 
this, or if I’m to do something else. I’m not totally sure what to search for 
in the docs.

My best guess is 
- (CGRect)boundingRectForGlyphRange:(NSRange)glyphRange 
inTextContainer:(NSTextContainer *)container;

but some pointers would be nice :)




___

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

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: UIButton issue in ios7.1/xcode5.1

2014-03-20 Thread Alex Kac
Correct. We have a RADAR and a test project showing this same problem. 

The problem occurs only on iOS 7.1 and only when using the 7.1 SDK. My guess is 
that its an optimization gone bad. I’ve re-read the docs multiple times and 

1) I think you are correct. 
2) The workaround I use is ugly - I just loop through my buttons and set their 
selected and normal text to be the same.
3) Because iOS checks against what SDK you built against and uses different 
behaviors depending.

On Mar 20, 2014, at 1:19 PM, David Brittain  wrote:

> I am seeing an issue in our app where setTitle:forState: is not
> working when a UIButton is in the selected state (the same happens
> with setImage:forState:). Specifically I am calling:

…

> So, a few questions:
> - am I correct that I should not have to call  [self.button
> setTitle:@"New name" forState:UIControlStateSelected];
> - any suggestions for workarounds?
> - any ideas how this could happen when building with xcode 5.1 but not
> xcode 5.0?
> 

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: secure uitextfield is not secure

2014-03-05 Thread Alex Kac

On Mar 5, 2014, at 3:05 PM, Luther Baker  wrote:

>> The only way to find out is to file a radar and see what comes out in iOS
> 8.
> 
> How very sad ... there should really be no way I could influence Apple in
> this regard. IE: this isn't some elaborate, hard to define bug. This better
> not be an accident that requires energy from someone as insignificant as me
>  to ask that secure text fields not echo their contents in Plaintext.

Filing a bug *is* how you influence Apple. Or, buy a few million shares. Or 
become a head of engineering. I mean seriously, if everyone had the same amount 
of influence, then iOS would be Android.

> I guess its no big deal when you think of the naive device use case - where
> someone could simply watch your fingers type on the virtual keyboard ...
> but demos are often on mirrored devices or sometimes use hardware keyboards
> or are fired up the simulator and displayed on the big screen as the team
> watches in earnest to see the week's progress.

Perhaps a good bug report is that the user’s screen works the same way it does 
now, but if its mirrored - then the mirrored screen keeps he password hidden. 
That would be a good use case. 

> 
> Again, I'm OK with it. I like writing custom controls. Just find it
> interesting ... there has to be _some_ reason we haven't uncovered yet :)
> Wanted to see if anyone had an elegant solution or if I'd missed something
> in the API.

The good reason was already provided - MOST people cannot enter a password on a 
soft keyboard without seeing the character they just pressed.
___

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

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: Preferences caching?

2013-11-27 Thread Alex Kac
While I agree that sometimes deleting a prefs file is useful, its not really a 
good idea - never was. Its still asking the user to muck around app internals. 
The fact that mavericks now caches really shouldn’t matter. 

I think if deleting your prefs file is a common case, or even somewhat common, 
or used at all - then yes, its far more appropriate for you to have a button. 
Asking the user to trawl through internal implementation details of the system 
was never a good idea.

So in this case, I think Apple is doing the right thing.

On Nov 27, 2013, at 12:27 PM, Graham Cox  wrote:

> 
> On 27 Nov 2013, at 8:18 pm, David Duncan  wrote:
> 
>> The preferences file has always been considered an implementation detail. 
>> I'm not up on all the reasons for the change, but you should be able to use 
>> the 'defaults' command line tool to do the same thing that trashing prefs 
>> used to do. Something like 'defaults delete com.yourcompany.yourapp' should 
>> do the trick.
> 
> 
> Great. For me. For users in the field, the command line is the badlands, and 
> we can’t expect many users to be comfortable doing that. Trashing a file is 
> at least something they can understand, even if sometimes even that can be an 
> ordeal getting them to the ~/Library/Preferences folder, now it’s hidden by 
> default.
> 
> Really, Apple are supposed to be the champions of the average user aren’t 
> they? Have they talked to any recently? Honestly, it would serve everyone 
> well if every developer served a month in a call centre.
> 
> I guess we’re going to have to put a button somewhere that’s going to do this 
> for them. Sigh.
> 
> ―Graham

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

"If at first you don't succeed, skydiving is not for you."
-- Francis Roberts






___

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

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 Storyboard - on boarding - skip

2013-10-19 Thread Alex Kac
I’ve considered that as my last resort - I’m not against code as I normally do 
most of my work in code and don’t use NIBs as much as I probably should - but 
I’m trying to see what is possible via storyboards and a bit of code. 

On Oct 18, 2013, at 9:44 PM, Richard Heard  wrote:

> Seems like a case where it would make more sense to push the controllers 
> explicitly.
> ie: 
> 
> YNYourNextStepViewController *vc = [self.storyboard 
> instantiateViewControllerWithIdentifier:YNYourNextStepViewControllerIdentifier];
> [self.navigationController presentViewController:vc animated:YES 
> completion:nil];
> 
> I find that Storyboards quickly regress to string based programming for 
> anything out of the ordinary flow and avoid them whenever i can.  
> -Richard
> 
> On 18 Oct 2013, at 6:07:41 PM, Alex Kac  wrote:
> 
>> Howdy guys. I am looking for some advice. I have an on boarding process that 
>> asks for permissions from the user for things like contacts, location, 
>> etc…where each page describes why we’re asking and then asks the user to 
>> enable access. It works wonderfully and really makes everything far simpler. 
>> Now to the problem: we show these pages even if the user already has given 
>> us access. Why/how would this happen? If a user uninstalls/reinstalls is one 
>> good example.
>> 
>> What I’d like to do is simply skip over a VC/page in the storyboard if the 
>> user has already permitted access. This is where I’m unsure what to do. I’ve 
>> tried creating a custom no-animation push segue, and on viewDidAppear 
>> performing the segue (I also tried viewWillAppear, but it doesn’t work). The 
>> problem is that this only works for one page, and two it looks weird showing 
>> the original page and then bam - the others just show up. Using an animation 
>> looks weird too.
>> 
>> Creating a segue for every permutation is just an exercise in frustration. 
>> 
>> I’m not a storyboard expert by any means having been using them lightly over 
>> the last few months. I’d love a little bit of experienced guidance on the 
>> best way to handle this that keeps the storyboard flow for the default user 
>> since the point of using the SB was to see the flow visually AND keep typed 
>> code down.
>> 
>> Screenshot:
>> https://www.dropbox.com/s/h96by0uc5yl7lnx/Screenshot%202013-10-18%2019.00.33.png
>> 
>> 
>> 
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> 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/heardrwt%40gmail.com
>> 
>> This email sent to heard...@gmail.com
> 

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

"The person who is not hungry says that the coconut has a hard shell."
-- African Tribal Saying






___

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

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 Storyboard - on boarding - skip

2013-10-18 Thread Alex Kac
Howdy guys. I am looking for some advice. I have an on boarding process that 
asks for permissions from the user for things like contacts, location, 
etc…where each page describes why we’re asking and then asks the user to enable 
access. It works wonderfully and really makes everything far simpler. Now to 
the problem: we show these pages even if the user already has given us access. 
Why/how would this happen? If a user uninstalls/reinstalls is one good example.

What I’d like to do is simply skip over a VC/page in the storyboard if the user 
has already permitted access. This is where I’m unsure what to do. I’ve tried 
creating a custom no-animation push segue, and on viewDidAppear performing the 
segue (I also tried viewWillAppear, but it doesn’t work). The problem is that 
this only works for one page, and two it looks weird showing the original page 
and then bam - the others just show up. Using an animation looks weird too.

Creating a segue for every permutation is just an exercise in frustration. 

I’m not a storyboard expert by any means having been using them lightly over 
the last few months. I’d love a little bit of experienced guidance on the best 
way to handle this that keeps the storyboard flow for the default user since 
the point of using the SB was to see the flow visually AND keep typed code down.

Screenshot:
https://www.dropbox.com/s/h96by0uc5yl7lnx/Screenshot%202013-10-18%2019.00.33.png




___

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

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

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

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

Re: Core Data with ODBC databases?

2013-10-17 Thread Alex Kac
Oh I have no need for it. I’m just saying I’ve seen it. My experience with 
databases comes from over 25 years in writing c/s apps using enterprise Oracle, 
SQLServer, etc.. down to transactional local databases such as btrieve. Most of 
my experience in the above comes from the 90s/early 2000s doing c/s apps and 
web apps both using frameworks and bare metal network apps, so I get network 
programming pretty well. However, there are situations where this can work very 
well. Personally, none of my projects have a need for it as while I like CD, I 
would only use something like this in a controlled situation.

On Oct 17, 2013, at 11:36 AM, Kyle Sluder  wrote:

> On Thu, Oct 17, 2013, at 09:04 AM, Alex Kac wrote:
>> YES, that was it. I KNEW I saw a project for this, but couldn’t find it
>> via Google anymore. 
> 
> Please don't use AFIncrementalStore. It's just a bad idea for all the
> reasons that are mentioned in the "Fallacies of Network Programming"
> Jens refers to.
> 
> --Kyle Sluder

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

"There will always be death and taxes; however, death doesn't get worse every 
year."
-- 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: Core Data with ODBC databases?

2013-10-17 Thread Alex Kac
YES, that was it. I KNEW I saw a project for this, but couldn’t find it via 
Google anymore. 

On Oct 17, 2013, at 8:40 AM, Flavio Donadio  wrote:

> Alex,
> 
> 
>> Can’t you use NSIncrementalStore to talk with REST services as a backend for 
>> Core Data? I remember seeing some articles on this.
> 
> 
> That's what AFIncrementalStore/AFRESTClient does. It uses AFNetworking to 
> communicate with the web service:
> 
> https://github.com/AFNetworking/AFIncrementalStore
> 
> 
> Cheers,
> Flavio

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

“Don't forget until too late that the business of life is not business but 
living.”
-- B.C. Forbes,





___

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

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

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

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

Re: Core Data with ODBC databases?

2013-10-16 Thread Alex Kac
Can’t you use NSIncrementalStore to talk with REST services as a backend for 
Core Data? I remember seeing some articles on this.

Yes:
http://sealedabstract.com/code/nsincrementalstore-the-future-of-web-services-in-ios-mac-os-x/
http://stackoverflow.com/questions/17813652/nsincrementalstore-using-local-and-remote-data

I’ve never tried it, but it seems like its been forgotten about.


On Oct 16, 2013, at 4:57 PM, Jens Alfke  wrote:

> 
> On Oct 16, 2013, at 8:24 AM, Flavio Donadio  wrote:
> 
>> So, that's why we need another tier: an application server between the 
>> client and database server, to manage locking and concurrency (among other 
>> things).
>> This is really annoying, as we have to deal with things like web services 
>> (or, even worse, custom protocols), data encoding into structures meant only 
>> for client/server communication (stuff like XML, JSON or whatever).
> 
> It’s inevitable. You can’t safely make a client-server connection over the 
> Internet look like a traditional database connection. They have very 
> different characteristics: reliability, latency, throughput, security. I’m 
> offline right now, but look up “distributed computing fallacies” for a great 
> description of all the ways network requests can get into trouble. So using 
> Core Data to hide the fact that you’re talking to an Internet service would 
> be a bad idea.
> 
> This is why REST APIs (for example) don’t use transactions, send more data at 
> once, have flexible schemas, etc.
> 
>> In cases where a partially connected application is desired, even if you 
>> want to use CoreData in the client, it's still very hard to do. You have to 
>> have two identical models (one for the server, one for the client -- often 
>> in different formats) and keep them in sync as you add/change features to/in 
>> the app. You also have to generate NSManagedObjects from the data you 
>> receive from the app server and save them back when the objects modified. 
>> AFIncrementalStore helps, but it could be even easier.
> 
> Yeah, I don’t think CoreData is the right tool for that kind of job. In my 
> day job I work on a data sync engine (Couchbase Lite) that uses a REST-based 
> transport protocol, and the app API it provides is lower-level than Core 
> Data; but on the other hand it’s a lot simpler. The world the developer sees 
> is one with a local database, one that may change asynchronously as the 
> background replication task pulls in new revisions from the server. This can 
> result in conflicts (just like a “git pull”, say) that need to be resolved. 
> It’s a pretty nice way to work, since it lets you ignore the network and 
> think in terms of JSON objects and revisions instead.
> 
> —Jens
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> 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.
"To educate a person in mind and not in morals is to educate a menace to 
society."
-- Theodore Roosevelt







___

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

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 get a "Normal" button in iOS 7/IB

2013-10-04 Thread Alex Kac
Just my two cents - its not much work at all. Create a UIButton subclass.
Have it use images or code - who cares. Then you just go and change the
classes throughout code to your new subclass.

For 5 apps, should take…30 minutes.

Not supporting iOS 7? OK…


On Fri, Oct 4, 2013 at 4:02 AM, Dave  wrote:

> Hi,
>
> Using the cap approach sounds good, but it's way to much work for these 5
> apps I have to modify. It's all a bit mute now anyway. since I've just come
> out of a meeting and, because of all this Button nonsense (as well as other
> UI issues) we are not going to support iOS 7 for these Apps for a while if
> ever. They work find on iOS 6 and the Users won't be upgrading their pads
> to iOS 7, so it really doesn't matter. I'm pleased because I was dreading
> having to change a *lot* of "Button" code just to get back what we already
> had a few days ago under iOS 6!
>
> Thanks a lot for everyone's time and at least I know how to do it now if
> we ever need to.
>
> All the Best
> Dave
>
> On 4 Oct 2013, at 00:52, Alex Zavatone  wrote:
>
> > The cap approach is something that's supported with a standard button
> and it works really well.
> >
> > FWIW, I've been using it since 1998 with PNGs.  Basically, the approach
> is that you have a PNG graphic that is nicely antialiased and alpha
> channeled.  It consists of a button's left and right caps and a middle
> region that is a stretchable column of pixels.  When making the button, and
> assigning the graphic, you define how many pixels are used in the left and
> right caps and the middle is taken from the middle column of pixels.
> >
> > Make sure to have a graphic that consists of the left, right and middle
> for each state of the button, such as active and clickable/tappable,
> active/over, down, selected, disabled.
> >
> > It works like a charm.  I've even got some of these PNGs if you need to
> try it out on a UIButton.
> >
> > There are more advanced ways to make buttons with gradients by creating
> the image in code, but just creating a set of capped images for the button
> graphics is a pretty easy way to go.
> >
> > Lots of how some frameworks are implemented might not make sense and
> might suck to you.  You'll find that the frameworks are how the frameworks
> are, like it or not.
> >
> > I'm sure that there are loads of custom button classes out there that
> you can find on Github or StackExchange that create buttons in code the way
> you expect.  Whether something like this should be in the UIButton class or
> not, well - it probably should be, but it isn't and it's up to us to see
> how to deal with that.
> >
> > Might be a good little project for a class extension category for you to
> build out.
> >
> >
> > On Oct 3, 2013, at 5:39 PM, Dave wrote:
> >
> >>
> >> On 3 Oct 2013, at 21:13, Fritz Anderson 
> wrote:
> >>
> >>> On 3 Oct 2013, at 2:09 PM, Dave  wrote:
> >>>
> >>>> Sorry, should have said, without using an Image.
> >>>
> >>> Why? Images are how this sort of thing gets done. Anything else is a
> stunt, unless you have some constraint you're not telling us about.
> >>>
> >>> (You're familiar with -[UIImage resizableImageWithCapInsets:] and
> related API?)
> >>>
> >>> I suppose (off the top of my head, not even "written in Mail"), you
> could have a UIButton subclass that returns a CALayer subclass of your
> devising from +layerClass, and have your layer set borders and
> corner-rounding.
> >>
> >> I really don't want to make lots of images just for this and to be
> honest, if a Framework doesn't support an Industry Standard "Button" out of
> the box, then, it sucks!
> >>
> >> Thanks
> >> Dave
> >>
> >>
> >> ___
> >>
> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> >>
> >> Please do not post admin requests or moderator comments to the list.
> >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> >>
> >> Help/Unsubscribe/Update your Subscription:
> >> https://lists.apple.com/mailman/options/cocoa-dev/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/alex%40webis.net
>
> This email sent to a...@webis.net
>



-- 

*Alex Kac - **President and Founder*

*Web Information Solutions, 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

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Alex Kac
Two ways:
1) Use an image.
2) Subclass the button and handle the drawing yourself.


On Thu, Oct 3, 2013 at 12:56 PM, Dave  wrote:

> Hi All,
>
> I want to create a button (UIButton) that actually looks like a button,
> e.g. with a border round, as in iOS <7 is iOS 7, preferably with IB but in
> code otherwise. Which properties do I need to tweak in order to get this?
>
> I've been playing around for a while and can't seem to just get a common,
> all garden, down to earth, no messing around -  Button!!!
>
>
> 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/alex%40webis.net
>
> This email sent to a...@webis.net




-- 

*Alex Kac - **President and Founder*

*Web Information Solutions, 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

Re: iOS Calendar Question

2013-10-02 Thread Alex Kac
Yes it is. That’s why you create a way for it to be something they want to 
enable. When we talked to Apple about this, they gave us some examples from 
other apps that they liked. Here is our version (its a link to an image):

http://www.pocketinformant.com/Forums/index.php?app=core&module=attach§ion=attach&attach_rel_module=blogentry&attach_id=3792

But even so, other apps like Fandango and the Apple Store app just have a 
button “Add to Calendar” and then comes the dialog at that time. It makes sense 
to the user. They mostly don’t say no because they hit “Add to Calendar” and 
then they get a dialog asking for permission.

On Oct 2, 2013, at 12:03 PM, Dave  wrote:

> 
> On 2 Oct 2013, at 18:56, Alex Kac  wrote:
> 
>> To Safari - probably not. You’d have to bring up the document interaction 
>> controller, which would bring up any app that supports ICS - which would 
>> bring up the Calendar app. That would do what you want, but it would also 
>> invoke a lot more UI…which seems like it’d be simpler to just allow access.
> 
> I agree completely, it's just they think that most users would say NO to the 
> bland Alert dialog that is presented to the user, and that if the UI (complex 
> or not) is displayed, then they are more likely so say YES.
> 
> It's a marketing thing! 
> 
> Cheers
> 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/alex%40webis.net
> 
> This email sent to a...@webis.net

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

"If at first you don't succeed, skydiving is not for you."
-- Francis Roberts






___

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

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

2013-10-02 Thread Alex Kac
To Safari - probably not. You’d have to bring up the document interaction 
controller, which would bring up any app that supports ICS - which would bring 
up the Calendar app. That would do what you want, but it would also invoke a 
lot more UI…which seems like it’d be simpler to just allow access.

On Oct 2, 2013, at 11:44 AM, Dave  wrote:

> 
> On 1 Oct 2013, at 18:26, Marcel Weiher  wrote:
> 
>> 
>> On Oct 1, 2013, at 13:02 , Dave  wrote:
>> 
>>> 
>>> http://m.gunwharf-quays.com/whats-on/policing-through-ages
>>> 
>>> If you open the above link on an iPhone and then click the Add to Calendar 
>>> button, you will that it appears to add an event to the calendar WITHOUT 
>>> asking the user for permission! How does it manage to do it? 
>> 
>> As far as I can tell, that link delivers an ics file, “event.ics”, which is 
>> then opened automatically by the OS (also happens for ics attachments in 
>> Mail).  Since this only writes to the calendar and the original stink that 
>> caused restrictions was about reading calendar/address book info and 
>> uploading that to a server, I guess Apple finds that OK.
>> 
>> Now I don’t remember any sanctioned ways to open a file without user 
>> interaction, so this might not actually help you...
>> 
>> Marcel
>> 
>> 
>> —— snip —— 
>> BEGIN:VCALENDAR
>> VERSION:2.0
>> CALSCALE:GREGORIAN
>> PRODID:-//hacksw/handcal//NONSGML v1.0//EN
>> METHOD:PUBLISH
>> BEGIN:VEVENT
>> DTSTART;VALUE=DATE:20131005
>> DTEND;VALUE=DATE:20131006
>> SUMMARY:Policing Through the Ages 
>> LOCATION:Gunwharf Quays
>> DESCRIPTION:Policing Through the Ages  - 
>> http://m.gunwharf-quays.com/whats-on/policing-through-ages
>> URL:http://m.gunwharf-quays.com/whats-on/policing-through-ages
>> END:VEVENT
>> END:VCALENDAR
>> —— snip —— 
> 
> So, I could send a pre-made .ics file to Safari? 
> 
> 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/alex%40webis.net
> 
> This email sent to a...@webis.net

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

"The person who is not hungry says that the coconut has a hard shell."
-- African Tribal Saying







___

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

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 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: ARC vs Manual Reference Counting

2013-09-08 Thread Alex Kac
Bingo. We’ve been working with Cocoa/Obj-C for many years, and still we’d find 
weird errors that would be caused by some over-released object. We cut a ton of 
code with ARC, and in the end we saw reliability go up and actually even some 
performance.

ARC is a win. The only place it really got a bit hairy was CF objects. I wish 
ARC would work with them a bit more.

On September 8, 2013 at 11:56:10 PM, Jens Alfke (j...@mooseyard.com) wrote:

They’re a _lot_ easier. It might not look that way when you’re reading about 
all the details, or converting existing code, because then you’re focusing on 
the rare edge cases. But for the most part when actually coding you can simply 
ignore ref-counting. Your code becomes more compact and readable, and you’re 
less likely to make mistakes.
Alex Kac - President and Founder
Web Information Solutions, 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

Re: ARC vs Manual Reference Counting

2013-09-08 Thread Alex Kac
Converting to ARC in some ways - depends. On the whole we’re finding positives 
with it. Writing new apps with it its superb.

On September 8, 2013 at 10:44:41 PM, livinginlosange...@mac.com 
(livinginlosange...@mac.com) wrote:

Would anyone agree me that ARC introduces more rules and considerations than 
previously existed with manual reference counting?

Alex Kac - President and Founder
Web Information Solutions, 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

Re: bugreport.apple.com

2013-09-03 Thread Alex Kac
My assumption was that the text limits were instituted so that people would
put log statements and all that in attachments instead of the text fields
of the bug reporter.


On Tue, Sep 3, 2013 at 11:42 AM, Greg Parker  wrote:

> On Sep 2, 2013, at 12:31 PM, Fritz Anderson 
> wrote:
> > Cocoa developers will want to bear in mind for their development
> practices that the new forms limit text to lengths much, much shorter than
> what I had found necessary for a useful bug report. Shorter than many posts
> to this list that draw helpful replies. For instance, it is practically
> impossible to iterate attempted workarounds and their effect on application
> state. Iterated NSLog() output (even if cut down to your guess at the
> relevant items) is out of the question.
>
> That sounds bad. Did you file a bug report? (Yes, usability bugs in the
> bug reporter should be filed using the bug reporter.)
>
>
> --
> Greg Parker gpar...@apple.com Runtime Wrangler
>
>
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> 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.*
___

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

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: IB autolayout is impossible

2013-08-19 Thread Alex Kac
IB 4.x is astoundingly hard to work with auto layout. A newer IB that shall not 
be named is supposedly better…

On Aug 19, 2013, at 4:40 PM, Rick Mann  wrote:

> I want to create a view with size 74 x 74, containing three subviews, all 
> centered on it. But IB is just a game of whack-a-mole. So angry.
> 

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

"In the Country of the Blind, the one-eyed man is king."
--Desiderius Erasmus





___

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

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: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?

2013-05-09 Thread Alex Kac
I'd strongly recommend a great tool from the DTCoreText github project - 
DTHTMLWriter and DTHTMLReader. It is designed to work with HTML documents and 
turn them into XML or like (he uses it for NSAttributedStrings).

I've been using this project very heavily and it works extremely well. For 
example I use it to convert HTML to ENML for Evernote. It works with loads of 
poorly formatted HTML.

On May 9, 2013, at 12:58 PM, Jens Alfke  wrote:

> 
> On May 9, 2013, at 10:53 AM, Markus Spoettl  wrote:
> 
>> Well, that's not entirely true, unfortunately. Although the documentation 
>> suggests you can, NSXMLDocument -init will crash if the content you're 
>> trying to feed it is sufficiently non-XML (say an ASCII text file).
> 
> Well, that’s bad, especially since one of the purposes of tidy is to make it 
> safe to read untrusted XML/HTML input. 
> Have you reported this to Radar?
> 
> —Jens


___

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

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

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

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

  1   2   3   >