Re: setApplicationIconImage:

2015-01-23 Thread Rick C.
Thanks everyone for the help.  Bit of effort for something simple though.  
Unfortunately setApplicationIconImage: works great it’s just I can’t find a 
method to put it in that will cause the change before the app launches.  It 
always takes place a second after the app launches…


> On Jan 23, 2015, at 11:09 AM, Charles Srstka  wrote:
> 
> I think you should be able to do what you want using a Dock Tile Plugin:
> 
> https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/customizing_docktile/CreatingaDockTilePlug-in/CreatingaDockTilePlug-in.html
>  
> 
> 
> Definitely don’t modify your app’s own bundle. Not only is that evil, but 
> it’ll invalidate your code signature.
> 
> Charles
> 
>> On Jan 21, 2015, at 11:46 PM, Rick C. > > wrote:
>> 
>> Hi,
>> 
>> I’m using NSApp setApplicationIconImage: to set a different icon for 
>> Yosemite.  Problem is the standard icon appears for a second then it changes 
>> to the Yosemite one.  Same when quitting the app.  Is there a better way to 
>> do this?
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
>> )
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
>> 
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40charlessoft.com 
>> 
>> 
>> This email sent to cocoa...@charlessoft.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: setApplicationIconImage:

2015-01-23 Thread Charles Jenkins
Rick, I have a silly suggestion you might like. 

I don't really understand what could be so different about the Yosemite icon 
that it would seem glaringly out of place on other systems, but assuming it 
really is the case that you want to continue to have two versions, I suggest 
you continue to use setApplicationIconImage:, but do things the other way 
around. Make the Yosemite icon be the app's official one, and only call 
setApplicationIconImage: for earlier OS versions. That way any unpleasantness 
will cure itself when the user upgrades. You might even include a preference 
setting so that if the change offends someone, he can turn it off and keep the 
Yosemite icon on any OS version.

-- 

Charles

On January 23, 2015 at 04:55:56, Rick C. (rickcort...@gmail.com) wrote:

Thanks everyone for the help. Bit of effort for something simple though. 
Unfortunately setApplicationIconImage: works great it’s just I can’t find a 
method to put it in that will cause the change before the app launches. It 
always takes place a second after the app launches…


> On Jan 23, 2015, at 11:09 AM, Charles Srstka  wrote:
>  
> I think you should be able to do what you want using a Dock Tile Plugin:
>  
> https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/customizing_docktile/CreatingaDockTilePlug-in/CreatingaDockTilePlug-in.html
>  
> 
>  
> Definitely don’t modify your app’s own bundle. Not only is that evil, but 
> it’ll invalidate your code signature.
>  
> Charles
>  
>> On Jan 21, 2015, at 11:46 PM, Rick C. > > wrote:
>>  
>> Hi,
>>  
>> I’m using NSApp setApplicationIconImage: to set a different icon for 
>> Yosemite. Problem is the standard icon appears for a second then it changes 
>> to the Yosemite one. Same when quitting the app. Is there a better way to do 
>> this?
>> ___
>>  
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
>> )
>>  
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
>> 
>>  
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40charlessoft.com 
>> 
>>  
>> This email sent to cocoa...@charlessoft.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/cejwork%40gmail.com

This email sent to cejw...@gmail.com
___

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

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

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

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

What's up with the Cocoa Text System?

2015-01-23 Thread Charles Jenkins
For some reason, typing text on a Mac has always had a little bit of friction: 
however the OS receives keyboard input, it doesn't seem to be able to keep up 
as well as a PC. But lately, toward the end of Mavericks' lifespan and now on 
Yosemite, it has actually become painful to type in text. I'm excited about 
working on my app, but when it comes time to sit down and work on it, I always 
feel noticeable dread about having to type code into XCode.

(Does anyone use BBEdit? Is it more responsive?)

I don't want to open a Mac-vs-PC debate, so let me say I've used Macs since the 
advent of Jaguar and I'd never buy anything else for my primary, personal use. 
I work on PCs all day at work, but I bought a Mac mini there and work on PCs 
remotely through Jump Desktop because the Mac can handle my display better. 
Year over year, my experience is that everything is better on a Mac... except 
typing text. The PC just keeps up better.

I'm not just complaining here: I'm writing a word processor, so I'm concerned 
about how to make my app more responsive.

I'm composing this email using Airmail 2, but it wouldn't matter what email 
client I used. I recently switched from Sparrow, where I had exactly the same 
problems. I have turned off Autocorrect and Check Spelling While Typing to 
eliminate the significant pause that happens each time you finish a word and 
hit the space bar. I just wrote a reply and still had regular hiccups as I 
typed, so then I turned off Substitutions - Smart Links and Substitutions - 
Text Replacement. Now typing flows better and I'm able to get more words typed 
in before a pause. It's much better now, but there are still times when the 
computer will seem to hang for a bit and then a group of ten or so characters 
will all appear at once.

I am not a fast touch-typist, but post-Mavericks, it seems that in every new 
app I have go go and turn off a bunch of text system features we Mac users have 
come to rely on over the years in order to make typing at all bearable.

Is there anything I can do as a developer to make my app more responsive and 
make typing flow better, other than defaulting the app to turn off as many text 
features as possible or writing my own replacement for NSTextView?

-- 

Charles
___

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

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

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

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

Re: What's up with the Cocoa Text System?

2015-01-23 Thread Peter
Maybe this sounds silly, but have you tried to increase the keyboard repeat 
frequency in the system preferences. I once was silly enough not to.

___ Peter Hartmann 



Am 23.01.2015 um 14:50 schrieb Charles Jenkins :

> For some reason, typing text on a Mac has always had a little bit of 
> friction: however the OS receives keyboard input, it doesn't seem to be able 
> to keep up as well as a PC. But lately, toward the end of Mavericks' lifespan 
> and now on Yosemite, it has actually become painful to type in text. I'm 
> excited about working on my app, but when it comes time to sit down and work 
> on it, I always feel noticeable dread about having to type code into XCode.
> 
> (Does anyone use BBEdit? Is it more responsive?)
> 
> I don't want to open a Mac-vs-PC debate, so let me say I've used Macs since 
> the advent of Jaguar and I'd never buy anything else for my primary, personal 
> use. I work on PCs all day at work, but I bought a Mac mini there and work on 
> PCs remotely through Jump Desktop because the Mac can handle my display 
> better. Year over year, my experience is that everything is better on a 
> Mac... except typing text. The PC just keeps up better.
> 
> I'm not just complaining here: I'm writing a word processor, so I'm concerned 
> about how to make my app more responsive.
> 
> I'm composing this email using Airmail 2, but it wouldn't matter what email 
> client I used. I recently switched from Sparrow, where I had exactly the same 
> problems. I have turned off Autocorrect and Check Spelling While Typing to 
> eliminate the significant pause that happens each time you finish a word and 
> hit the space bar. I just wrote a reply and still had regular hiccups as I 
> typed, so then I turned off Substitutions - Smart Links and Substitutions - 
> Text Replacement. Now typing flows better and I'm able to get more words 
> typed in before a pause. It's much better now, but there are still times when 
> the computer will seem to hang for a bit and then a group of ten or so 
> characters will all appear at once.
> 
> I am not a fast touch-typist, but post-Mavericks, it seems that in every new 
> app I have go go and turn off a bunch of text system features we Mac users 
> have come to rely on over the years in order to make typing at all bearable.
> 
> Is there anything I can do as a developer to make my app more responsive and 
> make typing flow better, other than defaulting the app to turn off as many 
> text features as possible or writing my own replacement for NSTextView?
> 
> -- 
> 
> Charles
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/magnard%40web.de
> 
> This email sent to magn...@web.de


___

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

Please do not post admin requests or moderator comments to the list.
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: setApplicationIconImage:

2015-01-23 Thread Steve Mills
On Jan 23, 2015, at 07:34:19, Charles Jenkins  wrote:
> 
> Rick, I have a silly suggestion you might like. 
> 
> I don't really understand what could be so different about the Yosemite icon 
> that it would seem glaringly out of place on other systems, but assuming it 
> really is the case that you want to continue to have two versions, I suggest 
> you continue to use setApplicationIconImage:, but do things the other way 
> around. Make the Yosemite icon be the app's official one, and only call 
> setApplicationIconImage: for earlier OS versions. That way any unpleasantness 
> will cure itself when the user upgrades. You might even include a preference 
> setting so that if the change offends someone, he can turn it off and keep 
> the Yosemite icon on any OS version.

The problem with setApplicationIconImage: is that it will revert back to the 
actual icon when the user quits, right? So if they keep the app in their Dock, 
the icon will keep changing as they launch/quit. -setIcon:forFile:options: 
still sounds like your best bet, because it will make a lasting change. 
Although it's too bad that Apple didn't allow this method to take an .icns file 
as well as an image. That would've made it the perfect solution.

--
Steve Mills
Drummer, Mac geek


___

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

Please do not post admin requests or moderator comments to the list.
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

Is the button group in Safari a general widget ?

2015-01-23 Thread Aaron Lewis
Hi,

I've seen a lot of apps like Safari. 5 buttons in the bottom

Is that a common widget? I couldn't find it on google


-- 
Best Regards,
Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/
Finger Print:   9F67 391B B770 8FF6 99DC  D92D 87F6 2602 1371 4D33
___

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

Please do not post admin requests or moderator comments to the list.
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: setApplicationIconImage:

2015-01-23 Thread Fritz Anderson
On 23 Jan 2015, at 10:07 AM, Steve Mills  wrote:

> -setIcon:forFile:options: still sounds like your best bet, because it will 
> make a lasting change. Although it's too bad that Apple didn't allow this 
> method to take an .icns file as well as an image. That would've made it the 
> perfect solution.
> 

For my own instruction, does it help that NSImage can take TIFF, which can be 
multi-resolution, which I suppose is what you wanted from .icns? It’s what 
Apple advocates for high-resolution within OS X apps, but I’d like to know 
whether the setIcon: pipeline makes that infeasible.

— F


___

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

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

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

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

Re: Is the button group in Safari a general widget ?

2015-01-23 Thread Jonathan Hull
UIToolbar with UIBarButtonItems?

Thanks,
Jon

> On Jan 23, 2015, at 8:20 AM, Aaron Lewis  wrote:
> 
> Hi,
> 
> I've seen a lot of apps like Safari. 5 buttons in the bottom
> 
> Is that a common widget? I couldn't find it on google
> 
> 
> -- 
> Best Regards,
> Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/
> Finger Print:   9F67 391B B770 8FF6 99DC  D92D 87F6 2602 1371 4D33
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/jhull%40gbis.com
> 
> This email sent to jh...@gbis.com


___

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

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

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

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

Re: Is the button group in Safari a general widget ?

2015-01-23 Thread Fritz Anderson
On 23 Jan 2015, at 10:20 AM, Aaron Lewis  wrote:

> I've seen a lot of apps like Safari. 5 buttons in the bottom
> 
> Is that a common widget? I couldn't find it on google


(Notes ~ “widget” doesn’t have the same meaning in iOS/OS X frameworks that it 
does on other platforms. You mean “control.” Jonathan Hull just suggested the 
UIToolbar family, which is an excellent suggestion. I wrote this assuming you 
were asking about OS X. Because you hadn’t said otherwise. The fundamentals 
about what’s available, what has to be custom made, and how to ask questions 
are the same.)

Perhaps you could put what you want to do less telegraphically?

Five buttons on the bottom is not like [desktop] Safari, we can’t use “a lot of 
apps” as a guide to examples, and if you’re talking about the design of your 
own application, how many there are and where doesn’t matter. Buttons exist. 
You can have five of them. You can put them anywhere, singly or together. That 
is common.

I am guessing that you mean something like NSSegmentedControl [if AppKit]. 
Apple [often] has a special appearance for segmented controls in its own 
applications, which are built with private code. 

Many developers want that look, but it’s not in AppKit [UIKit]. You have to 
make your own, or find a third-party library that gives you what you want. 
Maybe you can get better search results if you try the terms “segmented control 
Mac”. [Or “… iOS”.]


— F


___

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

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

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

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

Re: What's up with the Cocoa Text System?

2015-01-23 Thread Jens Alfke

> On Jan 23, 2015, at 5:50 AM, Charles Jenkins  wrote:
> 
> For some reason, typing text on a Mac has always had a little bit of 
> friction: however the OS receives keyboard input, it doesn't seem to be able 
> to keep up as well as a PC. But lately, toward the end of Mavericks' lifespan 
> and now on Yosemite, it has actually become painful to type in text. I'm 
> excited about working on my app, but when it comes time to sit down and work 
> on it, I always feel noticeable dread about having to type code into XCode.

I don't see this problem. I'm quite a fast typist, and apps don't have trouble 
keeping up. In particular, there's not a "significant pause that happens each 
time you finish a word".

I have very occasionally seen Xcode get sluggish, but I could resolve it simply 
be relaunching Xcode. (My hunch is that it was some Xcode bug where a 
timer-based task starts running after every event and taking too much time.)

I'm guessing you either have very old hardware, or too little RAM, or some kind 
of extensions installed (input methods?) that are monitoring keystrokes and 
doing too much work.

The way I'd troubleshoot this is to go to Terminal, enter "sleep 2; sample 
TextEdit 5", immediately switch to TextEdit and type as fast as you can for 5 
seconds. Then look at the sample and see where the time is going and if 
anything looks suspicious ("-[NSAKeyLogger checkForTerroristKeywords:]" maybe…)

—Jens
___

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

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

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

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

Re: What's up with the Cocoa Text System?

2015-01-23 Thread Jens Alfke

> On Jan 23, 2015, at 6:02 AM, Peter  wrote:
> 
> Maybe this sounds silly, but have you tried to increase the keyboard repeat 
> frequency in the system preferences. I once was silly enough not to.

That sounds silly, honestly. That only affects how rapidly a key repeats when 
you hold it down. Useful for arrow keys and Delete, but not a factor while 
typing in text.

—Jens
___

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

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

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

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

Re: setApplicationIconImage:

2015-01-23 Thread Jens Alfke

> On Jan 23, 2015, at 1:53 AM, Rick C.  wrote:
> 
> Unfortunately setApplicationIconImage: works great it’s just I can’t find a 
> method to put it in that will cause the change before the app launches.  It 
> always takes place a second after the app launches…

What you're asking for is impossible, because -setApplicationIconImage is a 
TEMPORARY change to the icon that only takes effect when the method is called, 
and goes away when the app quits. Read that word again: TEMPORARY.

We explained this to you already. If you ask questions and then ignore the 
answers, it makes people less likely to help you in the future. :-p

—Jens
___

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

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

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

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

Re: What's up with the Cocoa Text System?

2015-01-23 Thread sqwarqDev
> On 23 Jan 2015, at 20:50, Charles Jenkins  wrote:
> 
> I have turned off Autocorrect and Check Spelling While Typing to eliminate 
> the significant pause that happens each time you finish a word and hit the 
> space bar.

That's a local issue you've got there. 

1. Create a new user. Restart and log in to that account. If the problem is not 
apparent in the new user account, look carefuly at what 's in the affected 
account's ~/Library/LaunchAgents folder and its System Preferences > Users & 
Groups | Login Items ("look carefully" = remove everytihng and add them back in 
one at a time till you find the culprit).

2. If the problem persists in a new user account, look at what's in both of 

[Hard Disk]/Library/LaunchAgents
[Hard Disk]/Library/LaunchDeamons

Again, eliminate any 3rd party stuff, restart and test. Add any 3ed party files 
back in one at a time, restarting and testing after each, till you find the 
miscreant.

3. If there's no 3rd party stuff in there or removing them doesn't solve the 
issue, find or get an external USB HD, do a clean install of OS X, boot into it 
and see the difference. If it's noticeable don't discount internal HD failure 
(have you checked the SMART status of the disk in Disk Utility?), but chances 
are a reinstall of OS X on your internal HD will sort things out.

If there is no difference, you've got hardware problems (too little, badly 
seated or corrupt RAM, failing logic board, graphics card, etc). 

Best

Phil

DisplayDroid beta (a lightweight script editor and automation tool) is now 
available for free download. More info on sqwarq.com/displaydroid

http://applehelpwriter.com
http://sqwarq.com - apps for OS X & iOS










___

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

Please do not post admin requests or moderator comments to the list.
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

Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Jerry Krinock
Can anyone explain this weird crash report I got from a user and symbolized?  
The last thing my code does (frame 24 in the call stack below), is to send 
-[NSAppleScript executeAndReturnError:].  The crash says someone tried to set a 
*dictionary* object with a nil key.  How could I have done that?

OS Version:Mac OS X 10.10.1 (14B25)
Crashed Thread:0  Dispatch queue: com.apple.main-thread
Exception Type:EXC_CRASH (SIGABRT)
Exception Codes:   0x, 0x

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', 
reason: '*** setObjectForKey: key cannot be nil'
terminating with uncaught exception of type NSException
abort() called

0   CoreFoundation   __exceptionPreprocess + 172
1   libobjc.A.dylib  objc_exception_throw + 43
2   CoreFoundation   -[__NSDictionaryM setObject:forKey:] + 1174
3   Foundation   __NSThreadPerformPerform + 293
4   CoreFoundation   __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 
+ 17
5   CoreFoundation   __CFRunLoopDoSources0 + 269
6   CoreFoundation   __CFRunLoopRun + 927
7   CoreFoundation   CFRunLoopRunSpecific + 296
8   HIToolboxRunCurrentEventLoopInMode + 235
9   HIToolboxGetNextEventMatchingMask + 357
10  HIToolboxWNEInternal + 149
11  AppleScript  _Z19AEDefaultActiveProcPv + 157
12  AppleScript  _Z23InternalComponentActivej + 81
13  AppleScript  
_ZN15TUASApplication4SendEP25TStackFrame_UASRemoteSendP6AEDescS3_hhh + 2974
14  AppleScript  _Z13UASRemoteSendhPh + 582
15  AppleScript  _Z11UASExecute1v + 373
16  AppleScript  _Z10UASExecuteh + 193
17  AppleScript  _Z9ASExecutejjiPj + 460
18  AppleScript  AppleScriptComponent + 737
19  AppleScript  _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 37
20  AppleScript  _ZN15AGenericManager13HandleOSACallEP19ComponentParameters 
+ 55
21  AppleScript  GenericComponent + 108
22  OpenScriptingOSAExecute + 65
23  Foundation   -[NSAppleScript(NSPrivate) 
_executeWithMode:andReturnError:] + 131
24  MyFramework  -[NSAppleScript(SSYThreadSafe) executeSource:error_p:]

The last frame there, 24, is these three lines of my code:

NSAppleScript* script = [[NSAppleScript alloc] initWithSource:source] ;
NSDictionary* errorDictionary = nil ;
NSAppleEventDescriptor* result = [script 
executeAndReturnError:&errorDictionary] ;

and, down the stack a ways, 'source’ comes from here:

NSString* source ;
source = [NSString stringWithFormat:
  @"tell application \"%@\"\n"
  @"activate\n"
  @"present last logged error\n"
  @"end tell",
  [[NSBundle mainAppBundle] bundlePath]
  ] ;

where [[NSBundle mainAppBundle] bundlePath] returns “com.mycompany.MyApp”.  
MyApp indeed has a 'present last logged error’ AppleScript command defined, and 
it works.

I do not see any bad guys loaded in the Binary Images section.

Although it seems to happen repeatably for this user (3 identical crash 
reports), exercising the same code path on my Mac, the script executes 
perfectly.

* * *

Even if I run code with a crap script source like this:

NSAppleScript* script = [[NSAppleScript alloc] initWithSource:@"garbage in!"] ;
NSDictionary* errorDictionary = nil ;
NSAppleEventDescriptor* result = [script 
executeAndReturnError:&errorDictionary] ;

‘result' is nil, and the errorDictionary tells me politely that my script is 
bad.  It doesn’t crash.

Jerry


___

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

Please do not post admin requests or moderator comments to the list.
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: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Steve Mills
On Jan 23, 2015, at 13:25:58, Jerry Krinock  wrote:
> 
> Can anyone explain this weird crash report I got from a user and symbolized?  
> The last thing my code does (frame 24 in the call stack below), is to send 
> -[NSAppleScript executeAndReturnError:].  The crash says someone tried to set 
> a *dictionary* object with a nil key.  How could I have done that?
> 
> NSString* source ;
> source = [NSString stringWithFormat:
> @"tell application \"%@\"\n"
> @"activate\n"
> @"present last logged error\n"
> @"end tell",
> [[NSBundle mainAppBundle] bundlePath]
> ] ;
> 
> where [[NSBundle mainAppBundle] bundlePath] returns “com.mycompany.MyApp”.  
> MyApp indeed has a 'present last logged error’ AppleScript command defined, 
> and it works.

I can't find any docs for "present last logged error". How do I set up a state 
so that it will do something? I'm trying your code here and it executes fine, 
probably because there is no last logged error. I tried first sending an 
AppleScript that asked for document 1, which generated an error because there 
is no document.

--
Steve Mills
Drummer, Mac geek


___

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

Please do not post admin requests or moderator comments to the list.
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: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Jerry Krinock

> On 2015 Jan 23, at 11:40, Steve Mills  wrote:
> 
> I can't find any docs for "present last logged error”.

Thank you, Steve.  Oh, there isn’t any.  It is only my app, as in MyApp, which 
implements that command.  I made it up.  :)

> How do I set up a state so that it will do something? I'm trying your code 
> here and it executes fine, probably because there is no last logged error. I 
> tried first sending an AppleScript that asked for document 1, which generated 
> an error because there is no document.

Indeed.  The way I’m using -[NSAppleScript executeAndReturnError:] is, as far 
as I can see, 100% perfect Cocoa and it works fine on my Mac.  The crash report 
is a paradox of some kind.

Jerry


___

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

Please do not post admin requests or moderator comments to the list.
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: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Steve Mills
On Jan 23, 2015, at 14:18:38, Jerry Krinock  wrote:
> 
> Thank you, Steve.  Oh, there isn’t any.  It is only my app, as in MyApp, 
> which implements that command.  I made it up.  :)

Oh duh. That would explain why 1 of the 3 search results is at 
sheepsystems.com. :)

> Indeed.  The way I’m using -[NSAppleScript executeAndReturnError:] is, as far 
> as I can see, 100% perfect Cocoa and it works fine on my Mac.  The crash 
> report is a paradox of some kind.

If "present last logged error” puts up a dialog, could there be some conflict 
between run loops, autorelease pools being emptied (I recall many problems with 
this happening in non-ARC apps I've worked on), etc? It wouldn't even have to 
put up a dialog - just responding to an Apple Event could be enough for the run 
loop to drain its pools.

--
Steve Mills
Drummer, Mac geek


___

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

Please do not post admin requests or moderator comments to the list.
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: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Michael Crawford
perhaps the bug occurred somewhere else and either corrupted the heap
or wrote an erroneous value into some data structure, with the
eventual result that you jumped off into hyperspace, then ran along
just fine until a method was called with parameters that were suitably
invalid as to cause a crash.

If you haven't already tried it, enable Guard Malloc and friends in
your build.  Also put some logging into the build you send your user -
hopefully they will be cool with running an instrumented build.  In my
experience, most end-users are quite excited to get in on development.

Put assertions everywhere.  Again in my own experience, I get the
greatest yield with least effort by validating the input parameters to
everything.  While it does help to assert elsewhere, in general most
things that can be asserted ultimately wind up as input parameters
somewhere:

   assert() is the Documentation that Keeps On Testing
   http://www.warplife.com/tips/code/quality/test/assertion/

I'll send you my bill in the mail.  :-D

Mike
Michael David Crawford, Consulting Software Engineer
mdcrawf...@gmail.com
http://www.warplife.com/mdc/

   Available for Software Development in the Portland, Oregon Metropolitan
Area.


On Fri, Jan 23, 2015 at 12:25 PM, Steve Mills  wrote:
> On Jan 23, 2015, at 14:18:38, Jerry Krinock  wrote:
>>
>> Thank you, Steve.  Oh, there isn't any.  It is only my app, as in MyApp, 
>> which implements that command.  I made it up.  :)
>
> Oh duh. That would explain why 1 of the 3 search results is at 
> sheepsystems.com. :)
>
>> Indeed.  The way I'm using -[NSAppleScript executeAndReturnError:] is, as 
>> far as I can see, 100% perfect Cocoa and it works fine on my Mac.  The crash 
>> report is a paradox of some kind.
>
> If "present last logged error" puts up a dialog, could there be some conflict 
> between run loops, autorelease pools being emptied (I recall many problems 
> with this happening in non-ARC apps I've worked on), etc? It wouldn't even 
> have to put up a dialog - just responding to an Apple Event could be enough 
> for the run loop to drain its pools.
>
> --
> Steve Mills
> Drummer, Mac geek
>
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/mdcrawford%40gmail.com
>
> This email sent to mdcrawf...@gmail.com

___

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

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

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

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

Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Jerry Krinock

> On 2015 Jan 23, at 12:36, Michael Crawford  wrote:
> 
> perhaps the bug occurred somewhere else and either corrupted the heap or…

Yes, that is a good point.

> If you haven't already tried it, enable Guard Malloc and friends in
> your build.

Ah, I forgot about that.  Just tried it.  Worked perfectly, no nastygrams.

> Also put some logging into the build you send your user

yes, I’m doing that now.


___

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

Please do not post admin requests or moderator comments to the list.
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's up with the Cocoa Text System?

2015-01-23 Thread Michael Crawford
At one time I found it quite painful to edit source code with Xcode.
I was told that was due to Xcode using the Cocoa text widget.

Consider that Lightspeed C worked just fine, snappy and responsive, on
my 6 MHz 68000 Mac 512k (or was it 8 MHz).

I myself did a lot of the work on Working Software's QuickLetter,
which used the same CoreEdit styled text engine as MacWrite.  When I
ran into its developers at a WWDC, I shouted "We owe you sixty
thousand dollars!"

"No worries," one of them replied, "Say 'Hi' to Dave for us."

While somewhat buggy QuickLetter was quite perfomant on System 6.5 on
a Mac Plus.  It stopped being buggy after I'd been working for WSI for
a while.

A real good way to get performance problems out of code, is for that
code's developers to use the very slowest computers they possibly can
as their development machines.
Michael David Crawford, Consulting Software Engineer
mdcrawf...@gmail.com
http://www.warplife.com/mdc/

   Available for Software Development in the Portland, Oregon Metropolitan
Area.


On Fri, Jan 23, 2015 at 10:43 AM, sqwarqDev <2551p...@gmail.com> wrote:
>> On 23 Jan 2015, at 20:50, Charles Jenkins  wrote:
>>
>> I have turned off Autocorrect and Check Spelling While Typing to eliminate 
>> the significant pause that happens each time you finish a word and hit the 
>> space bar.
>
> That's a local issue you've got there.
>
> 1. Create a new user. Restart and log in to that account. If the problem is 
> not apparent in the new user account, look carefuly at what 's in the 
> affected account's ~/Library/LaunchAgents folder and its System Preferences > 
> Users & Groups | Login Items ("look carefully" = remove everytihng and add 
> them back in one at a time till you find the culprit).
>
> 2. If the problem persists in a new user account, look at what's in both of
>
> [Hard Disk]/Library/LaunchAgents
> [Hard Disk]/Library/LaunchDeamons
>
> Again, eliminate any 3rd party stuff, restart and test. Add any 3ed party 
> files back in one at a time, restarting and testing after each, till you find 
> the miscreant.
>
> 3. If there's no 3rd party stuff in there or removing them doesn't solve the 
> issue, find or get an external USB HD, do a clean install of OS X, boot into 
> it and see the difference. If it's noticeable don't discount internal HD 
> failure (have you checked the SMART status of the disk in Disk Utility?), but 
> chances are a reinstall of OS X on your internal HD will sort things out.
>
> If there is no difference, you've got hardware problems (too little, badly 
> seated or corrupt RAM, failing logic board, graphics card, etc).
>
> Best
>
> Phil
>
> DisplayDroid beta (a lightweight script editor and automation tool) is now 
> available for free download. More info on sqwarq.com/displaydroid
>
> http://applehelpwriter.com
> http://sqwarq.com - apps for OS X & iOS
>
>
>
>
>
>
>
>
>
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/mdcrawford%40gmail.com
>
> This email sent to mdcrawf...@gmail.com

___

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

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

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

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

Re: What's up with the Cocoa Text System?

2015-01-23 Thread Jens Alfke

> On Jan 23, 2015, at 1:53 PM, Michael Crawford  wrote:
> 
> At one time I found it quite painful to edit source code with Xcode.
> I was told that was due to Xcode using the Cocoa text widget.
> 
> Consider that Lightspeed C worked just fine, snappy and responsive, on
> my 6 MHz 68000 Mac 512k (or was it 8 MHz).

I used Lightspeed C too. Its editor didn't support Unicode, or any languages 
outside the basic Roman alphabet. That's a significant quality-of-life issue 
for programmers whose first language isn't English. It also didn't do live 
syntax checking or code folding. In fact it only supported monospaced 
single-color text (no syntax highlighting.) 

The Cocoa text system compares to that editor, or MacWrite, the way Photoshop 
compares to a crayon. And some of those features may seem like nice-to-have 
frills to Americans (contextual forms, ligatures, bidirectional layout, pop-up 
text input panels) but are must-haves for languages written by the majority of 
the world's people.

I'm sure that if we resurrected the Lightspeed C engine, it would let you type 
at about ten million words-per-minute on today's computers. So what? The editor 
only needs to be fast enough to keep up with human fingers. The rest of the CPU 
time can be dedicated to extra features.

Cocoa Text isn't slow. (And it wasn't slow on a Power Mac G3 back in the day 
either.) One guy is having some nasty slowdowns that seem to be caused by 
something incidental, not an intrinsic problem with the text system.

—Jens
___

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

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

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

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

Re: What's up with the Cocoa Text System?

2015-01-23 Thread Michael Crawford
Cocoa Text is glacially slow compared to what it would be had Apple
offered me the developer tools job I interviewed for in 2001.

Perhaps, when interviewing with the Xocde team, it might not have been
a bad idea to avoid criticizing Xcode.  I made it quite clear that I
was unimpressed with Mac OS X in general, and to this day, I regard
Mac OS System 8.1 as the very finest System Software release Apple has
ever produced.

Are you familiar with the term "Bozo Filter"?

More or less, I won't accept a job offer, unless I can call my
potential employer a jackass directly to his face - then have him
agree that he is, in fact, a jackass.

No doubt you expect that I am of very modest means.  I was quite
wealthy at one time, but my money did not do me a whole lot of good.
Michael David Crawford, Consulting Software Engineer
mdcrawf...@gmail.com
http://www.warplife.com/mdc/

   Available for Software Development in the Portland, Oregon Metropolitan
Area.


On Fri, Jan 23, 2015 at 2:16 PM, Jens Alfke  wrote:
>
> On Jan 23, 2015, at 1:53 PM, Michael Crawford  wrote:
>
> At one time I found it quite painful to edit source code with Xcode.
> I was told that was due to Xcode using the Cocoa text widget.
>
> Consider that Lightspeed C worked just fine, snappy and responsive, on
> my 6 MHz 68000 Mac 512k (or was it 8 MHz).
>
>
> I used Lightspeed C too. Its editor didn't support Unicode, or any languages
> outside the basic Roman alphabet. That's a significant quality-of-life issue
> for programmers whose first language isn't English. It also didn't do live
> syntax checking or code folding. In fact it only supported monospaced
> single-color text (no syntax highlighting.)
>
> The Cocoa text system compares to that editor, or MacWrite, the way
> Photoshop compares to a crayon. And some of those features may seem like
> nice-to-have frills to Americans (contextual forms, ligatures, bidirectional
> layout, pop-up text input panels) but are must-haves for languages written
> by the majority of the world's people.
>
> I'm sure that if we resurrected the Lightspeed C engine, it would let you
> type at about ten million words-per-minute on today's computers. So what?
> The editor only needs to be fast enough to keep up with human fingers. The
> rest of the CPU time can be dedicated to extra features.
>
> Cocoa Text isn't slow. (And it wasn't slow on a Power Mac G3 back in the day
> either.) One guy is having some nasty slowdowns that seem to be caused by
> something incidental, not an intrinsic problem with the text system.
>
> --Jens
___

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

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

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

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

Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Shane Stanley
On 24 Jan 2015, at 6:25 am, Jerry Krinock  wrote:
> 
> NSString* source ;
> source = [NSString stringWithFormat:
> @"tell application \"%@\"\n"
> @"activate\n"
> @"present last logged error\n"
> @"end tell",
> [[NSBundle mainAppBundle] bundlePath]
> ] ;
> 
> where [[NSBundle mainAppBundle] bundlePath] returns “com.mycompany.MyApp”.  

In that case, you should be using @"tell application id \"%@\"\n". (Oh, and 
"activate" seems to have become asynchronous these days.)

> MyApp indeed has a 'present last logged error’ AppleScript command defined, 
> and it works.

What does it do -- does it call OSACOerceFromDesc() by any chance? Do you know 
what code was running when the errors were generated?

-- 
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/archive%40mail-archive.com

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

Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Shane Stanley
On 24 Jan 2015, at 11:40 am, Shane Stanley  wrote:
> 
>> where [[NSBundle mainAppBundle] bundlePath] returns “com.mycompany.MyApp”.  
> 
> In that case, you should be using @"tell application id \"%@\"\n".

Ignore that. Your code says bundlePath, but I focused on your description, 
which looks more like a UTI. 

-- 
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/archive%40mail-archive.com

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

Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Steve Mills
On Jan 23, 2015, at 18:40, Shane Stanley  wrote:

>> On 24 Jan 2015, at 6:25 am, Jerry Krinock  wrote:
>> 
>> NSString* source ;
>> source = [NSString stringWithFormat:
>>  @"tell application \"%@\"\n"
>>  @"activate\n"
>>  @"present last logged error\n"
>>  @"end tell",
>>  [[NSBundle mainAppBundle] bundlePath]
>>  ] ;
>> 
>> where [[NSBundle mainAppBundle] bundlePath] returns “com.mycompany.MyApp”.  
> 
> In that case, you should be using @"tell application id \"%@\"\n". (Oh, and 
> "activate" seems to have become asynchronous these days.)

Oh, that reminds me. I had to change it to mainBundle instead of mainAppBundle.

Steve via iPad
___

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

Please do not post admin requests or moderator comments to the list.
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: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Jerry Krinock

> On 2015 Jan 23, at 17:17, Steve Mills  wrote:
> 
> Oh, that reminds me. I had to change it to mainBundle instead of 
> mainAppBundle.

The method is -mainAppBundle, but indeed you don’t have it.  I wrote it.  It 
returns the bundle of the enclosing “main” app when run from a helper tool, so 
that the helper tool can access resources or whatever.


___

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

Please do not post admin requests or moderator comments to the list.
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: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Ken Thomases
On Jan 23, 2015, at 1:25 PM, Jerry Krinock  wrote:

> Can anyone explain this weird crash report I got from a user and symbolized?  
> The last thing my code does (frame 24 in the call stack below), is to send 
> -[NSAppleScript executeAndReturnError:].  The crash says someone tried to set 
> a *dictionary* object with a nil key.  How could I have done that?
> 
> OS Version:Mac OS X 10.10.1 (14B25)
> Crashed Thread:0  Dispatch queue: com.apple.main-thread
> Exception Type:EXC_CRASH (SIGABRT)
> Exception Codes:   0x, 0x
> 
> *** Terminating app due to uncaught exception 'NSInvalidArgumentException', 
> reason: '*** setObjectForKey: key cannot be nil'
> terminating with uncaught exception of type NSException
> abort() called
> 
> 0   CoreFoundation   __exceptionPreprocess + 172
> 1   libobjc.A.dylib  objc_exception_throw + 43
> 2   CoreFoundation   -[__NSDictionaryM setObject:forKey:] + 1174
> 3   Foundation   __NSThreadPerformPerform + 293
> 4   CoreFoundation   
> __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
> 5   CoreFoundation   __CFRunLoopDoSources0 + 269
> 6   CoreFoundation   __CFRunLoopRun + 927
> 7   CoreFoundation   CFRunLoopRunSpecific + 296
> 8   HIToolboxRunCurrentEventLoopInMode + 235
> 9   HIToolboxGetNextEventMatchingMask + 357
> 10  HIToolboxWNEInternal + 149
> 11  AppleScript  _Z19AEDefaultActiveProcPv + 157
> 12  AppleScript  _Z23InternalComponentActivej + 81
> 13  AppleScript  
> _ZN15TUASApplication4SendEP25TStackFrame_UASRemoteSendP6AEDescS3_hhh + 2974
> 14  AppleScript  _Z13UASRemoteSendhPh + 582
> 15  AppleScript  _Z11UASExecute1v + 373
> 16  AppleScript  _Z10UASExecuteh + 193
> 17  AppleScript  _Z9ASExecutejjiPj + 460
> 18  AppleScript  AppleScriptComponent + 737
> 19  AppleScript  _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 
> 37
> 20  AppleScript  
> _ZN15AGenericManager13HandleOSACallEP19ComponentParameters + 55
> 21  AppleScript  GenericComponent + 108
> 22  OpenScriptingOSAExecute + 65
> 23  Foundation   -[NSAppleScript(NSPrivate) 
> _executeWithMode:andReturnError:] + 131
> 24  MyFramework  -[NSAppleScript(SSYThreadSafe) executeSource:error_p:]

It may have nothing directly to do with you executing an Apple Script.  While 
processing the script, the system is running an internal run loop while it 
waits for a reply.  Some run loop source has fired.  That run loop source may 
have nothing to do with the Apple Script.  Executing the script simply gave it 
the opportunity to fire.

It appears to be related to a -performSelectorOnMainThread:… or 
-performSelector:onThread:… invocation, judging by the presence of 
__NSThreadPerformPerform in the stack trace.  Beyond that, it may be a memory 
management error, where something was over-released and thus deallocated while 
there was still a reference to it.  Or it may even be that the 
-performSelector… invocation was for -setObject:forKey: on a dictionary, with a 
nil argument.

Regards,
Ken


___

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

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

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

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

[SOLVED] Re: Is the button group in Safari a general widget ?

2015-01-23 Thread Aaron Lewis
Hi all,

@Jon
Thanks! I just tried UIToolBar, it's exactly what I wanted.

@Fritz
Sorry, I came from Qt world, I'm getting myself familiarised with the
UI Control terms .. I'll use the right terms next time

I meant iOS but I thought these UI Controls are available in both OSX
and iOS so I didn't mention it .. I'll be clear about that next time.

P.S I also tried NSSegmentedControl as you suggested, but UIToolBar
looks more like it

On Sat, Jan 24, 2015 at 12:47 AM, Fritz Anderson
 wrote:
> On 23 Jan 2015, at 10:20 AM, Aaron Lewis  wrote:
>
>> I've seen a lot of apps like Safari. 5 buttons in the bottom
>>
>> Is that a common widget? I couldn't find it on google
>
>
> (Notes ~ “widget” doesn’t have the same meaning in iOS/OS X frameworks that 
> it does on other platforms. You mean “control.” Jonathan Hull just suggested 
> the UIToolbar family, which is an excellent suggestion. I wrote this assuming 
> you were asking about OS X. Because you hadn’t said otherwise. The 
> fundamentals about what’s available, what has to be custom made, and how to 
> ask questions are the same.)
>
> Perhaps you could put what you want to do less telegraphically?
>
> Five buttons on the bottom is not like [desktop] Safari, we can’t use “a lot 
> of apps” as a guide to examples, and if you’re talking about the design of 
> your own application, how many there are and where doesn’t matter. Buttons 
> exist. You can have five of them. You can put them anywhere, singly or 
> together. That is common.
>
> I am guessing that you mean something like NSSegmentedControl [if AppKit]. 
> Apple [often] has a special appearance for segmented controls in its own 
> applications, which are built with private code.
>
> Many developers want that look, but it’s not in AppKit [UIKit]. You have to 
> make your own, or find a third-party library that gives you what you want. 
> Maybe you can get better search results if you try the terms “segmented 
> control Mac”. [Or “… iOS”.]
>
>
> — F
>



-- 
Best Regards,
Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/
Finger Print:   9F67 391B B770 8FF6 99DC  D92D 87F6 2602 1371 4D33

___

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

Please do not post admin requests or moderator comments to the list.
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's up with the Cocoa Text System?

2015-01-23 Thread Ben Kennedy
Is your personal hubris about a job you were not offered 14 years ago (and 
tastes for interview style) somehow relevant to the other developers on this 
list?

b

Sent from my iPhone

> On Jan 23, 2015, at 2:38 PM, Michael Crawford  wrote:
> 
> Cocoa Text is glacially slow compared to what it would be had Apple
> offered me the developer tools job I interviewed for in 2001.
> 
> Perhaps, when interviewing with the Xocde team, it might not have been
> a bad idea to avoid criticizing Xcode.  I made it quite clear that I
> was unimpressed with Mac OS X in general, and to this day, I regard
> Mac OS System 8.1 as the very finest System Software release Apple has
> ever produced.
> 
> Are you familiar with the term "Bozo Filter"?
> 
> More or less, I won't accept a job offer, unless I can call my
> potential employer a jackass directly to his face - then have him
> agree that he is, in fact, a jackass.
> 
> No doubt you expect that I am of very modest means.  I was quite
> wealthy at one time, but my money did not do me a whole lot of good.
> Michael David Crawford, Consulting Software Engineer
> mdcrawf...@gmail.com
> http://www.warplife.com/mdc/
> 
>   Available for Software Development in the Portland, Oregon Metropolitan
> Area.
> 
> 
>> On Fri, Jan 23, 2015 at 2:16 PM, Jens Alfke  wrote:
>> 
>> On Jan 23, 2015, at 1:53 PM, Michael Crawford  wrote:
>> 
>> At one time I found it quite painful to edit source code with Xcode.
>> I was told that was due to Xcode using the Cocoa text widget.
>> 
>> Consider that Lightspeed C worked just fine, snappy and responsive, on
>> my 6 MHz 68000 Mac 512k (or was it 8 MHz).
>> 
>> 
>> I used Lightspeed C too. Its editor didn't support Unicode, or any languages
>> outside the basic Roman alphabet. That's a significant quality-of-life issue
>> for programmers whose first language isn't English. It also didn't do live
>> syntax checking or code folding. In fact it only supported monospaced
>> single-color text (no syntax highlighting.)
>> 
>> The Cocoa text system compares to that editor, or MacWrite, the way
>> Photoshop compares to a crayon. And some of those features may seem like
>> nice-to-have frills to Americans (contextual forms, ligatures, bidirectional
>> layout, pop-up text input panels) but are must-haves for languages written
>> by the majority of the world's people.
>> 
>> I'm sure that if we resurrected the Lightspeed C engine, it would let you
>> type at about ten million words-per-minute on today's computers. So what?
>> The editor only needs to be fast enough to keep up with human fingers. The
>> rest of the CPU time can be dedicated to extra features.
>> 
>> Cocoa Text isn't slow. (And it wasn't slow on a Power Mac G3 back in the day
>> either.) One guy is having some nasty slowdowns that seem to be caused by
>> something incidental, not an intrinsic problem with the text system.
>> 
>> --Jens
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/ben%40zygoat.ca
> 
> This email sent to b...@zygoat.ca

___

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

Please do not post admin requests or moderator comments to the list.
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