Re: The Case of the Dancing Keyboard

2015-04-27 Thread Gerriet M. Denkmann

 On 23 Apr 2015, at 12:04, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:
 
 
 An UITableViewController with an UISearchController in iOS 8.3
 
 When I click in the SearchBar the following dance happens:
 Keyboard comes; 
 Keyboard goes away; 
 Background becomes gray; 
 Keyboard comes again and now stays. 
 
 This is sort of difficult to see in the Simulator because it happens too fast.
 But clearly seen (and rather annoying) on iPhone 4s.
 
 Any ideas how this silly dance can be avoided?
 
 Gerriet.

Further investigation shows:

In my app with the dancing keyboard I see:

Click in SearchBar → Keyboard appears and vanishes again
42:38.530  -[MasterViewController searchBarTextDidBeginEditing:] 
searchBar 0x7a79a810 isFirstResponder YES
42:38.530  -[MasterViewController presentSearchController:]  
searchBar 0x7a79a810 isFirstResponder YES
42:38.530  -[MasterViewController willPresentSearchController:]  
searchBar 0x7a79a810 isFirstResponder YES
42:38.536  -[MasterViewController searchBarShouldEndEditing:]
searchBar 0x7a79a810 isFirstResponder YES
42:38.536  -[MasterViewController searchBarShouldEndEditing:]
searchBar 0x7a79a810 isFirstResponder YES
42:38.537  -[MasterViewController searchBarShouldEndEditing:]
searchBar 0x7a79a810 isFirstResponder YES
*   42:38.539  -[MasterViewController searchBarShouldEndEditing:]
searchBar 0x7a79a810 isFirstResponder YES
*   42:38.542  -[MasterViewController searchBarTextDidEndEditing:]   
searchBar 0x7a79a810 isFirstResponder NO
*   42:38.858  -[MasterViewController didPresentSearchController:]   
searchBar 0x7a79a810 isFirstResponder NO

Click again to make Keyboard appear:
43:15.282  -[MasterViewController searchBarTextDidBeginEditing:] 
searchBar 0x7a79a810 isFirstResponder YES

The lines marked with “*” differ from those below.

In another app (TableSearchwithUISearchController) I see:

Click in SearchBar → Keyboard appears 
47:02.041  -[APLMainTableViewController searchBarTextDidBeginEditing:] 
searchBar 0x7d5ad7d0 isFirstResponder YES
47:02.041  -[APLMainTableViewController presentSearchController:]  
searchBar 0x7d5ad7d0 isFirstResponder YES
47:02.041  -[APLMainTableViewController willPresentSearchController:]  
searchBar 0x7d5ad7d0 isFirstResponder YES
47:02.046  -[APLMainTableViewController searchBarShouldEndEditing:]
searchBar 0x7d5ad7d0 isFirstResponder YES
47:02.047  -[APLMainTableViewController searchBarShouldEndEditing:]
searchBar 0x7d5ad7d0 isFirstResponder YES
47:02.047  -[APLMainTableViewController searchBarShouldEndEditing:]
searchBar 0x7d5ad7d0 isFirstResponder YES
47:02.368  -[APLMainTableViewController didPresentSearchController:]   
searchBar 0x7d5ad7d0 isFirstResponder YES

Somehow I seem to have messed up my searchBar: there is an additional 
searchBarShouldEndEditing + searchBarTextDidEndEditing (which seems to call 
resignFirstResponder, which removes the keyboard).

I tried to follow all steps in my app same as TableSearchwithUISearchController.

Any ideas?

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

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

Cocoa window stops responding

2015-04-27 Thread Nisar Ahmed
My application has a UI having a main window which contains many views such
as NSTableView, NSOutlineView, NSOpenGLView, many NSTextFields etc...

The applications works normally but after some time the UI stops responding
to the mouse clicks, the application does not hang but it seems that all
the views stop redrawing itself. I have tried many things but fails to
prevent or reproduce the behaviour. Need some advice on how to fix or
atleast find out what is causing such behaviour.

I am updating all UI controls on the main thread and using Cocoa bindings
heavily.. apparently there is no memory leaks, I am using Xcode 6.1 on
Mavericks

Please help!
___

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

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

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

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

Re: Cocoa window stops responding

2015-04-27 Thread Uli Kusterer
On 27 Apr 2015, at 10:53, Nisar Ahmed nisar@gmail.com wrote:
 My application has a UI having a main window which contains many views such
 as NSTableView, NSOutlineView, NSOpenGLView, many NSTextFields etc...
 
 The applications works normally but after some time the UI stops responding
 to the mouse clicks, the application does not hang but it seems that all
 the views stop redrawing itself. I have tried many things but fails to
 prevent or reproduce the behaviour. Need some advice on how to fix or
 atleast find out what is causing such behaviour.
 
 I am updating all UI controls on the main thread and using Cocoa bindings
 heavily.. apparently there is no memory leaks, I am using Xcode 6.1 on
 Mavericks

 My first suspects if a window stops drawing are always:

1) Drawing attributes that bleed out (e.g. setting the color to white at some 
point but never back to black, so the next iteration starts out with white 
instead of the default black) and aren’t wrapped in saveGState

2) Calls to setNeedsDisplay: or display or the like while a drawRect: is 
running (e.g. setNeedsDisplay: causes drawRect: which sets a property that 
calls setNeedsDisplay: again which causes a drawRect: on the next run loop 
iteration, making your Mac constantly redraw stuff until that’s all it does, or 
even worse manipulating the view hierarchy while the OS is iterating views to 
draw them).

3) Threaded code that manipulates the UI from another thread than the main 
thread. There are very few, very specific circumstances under which you may 
manipulate and draw views and view hierarchies on a non-main thread (or call 
setNeedsDisplay: or display), so if you do not for a fact know that this is 
documented as being OK, you probably shouldn’t do it. This case in particular 
has often screwed up drawing in such a way that the entire window just became a 
white sheet.

I presume you’ve done the usual, i.e. ran Analyze and fixed all it complained 
about, as well as Instruments.

Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.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: To Swiftly Crash

2015-04-27 Thread Charles Jenkins
That’s it! Thank you, Quincey!

It no longer crashes if I put a question mark after replacementString:String 
and then ignore XCode’s warning, but I went ahead and implemented the 
“shouldChangeTextInRanges method instead. Thanks for the quick, correct 
response!

-- 

Charles

On April 26, 2015 at 16:05:00, Quincey Morris 
(quinceymor...@rivergatesoftware.com) wrote:

On Apr 26, 2015, at 12:40 , Charles Jenkins cejw...@gmail.com wrote:

Is this a disaster in Swift-to-ObjC bridging, or have I done something wrong to 
cause it?

  func textView( tv:NSTextView, shouldChangeTextInRange range:NSRange, 
replacementString:String ) - Bool

The problem is that the replacement string can be nil (if only attributes are 
being changed, which is what happens when you Command-B), but the bridged 
signature is missing a ‘?’ on the replacementString type. (You can see this if 
you change the type to ’String!’, ignore the warning, and see the log message 
when you run.) Why this is, I don’t know, but I doubt it’s your fault.

This delegate method is described as “superseded” in the header file. I suggest 
you try using the recommended method:

   func textView(textView: NSTextView, shouldChangeTextInRanges affectedRanges: 
[AnyObject], replacementStrings: [AnyObject]?) - Bool


___

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

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

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

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

Re: Cocoa window stops responding

2015-04-27 Thread Jonathan Mitchell


 On 27 Apr 2015, at 09:53, Nisar Ahmed nisar@gmail.com wrote:
 
 My application has a UI having a main window which contains many views such
 as NSTableView, NSOutlineView, NSOpenGLView, many NSTextFields etc...
 
 The applications works normally but after some time the UI stops responding
 to the mouse clicks, the application does not hang but it seems that all
 the views stop redrawing itself. I have tried many things but fails to
 prevent or reproduce the behaviour. Need some advice on how to fix or
 atleast find out what is causing such behaviour.
 
 I am updating all UI controls on the main thread and using Cocoa bindings
 heavily.. apparently there is no memory leaks, I am using Xcode 6.1 on
 Mavericks
 
Personally I would try and follow the flow of events:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/1060i-CH3-SW11

You could try overriding NSWindow -sendEvent:
This action method dispatches mouse and keyboard events sent to the window by 
the NSApplication object.
This should help you to narrow down the location of the problem.

Jonathan
___

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

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

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

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

Re: The Case of the Dancing Keyboard

2015-04-27 Thread Alex Zavatone
By any chance is the searchBar wired through an IBOutlet?

If so, do you have two connections to it?

On Apr 27, 2015, at 2:04 AM, Gerriet M. Denkmann wrote:

 
 On 23 Apr 2015, at 12:04, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:
 
 
 An UITableViewController with an UISearchController in iOS 8.3
 
 When I click in the SearchBar the following dance happens:
 Keyboard comes; 
 Keyboard goes away; 
 Background becomes gray; 
 Keyboard comes again and now stays. 
 
 This is sort of difficult to see in the Simulator because it happens too 
 fast.
 But clearly seen (and rather annoying) on iPhone 4s.
 
 Any ideas how this silly dance can be avoided?
 
 Gerriet.
 
 Further investigation shows:
 
 In my app with the dancing keyboard I see:
 
   Click in SearchBar → Keyboard appears and vanishes again
   42:38.530  -[MasterViewController searchBarTextDidBeginEditing:] 
 searchBar 0x7a79a810 isFirstResponder YES
   42:38.530  -[MasterViewController presentSearchController:]  
 searchBar 0x7a79a810 isFirstResponder YES
   42:38.530  -[MasterViewController willPresentSearchController:]  
 searchBar 0x7a79a810 isFirstResponder YES
   42:38.536  -[MasterViewController searchBarShouldEndEditing:]
 searchBar 0x7a79a810 isFirstResponder YES
   42:38.536  -[MasterViewController searchBarShouldEndEditing:]
 searchBar 0x7a79a810 isFirstResponder YES
   42:38.537  -[MasterViewController searchBarShouldEndEditing:]
 searchBar 0x7a79a810 isFirstResponder YES
 * 42:38.539  -[MasterViewController searchBarShouldEndEditing:]
 searchBar 0x7a79a810 isFirstResponder YES
 * 42:38.542  -[MasterViewController searchBarTextDidEndEditing:]   
 searchBar 0x7a79a810 isFirstResponder NO
 * 42:38.858  -[MasterViewController didPresentSearchController:]   
 searchBar 0x7a79a810 isFirstResponder NO
   
   Click again to make Keyboard appear:
   43:15.282  -[MasterViewController searchBarTextDidBeginEditing:] 
 searchBar 0x7a79a810 isFirstResponder YES
 
 The lines marked with “*” differ from those below.
 
 In another app (TableSearchwithUISearchController) I see:
 
   Click in SearchBar → Keyboard appears 
   47:02.041  -[APLMainTableViewController searchBarTextDidBeginEditing:] 
 searchBar 0x7d5ad7d0 isFirstResponder YES
   47:02.041  -[APLMainTableViewController presentSearchController:]  
 searchBar 0x7d5ad7d0 isFirstResponder YES
   47:02.041  -[APLMainTableViewController willPresentSearchController:]  
 searchBar 0x7d5ad7d0 isFirstResponder YES
   47:02.046  -[APLMainTableViewController searchBarShouldEndEditing:]
 searchBar 0x7d5ad7d0 isFirstResponder YES
   47:02.047  -[APLMainTableViewController searchBarShouldEndEditing:]
 searchBar 0x7d5ad7d0 isFirstResponder YES
   47:02.047  -[APLMainTableViewController searchBarShouldEndEditing:]
 searchBar 0x7d5ad7d0 isFirstResponder YES
   47:02.368  -[APLMainTableViewController didPresentSearchController:]   
 searchBar 0x7d5ad7d0 isFirstResponder YES
 
 Somehow I seem to have messed up my searchBar: there is an additional 
 searchBarShouldEndEditing + searchBarTextDidEndEditing (which seems to call 
 resignFirstResponder, which removes the keyboard).
 
 I tried to follow all steps in my app same as 
 TableSearchwithUISearchController.
 
 Any ideas?
 
 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/zav%40mac.com
 
 This email sent to z...@mac.com


___

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

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

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

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

Running AppleScripts from an App using NSAppleScript

2015-04-27 Thread Dave
Hi All,

I have a number of AppleScripts I’d want to run from my App. Each Script has a 
couple of parameters, here is an example:

on run
set  myParam1 to Data from Cocoa App
set  myParam2 to Data from Cocoa App
set myStatus to doStuff(myParam1, myParam2)

return myStatus
end run

—
—  Do something with Param1 and Param2
—
on doStuff(theParam1,theParam2)

tell application ”TextEdit

end tell

return “OK
end setClassificationContent


At the moment, I setup the Text for the Script, Compile it and then Run it each 
time. I’m wondering if there is anyway to be able to just compile the Script 
once, and then pass the Parameters to the Script as it seems a bit 
time-consuming to recompile each time when 99% of the Script is constant.

All the Best
Dave


___

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

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

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

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

Sketch TNG Code?

2015-04-27 Thread Rick Mann
Is the Sketch TNG sample code available anywhere? Session 2014-212 showed 
something I need to do, but didn't explain how it was done (connecting the 
selected shape's properties to the inspector side bar).



-- 
Rick Mann
rm...@latencyzero.com



___

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

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

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

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

Do Bindings work in Swift?

2015-04-27 Thread Rick Mann
In the latest Xcode 6.3.1, I've got an OS X app with a mixture of Objective-C 
and Swift classes, and a Storyboard-based UI.

I have one table view that's bound through an NSArrayController to an array in 
an Objective-C class, and it seems to work as desired.

I have another table view that's bound through an NSArrayController to an Obj-C 
NSViewController subclass, which has a property to a Swift class which has an 
array property. If I get the binding configuration wrong, I get errors and the 
window doesn't render its contents. But if I get it right, I get no errors and 
all the views show up, but the table is empty (however, I know the array is 
getting .append() called and it's populating).

It seems like the binding isn't working, but I'm not sure.

The Swift class subclasses NSObject.

Thanks for any help!

-- 
Rick Mann
rm...@latencyzero.com



___

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

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

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

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

Re: The Case of the Dancing Keyboard

2015-04-27 Thread Gerriet M. Denkmann

 On 27 Apr 2015, at 19:04, Alex Zavatone z...@mac.com wrote:
 
 By any chance is the searchBar wired through an IBOutlet?
 
 If so, do you have two connections to it?

No, it is not connected to any IBOutlets.

The reason is simply: programmer error.

When I click in the searchBar the following happens:

42:38.530  -[MasterViewController searchBarTextDidBeginEditing:] 
searchBar 0x7a79a810 isFirstResponder YES
42:38.530  -[MasterViewController presentSearchController:]  
searchBar 0x7a79a810 isFirstResponder YES
42:38.530  -[MasterViewController willPresentSearchController:]  
searchBar 0x7a79a810 isFirstResponder YES
42:38.536  -[MasterViewController searchBarShouldEndEditing:]
searchBar 0x7a79a810 isFirstResponder YES
42:38.536  -[MasterViewController searchBarShouldEndEditing:]
searchBar 0x7a79a810 isFirstResponder YES
42:38.537  -[MasterViewController searchBarShouldEndEditing:]
searchBar 0x7a79a810 isFirstResponder YES
-[ResultsTableController scrollViewDidScroll:]  
rows: (none) - (none).
-[ResultsTableController scrollViewDidScroll:]  
rows: (none) - (none).
-[ResultsTableController scrollViewDidScroll:]  
 rows: (none) - (none).
42:38.858  -[MasterViewController didPresentSearchController:]   
searchBar 0x7a79a810 isFirstResponder YES

I had in scrollViewDidScroll: 
[searchBar resignFirstResponder ];
because I wanted the keyboard not to obscure the list when the user scrolls the 
tableView.

I did not anticipate that scrollViewDidScroll: is also called when nobody 
actually scrolls the tableView (which is quite empty at this point).

Once I fixed this, everything went back to normal.

Sorry for the noise.

Gerriet.



 On Apr 27, 2015, at 2:04 AM, Gerriet M. Denkmann wrote:
 
 
 On 23 Apr 2015, at 12:04, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:
 
 
 An UITableViewController with an UISearchController in iOS 8.3
 
 When I click in the SearchBar the following dance happens:
 Keyboard comes; 
 Keyboard goes away; 
 Background becomes gray; 
 Keyboard comes again and now stays. 
 
 This is sort of difficult to see in the Simulator because it happens too 
 fast.
 But clearly seen (and rather annoying) on iPhone 4s.
 
 Any ideas how this silly dance can be avoided?
 
 Gerriet.
 
 Further investigation shows:
 
 In my app with the dancing keyboard I see:
 
  Click in SearchBar → Keyboard appears and vanishes again
  42:38.530  -[MasterViewController searchBarTextDidBeginEditing:] 
 searchBar 0x7a79a810 isFirstResponder YES
  42:38.530  -[MasterViewController presentSearchController:]  
 searchBar 0x7a79a810 isFirstResponder YES
  42:38.530  -[MasterViewController willPresentSearchController:]  
 searchBar 0x7a79a810 isFirstResponder YES
  42:38.536  -[MasterViewController searchBarShouldEndEditing:]
 searchBar 0x7a79a810 isFirstResponder YES
  42:38.536  -[MasterViewController searchBarShouldEndEditing:]
 searchBar 0x7a79a810 isFirstResponder YES
  42:38.537  -[MasterViewController searchBarShouldEndEditing:]
 searchBar 0x7a79a810 isFirstResponder YES
 *42:38.539  -[MasterViewController searchBarShouldEndEditing:]
 searchBar 0x7a79a810 isFirstResponder YES
 *42:38.542  -[MasterViewController searchBarTextDidEndEditing:]   
 searchBar 0x7a79a810 isFirstResponder NO
 *42:38.858  -[MasterViewController didPresentSearchController:]   
 searchBar 0x7a79a810 isFirstResponder NO
  
  Click again to make Keyboard appear:
  43:15.282  -[MasterViewController searchBarTextDidBeginEditing:] 
 searchBar 0x7a79a810 isFirstResponder YES
 
 The lines marked with “*” differ from those below.
 
 In another app (TableSearchwithUISearchController) I see:
 
  Click in SearchBar → Keyboard appears 
  47:02.041  -[APLMainTableViewController searchBarTextDidBeginEditing:] 
 searchBar 0x7d5ad7d0 isFirstResponder YES
  47:02.041  -[APLMainTableViewController presentSearchController:]  
 searchBar 0x7d5ad7d0 isFirstResponder YES
  47:02.041  -[APLMainTableViewController willPresentSearchController:]  
 searchBar 0x7d5ad7d0 isFirstResponder YES
  47:02.046  -[APLMainTableViewController searchBarShouldEndEditing:]
 searchBar 0x7d5ad7d0 isFirstResponder YES
  47:02.047  -[APLMainTableViewController searchBarShouldEndEditing:]
 searchBar 0x7d5ad7d0 isFirstResponder YES
  47:02.047  -[APLMainTableViewController searchBarShouldEndEditing:]
 searchBar 0x7d5ad7d0 isFirstResponder YES
  47:02.368  -[APLMainTableViewController didPresentSearchController:]   
 searchBar 0x7d5ad7d0 isFirstResponder YES
 
 Somehow I seem to have messed up my searchBar: there is an additional 
 searchBarShouldEndEditing + searchBarTextDidEndEditing (which seems to call 
 resignFirstResponder, which removes the keyboard).
 
 I tried to follow all steps in my app 

Fwd: XPC service crash

2015-04-27 Thread Arjun SM
Hi all,

My XPC service is crashing on Mavericks 10.9.5 and on Mountain Lion 10.8.x
and I am not able to figure out the problem. I have pasted the logs below.
The same code works perfectly fine on latest *10.10 Yosemite*.

I am not sure what changes to be done in my code to make it work on
Mavericks and Mountain Lion OS X. Any help is greatly appreciated.


*CRASH LOG*

Process: cspd [1930]
Path:/Library/PrivilegedHelperTools/*/cspd
Identifier:  cspd
Version: 1.0 (1.0.)
Code Type:   X86-64 (Native)
Parent Process:  launchd [1]
Responsible: cspd [1930]
User ID: 0

Date/Time:   2015-04-27 15:56:47.803 +0530
OS Version:  Mac OS X 10.9.5 (13F34)
Report Version:  11
Anonymous UUID:  69D81D83-6C1D-62A2-E979-4A567F1EF27D


Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0001, 0x

Application Specific Information:
Configuration error: Could not create listener. xpc_main() was probably
called from a process that is not an XPC service bundle.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libxpc.dylib   0x7fff8a9b8bb6 xpc_main + 359
1   com.apple.Foundation   0x7fff88f37cdb -[NSXPCListener
resume] + 108
2   com.mcafee.cspxpc 0x000105fcc6b5 main + 98 (main.mm:34)
3   libdyld.dylib 0x7fff88cc65fd start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x7fff8a9c3744  rbx: 0x7fb1f1c0bce0  rcx: 0x00ac
 rdx: 0x0003
  rdi: 0x020b  rsi: 0x1003  rbp: 0x7fff59c9be00
 rsp: 0x7fff59c9bd50
   r8: 0x   r9: 0x  r10: 0x00ac
 r11: 0x0206
  r12: 0x0001060ec010  r13: 0x  r14: 0x7fff88f37cdb
 r15: 0x
  rip: 0x7fff8a9b8bb6  rfl: 0x00010206  cr2: 0x7fff75b654d0



*Below is the Code Snippet that starts the service*

@interface ServiceDelegate : NSObject NSXPCListenerDelegate

@end


@implementation ServiceDelegate


- (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(
NSXPCConnection *)newConnection {

NSLog(@Received connection request from process PID : %d,
newConnection.processIdentifier );

newConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:
@protocol(MCSP_XPCProtocol)];

// Exported connection object

MCSPClient *exportedObject = [MCSPClient sharedClient];

newConnection.exportedObject = exportedObject;

[newConnection resume];

return YES;

}

@end


int main(int argc, const char *argv[])

{

ServiceDelegate *delegate = [ServiceDelegate new];

NSXPCListener *listener = [NSXPCListener serviceListener];

listener.delegate = delegate;

[listener resume];

return 0;

}


My launchd plist is as below,


?xml version=1.0 encoding=UTF-8?

!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN 
http://www.apple.com/DTDs/PropertyList-1.0.dtd;

plist version=1.0

dict

keyLabel/key

stringcom.cmpnyName.cspxpc/string

keyProgram/key

string/Library/PrivilegedHelperTools/cspd.xpc/Contents/MacOS/cspd
/string

keyKeepAlive/key

true/

keyMachServices/key

dict

keycom.cmpnyName.cspxpc/key

dict

keyResetAtClose/key

true/

/dict

/dict

keyEnableTransactions/key

true/

/dict

/plist

thanks,
~Arjun
___

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

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

Help/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: Do Bindings work in Swift?

2015-04-27 Thread Charles Srstka
On Apr 27, 2015, at 8:54 PM, Rick Mann rm...@latencyzero.com wrote:
 
 In the latest Xcode 6.3.1, I've got an OS X app with a mixture of Objective-C 
 and Swift classes, and a Storyboard-based UI.
 
 I have one table view that's bound through an NSArrayController to an array 
 in an Objective-C class, and it seems to work as desired.
 
 I have another table view that's bound through an NSArrayController to an 
 Obj-C NSViewController subclass, which has a property to a Swift class which 
 has an array property. If I get the binding configuration wrong, I get errors 
 and the window doesn't render its contents. But if I get it right, I get no 
 errors and all the views show up, but the table is empty (however, I know the 
 array is getting .append() called and it's populating).
 
 It seems like the binding isn't working, but I'm not sure.
 
 The Swift class subclasses NSObject.
 
 Thanks for any help!

Make sure your array property is marked as dynamic, and also that the proper 
KVO notifications are being sent when you update the array (whether by using 
the to-many KVC methods like -insertObject:inkeyAtIndex: and friends, or by 
calling -willChangeValueForKey: and -didChangeValueForKey:).

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: Running AppleScripts from an App using NSAppleScript

2015-04-27 Thread Jens Alfke

 On Apr 27, 2015, at 6:52 AM, Dave d...@looktowindward.com wrote:
 
 At the moment, I setup the Text for the Script, Compile it and then Run it 
 each time. I’m wondering if there is anyway to be able to just compile the 
 Script once, and then pass the Parameters to the Script as it seems a bit 
 time-consuming to recompile each time when 99% of the Script is constant.

Define an event handler (“on …”) in the script and get the parameters out of 
it. Then call the script via -executeAppleEvent: passing it an AE descriptor 
containing the parameter values.

—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: Sketch TNG Code?

2015-04-27 Thread Thomas Wetmore
Rick, I requested that code and was told it was not packaged for release as a 
sample project. I then requested an as-is copy, and am awaiting a reply.

If you manage to find a copy I would appreciate hearing about it.

Tom Wetmore

 On Apr 27, 2015, at 8:52 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Is the Sketch TNG sample code available anywhere? Session 2014-212 showed 
 something I need to do, but didn’t explain how it was done (connecting the 
 selected shape's properties to the inspector side bar).

 -- 
 Rick Mann
 rm...@latencyzero.com

___

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

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

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

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

Re: Sketch TNG Code?

2015-04-27 Thread Rick Mann
Figures. If you get ahold of it, I'd love to get a copy. Thanks!

 On Apr 27, 2015, at 22:12 , Thomas Wetmore t...@verizon.net wrote:
 
 Rick, I requested that code and was told it was not packaged for release as a 
 sample project. I then requested an as-is copy, and am awaiting a reply.
 
 If you manage to find a copy I would appreciate hearing about it.
 
 Tom Wetmore
 
 On Apr 27, 2015, at 8:52 PM, Rick Mann rm...@latencyzero.com wrote:
 
 Is the Sketch TNG sample code available anywhere? Session 2014-212 showed 
 something I need to do, but didn’t explain how it was done (connecting the 
 selected shape's properties to the inspector side bar).
 
 -- 
 Rick Mann
 rm...@latencyzero.com


-- 
Rick Mann
rm...@latencyzero.com



___

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

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

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

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