Re: Making Managed Object Context available to array controller in Storyboard scene

2016-03-15 Thread Eric Gorr
14, 2016, at 8:40 PM, Eric Gorr wrote: > > I have a core data, document based, storyboard OS X application. > > There is a test project here: > > https://github.com/ericgorr/sb_ac_doc > > which is just the default project Xcode creates with a few modifications. > > I

Making Managed Object Context available to array controller in Storyboard scene

2016-03-14 Thread Eric Gorr
I have a core data, document based, storyboard OS X application. There is a test project here: https://github.com/ericgorr/sb_ac_doc which is just the default project Xcode creates with a few modifications. I have a single view controller and the view contains a table view which will eventuall

Re: Automatically restore last saved document on application launch

2016-03-12 Thread Eric Gorr
, 2016, at 9:38 PM, Eric Gorr wrote: > > There are still several key details I seem to be missing. > > I have a new commit > > https://github.com/ericgorr/last_saved/commit/ba462a19062fefde68f7e0f4459a0c8293332e9f > > <https://gith

Re: Automatically restore last saved document on application launch

2016-03-11 Thread Eric Gorr
pDelegate.self theWindow.identifier= "last_saved_window" self.addWindowController( windowController ) } to setup the window for restoration. Does this look correct? > On Mar 11, 2016, at 2:14 AM, Quincey Morris > wrote: > > On

Automatically restore last saved document on application launch

2016-03-10 Thread Eric Gorr
I have a Core Data Document Based OS X application written in swift and using storyboards. Whenever I build and launch the app, instead of automatically opening the last opened document(s), it will create a new document. What I want to be able to do is have the application automatically restore

Re: calendar & repeating events api

2016-02-21 Thread Eric Gorr
> On Feb 16, 2016, at 9:52 PM, Greg Parker wrote: > > >> On Feb 16, 2016, at 6:34 PM, Eric Gorr wrote: >> >> When setting up a repeating event in Apple’s Calendar application, there is >> a lot of flexibility. For example, I can specify that an event r

calendar & repeating events api

2016-02-16 Thread Eric Gorr
When setting up a repeating event in Apple’s Calendar application, there is a lot of flexibility. For example, I can specify that an event repeats every month on the 5th Saturday. Of course, not every month has a fifth saturday, so for that month there is no event. What I am wondering is if the

Re: Assigning an element of a swift array to a userdata parameter triggers didSet

2015-11-18 Thread Eric Gorr
Yes, that all makes sense. So, the question is what can I do about it? The number of tooltips I need is the same number of elements in the array and the number of elements in the array can change over the lifetime of the application. So, it is natural to store the information needed by the toolt

Assigning an element of a swift array to a userdata parameter triggers didSet

2015-11-17 Thread Eric Gorr
I created the default Cocoa/Swift app. My AppDelegate class is below. I have hooked the view in the window to the view IBOutlet in the AppDelegate. What I am trying to do is assign a element from an array to the userdata for a tooltip. The code executes and prints 'did set' three times. I would

Re: NSTableView: Rows from bottom up

2015-09-03 Thread Eric Gorr
I went ahead and used a DTS ticket and the response I got back from Apple is that there is no supported way to do what I want. So, I am left with something custom or attempting to fake it by determining the number of rows I need to fill the table (when there aren’t enough already) and ordering

Re: NSTableView: Rows from bottom up

2015-09-01 Thread Eric Gorr
> On Aug 31, 2015, at 10:00 PM, Keary Suska wrote: > > On Aug 31, 2015, at 7:51 PM, Eric Gorr wrote: >> >> Normally when one adds the first row to a NSTableView, it will appear at the >> top of the view and additional rows will appear below it. Is it possible to &

NSTableView: Rows from bottom up

2015-08-31 Thread Eric Gorr
Normally when one adds the first row to a NSTableView, it will appear at the top of the view and additional rows will appear below it. Is it possible to have the first row appear at the bottom of the NSTableView and for new rows to appear above it? No doubt this would require some extensive cus

Re: Prevent autoloading of last opened document

2014-02-13 Thread Eric Gorr
> On Feb 13, 2014, at 6:22 PM, Mike Abdullah wrote: > > >> On 13 Feb 2014, at 21:12, Eric Gorr wrote: >> >> What I want to do seems like it should be fairly straightforward, but >> doesn't seem to be. All I want to do is with a standard NSDocument Bas

Prevent autoloading of last opened document

2014-02-13 Thread Eric Gorr
What I want to do seems like it should be fairly straightforward, but doesn't seem to be. All I want to do is with a standard NSDocument Based (with Core Data) is prevent the last document opened from opening automatically the next time the application is launched. What is the best way to accom

Re: SKIndexAddDocument crashing

2013-11-20 Thread Eric Gorr
If anyone else is interested, this has been confirmed as a bug and there is no workaround. Again, the bug number is rdar://15410920 On Nov 14, 2013, at 9:14 AM, mail...@ericgorr.net wrote: > If anyone is watching who can expedite this, I have started a DTS incident. > > This does appear to be

Re: SKIndexAddDocument crashing

2013-11-07 Thread Eric Gorr
The values are all valid. There is not much more to the sample test project then the code I posted if you wanted to check this out yourself. The sample project is just the default cocoa app. At least one other person did and saw the same behavior Sent from my iPhone > On Nov 7, 2013, at 12:12

Re: SKIndexAddDocument crashing

2013-11-07 Thread Eric Gorr
Good thought. mdimport works just fine. Sent from my iPhone > On Nov 7, 2013, at 2:56 AM, Kyle Sluder wrote: > >> On Nov 6, 2013, at 7:35 PM, Eric Gorr wrote: >> >> If I hand SKIndexAddDocument a text file, the code works without issue. As >> best I can figu

Re: SKIndexAddDocument crashing

2013-11-06 Thread Eric Gorr
On Nov 6, 2013, at 7:29 AM, Mike Abdullah wrote: > > On 6 Nov 2013, at 02:18, Eric Gorr wrote: > >> I've got a functioning sample project at >> https://github.com/ericgorr/searchtest.git >> >> The relevant code is self contained in the appli

SKIndexAddDocument crashing

2013-11-05 Thread Eric Gorr
I've got a functioning sample project at https://github.com/ericgorr/searchtest.git The relevant code is self contained in the applicationDidFinishLaunching method in ELIZAppDelegate.m... NSBundle* mainBundle = [NSBundle mainBundle]; NSURL* docURL = [mainBundle UR

Re: view based NSTable View - button not firing

2013-07-23 Thread Eric Gorr
n't know why. > > Thanks, > Abdul > > Sent from my iPhone > >> On Jul 23, 2013, at 8:43 PM, "Eric Gorr" wrote: >> >>> On Jul 23, 2013, at 3:42 PM, Keary Suska wrote: >>> >>>> On Jul 22, 2013, at 8:31 AM, Abdul Sowayan wro

Re: view based NSTable View - button not firing

2013-07-23 Thread Eric Gorr
On Jul 23, 2013, at 3:42 PM, Keary Suska wrote: > On Jul 22, 2013, at 8:31 AM, Abdul Sowayan wrote: > >> I’m am using a view based NSTableView. In the NSTableViewCell, I place a >> button and hook up its action/target to the App delegate. The problem is, it >> doesn’t seem to work. If I place

NSCollectionView - different highlight color

2013-05-23 Thread Eric Gorr
Is it possible to get control over the highlight color of the selected item? I would like a different highlight color used when the control does not have focus. Thank you. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Lazy Fetching - Bug?

2013-05-19 Thread Eric Gorr
I've got a sample project at https://github.com/ericgorr/LazyFetching which demonstrates some strange behavior I am seeing. If you build and run the project, what I did was to: (1) Press the top + button and name the entry 'a' (2) Press the top + button again and name the entry 'b' (3) Pressed

positional information about terms in a search kit index

2013-02-28 Thread Eric Gorr
I know that in an inverted index which was created with kSKProximityIndexing, the position of each term is stored in order to support phrased based searching. Perhaps I missed something, but I was wondering if there were any APIs which would provide this positional information from the index for

Re: NSSavePanel problem

2013-02-24 Thread Eric Gorr
It may take more effort to reproduce the problem then just building a minimal app with a NSSavePanel. I have little doubt that works as, if it did not, nearly every application out there would be crashing and they aren't. It will take effort, but you will likely need to replicate the conditions

Re: NSSavePanel problem

2013-02-24 Thread Eric Gorr
If you attempt to develop a sample application which reproduces the problem, can you do so? If so, making the sample application available might be quite useful in tracking down the problem. On Feb 24, 2013, at 4:26 AM, Peter Hudson wrote: > Here is the code for running the NSSavePanel. > I r

Binding a NSArrayController to a NSPopupButtonn & NSTextField

2013-02-15 Thread Eric Gorr
What I want to accomplish seems like it should be fairly straightforward. I have placed a sample project at https://github.com/ericgorr/arraycontrollerbindings. I have a NSArrayController filled with an array of NSDictionaries. [[self controller] addObject:@{ @"name" : @"itemA", @"part" : @"par

Re: Optimal height for WebView

2013-02-07 Thread Eric Gorr
I think I've finally got a good answer for how to compute the height of the content of a WebView. The trick seems to be to give an element an ID (in this case 'foo' ) and then evaluate: @"document.getElementById(\"foo\").scrollHeight;" on that element. This does appear to give the correct hei

Re: Core Data & NSPersistentDocument & Concurrency

2013-02-02 Thread Eric Gorr
On Feb 1, 2013, at 6:59 PM, Mike Abdullah wrote: > On 1 Feb 2013, at 20:13, mail...@ericgorr.net wrote: > >> I've got a NSPersistentDocument. I have read the Concurrency with Core Data >> in the Core Data Programming Guide and am following the typically >> recommended approach which is to cre

Re: Core Data & NSPersistentDocument & Concurrency

2013-02-02 Thread Eric Gorr
On Feb 1, 2013, at 7:00 PM, Mike Abdullah wrote: > > On 1 Feb 2013, at 22:11, Felix Franz wrote: > >> >> On 01.02.2013, at 21:13, mail...@ericgorr.net wrote: >> >>> >>> The problem then is that my NSPersistentDocument generates an error which >>> says: >>> >>> "The document "xxx" could

Re: Using a document bundle file type with core data

2013-01-17 Thread Eric Gorr
On Jan 17, 2013, at 5:42 AM, Mike Abdullah wrote: > > On 17 Jan 2013, at 03:38, David Brittain wrote: > >> The code in this blog article enables saving core data files to a package: >> >> http://cutecoder.org/featured/asynchronous-core-data-document/ >> >> Take a look at the writeSafelyToUR

Re: Using a document bundle file type with core data

2013-01-16 Thread Eric Gorr
and documents. > > On Wed, Jan 16, 2013 at 7:25 PM, Eric Gorr wrote: >> I've got a sample project at: >> >> http://ericgorr.net/cocoadev/docbundleCD.zip >> >> Basically, what I am attempting to do should be fairly standard and simple, >> but I am a

Using a document bundle file type with core data

2013-01-16 Thread Eric Gorr
I've got a sample project at: http://ericgorr.net/cocoadev/docbundleCD.zip Basically, what I am attempting to do should be fairly standard and simple, but I am apparently missing something obvious. I only want to be able to define my document type as a document bundle and place a Core Data file

Re: Override runModalSavePanelForSaveOperation

2013-01-16 Thread Eric Gorr
Sent from my iPhone On Jan 16, 2013, at 5:05 PM, Quincey Morris wrote: > On Jan 16, 2013, at 13:36 , Eric Gorr wrote: > >> I need to override runModalSavePanelForSaveOperation in NSDocument to >> provide some custom behavior. > > I'd suggest you keep trying

Override runModalSavePanelForSaveOperation

2013-01-16 Thread Eric Gorr
I need to override runModalSavePanelForSaveOperation in NSDocument to provide some custom behavior. According to the description in the documentation, one needs to call saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo: which I am doing. However, my writeToURL:ofType:forSa

Re: book for n00b

2013-01-16 Thread Eric Gorr
That would be my recommendation. On Jan 16, 2013, at 1:14 PM, Scott Ribe wrote: > I know someone who's developed an interest in developing for Mac. No > programming experience, some HTML, so classic newbie. > > Would Hillegass' book still be the best intro? > > -- > Scott Ribe > scott_r...@e

Re: Optimal height for WebView

2013-01-14 Thread Eric Gorr
Sent from my iPhone On Jan 4, 2013, at 9:45 PM, Steve Christensen wrote: > On Jan 4, 2013, at 10:40 AM, Mike Abdullah wrote: > >> On 4 Jan 2013, at 18:12, Eric Gorr wrote: >> >>> Good point Mike. >>> >>> However, after it has complete

Re: Optimal height for WebView

2013-01-04 Thread Eric Gorr
height - that is essentially what the stackoverflow solution does, just in a rather convoluted way. On Jan 4, 2013, at 12:22 PM, Mike Abdullah wrote: > > On 4 Jan 2013, at 17:19, Eric Gorr wrote: > >> >> >> Sent from my iPhone >> >> On Jan 4, 2013, at 1

Re: Optimal height for WebView

2013-01-04 Thread Eric Gorr
Sent from my iPhone On Jan 4, 2013, at 11:34 AM, Keary Suska wrote: > On Jan 4, 2013, at 9:19 AM, Eric Gorr wrote: > >> It seems like this should be a simple question. I can access the >> NSScrollView of the WebView and ask the scroll view for the height of its >>

Optimal height for WebView

2013-01-04 Thread Eric Gorr
It seems like this should be a simple question. I can access the NSScrollView of the WebView and ask the scroll view for the height of its document view, but the height it returns is the current height of the WebView, not the height of the content it currently contains. If I reduce the height o

Re: Simple Auto-Layout problem

2012-12-14 Thread Eric Gorr
Dec 10, 2012, at 9:27 PM, Eric Gorr wrote: > Well, at least it looks like it should be a simple one. I have a sample > project at: > > http://ericgorr.net/cocoadev/autolayout01.zip > > If you run the app and resize the window to be it's smallest and then larger, > th

Simple Auto-Layout problem

2012-12-10 Thread Eric Gorr
Well, at least it looks like it should be a simple one. I have a sample project at: http://ericgorr.net/cocoadev/autolayout01.zip If you run the app and resize the window to be it's smallest and then larger, the button will not be drawn correctly, if at all. If one makes the window bigger fast

Getting a dotted font from a regular font

2012-09-30 Thread Eric Gorr
An odd request I know, but I have a need to take a regular font and obtain a dotted version of it. Any clever ideas that would not involve loading the font into a font editor and turing it into a dotted font? ___ Cocoa-dev mailing list (Cocoa-dev@l

Constraints Question

2012-09-29 Thread Eric Gorr
I am trying to wrap my head around the auto-layout functionality. I have a sample project at: http://ericgorr.net/cocoadev/constraints.zip After opening the project, take a look at ELGFirstViewController.xib. This app will only be used in landscape. On this XIB, there are three object

Re: How to implement an object whose properties are really dictionary entries.

2012-07-11 Thread Eric Gorr
OP = original poster (i.e the person who started the thread) On Jul 11, 2012, at 4:45 PM, Motti Shneor wrote: > Wow, and thanks, everyone. BTW, what does "OP" stand for? (obviously, its > me...) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Concealing an app from DTrace

2012-05-02 Thread Eric Gorr
it is >>> not possible to conceal an application from DTrace. > >> On May 1, 2012, at 6:04 PM, Eric Gorr wrote: >> It is true and will be true as long as your are able to compile your own >> kernel. Think about it. > > Even if you couldn't compiler your

Re: Concealing an app from DTrace

2012-05-01 Thread Eric Gorr
Thanks Kyle. Is that the only way? Or is there something easier that would bypass the flag? In my case, I am not sure i would be concerned if a custom kernel was required. On May 1, 2012, at 9:28 PM, Kyle Sluder wrote: > On May 1, 2012, at 6:04 PM, Eric Gorr wrote: > >> I fo

Concealing an app from DTrace

2012-05-01 Thread Eric Gorr
I found this old message: http://lists.apple.com/archives/cocoa-dev/2010/Mar/msg01042.html in which stated: If you think this is going to help you avoid piracy, it's not. OS X has a flag (PT_DENY_ATTACH) that the kernel checks for when a debugger asks to attach to a process. If t

Re: Question about SMJobBless

2011-10-13 Thread Eric Gorr
FBundleCopyInfoDictionaryForURL( > (CFURLRef)currentHelperToolURL ); > NSString* currentBundleVersion= [currentInfoPlist > objectForKey:@"CFBundleVersion"]; > NSInteger currentVersion = [currentBundleVersion integerValue]; > > NSLog( @"currentVersi

Re: PDF viewing

2011-10-04 Thread Eric Gorr
Yes. See the ZoomingPDFViewer sample code. http://developer.apple.com/library/ios/#samplecode/ZoomingPDFViewer/Introduction/Intro.html >From the description: This sample code project demonstrates how to create a PDF viewer using the UIScrollView and CATilerLayer classes. On Oct 4,

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
{ stErr = SecStaticCodeCheckValidity( staticCodeRef, kSecCSDefaultFlags, requirement ); needToInstall = NO; } } } On Sep 30, 2011, at 4:27 PM, Eric Gorr wrote: > Well, it turned out to be not that bad to check the version n

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
= [currentBundleVersion integerValue]; NSLog( @"currentVersion: %ld", (long)currentVersion ); if ( currentVersion == installedVersion ) { needToInstall = NO; } } On Sep 30, 2011, at 3:09 PM, Eric Gorr wrote: > So, it look

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
then this. On Sep 30, 2011, at 1:53 PM, Eric Gorr wrote: > That's interesting. > > So, how would one go about checking to see whether or not SMJobBless needed > to be called? > > I suppose one would need to check the version number of the installed job vs. > the

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
tool and, if that fails, then call SMJobBless. On Sep 30, 2011, at 1:40 PM, Kyle Sluder wrote: > On Sep 30, 2011, at 10:05 AM, Eric Gorr wrote: > >> On Sep 30, 2011, at 1:00 PM, Jean-Daniel Dupas wrote: >> >>> As I understand it, you have to bless the job only once,

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
On Sep 30, 2011, at 1:00 PM, Jean-Daniel Dupas wrote: > Le 30 sept. 2011 à 18:14, Eric Gorr a écrit : > >> >> On Sep 30, 2011, at 10:34 AM, Jean-Daniel Dupas wrote: >> >>> >>> Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : >>> >>>&g

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
On Sep 30, 2011, at 10:34 AM, Jean-Daniel Dupas wrote: > > Le 30 sept. 2011 à 16:01, Eric Gorr a écrit : > >> I had a couple of followup questions concerning the approach used by >> SMJobBless in developing a secure helper tool. >> >> In the How It Works

Re: Question about SMJobBless

2011-09-30 Thread Eric Gorr
? I am also wondering how it might be possible to only ask for an admin password once as an absolute regardless of the number of time the application was launched. Is this possible? If so, how? Thank you. On Sep 29, 2011, at 4:45 PM, Eric Gorr wrote: > I cannot seem to locate any document

Question about SMJobBless

2011-09-29 Thread Eric Gorr
I cannot seem to locate any documentation on this, so hopefully someone can confirm the behavior I am seeing with Apple's sample SMJobBless code located at: http://developer.apple.com/library/mac/#samplecode/SMJobBless/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010071 I was under the impre

Re: Cleaning up a window with blocks

2011-09-29 Thread Eric Gorr
Ya, thanks. I spotted that almost immediately after I posted the message. On Sep 29, 2011, at 4:22 PM, Ken Thomases wrote: > On Sep 29, 2011, at 11:42 AM, Thomas Davie wrote: > >> A quick scan over the code says that your issue is that you're referring to >> theObserver inside theObserver, wh

Cleaning up a window with blocks

2011-09-29 Thread Eric Gorr
The intent of the following code is to implement a quick and easy way to bring up a window and provide a way to clean up after it closes. The problem is that it is crashing. I believe I am missing something obvious here and was hoping that someone could remove the blinders... - (void) displayW

Re: Creating a TCP server?

2011-07-26 Thread Eric Gorr
Jul 26, 2011, at 12:23 , Eric Gorr wrote: > >> I would suggest checking out the SSD sample project from WWDC 2010. There >> are a couple of problems in the source which are covered in this thread: >> >> http://lists.apple.com/archives/Macnetworkprog/2011/Jul/msg5.h

Re: Creating a TCP server?

2011-07-26 Thread Eric Gorr
I would suggest checking out the SSD sample project from WWDC 2010. There are a couple of problems in the source which are covered in this thread: http://lists.apple.com/archives/Macnetworkprog/2011/Jul/msg5.html But the basics of what you want to do I believe are there... On Jul 26, 2011,

Re: Help Book question

2011-06-22 Thread Eric Gorr
On Jun 22, 2011, at 11:19 AM, Matt Neuburg wrote: > Even easier, though, if you were to ask this instead on the > apple-help-authoring list. Thanks. >> I would like to understand why the anchor based link isn't working. I'm sure >> I'm doing something obviously wrong > > Not necessarily;

Help Book question

2011-06-21 Thread Eric Gorr
This should be an easy question for someone to answer. I've got a sample application demonstrating the problem at: http://ericgorr.net/cocoadev/helpbooktest.zip After launching the application, bring up the help book from the help menu. The first about link is anchor based and should link to t

Re: Using selectedMenuItemColor

2011-04-10 Thread Eric Gorr
On Apr 10, 2011, at 10:09 PM, Graham Cox wrote: > > On 11/04/2011, at 11:33 AM, Eric Gorr wrote: > >> Hummm...I can't seem to get it to do much. If I alter the code to: > > > Have you tried using NSAffineTransform to offset the coordinate system to > wher

Re: Using selectedMenuItemColor

2011-04-10 Thread Eric Gorr
On Apr 10, 2011, at 2:13 AM, Lee Ann Rucker wrote: > Interesting - if you set the view so its Y origin is zero, it draws as > expected. Hummm...I can't seem to get it to do much. If I alter the code to: [self setFrameOrigin:NSMakePoint( 0, 0 )]; for ( x = 0; x < 10; x++ )

Using selectedMenuItemColor

2011-04-09 Thread Eric Gorr
I've got a sample application at http://ericgorr.net/cocoadev/colordrawing.zip attempting demonstrate what I am trying to do. Basically, I would like the smaller rectangles to the right of the large one to all look the same. However, when filling a rect using selectedMenuItemColor, the way the

Re: iOS - Hide Master view in a split view

2011-03-24 Thread Eric Gorr
Sent from my iPhone On Mar 24, 2011, at 7:11 PM, WT wrote: > On Mar 24, 2011, at 6:27 PM, Eric Gorr wrote: > >> I am trying to figure out how to hide the master view in a split view while >> in landscape mode. Searching, I found the suggestion to try: &g

iOS - Hide Master view in a split view

2011-03-24 Thread Eric Gorr
I am trying to figure out how to hide the master view in a split view while in landscape mode. Searching, I found the suggestion to try: [[master view] setFrame:CGRectMake(0, 0, 0, 0)]; [[detail view] setFrame:splitBounds]; However, this does not appear to work. What is the recommend me

Changing tooltips in a custom view

2011-03-22 Thread Eric Gorr
I've got a sample project at: http://ericgorr.net/cocoadev/tooltip.zip What I would like to do is define a single tooltip rect for an entire view but be able to change the tooltip as the cursor moves inside of the view. Is there a way to do that? Is there a way to force it to hide the current

Books covering iOS security issues

2011-03-16 Thread Eric Gorr
I was just wondering if there were any books people would recommend, apart from Apple's documentation on the topic ( http://bit.ly/gz36Bn, etc. ), which discuss security issues and best-coding practices for iOS. Thank you. ___ Cocoa-dev mailing list

Re: Book "Cocoa programming for Mac OS X" Third Edition

2011-03-11 Thread Eric Gorr
On Mar 11, 2011, at 9:52 AM, David Remacle wrote: > I have see on amazon the book "Cocoa programming for Mac OS X" third > Edition of Aaron Hillegass. Is this a good book for beginner ? Yes! It's the best book for a beginner learning Cocoa. > Which books for objective-C 2.0/Cocoa do you recommen

Customizing the drop highlight on a NSTableView

2011-03-02 Thread Eric Gorr
I found this old thread: http://lists.apple.com/archives/cocoa-dev/2005/Jun/msg01922.html which talks about overriding the private method: _drawDropHighlightOnRow: Now, I tried this out, and while the method does get called, it no longer appears to control the drop highlight of a row. I am us

NSTableView & hiding or updating tooltips

2011-02-28 Thread Eric Gorr
For my NSTableView, I have defined - (NSString *)tableView:toolTipForCell:rect:tableColumn:row:mouseLocation: and this does return the string I want to display and the NSTableView does display that string as a tooltip. The problem is that while the tooltip is being displayed, I click the mouse

Setting a color in a NSBitmapImageRep to white or black

2011-02-17 Thread Eric Gorr
I've got this category method on NSColor: + (NSColor*) patternColorWithData:(unsigned char*)bits oneColor:(NSColor*)oneColor zeroColor:(NSColor*)zeroColor { NSBitmapImageRep* patternBitmap; patternBitmap = [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL

Re: Strange problem drawing a custom grid in NSTableView

2011-02-11 Thread Eric Gorr
I filed a bug report on this: rdar://8988596 Hopefully this will be fixed soon or a workaround provided. In the meantime, I will just disable the Automatically Hide Scrollers feature of NSScrollView. On Feb 10, 2011, at 7:07 PM, Eric Gorr wrote: > Unfortunately, no. > > - (void

Re: Strange problem drawing a custom grid in NSTableView

2011-02-10 Thread Eric Gorr
> > corbin > > On Feb 10, 2011, at 2:51 PM, Eric Gorr wrote: > >> I've got a sample project demonstrating the problem: >> >> http://ericgorr.net/cocoadev/TableViewGridDrawing.zip >> >> I've included a screen recording showing the problem as

Strange problem drawing a custom grid in NSTableView

2011-02-10 Thread Eric Gorr
I've got a sample project demonstrating the problem: http://ericgorr.net/cocoadev/TableViewGridDrawing.zip I've included a screen recording showing the problem as well. Basically, I need to drawn some vertical column line in a column. Since, in the real case, these lines would be drawn for only

Redisplaying a NSTableColumn NSTableHeaderCell

2011-01-26 Thread Eric Gorr
I found this old thread: refreshing the header title for an NSTableColumn http://lists.apple.com/archives/cocoa-dev/2005/Nov/msg00659.html which describes the same problem I just faced. In my case, I needed to change the justification of the text in the header cell and calling setNeedsDis

Re: Creating a mouse event & event number

2011-01-26 Thread Eric Gorr
/msg00050.html > > > izidor > > > > On 24.1.2011, at 16:52, Eric Gorr wrote: > > > It's straightforward to create a mouse event using NSEvent's > > mouseEventWithType method. The only question I have is what should I be > > passi

Creating a mouse event & event number

2011-01-24 Thread Eric Gorr
It's straightforward to create a mouse event using NSEvent's mouseEventWithType method. The only question I have is what should I be passing in for the eventNumber parameter? 0? 1? some other number? Does it matter?___ Cocoa-dev mailing list (Cocoa-de

Re: Cleaning up weak references ( was Re: Odd Crash when adding table columns manually )

2011-01-20 Thread Eric Gorr
On Jan 20, 2011, at 4:27 PM, Corbin Dunn wrote: > Hi Eric, > > On Jan 20, 2011, at 9:26 AM, Eric Gorr wrote: > >> >> On Jan 20, 2011, at 12:17 PM, Kyle Sluder wrote: >> >>> On Thu, Jan 20, 2011 at 7:22 AM, Eric Gorr wrote: >>>> Based on my c

Re: Cleaning up weak references ( was Re: Odd Crash when adding table columns manually )

2011-01-20 Thread Eric Gorr
On Jan 20, 2011, at 4:56 PM, Sean McBride wrote: > On Thu, 20 Jan 2011 13:27:35 -0800, Corbin Dunn said: > >>> For a specific example, check out the AnimatedTableView sample code >> from Apple. The ATColorTableController class is a datasource for the >> table, but it's dealloc looks like: >>>

Re: Cleaning up weak references ( was Re: Odd Crash when adding table columns manually )

2011-01-20 Thread Eric Gorr
On Jan 20, 2011, at 12:17 PM, Kyle Sluder wrote: > On Thu, Jan 20, 2011 at 7:22 AM, Eric Gorr wrote: >> Based on my current understanding, the dealloc should be setting it's >> datasource and delegate to nil. Correct? If so, I will file a bug. > > No. It is the resp

Cleaning up weak references ( was Re: Odd Crash when adding table columns manually )

2011-01-20 Thread Eric Gorr
On Jan 19, 2011, at 8:24 PM, Eric Gorr wrote: > On Jan 19, 2011, at 8:19 PM, Graham Cox wrote: > >> On 20/01/2011, at 12:14 PM, Eric Gorr wrote: >> >>> The table is also owned by the the scrolling view and therefore the window >>> and would not be dealloca

Re: Odd Crash when adding table columns manually

2011-01-19 Thread Eric Gorr
On Jan 19, 2011, at 8:19 PM, Graham Cox wrote: > On 20/01/2011, at 12:14 PM, Eric Gorr wrote: > >> The table is also owned by the the scrolling view and therefore the window >> and would not be deallocated here...it will stick around long after the >> controller is

Re: Odd Crash when adding table columns manually

2011-01-19 Thread Eric Gorr
The reason was that removing the table columns from the table prevented the crash from happening. However, simply setting the the datasource and delegate to nil works as well and is a better solution. Without any table columns, even though the table might have been marked as dirty, neither the

Re: Odd Crash when adding table columns manually

2011-01-19 Thread Eric Gorr
explicitly when the > window is about to close, so we suspect that it's attempting to use > deallocated objects. > > > On Jan 19, 2011, at 11:55 AM, Eric Gorr wrote: > >> If anyone is interested, this odd crash turns out to be the same issue I was >> struggling w

Re: Odd Crash when adding table columns manually

2011-01-19 Thread Eric Gorr
rences-in-objective-c.html On Jan 12, 2011, at 10:08 AM, Eric Gorr wrote: > Try grabbing the project again - I have cleaned up a few things which should > make this a bit easier. > > http://ericgorr.net/cocoadev/TableColumnTest.zip > > It should crash everytime as long as in

Re: Store a file vs create on the fly?

2011-01-18 Thread Eric Gorr
It doesn't seem to me tha it will really matter based on your description. But, I'd probably go with storing it within your app bundle. This way I could make changes to the file without a recompile. On Jan 18, 2011, at 8:30 PM, Jeremy Matthews wrote: > So I have a simple app which, in essence,

Re: Window Controllers & Window Deallocation

2011-01-18 Thread Eric Gorr
, to clean it up when being deallocated. Any additional thoughts would be of interest. On Jan 18, 2011, at 2:46 PM, Eric Gorr wrote: > This seems like it should have an easy answer and one that I should know, but > my brain has frozen up on this and I cannot seem to determine if thin

Window Controllers & Window Deallocation

2011-01-18 Thread Eric Gorr
This seems like it should have an easy answer and one that I should know, but my brain has frozen up on this and I cannot seem to determine if things are working as expected or if there is something more I should be doing. First, here is a sample project that demonstrates the behavior I am seein

Re: Odd Crash when adding table columns manually

2011-01-12 Thread Eric Gorr
with zombies. On Jan 12, 2011, at 9:52 AM, Keary Suska wrote: > On Jan 11, 2011, at 5:49 PM, Eric Gorr wrote: > >> I do release them after adding them to the table. It will still crash... > > I cannot reproduce the crash with your test project. Have you verified, using > zo

Re: Odd Crash when adding table columns manually

2011-01-11 Thread Eric Gorr
gt; invoking -addTableColumn: . > The table view owns its columns and will release them when it itself is > released. > > This is the normal behaviour when adding subviews to an NSView or its > subclasses. > > Peter > > > Am 11.01.2011 um 18:06 schrieb Eric Gor

Odd Crash when adding table columns manually

2011-01-11 Thread Eric Gorr
I've got a sample test project at: http://ericgorr.net/cocoadev/TableColumnTest.zip which reproduces the strange crash. I have a NSTableView to which I need to add NSTableColumns manually using the addTableColumn: method. The problem is that for some reason when I release the window and everyt

Key Equivalents enhancement request

2010-12-02 Thread Eric Gorr
Don't know if anyone else would find this useful, but if so, I would encourage you to file your own enhancement request. Mine is rdar://8721395. The request is as follows: One is allowed to assign a key equivalent to controls, but there is no standard way for the user to see what key equivalen

Making a Label (NSTextField) clickable

2010-11-23 Thread Eric Gorr
I just need a Label to send it's action to it's target when I click on it. The first thing I tried was to use setTarget:, setAction:, & sendActionOn:, but that did not work. I messed around with a couple of other things, but without success. What did finally work was to subclass NSTextField and

Re: Strange result with NSView's convertPoint:toView:

2010-11-12 Thread Eric Gorr
On Nov 12, 2010, at 11:47 AM, Eric Gorr wrote: > I have changed the contentView of my NSWindow to be a NSView which return YES > for isFlipped. > > If I place a NSButton in the contentView of a window, I can do the following: > > NSRect r = [view frame]; >

Strange result with NSView's convertPoint:toView:

2010-11-12 Thread Eric Gorr
I have changed the contentView of my NSWindow to be a NSView which return YES for isFlipped. If I place a NSButton in the contentView of a window, I can do the following: NSRect r = [view frame]; NSPoint origin; origin = [view convertPoint:NSZeroPoint toView:[[view wind

Re: NSTextView vs NSTextField

2010-11-11 Thread Eric Gorr
t; From: Erik Buck >> Subject: Re: NSTextView vs NSTextField >> To: "Cocoa Dev" , "Eric Gorr" >> >> Date: Thursday, November 11, 2010, 10:50 AM >> NSTextField doesn't display or edit >> text at all. It uses an instance of NSTextView call

  1   2   3   4   >