TextEdit-speed file loading

2008-02-28 Thread Steven Degutis
I have a large (ascii) text file, about 65 MB, which TextEdit loads instantaneously in about a split second. I've tried to mimic this behavior using NSTextView to no avail. The problem isn't about unresponsiveness, because it's completely responsive during this loading of the large text file. The p

Fwd: TextEdit-speed file loading

2008-02-28 Thread Steven Degutis
tEdit calls -[NSLayoutManager setAllowsNonContiguousLayout:YES]; > could that be it? > Ali > > On Feb 28, 2008, at 20:06 , Steven Degutis wrote: > > > I have a large (ascii) text file, about 65 MB, which TextEdit loads > > instantaneously in about a split second. I've tr

Re: Problems with ScriptingBridge and iTunes

2008-03-02 Thread Steven Degutis
Hannes, I haven't heard of this ITApplication before, but for your specific problem, I think it's clear why [currentTrack isKindOfClass:[iTunesFileTrack class]] evaluates to true: in the previous line, you defined it as such, like this: iTunesTrack *currentTrack = [iTunes currentTrack]; So obvio

Re: Problems with ScriptingBridge and iTunes

2008-03-03 Thread Steven Degutis
p. On Mon, Mar 3, 2008 at 12:32 AM, Jens Alfke <[EMAIL PROTECTED]> wrote: > > On 2 Mar '08, at 4:54 AM, Steven Degutis wrote: > > > I think it's clear why [currentTrack > > isKindOfClass:[iTunesFileTrack class]] evaluates to true: in the >

Re: Relaunching an application

2008-03-03 Thread Steven Degutis
Perhaps a small application like relaunch.app could be imbedded into your relaunchable application, where all it pretty much does is serve as a buffer by relaunching your application reliably (through Cocoa methods) after your app calls it the same way you mentioned above. [[NSWorkspace sharedWork

Re: Relaunching an application

2008-03-03 Thread Steven Degutis
if ([appPath isEqualToString:theQuittingApp]) { [[NSWorkspace sharedWorkspace] launchApplication:appPath]; [NSApp terminate:self]; } } @end On Mon, Mar 3, 2008 at 4:22 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > On Mon, Mar 3, 2008 at 2:43 PM, Steven Degutis <[EMAIL P

Re: Setting the image of an NSPopUpButton in IB?

2008-03-03 Thread Steven Degutis
For the first time a few days ago, I began to use NSPopUpButton and began to test it in IB3 to experiment around and see what it could do. Ultimately, I was planning on using -setImage: programattically, but it seemed odd that I couldn't set its image in IB. Within a few minutes, I had solved the p

Re: Getting the "iCal" window style?

2008-03-03 Thread Steven Degutis
I haven't tested this, but I'm almost certain that the thickness of the bottom border is exactly what causes the gradient to become lighter. Perhaps you should follow up on Kyle's advice and try it. Then perhaps you should read this: http://www.mikeash.com/getting_answers.html On Mon, Mar 3, 2008

SUUpdater == nil, only on 64-bit, when created inside framework (crazy!)

2009-08-26 Thread Steven Degutis
all? I've looked through Sparkle's source, and the only place where it could return nil instead of a valid object is +alloc, from my understanding. Thanks in advance for any help on this!! -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ __

Re: libcrypto on Snow Leopard

2009-08-28 Thread Steven Degutis
The solution to this is pretty simple, don't link to libcrypto. Instead, just #import in your file and use the CC_ prefixed functions in your app, such as CC_MD5. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Fri, Aug 28, 2009 at 3:41 PM, David Riggle wrote:

Async NSURLConnection + Concurrent NSOperation = Not possible under Mac OS X 10.6?

2009-08-30 Thread Steven Degutis
Operation subclass is that it will be more easily cancelable, but that's definitely not more important than the whole class working altogether with GCD, so it could be dropped in the blink of an eye if this isn't a feasible idea. Thanks in advance

Re: Async NSURLConnection + Concurrent NSOperation = Not possible under Mac OS X 10.6?

2009-08-30 Thread Steven Degutis
ubclass. (Please correct me if I'm wrong!) -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sun, Aug 30, 2009 at 9:53 AM, Ken Thomases wrote: > On Aug 30, 2009, at 9:09 AM, Steven Degutis wrote: > > Unfortunately, the code I wrote completely broke

Re: KVO: when to stop observing?

2009-08-30 Thread Steven Degutis
or 10.5 is to perform this inside your -finalize method. (Obviously this whole reply pertains only to garbage-collected environments). -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sun, Aug 30, 2009 at 1:59 AM, Michel Schinz < michel.schinz.li...@gmail.com> wrot

Re: What sound plays after an Installer runs?

2009-08-31 Thread Steven Degutis
Aaron, The sound played is not part of Cocoa if I recall correctly. It is located inside Installer.app's Resources directory and you can thus technically take it out and use it in your app, if you're alright with that sort of thing. -- Steven Degutis http://www.thoughtfultree

Re: NSMenuItem's selectors messages not sent

2009-08-31 Thread Steven Degutis
t the case. In any event, you can use gdb to trace the program's execution flow to find out exactly when certain things are happening, and put breakpoints on questionable lines of code. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Aug 31, 2009 at 4:20

Re: NSUserDefaults

2009-09-03 Thread Steven Degutis
only. (Why they aren't balanced is beyond me.) -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Thu, Sep 3, 2009 at 4:05 PM, Oftenwrong Soong wrote: > Hi all, > > Why does NSUserDefaults provide method stringForKey but not a method > setStrin

Re: (no subject)

2009-09-04 Thread Steven Degutis
This is a common concept. In fact, it's exactly how nearly all twitter apps on the iPhone work. Usually it can be done manually with NSURLConnection and the like, though you may consider using a third-party framework like ASI-HTTP-Request or CocoaREST. -- Steven Degutis

Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Steven Degutis
ory splash screen that explains how to use the app using images (and movie files if needed). Another nice example of this is in the app Things.app That is all. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Wed, Sep 2, 2009 at 10:28 AM, Michael A. Crawford <

Re: capturing a partial screen.

2009-09-04 Thread Steven Degutis
If you're specifically trying to mimic the screenshot-capabilties in Mac OS X itself, you can use the `screencapture` command line utility, coupled with an NSTask object in Cocoa. This is what I use in one of my apps, and what Papaya does. -- Steven Degutis http://www.thoughtfultree.com/

Re: Application main menu title behavior change in 10.6

2009-09-04 Thread Steven Degutis
t least look to see if this is possible using private APIs in AppKit. But that's just me... -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Fri, Sep 4, 2009 at 1:31 PM, Jim Turner wrote: > Hi all, > > I have an application (QuicKeys) that allows the us

Re: Custom Window not receiving "full" shadow

2009-09-04 Thread Steven Degutis
Francisco, Generally this less pronounced shadow is produced by giving an NSPanel the "Utility" style in IB. As I've never had to do it programmatically, I don't know what the relevant method would be to set this style, but I'm sure it's a style on the NSWindow c

Re: Custom Window not receiving "full" shadow

2009-09-04 Thread Steven Degutis
Interestingly, after searching the NSWindow (and NSPanel) docs and google for like 5 minutes, I still can't figure out how to set this small shadow programmatically. Now I'm all curious! Anyone know? -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Fri, Sep

Re: Easy Question re NSWindowController

2009-09-05 Thread Steven Degutis
indowNibName: and pass the name of this second NIB file you've just created. That's how I do it. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sat, Sep 5, 2009 at 7:42 AM, Brad Gibbs wrote: > I've done some testing, but I just can't make t

Re: crash question NSString

2009-09-05 Thread Steven Degutis
This error is not indicating that the receiver is invalid, but rather than your argument is nil. Thus, perform some kind of check to verify it's not nil, before passing it as an argument to the method, lest you get this error. -- Steven Degutis http://www.thoughtfultree.com/

Re: NSMenuItem font size of the keyboard shortcut text

2009-09-06 Thread Steven Degutis
n't bother trying, were I you. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sun, Sep 6, 2009 at 1:23 AM, aaron smith wrote: > Does anyone know of a way to change the font size of the keyboard > shortcut text in an NSMenuItem? > > I use NSAttributed

Re: NSArrayController design/usage question

2009-09-06 Thread Steven Degutis
our example of Now Playing, since it has less to do with your model itself, but it works fairly well when you have a property derived from other properties on your Entity. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Sun, Sep 6, 2009 at 10:41 AM, Gregory Holden w

Re: completion handlers?

2009-09-06 Thread Steven Degutis
C and/or Cocoa, but never heard of Blocks before. Here's the link: http://www.degutis.org/dev/2009/08/30/beginners-guide-to-blocks-in-cocoa/ In a nutshell, Blocks are very simple, and greatly improve your code's readability and maintainability. (And yes, they work for C as well as Obj

Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.

2009-09-07 Thread Steven Degutis
rt has come back positive (for chlamydia). -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Sep 7, 2009 at 10:14 AM, Joshua Garnham wrote: > How would I do this? > The Outline View is being used with Core Data. > > Cheers, > Josh. > > > > >

Re: mouseDown Event Position Accuracy (was: NSString drawAtPoint and vertical font alignment)

2009-09-07 Thread Steven Degutis
, and see if it is acting "as expected" at that point, by appearing to register clicks inside the bounds and not outside. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Sep 7, 2009 at 11:19 AM, Stephen Blinkhorn < stephen.blinkh...@audiospillage.co

Re: Problem with LSSharedFileListInsertItemURL() usage. (API in LaunchServices/LSSharedFileList.h)

2009-09-07 Thread Steven Degutis
t had no Dock icon, and only used status bar items.) -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Mon, Sep 7, 2009 at 6:10 AM, Parimal Das wrote: > Hello all, > > I am trying to do the following- "when my app is used for the first > time -

Re: NSTableView doesn't increase the number of elements in table?

2009-09-08 Thread Steven Degutis
t somewhere. But remember, use NSArrayController, not manual bindings, when using Core Data. (Usually.) -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Tue, Sep 8, 2009 at 9:55 AM, Rui Pacheco wrote: > Hi all, > I've an NSTableView that uses the controller object

Re: NSArray EXEC_BAD_ACCESS when initalized with strings

2009-09-08 Thread Steven Degutis
For some reason, I really doubt that the creation of the NSArray is causing this exception. Have you run this through the debugger and verified this is the exact line that throws the exception? And is that the exact line of code? -- Steven Degutis http://www.thoughtfultree.com/ http

Re: How can we draw a horizontal line with embossing effect?

2009-09-10 Thread Steven Degutis
Arun, It's just two lines drawn on top of one another, with the top one darker than the background and the bottom one lighter. I use it in my Preference panels all the time. -- Steven Degutis http://www.thoughtfultree.com/ http://www.degutis.org/ On Thu, Sep 10, 2009 at 4:15 AM, Arun

Re: Drawing an NSImage in a CALayer

2008-10-09 Thread Steven Degutis
situation, but maybe someone else can use it. ~ Steven Degutis http://www.degutis.org/ On Thu, Sep 18, 2008 at 4:54 PM, Brad Gibbs <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to draw an NSImage (a PNG) in a CALayer. The goal is to create > a method that allows me t

Re: Read-only properties

2008-10-12 Thread Steven Degutis
iption: > http://lists.apple.com/mailman/options/cocoa-dev/steven.degutis%40gmail.com > > This email sent to [EMAIL PROTECTED] > -- Steven Degutis ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: Drawing?

2008-10-12 Thread Steven Degutis
he moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/steven.degutis%40gmail.com > > This email sent to [EMAIL PROTECTED] > -- Steven Degutis __

Re: Drawing?

2008-10-12 Thread Steven Degutis
Point(path, NULL, left, top + height, left, top + height - radius, radius); CGPathCloseSubpath(path); } On Sun, Oct 12, 2008 at 12:14 PM, Dave DeLong <[EMAIL PROTECTED]> wrote: > Unfortunately, NSBezierPath does not exist on the iPhone. > > Dave > > On 12 Oct, 2008, a

LSSharedFileList API bug(s) -- workaround?

2008-10-27 Thread Steven Degutis
in Item problem. If anyone has any ideas for a workaround or solution, please let me know! Steven Degutis http://www.degutis.org/ http://www.thoughtfultree.com/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: how to self-delete app

2008-10-27 Thread Steven Degutis
y is it copying itself? Steven Degutis http://www.degutis.org/ http://www.thoughtfultree.com/ On Tue, Oct 28, 2008 at 10:10 AM, han <[EMAIL PROTECTED]> wrote: > i try to implemnet a self-delete app. first start the app. a copy of the > app is created in another direction.then,i st

Re: how to self-delete app

2008-10-27 Thread Steven Degutis
Han, You might find it beneficial to check out this website on how to get answers. It doesn't just apply to cocoa-dev either, it's universally an overall set of good ideas. http://www.mikeash.com/getting_answers.html Steven Degutis http://www.degutis.org/ http://www.thoughtfultree.co

Re: LSSharedFileList API bug(s) -- workaround?

2008-10-27 Thread Steven Degutis
e.com/technotes/tn2005/tn2083.html, Login Items is the appropriate solution here, not a launchd service. Although it is worth taking into consideration. On Mon, Oct 27, 2008 at 4:00 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote: > > On 2008 Oct, 27, at 13:24, Steven Degutis wrote: > > I

Re: persisting user credentials -- how?

2009-03-09 Thread Steven Degutis
You should look into EMKeychain made by Brian Amerige, same guy who made Flow. It's handy. - Steven Degutis www.degutis.org www.teachmecocoa.com www.thoughtfultree.com On Mon, Mar 9, 2009 at 4:32 PM, Stefan Wolfrum wrote: > Hi, > > I have a little app that needs a username &am

[ANN] InspectorKit (framework/IB-plugin)

2009-03-09 Thread Steven Degutis
it in your project, I'd love to hear about it! -Steven Degutis Lead Monkey Assassin www.ThoughtfulTree.com www.TeachMeCocoa.com www.Degutis.org (also hire.Degutis.org) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post ad

Re: [ANN] InspectorKit (framework/IB-plugin)

2009-03-10 Thread Steven Degutis
s from OmniInspector, other than having an IB Plugin? > > Mike. > > On 10 Mar 2009, at 05:05, Steven Degutis wrote: > >> Hi all! >> >> I've just released a piece of open-source software (BSD license) as >> both a framework and an Interface Builder plugin,

Dragging anything out of a WebView into other Cocoa controls

2009-04-03 Thread Steven Degutis
ossibly thanked at an upcoming WWDC, maybe even more, who knows. ~Steven Degutis ___ 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

Re: Dragging anything out of a WebView into other Cocoa controls

2009-04-03 Thread Steven Degutis
[Solved] Apparently I was using the wrong data source method to validate drops, which explains why this was not working with my NSOutlineView. Thanks for all the fish. - Anonymous On Fri, Apr 3, 2009 at 8:48 PM, Steven Degutis wrote: > Hello, > I have been trying to figure out some

-[CALayer hitTest:] incorrect when embedding layer-backed NSView subclass inside NSScrollView

2009-05-04 Thread Steven Degutis
and many combinations of this. Nothing seems to do the trick. I've also not seen anybody have this same problem on cocoa-dev, google, et al. Thanks in advance for any help! -Steven Degutis ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: Discussion on how to draw text like that seen in toolbars

2009-05-04 Thread Steven Degutis
text had this sunken-in look. - Steven Degutis On Fri, May 1, 2009 at 5:42 PM, Alex Kac wrote: > I know there was a discussion about this a few months ago on this list, but > I cannot find the right terms to search for. The discussion was how to draw > text so that it was sunken much l

[ANN] CocoaREST - Cocoa library for RESTful services

2009-06-28 Thread Steven Degutis
Hey all, I recently released the source code to CocoaREST under a BSD-style license. Basically it's a Cocoa library that lets developers interact with RESTful services quite easily. (Emphasis is on ease of use!) Right now Twitter is the main supported service, but support for many more services are

How to tell an object to notify its KVOs that one of its properties needs to be re-cached...

2009-07-25 Thread Steven Degutis
When we have an object who has a property that's generated based on other properties, usually we implement the +keyPathsForValuesAffecting[PropertyName] class method. What I'm trying to do is basically the same thing for a property on my NSManagedObject, but traversing a relationship. My model is

Screwy Binding/KVO

2009-12-11 Thread Steven Degutis
yPath :keyPath]); } @end This is the output: *2009-12-11 11:10:02.139 ScrewyKVO[21311:a0f] mark 1* *2009-12-11 11:10:02.515 ScrewyKVO[21311:a0f] observing keypath [content] == [(* *)]* *2009-12-11 11:10:02.516 ScrewyKVO[21311:a0f] mark 2* *2009-12-11 11:10:02.521 ScrewyKVO[21311:a0f] mark 3*

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
{ >NSLog(@"Drink name is %@", name); > } > > ___ > > 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-a

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
Oops, correction: the downside is that all arguments and return values need to conform to NSCoder protocol. So, it's even more strict than I described earlier. But it's still cool :) -Steven On Wed, Jan 20, 2010 at 12:40 PM, Steven Degutis wrote: > Recently I had the same issue yo

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
this. -Steven On Wed, Jan 20, 2010 at 1:32 PM, Carter R. Harrison wrote: > > On Jan 20, 2010, at 1:40 PM, Steven Degutis wrote: > > Recently I had the same issue you were having, sort of. And I came up with > a solution I really liked. > > When I was playing with Distributed Object

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
rinkName:)] >} > } > > -(void)didFetchDrinkName:(NSString *)name > { >NSLog(@"Drink name is %@", name); > } > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > &g

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
>> >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/cocoa-dev/cepakare%40gmail.com >> >> This email sent to cepak...@gmail.com >> > ___ > > Cocoa-dev mailing list (Cocoa-dev@l

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
No check is done on what > selector or object is returned or is it ? > If this is done on a public service (web server or other), couldn't code > injection be too easilly done that way ? (easy hacking, wilfull crash etc) ? > > > Le 20 janv. 2010 à 19:47, Steven Degu

Re: Socket Blocking Question

2010-01-20 Thread Steven Degutis
t; selector or object is returned or is it ? > If this is done on a public service (web server or other), couldn't code > injection be too easilly done that way ? (easy hacking, wilfull crash etc) ? > > > Le 20 janv. 2010 à 19:47, Steven Degutis a > écrit : > > Oo

Re: NSArray (unique Items matching x)

2010-02-10 Thread Steven Degutis
e list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/steven.degutis%40gmail.com > > This email sent to steven.degu...@gmail.com > -- Steven Degutis http://www.thou