Re: debugging AutoLayout exception with no build errors

2015-11-06 Thread 2551

> On 6 Nov 2015, at 01:31, Conrad Shultz  wrote:
> You can attach LLDB to a running application (or set it to attach-on-launch) 
> and set breakpoints therein without needing to actually build.


Thanks, that’s something I’ll have to learn how to do down the road… :-)
 
In the meantime, I decided to fire up Xcode in Mavericks and see if the project 
would build in Xcode 6.1. To my surprise it did, and it showed over 30 
AutoLayout errors (4 conflicting constraints, 2 content priority ambiguities 
and a couple of dozen misplaced views, not to mention an unknown system font, 
".HelveticaNeueDeskInterface-Regular”). In Xcode 7.1, no AutoLayout issues are 
shown.

The good news is I’m able to run 10.9 and 10.11 side by side, so I can fix and 
test both simultaneously. I guess I should ask this over on the Xcode list, but 
why on earth doesn’t Xcode 7.1 show any of these warnings? Presumably, the 
10.11 SDK is resolving all this behind the scenes and not even warning the 
developer there’s anything amiss. Fine if the app’s run on 10.11, but with a 
deployment target of 10.9, you’d think Xcode 7.1 would have something to say, 
surely?

Anyways, thanks for the input. At least I can now get to work on fixing the 
problem.


Best


Phil
___

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

Please do not post 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: debugging AutoLayout exception with no build errors

2015-11-05 Thread 2551

> On 5 Nov 2015, at 20:33, Ken Thomases  wrote:

> It's trying to log the problem, but getting an exception while composing a 
> description string for one of the constraints.


Ahh, right. That’s what the ‘Unable to create description’ bit means. Thanks.

> You've truncated the stack trace 

Full stack trace appended below from when the [showWindow] message is sent.


>  Could it be that the window has a minimum or maximum size that's conflicting 
> with the size the view wants to be?

There’s a minimum size set that’s much smaller than the View size. There’s no 
maximum size set for the Window.

In fact, this problem only started to occur because in the last update to the 
app I changed a previously fixed-sized window to be resizable. After release, I 
realised I’d carelessly overlooked setting constraints on one of the textViews 
in a 3-tab tabview so that one of them didn't scale with the window (call me a 
luddite, but I still yearn for the old days of springs and struts; never had so 
much trouble with layout since AutoLayout…;p ). 

I’ve been assuming its that tabView that’s causing the problem, but even 
removing all those constraints doesn’t avoid the issue.


> You could break on the exception

Bear with me. My debugging-foo doesn’t extend much beyond logging and a few 
basic exceptions, but I don’t think this is possible for the simple reason no 
exception is raised on my build machine. I have some vague notion that I can 
attach the Clang debugger in Terminal to a running process, maybe on my 10.9 
machine— is that possible? A Complete Idiot’s Guide (or link to…) would be 
welcome here, if so.

> or set a breakpoint on -[NSView(NSConstraintBasedLayout) 
> engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:].  

Not sure I’m still following along. Are we talking symbolic breakpoint here? I 
tried that, but the app just builds and runs fine on 10.11.


> Either way, select that frame of the stack.  Then, try to examine the third 
> parameter, which seems like it would be the array of constraints.  


Ken, this is beyond my ken. Sure, I know what frames and stacks are, but I 
don’t understand where/how/when I’m supposed to be selecting these frames and 
stacks in the debugger when no debug session appears in Xcode. Or are you 
suggesting I export the project to my 10.9 install and run it from Xcode there? 
In theory I could do that (I think there’s an old Xcode install on that 
machine), but I’m not sure if the project will build if it was made in 10.11, 
will it?

Hmm…I know I could just revert back to the last commit before I made these 
changes and start all over again testing step by step, but there’s a lot of 
other work in here I don’t really want to recapitulate if i can avoid it. 

Appreciate any further thoughts! Here’s that full stack trace:


0   CoreFoundation  0x7fff9497025c 
__exceptionPreprocess + 172
1   libobjc.A.dylib 0x7fff92de3e75 
objc_exception_throw + 43
2   CoreFoundation  0x7fff9497010c 
+[NSException raise:format:] + 204
3   Foundation  0x7fff8f98cc55 
descriptionForLayoutAttribute_layoutItem_coefficient + 145
4   Foundation  0x7fff8f98caaf 
-[NSLayoutConstraint equationDescription] + 215
5   Foundation  0x7fff8f98cf3e 
-[NSLayoutConstraint description] + 298
6   CoreFoundation  0x7fff949620e1 -[NSArray 
descriptionWithLocale:indent:] + 481
7   Foundation  0x7fff8f7517bb 
_NSDescriptionWithLocaleFunc + 64
8   CoreFoundation  0x7fff9485ece4 
__CFStringAppendFormatCore + 7332
9   CoreFoundation  0x7fff9488d263 
_CFStringCreateWithFormatAndArgumentsAux + 115
10  CoreFoundation  0x7fff948c4aeb _CFLogvEx + 
123
11  Foundation  0x7fff8f77b32c NSLogv + 79
12  Foundation  0x7fff8f77b2b8 NSLog + 148
13  AppKit  0x7fff8f1dc194 
-[NSView(NSConstraintBasedLayout) 
engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:] + 114
14  Foundation  0x7fff8f98713e -[NSISEngine 
handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
 + 507
15  Foundation  0x7fff8f98789c -[NSISEngine 
tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
 + 379
16  Foundation  0x7fff8f784e89 -[NSISEngine 
tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:]
 + 663
17  Foundation  0x7fff8f98d897 
-[NSLayoutConstraint 
_add

Re: debugging AutoLayout exception with no build errors

2015-11-05 Thread 2551
No takers? 


> On 4 Nov 2015, at 22:19, 2551 <2551p...@gmail.com> wrote:
> 
> I have an OSX app built on 10.11.1, deployment target 10.9. The app builds 
> and runs without any AutoLayout issues or warnings from Xcode. I have 
> ambiguities turned on.
> 
> The problem is when I try to run the app on 10.9. Although the app will run 
> without fatally crashing, one of its main windows won’t open. In Console, on 
> launch I first see the message
> 
> 
> “Unable to create description in 
> descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil.”
> 
> 
> If I then try to open the window from a menu command, I get the stacktrace 
> (relevant part appended below). I see the ‘mutually exclusive’ error starting 
> at line 18 in the trace, but I’ve manually been through the constraints and 
> can’t see any conflicts. I’ve also removed all constraints and had Xcode do 
> “Add Missing Constraints” after that. Again, no AutoLayout errors on build, 
> but still the mutually exclusive exception occurs on 10.9.
> 
> Does anyone have any debugging tips as to how do I can find the source of the 
> problem when neither Xcode nor Console on my build machine make any 
> complaints?
> 
> 
> Best
> 
> 
> Phil
> 
> 
> 
> 
> 
>   0   CoreFoundation  0x7fff9497025c 
> __exceptionPreprocess + 172
> 
>   1   libobjc.A.dylib 0x7fff92de3e75 
> objc_exception_throw + 43
> 
>   2   CoreFoundation  0x7fff9497010c 
> +[NSException raise:format:] + 204
> 
>   3   Foundation  0x7fff8f98cc55 
> descriptionForLayoutAttribute_layoutItem_coefficient + 145
> 
>   4   Foundation  0x7fff8f98caaf 
> -[NSLayoutConstraint equationDescription] + 215
> 
>   5   Foundation  0x7fff8f98cf3e 
> -[NSLayoutConstraint description] + 298
> 
>   6   CoreFoundation  0x7fff949620e1 -[NSArray 
> descriptionWithLocale:indent:] + 481
> 
>   7   Foundation  0x7fff8f7517bb 
> _NSDescriptionWithLocaleFunc + 64
> 
>   8   CoreFoundation  0x7fff9485ece4 
> __CFStringAppendFormatCore + 7332
> 
>   9   CoreFoundation  0x7fff9488d263 
> _CFStringCreateWithFormatAndArgumentsAux + 115
> 
>   10  CoreFoundation  0x7fff948c4aeb _CFLogvEx + 
> 123
> 
>   11  Foundation  0x7fff8f77b32c NSLogv + 79
> 
>   12  Foundation  0x7fff8f77b2b8 NSLog + 148
> 
>   13  AppKit  0x7fff8f1dc194 
> -[NSView(NSConstraintBasedLayout) 
> engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:] + 114
> 
>   14  Foundation  0x7fff8f98713e -[NSISEngine 
> handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
>  + 507
> 
>   15  Foundation  0x7fff8f98789c -[NSISEngine 
> tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
>  + 379
> 
>   16  Foundation  0x7fff8f784e89 -[NSISEngine 
> tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:]
>  + 663
> 
>   17  Foundation  0x7fff8f98d897 
> -[NSLayoutConstraint 
> _addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:]
>  + 285
> 
>   18  Foundation  0x7fff8f7792cf 
> -[NSLayoutConstraint 
> _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 204
> 
>   19  AppKit  0x7fff8e97520b 
> __52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke_2 + 411
> 
>   20  Foundation  0x7fff8f7873aa -[NSISEngine 
> withBehaviors:performModifications:] + 119
> 
>   21  AppKit  0x7fff8e8d795c 
> -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] 
> + 66
> 
>   22  AppKit  0x7fff8e975049 
> __52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke + 433
> 
>   23  AppKit  0x7fff8e8da4fa 
> -[NSView(NSConstraintBasedLayout) _setLayoutEngine:] + 229
> 
>   24  AppKit  0x7fff8e975122 
> __52-[NSView(NSConstraintBasedLa

debugging AutoLayout exception with no build errors

2015-11-04 Thread 2551
I have an OSX app built on 10.11.1, deployment target 10.9. The app builds and 
runs without any AutoLayout issues or warnings from Xcode. I have ambiguities 
turned on.

The problem is when I try to run the app on 10.9. Although the app will run 
without fatally crashing, one of its main windows won’t open. In Console, on 
launch I first see the message


“Unable to create description in 
descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil.”


If I then try to open the window from a menu command, I get the stacktrace 
(relevant part appended below). I see the ‘mutually exclusive’ error starting 
at line 18 in the trace, but I’ve manually been through the constraints and 
can’t see any conflicts. I’ve also removed all constraints and had Xcode do 
“Add Missing Constraints” after that. Again, no AutoLayout errors on build, but 
still the mutually exclusive exception occurs on 10.9.

Does anyone have any debugging tips as to how do I can find the source of the 
problem when neither Xcode nor Console on my build machine make any complaints?


Best


Phil





0   CoreFoundation  0x7fff9497025c 
__exceptionPreprocess + 172

1   libobjc.A.dylib 0x7fff92de3e75 
objc_exception_throw + 43

2   CoreFoundation  0x7fff9497010c 
+[NSException raise:format:] + 204

3   Foundation  0x7fff8f98cc55 
descriptionForLayoutAttribute_layoutItem_coefficient + 145

4   Foundation  0x7fff8f98caaf 
-[NSLayoutConstraint equationDescription] + 215

5   Foundation  0x7fff8f98cf3e 
-[NSLayoutConstraint description] + 298

6   CoreFoundation  0x7fff949620e1 -[NSArray 
descriptionWithLocale:indent:] + 481

7   Foundation  0x7fff8f7517bb 
_NSDescriptionWithLocaleFunc + 64

8   CoreFoundation  0x7fff9485ece4 
__CFStringAppendFormatCore + 7332

9   CoreFoundation  0x7fff9488d263 
_CFStringCreateWithFormatAndArgumentsAux + 115

10  CoreFoundation  0x7fff948c4aeb _CFLogvEx + 
123

11  Foundation  0x7fff8f77b32c NSLogv + 79

12  Foundation  0x7fff8f77b2b8 NSLog + 148

13  AppKit  0x7fff8f1dc194 
-[NSView(NSConstraintBasedLayout) 
engine:willBreakConstraint:dueToMutuallyExclusiveConstraints:] + 114

14  Foundation  0x7fff8f98713e -[NSISEngine 
handleUnsatisfiableRowWithHead:body:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
 + 507

15  Foundation  0x7fff8f98789c -[NSISEngine 
tryUsingArtificialVariableToAddConstraintWithMarker:rowBody:usingInfeasibilityHandlingBehavior:mutuallyExclusiveConstraints:]
 + 379

16  Foundation  0x7fff8f784e89 -[NSISEngine 
tryToAddConstraintWithMarker:expression:integralizationAdjustment:mutuallyExclusiveConstraints:]
 + 663

17  Foundation  0x7fff8f98d897 
-[NSLayoutConstraint 
_addLoweredExpression:toEngine:integralizationAdjustment:lastLoweredConstantWasRounded:mutuallyExclusiveConstraints:]
 + 285

18  Foundation  0x7fff8f7792cf 
-[NSLayoutConstraint 
_addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 204

19  AppKit  0x7fff8e97520b 
__52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke_2 + 411

20  Foundation  0x7fff8f7873aa -[NSISEngine 
withBehaviors:performModifications:] + 119

21  AppKit  0x7fff8e8d795c 
-[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] + 
66

22  AppKit  0x7fff8e975049 
__52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke + 433

23  AppKit  0x7fff8e8da4fa 
-[NSView(NSConstraintBasedLayout) _setLayoutEngine:] + 229

24  AppKit  0x7fff8e975122 
__52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke_2 + 178

25  Foundation  0x7fff8f7873aa -[NSISEngine 
withBehaviors:performModifications:] + 119

26  AppKit  0x7fff8e8d795c 
-[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] + 
66

27  AppKit  0x7fff8e975049 
__52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke + 433

28  AppKit  0x7fff8e8da4fa 
-[NSView(NSConstraintBasedLayout) _setLayoutEngine:] + 229

29  AppKit  

Re: problem with rangeOfString debugger warning

2015-07-30 Thread 2551

> On 30 Jul 2015, at 23:19, Jens Alfke  wrote:
> 
> You’re confusing -substringWithRange: with -rangeOfSubstring:. The 
> documentation and warning you cite come from the former, but you’re talking 
> about the latter.


-rangeOfString: invokes, rangeOfString: options:, which invokes rangeOfString: 
options: range:. The quote comes from there.

Thanks for the other points; I’d got there myself after a night’s rest, but the 
NSAssert’s a nice touch I’ll remember for another time.


Best


Phil




___

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

Please do not post 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: Regarding these Olivia messages. Can we do something about the list security?

2015-07-30 Thread 2551
I’m on both of the affected lists, but so far have not been treated to Olivia’s 
favour (meanwhile my inbox is bulging with mail complaining about her, and I 
apologise in advance to contributing to that count, effectively spamming 
myself… :(.


> On 30 Jul 2015, at 20:45, Shane Stanley  wrote:
> 
> On 30 Jul 2015, at 9:36 pm, Alex Zavatone  wrote:
>> 
>> Including me, I know of three people who have gotten these.
> 
> FWIW, it's also happening to on at least one other Apple mailing list. Olivia 
> seems to get around.
> 
> -- 
> Shane Stanley 
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post 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/sqwarqdev%40icloud.com
> 
> This email sent to sqwarq...@icloud.com


___

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

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

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

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

Re: problem with rangeOfString debugger warning

2015-07-30 Thread 2551
Cancel that question. Found the error between the chair and keyboard 
(someString was depending on another function which itself was returning null 
and which I’d forgotten to bullet-proof).

Apologies for the noise.


Best


Phil


> On 30 Jul 2015, at 15:16, 2551 <2551p...@gmail.com> wrote:
> 
> 
>> On 30 Jul 2015, at 15:11, 2551 <2551p...@gmail.com> wrote:
>> 
>> NSRange range = [someString rangeOfString “cost”];
>> 
> 
> Just to head off any potential red herrings, that missing “@“ typo in the 
> pseudocode is not in my actual code.
> 
> 
> Best
> 
> 
> Phil
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post 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/sqwarqdev%40icloud.com
> 
> This email sent to sqwarq...@icloud.com


___

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

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

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

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

Re: problem with rangeOfString debugger warning

2015-07-30 Thread 2551

> On 30 Jul 2015, at 15:11, 2551 <2551p...@gmail.com> wrote:
> 
> NSRange range = [someString rangeOfString “cost”];
> 

Just to head off any potential red herrings, that missing “@“ typo in the 
pseudocode is not in my actual code.


Best


Phil
___

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

Please do not post 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

problem with rangeOfString debugger warning

2015-07-30 Thread 2551

I commonly use code like this to test if a string contains a substring

NSString *someString = @“This thing has an item.price and a discount.price”;

NSRange range = [someString rangeOfString “cost”];

if (range.location !=NSNotFound)
{
//do something
} else
{
//don’t do it
}


In one case where the string isn’t found, I’m getting a warning (Xcode 6.4, OS 
X 10.10.4) stating that

*** -[__NSCFString substringWithRange:]: Range {9223372036854775808, 
9223372036854775830} out of bounds; string length 48. This will become an 
exception for apps linked after 10.10 and iOS 8. Warning shown once per app 
execution.

When I look in the debugger, I see that ‘rangeOfString’ has not returned 
{NSNotFound, 0} as promised in the docs, but huge numbers for location and 
length:

range   NSRange location=4295047576, length=140734799794576 

leading to the ‘out of bounds warning. 


In the docs under ‘Special Considerations’ it says "This method detects all 
invalid ranges (including those with negative lengths). For applications linked 
against OS X v10.6 and later, this error causes an exception; for applications 
linked against earlier releases, this error causes a warning, which is 
displayed just once per application execution.”

My questions are: what causes this to be an “invalid range” rather than an 
NSNotFound? And: How do I avoid it when searching for a potentially 
non-existent string?


Any guidance much appreciated.


Best


Phil
___

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

Please do not post 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 - kill the blue (Obj-C)

2015-07-26 Thread 2551

> On 26 Jul 2015, at 22:17, Ken Thomases  wrote:
> 
> The right approach is to subclass NSTableRowView.  It's not hard.  Why do you 
> resist it?
> 

OK, got it. Thanks for the pointers. Much appreciated!


Best


Phil
___

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

Please do not post 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 - kill the blue (Obj-C)

2015-07-26 Thread 2551
I’ve been struggling with NSTableView for the last two days. All I want to do 
is ensure the alternative “gray” highlight is used on a selection consistently 
instead of the heavy blue. Here’s my code:

-(void) killBlue
{
NSInteger selectedRow = [_tableView selectedRow];

if ([_tableView selectedRow] != -1) //only call this if there is a 
selection
{
NSTableRowView *myRowView = [_tableView rowViewAtRow:selectedRow 
makeIfNecessary:NO];

   [myRowView 
setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleRegular];

[myRowView setEmphasized:NO];

[_tableView 
setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone];

}

}

I’m calling this from three places:

1. In -tableViewSelectionDidChange: //to take care of user-initiated selection 
changes
2. In -tabViewToggle//because the blue comes back when the TabView the 
TableView is embedded in is switched back and forth

and

3 and in -(void)applicationDidBecomeActive:(NSNotification *)aNotification 
//because the blue comes back when the app is switched in and out of frontmost

1 and 2 work fine. At first 3 only worked when the app was switched in an out 
of focus with the cmd-tab app switcher keys, but not when mouse clicks were 
used to change the frontmost app. To solve that problem, I also had to ensure 
something else was firstResponder when the app was made frontmost. 

I thought my troubles were over, until I discovered that despite those three 
implementations, I **still** get the blue highlighting in a situation where a 
row is highlighted (correctly appearing gray), then I click on any other app, 
then click back on the highlighted row (rather than somewhere else in the 
window) to make my app active again. Sure enough, there’s the blue. I’m 
exhausted trying to think of all the ways to defeat this blue highlighting and 
would appreciate some guidance. 

I’ve seen SE posts suggesting subclassing NSTableRowView, but I don’t 
understand why, since the property setEmphasized already exists in the parent 
class and should work across the board (shouldn’t it??).

Any thoughts much appreciated. 


Best

Phil


___

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

Please do not post 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: Distinguishing "home" and "commercial" use

2015-07-24 Thread 2551

> On 24 Jul 2015, at 21:13, Bill Cheeseman  wrote:
> 
> I find that the most important and effective use of the honor system is with 
> "big companies.” 

My "commercial users" are more likely to be small independent s/w / IT 
consultants, or educational institutions (i.e sysadmins of such). 

Except for the latter, the others are not likely to be worried by or subject to 
the same auditory or regulatory concerns as “big companies”; that’s why I need 
an in-app solution (i.e. some way of telling them “hey, you’re using this app 
for commercial purposes, how about buying a licence?”).


Best


Phil


___

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

Please do not post 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

Distinguishing "home" and "commercial" use

2015-07-24 Thread 2551
Friends, 

Platform: OSX 

Distribution: Outside of App Store

Aim: I want to distinguish “ordinary users” of my app from “commercial users”, 
where the latter might be defined as anyone installing my app on 5 or 10 (pick 
a number) different macs. 

Rationale: I want to offer my app for free to home users, but have those who 
use my app for commercial purposes (encouraged to) pay something. I know I can 
stipulate that in the licence, but since I’m a small, indie developer there’s 
no way I can enforce a licence in any case.

I know how to get the machine identifier, but I don’t know how to write that 
information back to the app. I see from my search-fu (never the strongest) that 
modifying the info.plist is “not the done thing” and will fail under some 
circumstances. 

Commercial users of my app are likely to run the same copy from a USB Flash 
drive on many machines. 

Is there some logic I can use and save in my code to track the number of 
installs and whether they’re on the same machine or not?


TIA


Phil
___

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

Please do not post 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: good intro book about cocoa dev

2015-07-22 Thread 2551

> On 22 Jul 2015, at 10:35, Richard Charles  wrote:
> 
> I second that. Hillegass is great. In the beginning of the book he will tell 
> you what the prerequisites are. Make sure you meet the prerequisites.


I asked this same question (not here, but in many other places and of devs that 
I knew) and got the same answer: Hillegass, Hillegass, Hillegass. 

As it turned out, I didn’t get on well with Hillegass at all. I found Kochan 
[1] and a whole series of books by Nick Smith [2] much better suited to my 
learning style, skill level and pocket (Smith’s books are admirably priced 
compared to the offerings from major publishers, and the quality of 
proofreading / lack of typos seems to suggest some of those big-name publishers 
need new editors…just saying…).

1. http://classroomm.com/objective-c/index.php

2. http://www.appsmith.dk
___

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

Please do not post 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: I am reluctant to file any more bugs until those already reported are fixed

2015-07-15 Thread 2551

> On 15 Jul 2015, at 18:38, Alex Zavatone  wrote:
> 
> Based on the result of effort put in to reporting bugs and amount fixed, 
> there is no way I can justify reporting bugs even if I had the time to afford 
> to do it. 

Well it depends. If we’re talking bug reporting to  , that’s one thing. But small indie developers have a much 
better track record (and a much better incentive) at responding to bug reports. 
As a small indie developer myself, I rely on users to report bugs as I simply 
don’t have the hardware to test my products on any other system than the one 
ageing Mac I own. 

I personally respond to and fix (or offer workarounds for) every bug that is 
reported to me, and I know other indie developers that take bug-squashing 
equally seriously. I only have 6 products out (and only 1 outstanding known bug 
to-date, which will be fixed tomorrow!), so you might think it’s not that hard, 
but then I have a 60-hr/week real job and a family to take care of before I can 
even think about spending time on my hobby software projects. So whether you’re 
Big Corp or just a crusty hiding in some unknown backwater of the internet, 
there’s always pressures.

I’d just say, at least when it comes to us small guys, please don’t stop 
reporting bugs. It’s the only way we can improve our offerings.



Best


Phil




___

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

Please do not post 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

Snow Leopard 10a432 DMG

2015-07-14 Thread 2551
I need to support users still on Snow Leopard (I’m on Xcode 6.4 / Yosemite 
10.10.4). I’m building using the latest SDK but deployment target is 10.6. As 
others have noted in the past, the compiler will not warn of any code 
incompatibilities, so I’m looking to install SL on an external partition.

The developer site has this

http://adcdownload.apple.com/Mac_OS_X/mac_os_x_version_10.6_snow_leopard_build_10a432/mac_os_x_v10.6_build_10a432_user_dvd.dmg
 



which I’m still trying to download (slow connection, several hours wait, then 
several hours to possibly install and update on a blank partition; my own 
machine can still run Leopard and on, but I don’t have a DVD drive any longer 
so I can’t use the install disks).  

I was wondering if anyone has actually tried using and installing this DMG as a 
testbed, and if so what issues you might have encountered? It looks like a 
pre-release build, so I’m guessing there may be issues trying to update it with 
the combo updater. 

On top of that, I was thinking of writing a script to do code check 
compatibility for me. I haven’t’ actually thought about how I’ll do that, but 
since all the information is in the docs and headers, it should in theory be 
doable. I was just wondering whether anyone has created such a tool already? 

Thoughts much appreciated.


Phil

___

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

Please do not post 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: Edit menu localisation, default application menu

2015-07-11 Thread 2551

> On 11 Jul 2015, at 16:03, Uli Kusterer  wrote:
> 
>  I can't find anything since they redid the web site.

Sorry, OT, but boy is that frustrating. What is it with Apple and their 
websites (cf the mess they made of Apple Support Communities with the 
"overhaul" a year or two back before deciding to make a similar disaster with 
the Developer site)?




___

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

Please do not post 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: Anyone recommend Dash?

2015-07-09 Thread 2551
I use it everyday and consider it excellent value for the $20 or so I paid for 
it.

If you're only using objective-C / Swift and you're always on line, you might 
not get as much mileage. 

However, if you're also using a variety of other language and IDES/Editors, 
it's a great one-stop documentation program. You can call it from within most 
other apps, and you can get docsets for just about every language out there.

If you're offline frequently, as I am, it's a life-saver, and its main 
advantage over Xcode at least since v6 (which seem to either ignore or fail to 
call local doc repositories in my experience).


> On 9 Jul 2015, at 13:52, Graham Cox  wrote:
> 
> 
> Is anyone using Dash for API documentation? Can you recommend it?
> 
> I received a bundle offer including this today and it seems like a good deal, 
> but wonder if it’s worth using over and above XCode’s standard docs?
> 
> —Graham
> 
> 
> 
> 
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/sqwarqdev%40icloud.com
> 
> This email sent to sqwarq...@icloud.com


___

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

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

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

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

Re: licence key validation method

2015-01-13 Thread 2551

> On 13 Jan 2015, at 07:42, João Varela  wrote:
> 
> all I’m saying be careful how you expose your licensing code if you are going 
> to use objective C.


I take the opposite POV. If someone's going to start messing around with otool 
and class-dump on my app, I know they're not going to be a paying customer. Why 
should I waste my time with obfuscation just to provide such people with a more 
educational challenge?

It's rather analogous to shoplifting. Stores don't put electronic tags on goods 
to stop the professional thieves (because professionals have the same removal 
tools that the counter staff have). They put them on there to: 

i. suggest the item is of value and worth paying for; and 
ii. to stop the person who 99/100 times would pay, but might just have an 
aberration if you make it painfully easy for them to walk out the door without 
doing so. 

Nevertheless, if they really don't want to pay for it, they're not going to pay 
for 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: licence key validation method

2015-01-13 Thread 2551

> On 13 Jan 2015, at 13:51, Jens Alfke  wrote:
> 
> The license mechanism serves as a reminder to new users that their demo has 
> expired, or that the copy they borrowed from their roommate hasn't been paid 
> for yet. 

Precisely. I haven't commented on this 
frankly-OT-but-what-the-heck-I'll-talk-to-anyone-I'm-gregarious-that-kind-of-way
 subthread so far, but my use of licence keys has NOTHING to do with stopping 
piracy (good job too, given the obvious failures the big SW companies 
experience in their attempts at doing so).  

I'm implementing licence keys partly because paying customers expect them (it 
adds a shine of professionalism), and partly so that I can drive sales with 
trial modes, unlock features and so on. 

If someone wants to use my app without paying for it, fine. I don't really have 
much of a problem with that. All the apps I've done before this have been 
"Freeware' or "DonateWare" anyway. That's why I've never tackled this licence 
key validation process before (as Allan linked to an earlier thread, I should 
point out I did ask this question once before, but with that app I gave up and 
just released it as freeware). It's just that with this app (and the next 
couple I've got coming through) I'd like to give people more incentive to buy. 

Best


Phil

 
___

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

Please do not post 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 2551
> On 13 Jan 2015, at 11:52, Gleb Dolgich  wrote:
> 
> You don't need cocoafob.m as it's test code. CFobLicVerifier.{h|m} and 
> CFobError.{h|m} should be it as all the necessary decoding in the no_openssl 
> branch is handled using SecurityFramework. The function codecheck() in 
> cocoafob.m just shows you how to verify a licence.


Right! Gotcha. I will try this when I get back from work tonight. 

I may be back with more questions after that, though hopefully not!  :-)

Thanks again for your input. 


Best


Phil


___

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

Please do not post 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 2551


> On 13 Jan 2015, at 11:23, 2551 <2551p...@gmail.com> wrote:
> 
> Is that all I need to do? 


I see I need CFobError, too. Is just this stuff going to be enough to get this 
to work?


> 
>   CFobError.h √
>   CFobError.m √   
>   
>   CFobLicVerifier.h   √
>   CFobLicVerifier.m   √
>   
>   cocoafob.m  √


Best


Phil
___

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

Please do not post 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 2551

> On 13 Jan 2015, at 11:05, 2551 <2551p...@gmail.com> wrote:
> Presumably, I only need the stuff in the objc folder, do I import all of 
> those files? And if so, what headers do I import into the class that contains 
> my registration view? What method/methods do I connect the "Enter" button and 
> NSTextField where the code is entered (in my licence validation window) to? 
> This is the level of help I need. 
> 

OK, looking through the files, I'm guessing I need to import

CFobLicVerifier.h and .m, along with cocoafob.m. 

I then pass my pubkey and the user's licence to the codecheck method in 
cocoafob.m. and handle the returning bool appropriately.

Is that all I need to do? Or is there more to it? Anything else? Do I need all 
those other files in the objc folder?

   CFobError.h
   CFobError.m
   CFobLicGenerator.h
   CFobLicGenerator.m
   CFobLicVerifier.h√
   CFobLicVerifier.m√
   CocoaFob|Info.plist
   CocoaFobARC|Info.plist
   CocoaFobTests
   MyApp.scriptSuite
   MyApp.scriptTerminology
   NSData+PECrypt.h
   NSData+PECrypt.m
   NSString+PECrypt.h
   NSString+PECrypt.m
   NSString|Base64Extensions.h
   NSString|Base64Extensions.m
   URLCommand.h
   URLCommand.m
   cocoafob.1
   cocoafob.m   √
   cocoafob.xcodeproj
   decoder.c
   decoder.h
   encoder.c
   encoder.h
   pxlic.m


Best


Phil


___

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

Please do not post 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 2551

> On 13 Jan 2015, at 00:34, Gleb Dolgich  wrote:
> 
> You can throw it at me as well, what with me being the author of CocoaFob 


Gleb, I appreciate your input. I found the no_openssl branch and downloaded it, 
but I'm still unsure what to do with it.

On the CocoaFob page it says "There is no framework or a library to link 
against. You include the files you need in your application project directly".

Could you walk me through which files I need to include in my project? 
Presumably, I only need the stuff in the objc folder, do I import all of those 
files? And if so, what headers do I import into the class that contains my 
registration view? What method/methods do I connect the "Enter" button and 
NSTextField where the code is entered (in my licence validation window) to? 
This is the level of help I need. 

TIA


Best


Phil
___

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

Please do not post 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 2551

> On 12 Jan 2015, at 20:38, Bill Cheeseman  wrote:
> 
> I've used eSellerate for many years. They provide a very well-documented API 
> for generating and validating registration keys in a variety of formats for 
> purchase i

Thanks for that, Bill. 

I'm not in any way contractually obliged to stay with FastSpring, though I've 
invested a lot of effort already setting up my product and store, but if their 
support can't put me on the right path, I may very well look at what eSellerate 
have to offer. 


Best


Phil
___

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

Please do not post 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 2551
> So my guess would be that you have somewhere on the Fastspring site asked 
> them to generate a CocoaFob key. 

Correct.

> 
> What that string of stuff most likely is is .. some information you have 
> supplied, like a user name or serial number or whatever fields you told 
> FastSpring you want in your license to be

Correct again.


> So the normal way to verify that key would be to download CocoaFob and use 
> whatever ObJC function it has to verify keys.

Yep, got that far sometime last week...


> Or you go find documentation on CocoaFob’s file format,

Tried that...

> which I’m sure is available,

It it were, and had I found it, or could make sense of it, I wouldn't be here.


> and you work out how to turn that string back into binary data, and you use 
> your public key to ‘verify’ it by doing the reverse of what was done to 
> generate it.

BINGO! That's my question. i.e., "How is this done?"


> You mentioned earlier that CocoaFob seemed to be a little unloved. Surely if 
> FastSpring is still supporting it...


Roland, you have understood the whole thing absolutely perfectly. My problem is 
I can't work out the "turn it back into binary data and verify it" bit. 
However, the last quote above is perhaps the key (no pun intended). Rather than 
annoying you good folks, and trying to get you to reverse engineer something 
you're not familiar with first hand, I should really be asking FastSpring 
Support. 

It's not like I haven't considered this before; it's just that their docs (such 
as they are) on this all just point to 3rd party links, which are either dead 
(AquaticPrime) or point to stuff full of deprecations (the CocoaFob repository 
I cloned from their link had 38 deprecations in it , and that was AFTER I did 
all Xcode's automatic attempts for ARC conversion etc). Also, I figured this is 
a Cocoa problem not a FastSpring service problem, but I'm flat out of road to 
travel here without someone giving me specifics.

Anyway, look guys. I appreciate the help. I'm just going to throw this at 
FastSpring and see what they come back with. 


Best


Phil




___

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

Please do not post 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 2551

> On 12 Jan 2015, at 18:39, Uli Kusterer  wrote:
> 
> Didn't FastSpring have an SDK that you just drop into your app to validate 
> their licenses?


That's actually what I expected when I signed up, but it doesn't appear to be 
the case, unless I've overlooked something somewhere.

My understanding of their documentation is that this is very much a matter of 
3rd party support. Their links to both AquaticPrime and CocoaFob are both well 
out of date and what little info FastSpring do offer on this is very basic 
(even to my limited understanding...). 

Of course, I could have missed something, and if anyone here is using 
FastSpring or similar (eSellerate, Kagi) and can confirm otherwise, I'd be both 
relieved and grateful to get your advice. I must admit when I started this 
thread, I did so in the hope that someone else on the list would be familiar 
with using this kind of service and be able to point me in the right direction. 
 


Best


Phil


___

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

Please do not post 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 2551
> On 12 Jan 2015, at 18:44, Roland King  wrote:
> 
> Part of the problem, at least for me, is I haven’t figured out yet what you 
> actually have that you’re trying to verify. Is it a string, a file
> 


Thanks, Roland. 

It's a string that looks like this:

DAWFE-F1AU6-6ZBFX-4FWHE-JQN8V-SSSUQ-JY3DL-WQY4B-A9KHP-SZA5V-765MN-63Z8W-GF9H5-C6XCW-N9L7A-K

and they are generated by code that starts  and ends with

-BEGIN DSA PRIVATE KEY


-END DSA PRIVATE KEY-


Does that help at all?


___

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

Please do not post 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 2551

> On 12 Jan 2015, at 03:59, Charles Srstka  wrote:
> 
> After all, you’re going to want some sort of automatic system for generating 
> license codes for your users, 

Actually, no. As I said, the licence codes are being generated via FastSpring 
(and that's OpenSSL). All I need is a method to validate the code the user 
enters. My public key is in the app (it was as a certificate, but following 
Uli's advice I've hard wired the pubkey into the code instead).

Now, I really appreciate the offerings that have been made so far, I can't 
emphasize that enough, and I've got a bit of a clearer understanding as a 
result, but I have to say all this "use OpenSSL" "no use LibreSSL", "use 
Security.framework", "don't use Security.framework" is more or less a 
repetition of the advice I gleaned from working round the stackexchange etc 
threads; i.e., I'm none the wiser.

How do I actually start writing the method that's going to check the validity 
of the licence key (that's the licence code I already have, that I don't need 
to know how to generate, and that I've included the public key for in my app)? 
Allan has offered the most practical advice so far, but even he says "don't use 
OpenSSL", and that was 10 years ago...

I spent all of yesterday, as it turned out, working on the logic of my 30-day 
trial (oh, boy did that turn out to be harder than I imagined, but fun all the 
same...), so I'm still to put all the advice given so far to practical use. 
However, here's a new question that's been raised by your suggestions:

Given that my licences are being generated with OpenSSL in the FastSpring 
website, does that mean I HAVE TO use OpenSSL to validate them? I'm thinking 
the "DUH" answer here has to be "YES", but given my lack of knowledge about 
this topic, I'm taking nothing for granted. 

I'm also kind of surprised, given how popular non-App Store distribution seems 
to be becoming (at least, my purely anecdotal impression is that more OS X 
developers are choosing to forego or at least parallel-offer their apps outside 
of the App Store than 12 or 24 months ago), that there isn't a drop-and-go 
solution to all this licensing and trial mode logic (or at least one that has 
been updated in the last 5 years, that is). 

Does everyone really work all this out from scratch, as I seem to be doing? 
(And when I do, rest assured I'm going to write this up for others). I'm quite 
happy to put the time and effort into figuring this whole thing out from 
scratch if that's what's required, it's just that I don't want to invent my own 
wobbly wheel if someone else has already figured out how to make a nice smooth 
ride of it (I did that with updates, only to discover Sparkle after I'd already 
written my own homegrown solution...). 

Your thoughts, as always, are greatly appreciated.


Phil

___

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

Please do not post 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-10 Thread 2551
Thanks for the overview Uli, and the pointer towards Security.framework. I'm 
working my way through the docs, but there's a lot that doesn't seem relevant 
to my task. 

Most of the rest in your outline I've got. However, it's these specific parts 
I'm struggling with and which prompted my initial question:

> any tutorial on...validating messages will do.

Yes, that's precisely what I'm looking for and don't seem able to find. Can 
anyone suggest one? I've been all over stackexchange etc, and there seems to be 
a lot of confusion out there (or, rather, the more I read, the more confused 
I'm getting).

> You include your public key in your application, and the license-checking 
> code simply decrypts the PList using that. 

Yes, I've got the public key in my app. I also have the encrypted licence for 
the user to insert. Its help with the "simple licence-checking code to do the 
decrypting" that I need.  

I'm going to spend the rest of the day working through the cocoafob and 
aquaticprime code and see if I can figure out what I need from there, but if 
anyone has done this themselves recently and can offer some guidance, 
pseudo-code or link to a tutorial, it'd be much appreciated. Security is not 
something I've tackled before, so this is a whole new mountain climb for me. 



Best


Phil
 

___

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

Please do not post 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: [SOLVED] building an AppleScript editor app

2014-12-07 Thread 2551
> 
> -[OSAScript executeAndReturnDisplayValue:error:]


Bingo! THAT's what I was looking for! 

In my current project (I have several derivatives of the editor I'm building, 
which is another thing that keeps me playing with it), I'd switched to 
NSAppleScript and forgotten that OSAScript has one or two more tricks. I was 
also spending too much time looking at NSAppleEventDescriptor thinking the 
answer was/should have been in there somewhere. 

Right, then. Now, let's see about that dictionary viewer...




___

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

Please do not post 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: set maximum file size

2014-10-08 Thread 2551

> On 8 Oct 2014, at 21:08, Alex Zavatone  wrote:
> 
> Why not check the file size before writing? 

Ah, yes, like a kid who picks up the binoculars fat-end first, I was looking at 
things the wrong way around (how to limit the size instead of getting the size 
and doing something with that info).

Thanks a lot, that should do it!


Best


P
___

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

Please do not post 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

set maximum file size

2014-10-08 Thread 2551
Hi folks

I have an app which needs to save some of its data into a log file. I have the 
method set up already for creating and appending the log file. However, I'd 
like to limit the file size and initiate a file turn over when it reaches a 
certain size. What is the best way to accomplish this?

I'm aware of Cocoa Lumberjack, but I really don't want to import an entire 3rd 
party framework for the sake of the one simple function that I need if I can 
avoid it.

Any thoughts much appreciated.


Best


P
___

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

Please do not post 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: NSLinguisticTagger

2014-09-24 Thread 2551
That's correct behaviour. There is no such word as เหลือง in Thai. It's a 
particle that always exists as an adjunct to something else. Although  สี is a 
word on its own, เหลือง is not. Even when Thais speakers say something like 
รถเหลือง, this is colloquial speech. Technically, it's รถสีเหลือง. 






On 24 Sep 2014, at 12:02, Gerriet M. Denkmann  wrote:

> 
> On 24 Sep 2014, at 11:46, Roland King  wrote:
> 
>> 
>>> On 24 Sep 2014, at 12:31 pm, Gerriet M. Denkmann  
>>> wrote:
>>> 
>>> I have a problem with NSLinguisticTagger / CFStringTokenizer on iOS 8.0
>>> 
>>> OS X 10.9.5 (and iOS 7 and earlier) parses "สีเหลือง" quite rightly as two 
>>> words: "สี" = colour and "เหลือง" = yellow.
>>> 
>>> No dictionary will ever contain "yellow colour". Every dictionary will 
>>> contain "yellow" and "colour".
>>> There are hundreds, if not thousands of these expressions, which are 
>>> wrongly classified as one word.
>>> Might have something to do with the new predictive keyboard.
>>> 
>>> But I am not writing this to complain, but to ask for a favour: could 
>>> anybody on 10.10 just click anywhere in: "สีเหลือง" and tell me whether all 
>>> gets highlighted, or just a part (as in 10.9.5)?
>> 
>> 
>> If I double click anywhere on the right of that I get the second part (all 
>> bar the first character) highlighted. Clicking on the first character I get 
>> just that character. So 10.10 (beta 8) splits that sequence into two 
>> ‘words’. 
> This is a big relief. Thanks a lot.
> 
>> 
>> Why do you suspect the predictive keyboard? Certainly wouldn’t be the first 
>> thing I thought of seeing that issue. I would probably instead assume I’d 
>> written myself a bug.
> 
> Well, here is the code; maybe you can find a bug:
> 
> let text = "สีเหลือง"
> let opts: Int = 0
> let schemes = [ NSLinguisticTagSchemeTokenType, 
> NSLinguisticTagSchemeNameTypeOrLexicalClass ]
> let tagger = NSLinguisticTagger(tagSchemes: schemes, options: opts )
> 
> let nsText = text as NSString
> let length = nsText.length
> tagger.string = nsText
> let range = NSMakeRange(0,length)
> let theScheme = NSLinguisticTagSchemeTokenType
> let ops = NSLinguisticTaggerOptions(0)
> tagger.enumerateTagsInRange ( 
>   range, 
>   scheme: theScheme, 
>   options:ops,
>   usingBlock: 
>   {   (   tag:String!, 
>   tokenRange: NSRange, 
>   sentenceRange:  NSRange, 
>   stop:   UnsafeMutablePointer
>   ) -> Void in
>   
>   let word = nsText.substringWithRange(tokenRange) 
>   println("\(tag) = \(word) " )
>   }
> )
> 
> Gerriet.
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post 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/sqwarqdev%40icloud.com
> 
> This email sent to sqwarq...@icloud.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: return string that is the difference between two other strings

2014-09-20 Thread 2551
On 21 Sep 2014, at 13:45, Allan Odgaard  wrote:
> One solution is the UNIX diff command  which, as Jens 
> previously mentioned, works on lines and is commonly used by version control 
> systems and programmers. You can call out to this command from Cocoa (e.g. 
> via NSTask).
> 


Thanks, Allan, for putting the 2 and 2 together for me. I didn't occur to me 
call diff from NSTask.

An excellent idea I'll play with later today. Thanks again.





signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: return string that is the difference between two other strings

2014-09-20 Thread 2551
On 21 Sep 2014, at 13:03, Kyle Sluder  wrote:

> 
> No, it is nowhere near a common operation to perform on strings.


I stand corrected on that front, then (apparently...). Doesn't change the fact 
that I need to know how to do it, unless someone is willing to  point me in the 
direction of a better way, for which I'd be most grateful.

> It’s common for *programmers* to perform on their source code.
> 

I've no idea what this means. Is it a cryptic answer to the problem, or a dig 
at my level of experience? 


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: return string that is the difference between two other strings

2014-09-20 Thread 2551

On 21 Sep 2014, at 13:38, Diederik Meijer | Ten Horses  
wrote:

> Meaning I would compare words and their index in an array of words created 
> from the two strings. 

Thanks, Diederik. That's exactly the approach I took by using NSMutableArray's 
-removeObject. 


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: return string that is the difference between two other strings

2014-09-20 Thread 2551
On 21 Sep 2014, at 10:58, Jens Alfke  wrote:

> What I'd want is something that shows the combined text with the deleted 
> words crossed out and the new words highlighted.

Thanks, Jens. You've hit the nail on the head. That's exactly what I want to 
achieve. I said order didn't matter because I figured that was a problem to 
sort out once I'd got the differences. 

As I've been saying all along, this is such a common operation, I'd have 
thought there must be a common cocoa method or API for doing it. So the 
question is, can anyone tell me what that is?




signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: return string that is the difference between two other strings

2014-09-20 Thread 2551
On 21 Sep 2014, at 02:56, Ludovic Nicolle  wrote:

> Once we (and maybe yourself? :p ) know what you truly want

OK, I should have presented the problem, rather than a solution that needed 
improving. If you have two text files written out at different times, how do 
you guys determine the difference between their contents to produce a third 
file stating the changes? (You can assume they are plain text and contain 
nothing other than the traditional ASCII 128 character set). That's all I'm 
trying to achieve. 

For my use case, order can be ingored, but case sensitive differences and 
repeats must be counted as unique instances. 

Thus, if 

String A =  @"Happy Birthday to You Happy Birthday to You Happy Birthday Dear 
Mary";
//Happy = 3, Birthday = 3, to = 2, You  = 2, Dear = 1, Mary = 1
 
String B = @"Happy Birthday Dear Mary and you too Scary";
//Happy = 1, Birthday = 1, Dear = 1; Mary = 1, and = 1, you = 1, too = 1, Scary 
= 1

The result should be the subtraction of the word counts, returning:

result = @"Happy Birthday to You Happy Birthday to You and you too Scary; 
//Happy = 2, Birthday = 2, to =2, You = 2, and = 1, you =1, too =1, Scary = 1
 
Just to sum up, the suggestions I've had so far are to look at

CFStringTokenizer (Thanks, Kyle)
NSLinguisticTagger (Thanks, Gerd)

and

NSMutableSet -minusSet: or -intersectSet (Gerd, again). 

I did look at -minusSet before setting out to reinvent the wheel (rather 
squarely) using a convoluted implementation of NSArray's removeObject. but I 
overlooked -intersectSet. I'll look again.


Thanks for the help so far.

Best



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: return string that is the difference between two other strings

2014-09-20 Thread 2551
Definition:

On 21 Sep 2014, at 00:53, Jens Alfke  wrote:

> a set of the words that are in the second string but not in the first

That's close. Any words that are in one string but not in the other. Yup, that 
is what I'm after. 

I'll pass if people start asking me what I mean by a 'word', though I'm well 
aware that that is a genuine question at certain levels and across different 
localisations. Take it that for the purpose of the inquiry I mean any 
combination of letters in the standard English alphabet that is space 
delimited. Punctuation and diacriticals can be ignored for my current purposes.


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: return string that is the difference between two other strings

2014-09-20 Thread 2551
Really? OK.
On 21 Sep 2014, at 00:05, SevenBits  wrote:

> On Sep 20, 2014, at 1:01 PM, 2551 <2551p...@gmail.com> wrote:
> 
>> I've searched high and low (or roundabouts in circles) for a built in method 
>> that will return the difference between two strings as a string. 
>> 
>> I hacked up this solution below, but it feels cludgy and isn't very robust 
>> (punctuation will mess it up a little); worse, I can't help feeling I must 
>> be reinventing the wheel. Finding the string that is the difference between 
>> two other strings must be a basic need. How do you guys do this? 
> 
> Define what you mean the “difference between two strings”.

 
For example:

   NSString *mary = @"mary had a little lamb, a little lamb she had";
NSString *scary = @"mary had a little lamb, a little naughty fella of a 
lamb she had for sure";
NSString *isDifferent = [self getDifference:mary and: scary];
NSLog(@"%@", isDifferent);

The method I posted below produces the difference that I want ("naughty fella 
of a for sure"). But I want to know if there's a more orthodox and robust 
solution. 




> 
>> 
>> 
>> 
>> -(NSString *)getDifference: (NSString *)aString and:(NSString 
>> *)anotherString {
>>   int i = aString.length;
>>   int j = anotherString.length;
>>   NSString *result, *longest, *shortest;
>> 
>>   if (i == j) {
>>   result = @"";
>>   return result;
>>   }
>> 
>>   if (i > j) {
>>   longest = aString;
>>   shortest = anotherString;
>>   } else {
>>   longest = anotherString;
>>   shortest = aString;
>>   }
>> 
>>   NSArray *fa = [longest componentsSeparatedByString: @" " ];
>>   NSArray *sa = [shortest componentsSeparatedByString: @" "];
>>   NSMutableArray *remainder = [NSMutableArray arrayWithArray:fa];
>>   [remainder removeObjectsInArray:sa];
>>   result = [remainder componentsJoinedByString:@" "];
>>   return result;
>> 
>> }
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post 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/sevenbitstech%40gmail.com
>> 
>> This email sent to sevenbitst...@gmail.com
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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

return string that is the difference between two other strings

2014-09-20 Thread 2551
I've searched high and low (or roundabouts in circles) for a built in method 
that will return the difference between two strings as a string. 

I hacked up this solution below, but it feels cludgy and isn't very robust 
(punctuation will mess it up a little); worse, I can't help feeling I must be 
reinventing the wheel. Finding the string that is the difference between two 
other strings must be a basic need. How do you guys do this? 



-(NSString *)getDifference: (NSString *)aString and:(NSString *)anotherString {
int i = aString.length;
int j = anotherString.length;
NSString *result, *longest, *shortest;

if (i == j) {
result = @"";
return result;
}

if (i > j) {
longest = aString;
shortest = anotherString;
} else {
longest = anotherString;
shortest = aString;
}

NSArray *fa = [longest componentsSeparatedByString: @" " ];
NSArray *sa = [shortest componentsSeparatedByString: @" "];
NSMutableArray *remainder = [NSMutableArray arrayWithArray:fa];
[remainder removeObjectsInArray:sa];
result = [remainder componentsJoinedByString:@" "];
return result;

}



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: What is the modern Cocoa way to send an Apple Event to yourself?

2014-08-22 Thread 2551

On 22 Aug 2014, at 12:24, Daryle Walker  wrote:
> Oh, is there a non-retired list of the basic Apple Events and their required 
> and optional parameters?
> 

Non-retired? Hmm; tricky. There's Apple Event Manager Reference and Apple 
Events Programming Guide, both 2007, both marked as 'legacy'. 

Then there's NSAppleEventDescriptor Class Reference, also from 2007 and NOT 
marked as legacy (last I looked).

Phil


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: Storing a value to access across app launches and even re-install

2014-08-19 Thread 2551
It's impossible to store something on a users computer and make it invulnerable 
from the user deleting it.

The best you can do is hide it, but there are various ethical hoops to jump 
through with that one.

Notwithstanding better advice from other list members, about best advice i've 
seen on this topic is summarized here:

http://stackoverflow.com/questions/7730916/how-do-you-make-a-cocoa-demo-app-that-only-works-for-a-limited-time


Best

Phil
On 19 Aug 2014, at 12:25, Navneet Kumar  wrote:

> Hi,
> 
> I need to store a numeric value in the system and update and access it across 
> every launch of my app.
> Also is it possible to safely store it in the system so that it can be picked 
> up even after a re-install of my app?
> I want it to be secure, so that even a os x savvy user may not be able to 
> delete/modify this value.
> 
> Its more like the apps that allow a certain number of launches with full 
> functionality before requiring registration.
> 
> Thanks in advance.
> 
> Best,
> Navneet
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post 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/2551phil%40gmail.com
> 
> This email sent to 2551p...@gmail.com



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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

[Solved] rotate UI subview (CFAffline Transform)

2014-07-18 Thread 2551
Thanks Steve and Cody

You were both correct that what was happening was that the subsequent 
translation was cancelling the rotation. All I needed to do was store the 
rotation as a CGFloat on the object and then call the rotation again after the 
move. 

Thanks again.





signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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

rotate UI subview (CFAffline Transform)

2014-07-18 Thread 2551
I have a problem which I can't find anyone else asking after hours of searches 
through stackexchange and the like. 

In a UIView, I'm rotating a subview with a Gesture recognizer that calls this 
selector:

- (IBAction)rotateShape:(UIRotationGestureRecognizer *)gesture {
gesture.view.transform = CGAffineTransformMakeRotation(gesture.rotation);
}

The rotation performs as expected and all is right with the world. However, as 
soon as I attempt to touch or move the rotated subview again (it also has a pan 
gesture), it reverts to its original orientation. 

It seems the original transform values are still being retained and held by the 
object or by the drawing context (I'm still not quite comfortable with all the 
graphics theory; indeed, this is my first attempt at trying to unlock its 
mysteries). What else do I need to do to ensure the new rotated, orientation 
"sticks" so that I can move the shape without it reverting to the original 
orientation?

Thanks for any help.


Phil


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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

can I safely ignore : CGAffineTransformInvert: singular matrix?

2014-07-15 Thread 2551
I added a bannerView to a custom UI detailController view, wired it up to a 
property in the class's .h file then added 

self.canDisplayBannerAds = YES;j 

to my implementation file. The banner works fine, but I'm getting several 
instances of 

: CGAffineTransformInvert: singular matrix

in console every time I segue into the view. The app isn't crashing or 
producing any other kinds of error output, but I'm wondering whether I'm just 
storing up trouble for later in the day.

The discussion here 

http://stackoverflow.com/questions/7471027/overriding-layoutsubviews-causes-cgaffinetransforminvert-singular-matrix-ran

offered some good theoretical perspective, but if its correct, I'm not sure 
what I need to adjust. I suspect its something to do with the iAd banner 
wanting to redraw the content view, but as I say, the banner displays and works 
fine. The parent view is mostly empty at the moment, but I will be adding 
controls to it next.

Another bunch of search results claim that this error message is/was a bug or 
(at least) an "oddness" associated with Storyboards. One remedy suggested 
switching off AutoLayout (see 
http://www.raywenderlich.com/forums/viewtopic.php?f=20&t=2793&start=120#p32794).
 However, I'm using Xcode 6 beta 3 and the new Size Classes option, which 
doesn't allow for AutoLayout being switched off.

So, my apps not crashing, the banner ad is displaying, can I ignore it this 
message? Or am I going to be tearing my hair out over it further down the line?

Thanks for your thoughts.


Phil






signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: Notification Center

2014-06-08 Thread 2551
Thanks, Kyle. That worked perfectly. The steps, in case anyone else needs it, 
to ensure notifications get delivered to the screen and not just to the 
notification center:

1. add  NSUserNotificationCenterDelegate to the header file:

<..., NSUserNotificationCenterDelegate>

2. In your delegate.m file, add the following to your init or 
didFinishLaunching method:

[[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:(id)self];

3. Finally, add the override method somewhere later in the same file:

- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center 
shouldPresentNotification:(NSUserNotification *)notification{
return YES;
}

That's it. Notifications should get delivered regardless of whether your app is 
frontmost or not. 



On 28 May 2014, at 00:40, Kyle Sluder  wrote:

>> On May 27, 2014, at 1:20 PM, 2551 <2551p...@gmail.com> wrote:
>> 
>> Moreover, the pair that don't work DO show in the Notification Center 
>> sidebar/panel, so I know the code is good, but for reasons I can't get to 
>> the bottom of, the banners just don't show. Why would some show but others 
>> not?
> 
> Notification Center uses certain heuristics to determine whether to show a 
> balloon for each notification it delivers. (One of the criteria is whether 
> the app sending the notification is currently frontmost.)
> 
> If you want to override Notification Center’s heuristics, set a delegate on 
> the shared NSUserNotificationCenter and implement 
> -userNotificationCenter:shouldPresentNotification:.
> 
> --Kyle Sluder



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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

Notification Center

2014-05-27 Thread 2551
I'm officially flumoxed. 

My app has a number of methods that send notifications to Notifications Center. 
All of them work, except for a pair in one method (there's a success/fail pair 
attached to an if/else clause in each case). The code is identical (they're all 
derived from the same code snippet):

NSUserNotification *success = [[NSUserNotification alloc] init];
success.title = @"app name";
success.informativeText = @"something was done";
success.soundName = NSUserNotificationDefaultSoundName;

[[NSUserNotificationCenter defaultUserNotificationCenter] 
deliverNotification:success];

Moreover, the pair that don't work DO show in the Notification Center 
sidebar/panel, so I know the code is good, but for reasons I can't get to the 
bottom of, the banners just don't show. Why would some show but others not?

I've rebuilt, restarted (both Xcode and the machine), disposed of Derived data 
and even cleaned out Notification Center's caches and plists, but my head has 
started to bleed from the excessive scratching.

Any balm out there?

Best


P


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: string literals and performance

2014-05-25 Thread 2551
> On 25 May 2014, at 15:11, Gary L. Wade  wrote:
> The performance benefit for choosing the first style over the second style 
> comes in if you need to debug your app or change the contents of a string 
> literal.

That's what I understood from the stackexchange discussion I linked to. As I 
said, those issues aren't relevant in this case, so I was wondering if there 
were others. From the replies thus far, it seems not, and I'm inclined to go to 
style 2 for reasons more or less outlined by Quincey.

Thanks to all for your thoughts.


Best

P




signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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

string literals and performance

2014-05-24 Thread 2551
Are there any performance implications that would suggest preferring one or the 
other of these different styles?

NSString *s = @"sing me a song";
[myClass aMethod: s];

and

[myClass aMethod: @"sing me a song"];

I have a lot of the first kind in my code, and I'm thinking of simplifying it 
by turning them all into the second kind. A discussion on stackoverflow here:

http://stackoverflow.com/questions/25746/whats-the-difference-between-a-string-constant-and-a-string-literal

seems to suggest (if I've understood it correctly) that I'd be better off 
sticking with the first style to avoid errors and to speed up comparisons. 
However, since in my code they're all one-off 'throw away" strings that don't 
get used elsewhere, that doesn't seem relevant. Is there any other reason why I 
should stick with the first style rather than the second?


Thanks for your thoughts.

P


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: get & set firewall status

2014-05-20 Thread 2551
On 20 May 2014, at 19:48, Edward Marczak  wrote:

>  This is the firewall represented in
> system_profiler output, so, check out the man page for (or use otool
> on) afctl.


Thanks for the feedback everyone.

I've done an exhaustive search, but there's nothing called 'afctl' on my system 
(latest public release of 10.9.3).

If there's no Cocoa methods for interacting with the OS X firewall, then I'll 
throw this over at the list suggesed by Jens, and I supose further replies 
should probably be to me off-list to reduce noise. If I figure out the answer 
to this and others want to know what it is, email me and I'll cc you in any 
follow ups.

Best


Phil





signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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

get & set firewall status

2014-05-16 Thread 2551
Is there a Cocoa way to get get and set the status of the built-in OS X 
Firewall? At the moment I'm using an NSTask and extracting the relevant part of 
the string from 

system_profiler SPFirewallDataType 

to get the status, but it's slow. 

Is there a better way?

TIA


Phil


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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

new iWorks-style document View

2014-05-08 Thread 2551
I'm seeing some 3rd party apps appearing now that use a similar interface as 
the new Pages 5 (Numbers, Keynote). Both the style of the toolbar and the way 
the split views / panels work are visually very different from pre-Mavericks.

Is there any apple documentation, WWDC video or sample code that models how to 
build this new kind of view? I've looked in the dev resources but maybe I'm not 
using the right search terms. The only new view View stuff I can find is on the 
stack view class.

TIA

Phil


signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: Help with Help

2014-04-30 Thread 2551
On 30 Apr 2014, at 00:52, Gordon Apple  wrote:

> We would like to get a recommendation on the best way to generate a help
> system for a fairly complex application. 

You might also try techwrl-list, they're the experts on help systems:

http://www.techwr-l.com/frequently-asked-questions.html#subscribe



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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

Please do not post 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: Threaded drawing

2013-12-12 Thread 2551
OK, OK, point taken. 

I think I'll print that list (and Uli’s caveat) and hang it on the wall, right 
next to the space I use for banging my head when struggling with Cocoa… :p


On 12 Dec 2013, at 18:46, Uli Kusterer  wrote:

> On 11 Dec 2013, at 16:01, Jens Alfke  wrote:
>> On Dec 11, 2013, at 4:39 AM, 2551 <2551p...@gmail.com> wrote:
>>> It’s certainly seemed the case to me that I would have probably spent less 
>>> time just writing my own code from scratch than I spend trying to figure 
>>> out how half the methods I’m trying to use should be implemented. 
>> 
>> That’s probably not actually true; our experience of time is pretty 
>> subjective, and time goes by faster when you’re in a ‘flow’ state than when 
>> you’re trying to figure out something new.
>> 
>> Even if it’s a bit faster to write your own code, using the system APIs is 
>> probably still a win because
>> (a) their implementations are almost certainly better debugged and more 
>> performant than your brand-new unused code;
>> (b) they will be improved and maintained by other people over time, saving 
>> you the trouble;
>> (c) they’ve been designed to be reusable, so you’ll be able to use them 
>> quickly in your next project;
>> (d) you can later hang out here explaining the APIs to noobs and make 
>> yourself look like a guru (or better yet, write books) ;-)
> 
> 
> Let's preface that with the statement that I agree with your conclusion.
> 
> Using Apple's code generally saves a lot of hassle and work because your code 
> has only you doing QA. Apple's code has all of Apple, plus you, plus everyone 
> else outside Apple who uses this API doing QA. It's bound to be more solid. 
> That said, Apple's code still has only whatever team at Apple is responsible 
> for that code fixing it. Only they have the source code.
> 
> So occasionally, when a piece of code isn't or stops being a priority for 
> Apple, item (b) above can actually be a liability. Still, we've seen how 
> people circumvent that with sync code and CoreData. People first use Apple's 
> code, getting a leg up and a release out the door and money in their coffers, 
> and can then afford to fund their own version.
> 
> -- Uli Kusterer
> "The Witnesses of TeachText are everywhere..."
> 
> 
> 


___

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

Please do not post 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: help with logic error

2013-12-12 Thread 2551
> On 12 Dec 2013, at 18:56, Mike Abdullah  wrote:
> If orientation happens to have a value *other* than NSVerticalRuler or 
> NSHorizontalRuler, you’ll reach this point with borderLineRect containing 
> garbage since it’s never been filled in properly. This is what the analyser 
> is complaining of I believe.

Thanks for that, Mike.

Putting in a default cured the error.


Best


Phil



___

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

Please do not post 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

help with logic error

2013-12-12 Thread 2551
Hi folks

I need some help with a logic error the Static Analyzer is throwing up. I 
didn’t write this code (in fact, its a piece of Apple sample code I’m resuing 
in my project), and I’m not quite sure how to correct it. It goes like this, 
where the numbers [1], [2], [3], [4] represent the end points of the analyzer's 
blue arrows:

   [1] const NSRect bounds = [self bounds];

[backgroundColor set];
NSRectFill(dirtyRect);

const NSRulerOrientation orientation = [self orientation];
NSRect borderLineRect;
[2] switch (orientation) {
case NSVerticalRuler:
borderLineRect = NSMakeRect(NSMaxX(bounds)-1.0, 0, 1.0, 
NSHeight(bounds));
break;
case NSHorizontalRuler:
borderLineRect = NSMakeRect(0, 0, NSWidth(bounds), 1.0);
break;
}

[3]if [4]([self needsToDrawRect:borderLineRect]) {
[[backgroundColor shadowWithLevel:0.4] set];
NSRectFill(borderLineRect);

The error message says, in full: Passed-by-value struct argument contains 
uninitialized data (e.g., via the field chain: 'origin.x’). 


Thoughts much appreciated.


Phil

___

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

Please do not post 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: Threaded drawing

2013-12-11 Thread 2551

On 11 Dec 2013, at 17:20, Graham Cox  wrote:
> The documentation is sparse though ...That’s my somewhat limited 
> understanding, not particularly well-informed by the docs, but appears to 
> work by experimentation. 

The commonality of this experience makes me wonder almost with everything I try 
to do in Cocoa whether it really IS true as advertised that the pre-written 
APIs make it easier than writing your own raw code all the way down in C and 
Obj-C or whether the whole Cocoa edifice has turned into such a monster that 
for anyone except the seasoned expert, quite the reverse is true.

It’s certainly seemed the case to me that I would have probably spent less time 
just writing my own code from scratch than I spend trying to figure out how 
half the methods I’m trying to use should be implemented. Of course, I always 
give in to Cocoa on the grounds that I figure I must be being stupid and 
missing the obvious and/or it’s inevitable that I’ll have to learn how to do it 
‘the Cocoa way’ in the end. 

Still, you can’t help wondering… ;)
___

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

Please do not post 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: NSTextView - stopping conversion of quotation marks

2013-11-12 Thread 2551
On 12 Nov 2013, at 23:51, 2551 <2551p...@gmail.com> wrote:
> Still not sure how to go about doing the latter 
> 

Scratch that. Light bulb went on. Got it! 

Thanks muchly. I’ve put this one to bed and can now move on to the next 
probl…ahem…*stage* of development. :p





___

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

Please do not post 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: NSTextView - stopping conversion of quotation marks

2013-11-12 Thread 2551

On 12 Nov 2013, at 23:25, Graham Cox  wrote:

> 
> This sounds like the smart quote substitution feature, which has nothing to 
> do with the font or other text attributes. 


Thanks, understood. However, I probably didn’t make it clear that I actually 
need to do both. i.e., remove the quote formatting AND set a particular default 
font and color. Still not sure how to go about doing the latter or why the 
Attributes panel settings are apparently a waste of space. 

Anyway, many thanks for the tips so far! 


Best

P
___

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

Please do not post 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: NSTextView - stopping conversion of quotation marks

2013-11-12 Thread 2551
Thanks Graham and Mark.


Candle out, torch on (with fresh batteries).  :)


P



On 12 Nov 2013, at 23:25, Graham Cox  wrote:

> 
> On 12 Nov 2013, at 4:19 pm, 2551 <2551p...@gmail.com> wrote:
> 
>> I’m confused. If you select a NSTextView item in IB, then examine the 
>> Attributes Inspector, you’re presented with various options for setting text 
>> attributes, such as the font, size and color. In my clumsy hands, none of 
>> these work. The text entry always defaults to Helvetica 12.0 in standard 
>> black. 
> 
>> Specifically for what I’m trying to accomplish, the text view always convert 
>> the quotation characters  " " to “ ” when the user types in the text view, 
>> which totally messes up the functionality of my app.
> 
> This sounds like the smart quote substitution feature, which has nothing to 
> do with the font or other text attributes. Have a look at [NSTextView 
> setAutomaticQuoteSubstitutionEnabled:].
> 
> Depending on how you are loading text into the text view, text attributes set 
> in IB might be overridden. If you are starting with an empty text view that 
> you type into, you will probably want to use -setTypingAttributes: to set the 
> initial font, etc used when typing. However, that setting is pretty fragile, 
> and will need to be performed when the selection changes. I think the 
> cocoabuilder reference you linked discusses this.
> 
>> Turning on the Field Editor does stop the conversion, but then restricts me 
>> to a single cell/line. How do I stop this automatic re-formatting but retain 
>> the ability to enter line breaks? 
> 
> I really don’t think the Field Editor should come into this - that’s used for 
> entering text into small fields, not when using a complete NSTextView. Forget 
> about that.
> 
> —Graham
> 
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/sqwarqdev%40icloud.com
> 
> This email sent to sqwarq...@icloud.com


___

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

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

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

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

NSTextView - stopping conversion of quotation marks

2013-11-12 Thread 2551
I’m confused. If you select a NSTextView item in IB, then examine the 
Attributes Inspector, you’re presented with various options for setting text 
attributes, such as the font, size and color. In my clumsy hands, none of these 
work. The text entry always defaults to Helvetica 12.0 in standard black. 
Specifically for what I’m trying to accomplish, the text view always convert 
the quotation characters  " " to “ ” when the user types in the text view, 
which totally messes up the functionality of my app. Turning on the Field 
Editor does stop the conversion, but then restricts me to a single cell/line. 
How do I stop this automatic re-formatting but retain the ability to enter line 
breaks? 

I’d have thought that setting the default options for a text view was a fairly 
common need, yet searches have only pointed me to one or two posts that discuss 
this problem, the most useful (but still not detailed enough for my current 
understanding) goes back to 2006 here:

http://www.cocoabuilder.com/archive/cocoa/160492-setting-the-default-font-of-an-nstextview.html

So I’m now deep (have been for most of the day) into numerous Apple 
documentation items (always a frustrating experience, since they are inevitably 
heavy on describing the wonderous possibilities of Cocoa and referencing a 
thousand other “Don’t miss...” documents while depressingly light on 
demonstrative details. Still, I digress…). Undoubtedly both a rite of passage 
and a useful extension to my learning, but it seems bizarre to me that 
something as basic as setting the default font attributes in a text view and 
avoiding automatic conversions should require heavy coding. I could do this in 
C with a blindfold on, but in Cocoa, I feel like I’m in a galaxy-wide void with 
only half a candle to light my way. 

Any enlightenment hugely appreciated.


Best

Phil


___

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

Please do not post 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 icons and images

2013-11-10 Thread 2551
On 10 Nov 2013, at 14:20, 2551 <2551p...@gmail.com> wrote:
>  I can’t find any clear specifications in the documentation as to what 
> exactly the ideal image size and resolution should be.

I finally stumbled upon:

32x32px @72dpi 

as giving consistent results. 
___

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

Please do not post 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 and images

2013-11-09 Thread 2551
I’ve spent the entire morning trying to import my own custom images for toolbar 
icons, with varying success. While they tend to look OK in both the ImageAssets 
interface and in the xib file, when I build and run the app they sometimes 
render correctly but (more often) sometimes do not.  I’ve experimented with 
png’s of almost every size from 32x32 to 512x512. I’ve tried 72dpi and 300dpi, 
but nothing seems to consistently work. 

I’m struggling to understand the logic of why that might be. I can’t find any 
clear specifications in the documentation as to what exactly the ideal image 
size and resolution should be. Am I also right in thinking that only png format 
is now allowed (as I can’t seem to import tiffs)?

I also note that ‘Rounded Segmented Textured Controls’ of the sort used in Mail 
and Safari are flagged as ‘Deprecated’. Does anyone know what we are supposed 
to use instead?

Any advice greatly appreciated.



Best

Phil
http://applehelpwriter.com


___

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

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

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

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

Re: Apple Sample Code WWDC 2010 session 114 (2551)

2013-11-08 Thread 2551
For all those interested:

https://www.dropbox.com/s/nqdsguiap4qs9ec/WWDC_2010_114.zip

Best

Phil
http://applehelpwriter.com

On 9 Nov 2013, at 01:54, Brian Clark  wrote:

> 
> On Nov 8, 2013, at 11:18 AM, 2551 <2551p...@gmail.com> wrote:
> 
>> I have now been fortunate to receive a copy of the code from a list member. 
>> I’m also grateful to several others that also kindly offered me the code.
> 
> I'm sure there are others interested in this code, if not now than for future 
> reference. Is it available for download anywhere? 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

Re: Apple Sample Code WWDC 2010 session 114

2013-11-08 Thread 2551
I have now been fortunate to receive a copy of the code from a list member. I’m 
also grateful to several others that also kindly offered me the code. 

I’d been banging my head on the desk over this problem for nearly a week. It 
took 28 minutes for the list to answer my wishes. It took me about ten minutes 
to scan the code and see where I’d been going wrong. You folks are awesome! :)) 

Thanks again to all who responded. :)


Best

Phil



On 5 Nov 2013, at 19:40, 2551 <2551p...@gmail.com> wrote:

> Hi folks
> 
> I’m desperately trying to track down some Apple sample code that was featured 
> at the WWDC 2010, related to session 114, entitle d ‘Advanced Cocoa Text Tips 
> and Tricks.
> 


___

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

Please do not post 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

Apple Sample Code WWDC 2010 session 114

2013-11-08 Thread 2551
Hi folks

I’m desperately trying to track down some Apple sample code that was featured 
at the WWDC 2010, related to session 114, entitle d ‘Advanced Cocoa Text Tips 
and Tricks.

The video is available on Apple’s Developer forum and iTunes University, but 
the sample project used in the video is not available on the site. Nor has 
Google returned me any successful hits.

I think the actual Xcodeproj file is called ‘WWDC_2010_114’ and includes a 
number of classes I’m desperate to get hold of (I’ve tried recreating as much 
as I can from the video, but alas I’m not skilled enough in Cocoa yet and I 
can’t figure out the bits I’m missing). The code pertains to implementing 
editor features similar to those seen in Xcode like text folding, line numbers 
and in-line contextual menus.

I’ve seen other code for line numbers elsewhere (Noodlesoft’s stuff here: 
https://github.com/MrNoodle/NoodleKit) but this is not sufficient for what I’m 
after. 

I’d really appreciate it if anyone could provide a link to where the Apple 
sample code might be available, or (long shot!!!) a copy if you happened to 
have been an attendee at WWDC 2010 and downloaded yourself!
 



Phil



___

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

Please do not post 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