Applescript: force garbage collection? (NSAppleScript call from Cocoa app)

2010-09-14 Thread eveningnick eveningnick
Hello I am trying to call applescript functions (from my cocoa application - using NSAppleScript's -executeAndReturnError), to automate some operations in Microsoft Word. The problem is that after every Applescript call, the Word operates slower and slower (and i guess finally it won't respond at a

Layer-backed view artifact

2010-09-14 Thread Jeff Schindler
Hi, We have an NSView with setWantsLayer:YES and it is part of an NSSplitView (right side). When the split view is resized (only to the right and only when done very fast), there is drawing artifact in the layer-backed NSView, which looks like the window's backing store. Note that this NSView

Re: CALayers - printing and flippedness

2010-09-14 Thread Gideon King
Thanks Scott, but I also tried with the layer being owned by the view, and nothing printed when I tried to print the view. I took it right back to a simple form where it just creates the layer and paints it red - works on screen but still doesn't print. - (void)awakeFromNib { CALayer *m

Re: CALayers - printing and flippedness

2010-09-14 Thread Matt Neuburg
On Tue, 14 Sep 2010 10:31:39 +1000, Gideon King said: >The first is that I am trying to make sure that I will be able to print what I have on my view, but this doesn't seem to be working. I tried creating a layer backed view, which in its drawRect: method fills the rect with red, and added a sub-

Re: Layer-backed view artifact

2010-09-14 Thread David Duncan
On Sep 13, 2010, at 8:38 PM, Jeff Schindler wrote: > We have an NSView with setWantsLayer:YES and it is part of an NSSplitView > (right side). When the split view is resized (only to the right and only > when done very fast), there is drawing artifact in the layer-backed NSView, > which looks

Number of open ports exceeded

2010-09-14 Thread Ivan C Myrvold
The Cocoa application I have developed have some problems on certain Macs, and by looking at the ports opened in Activity Monitor I see that on the Macs I have problems with, the problems start at 135 ports opened. Because my application communicates with other applications by AppleEvents, I can

Re: Interpreting a Crash Log

2010-09-14 Thread Sean McBride
On Mon, 13 Sep 2010 17:15:34 -0600, k...@highrolls.net said: >As I understand the entries below from a crash log my app crashed in >objc_msgSend which was called from the method changeAColor:newColor in >the class BMatrix, 1499 bytes into the method. > >How do I find the offending line in the sour

Re: CALayers - printing and flippedness

2010-09-14 Thread Gideon King
Thanks Matt - I was beginning to suspect that might be the case, but was hoping that there might be some workaround where I could get at the drawn content. I have done some performance testing and it appears that I'll need to go the route of pure layers for most of it (the animation got a bit je

Re: Layer-backed view artifact

2010-09-14 Thread Jeff Schindler
On Sep 14, 2010, at 12:02 PM, David Duncan wrote: > On Sep 13, 2010, at 8:38 PM, Jeff Schindler wrote: > >> We have an NSView with setWantsLayer:YES and it is part of an NSSplitView >> (right side). When the split view is resized (only to the right and only >> when done very fast), there is dr

Re: Interpreting a Crash Log

2010-09-14 Thread koko
Thanks to all for the tips and suggestions! -koko On Sep 14, 2010, at 10:52 AM, Sean McBride wrote: On Mon, 13 Sep 2010 17:15:34 -0600, k...@highrolls.net said: As I understand the entries below from a crash log my app crashed in objc_msgSend which was called from the method changeAColor:ne

Re: CALayers - printing and flippedness

2010-09-14 Thread Kyle Sluder
On Tue, Sep 14, 2010 at 10:12 AM, Gideon King wrote: > I have done some performance testing and it appears that I'll need to go the > route of pure layers for most of it (the animation got a bit jerky with 1,000 > layer backed views), but I guess I'll be able to factor out the drawing code > an

Re: CALayers - printing and flippedness

2010-09-14 Thread Matt Neuburg
On or about 9/14/10 10:12 AM, thus spake "Gideon King" : > I'm a little surprised about your statement that there is going to have to be > a completely separate codebase for Mac and iOS. I would have thought that if I > stick to the core graphics / quartz 2D drawing, that it would be reusable. Yo

Re: Number of open ports exceeded

2010-09-14 Thread Scott Ribe
On Sep 14, 2010, at 10:30 AM, Ivan C Myrvold wrote: > How can I increase the possible number of ports to be opened in my Cocoa > application? The question you should be asking is how you can make sure ports are closed when you are done using them. -- Scott Ribe scott_r...@elevated-dev.com htt

Re: Applescript: force garbage collection? (NSAppleScript call from Cocoa app)

2010-09-14 Thread John Nairn
On Sep 14, 2010, at 10:24 AM, cocoa-dev-requ...@lists.apple.com wrote: i think that after each call of NSAppleScript's -executeAndReturnError, Word doesn't clean its previous "results", which slows it down with every next call. I wanted to try to do an explicit call of Applescript's garbage

Fast User switching

2010-09-14 Thread Jim O'Connor
I receive disk appeared notifications. When the notification comes in I need to determine what to do based partly on if my user is the current user (not fast user switched out). Simply tracking switch in and switch out notifications isn't sufficient because I can be launched when the user isn't t

Re: CALayers - printing and flippedness

2010-09-14 Thread Gideon King
Absolutely brilliant, thanks Kyle - downloading it now... Gideon On 15/09/2010, at 4:08 AM, Kyle Sluder wrote: > On Tue, Sep 14, 2010 at 10:12 AM, Gideon King wrote: >> I have done some performance testing and it appears that I'll need to go the >> route of pure layers for most of it (the ani

Make checkbox in table view uneditable

2010-09-14 Thread Shane Stanley
I have a table view using Cocoa bindings, and all columns have editable turned off in the Attributes panel. However one column, which contains a checkbox cell, steadfastly remains editable. I've also tried binding its editable property to a boolean property set to NO, but that made no difference.

Re: force garbage collection? (NSAppleScript call from Cocoa app)

2010-09-14 Thread Matt Neuburg
On Tue, 14 Sep 2010 03:05:03 +0300, eveningnick eveningnick said: >Hello >I am trying to call applescript functions (from my cocoa application - using >NSAppleScript's -executeAndReturnError), to automate some operations in >Microsoft Word. >The problem is that after every Applescript call, the Wo

Re: force garbage collection? (NSAppleScript call from Cocoa app)

2010-09-14 Thread Jerry Krinock
On 2010 Sep 14, at 17:01, Matt Neuburg wrote: > Then it sounds like this is not a Cocoa question, but rather an AppleScript > question. To confirm this, paste your scripts into AppleScript Editor and click "Run". Makes development much easier if you can test your AppleScripts before embedding

Re: Make checkbox in table view uneditable

2010-09-14 Thread Keary Suska
On Sep 14, 2010, at 5:59 PM, Shane Stanley wrote: > I have a table view using Cocoa bindings, and all columns have editable > turned off in the Attributes panel. However one column, which contains a > checkbox cell, steadfastly remains editable. > > I've also tried binding its editable property

NSOutlineView Drag and Drop

2010-09-14 Thread koko
Other than - (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id )info proposedItem:(id)item proposedChildIndex:(int)index and - (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id )info item:(id)item childIndex:(int)index what do i need to implement so

Re: NSOutlineView Drag and Drop

2010-09-14 Thread Seth Willits
On Sep 14, 2010, at 7:36 PM, k...@highrolls.net wrote: > Other than > > - (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id > )info proposedItem:(id)item proposedChildIndex:(int)index > > and > > - (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id > )info

Re: Core Data Migration : Splitting an Entity : Source Fetch ?

2010-09-14 Thread Jerry Krinock
On 2010 Sep 13, at 15:38, Jerry Krinock wrote: > …I found that Xcode accepted my input if I set "Source Fetch" to Default and > entered one of these as "Filter Predicate": > >($source.beak != nil) // Bird >($source.beak == nil) // Fish Upon studying my situation a little furt

Re: NSOutlineView Drag and Drop

2010-09-14 Thread Chris Williams
Or check the sample code. There's a great sample that shows it all. From: Seth Willits Date: Tue, 14 Sep 2010 23:20:24 -0400 To: cocoa-dev list Subject: Re: NSOutlineView Drag and Drop On Sep 14, 2010, at 7:36 PM, k...@highrolls.net wrote: > Other than > > -

NSImageViews, Block Animation and Frame by Frame Image Swapping

2010-09-14 Thread James Miller
With Apple recommending block-based animation of UIImageViews, I'm not quite grasping how to take older frame-by-frame animation code like this: NSArray *playerImagesRight = [NSArray arrayWithObjects: [UIImage imageNamed:@"p1.png"], [UIImage imageNamed:@"p2.png"],[UIImage imageNamed:@"p3.png"],

Re: Make checkbox in table view uneditable

2010-09-14 Thread Shane Stanley
On 15/9/10 12:29 PM, "Keary Suska" wrote: > Checkboxes aren't edit controls, they are buttons, and to my knowledge don't > even have an "editable" property (even though the table column has such a > binding). To prevent changing a button state (without significant subclassing) > you must disable

Re: CALayers - printing and flippedness

2010-09-14 Thread Gideon King
Thanks Scott, but I also tried with the layer being owned by the view, and nothing printed when I tried to print the view. I took it right back to a simple form where it just creates the layer and paints it red - works on screen but still doesn't print. - (void)awakeFromNib { CALayer *m

Garbage collection 32 & 64-bit

2010-09-14 Thread Jonathan Guy
Hi all Having an issue with GC. I compile an app 32 & 64-bit intel only with GC supported (not required). The app has a webview which loads a flash animation (hence requiring the flash plugin). On a new intel box running Snow Leopard and everything running 64-bit all works fine. I run the same a

Programmatic Cocoa (Interface Builder accessibility)

2010-09-14 Thread E.J. Zufelt
Good afternoon, I am looking for learning resources about how to design UIs with Cocoa programmatically. All other arguments aside for the pros and cons of programmatic Cocoa, this is a * must * for me. I am using VoiceOver and as far as I can tell, through speaking with other blind developer

Re: Garbage collection 32 & 64-bit

2010-09-14 Thread Bill Bumgarner
On Sep 14, 2010, at 7:34 AM, Jonathan Guy wrote: > I was under the impression that if you compile GC in supported mode it was > capable of loading code with or without GC? I'm a bit confused as to why this > is happening. Can any GC gurus out the shed any light? Everything in an application mu