Re: Switching methods in private classes in Apple frameworks

2010-03-12 Thread Paul Sanders
ually worry me all that much. Paul Sanders. - Original Message - From: "Bill Bumgarner" To: "Gideon King" Cc: "Cocoa Dev" Sent: Friday, March 12, 2010 6:36 AM Subject: Re: Switching methods in private classes in Apple frameworks Where "careful about

Re: performSelector doesn't work for modal window

2010-03-12 Thread Paul Sanders
Try using: performSelector:withObject:afterDelay:inModes: passing: [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSModalPanelRunLoopMode, nil] to inModes: Paul Sanders - Original Message - From: "Alexander Bokovikov" To: Sent: Friday, March 12, 2010 4:34

Re: Better sorting using threads?

2010-03-12 Thread Paul Sanders
reentrancy problems and the same code worked fine on Leopard and Tiger. I guess Apple think it's dangerous to let us play with the sharp toys... Paul Sanders ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: Key-Value Observing speed

2010-03-13 Thread Paul Sanders
> As people often seem to do with such things, I was > misinterpreting what it [Instruments] was telling me. A really really simple way of getting a handle on where a program is spending its time is to take a few samples in Activity Monitor while it is busy. You'd be amazed at how well this w

Re: Better sorting using threads?

2010-03-13 Thread Paul Sanders
about the difference between copy and mutableCopy Ken so it wasn't that, but it was a nice idea to suggest it. Paul Sanders. - Original Message - From: "Greg Parker" To: "Paul Sanders" Cc: "Cocoa-Dev List" Sent: Saturday, March 13, 2010 12:01 AM Subjec

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-13 Thread Paul Sanders
Try: #define PRIVATE_ID id ... PRIVATE_ID myPrivateiVar; Paul Sanders. ___ 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

Re: NSTimer never being deallocated

2010-03-13 Thread Paul Sanders
, all will be well. Paul Sanders. ___ 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

Re: NSTimer never being deallocated

2010-03-13 Thread Paul Sanders
manage yourself might be released for the last time, but if you put a breakpoint on [NSTimer dealloc] you will be able to see it when it happens. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: Save As core data question

2010-03-21 Thread Paul Sanders
>From errno.h: #define ENOTEMPTY 66 /* Directory not empty */ If that helps at all... Paul Sanders. - Original Message - From: "Gideon King" To: "Cocoa Dev" Sent: Sunday, March 21, 2010 5:48 PM Subject: Re: Save As core data question ... AppKit

Re: Odd crash

2010-03-22 Thread Paul Sanders
...ple.CoreServices.CarbonCore 0x918d87ae PrivateMPEntryPoint + 68 8 libSystem.B.dylib 0x922f4fbd _pthread_start + 345 9 libSystem.B.dylib 0x922f4e42 thread_start + 34 I have submitted a bug report (#7753826). Paul Sanders. - Original Message - From: "Kevin Wo

Re: The fastest way to render bitmaps to screen in Cocoa on Snow Leopard?

2010-03-25 Thread Paul Sanders
> I need to open a bitmap file, perhaps do some filtering, and > render it > to the screen with the maximum possible performance. Try it the easy way, see if it's fast enough. NSImage can load most common bitmap file formats and draw itself.

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Paul Sanders
Have a look at -[NSBezierPath setFlatness:]. A larger value might be faster (but might also look ugly). There's also a bit of code floating around in the web-o-sphere that might be faster than what you are using: http://lists.apple.com/archives/Cocoa-dev/2006/Mar/msg01940.html Paul Sa

Mysterious 'QLPreviewView ' crashes.

2010-04-04 Thread Paul Sanders
s to respecting other people's memory, but you can never be 100% sure. Paul Sanders. ___ 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-

Re: How does Finder determine when a file is busy being written to the disk?

2010-04-08 Thread Paul Sanders
Maybe poll the file size when you get your event and wait for it to stop changing. Paul Sanders. - Original Message - From: "Lee Gillen" To: "Jens Alfke" Cc: "Apple Developer Mailing List" Sent: Thursday, April 08, 2010 7:08 PM Subject: Re: How does F

Re: How to find all clipping siblings for a view?

2010-04-16 Thread Paul Sanders
call). The exact effect you get depends on whether they erase the background first and suchlike. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moder

Re: How to empty the Trash programmatically?

2010-04-16 Thread Paul Sanders
you do this and keeps in sync. Looking in these folders will also allow you to give the user some idea of what he is about to permanently delete. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: How to find all clipping siblings for a view?

2010-04-16 Thread Paul Sanders
> Also, IB had (has?) a bug where it would unarchive views in the > reverse order from which they were stored in the nib. IB does allow > you to reorder subviews, so if you are still being bitten by this you > could build your interface and then reorder the views such that they > are backwards. The

Re: How to empty the Trash programmatically?

2010-04-16 Thread Paul Sanders
> Please don't hardcode those paths. Use system APIs like > FindFolder > instead to locate the trash directory for a given volume. Well, OK, but you get the idea. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: How to empty the Trash programmatically?

2010-04-16 Thread Paul Sanders
7;t obvious, my earlier "rm -rf" post was intended to show how to empty the trash for a particular volume only. I believe that might be what the OP was looking for. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Zeroing out instance variables

2010-04-16 Thread Paul Sanders
it for all subclasses that adopt that protocol (can someone please confirm this): @protocol MyLightweightReusableObjectProtocol - (void) zeroIVars; @end @interface MyClass : NSObject ... Paul Sanders. - Original Message - From: "Ben Haller" To: "Cocoa List" S

Re: Zeroing out instance variables

2010-04-17 Thread Paul Sanders
ions.html According to which, alloc + init + release costs about the same as 35-40 method calls. The code I posted could cache [MyClass class] if (as I do) you like to leave the asserts in your release code. And it works, of course, because the isA pointer in all instances of a particu

Re: Zeroing out instance variables

2010-04-17 Thread Paul Sanders
are probably easier to pull off in C++, but no doubt you have an existing obj-C code base. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

Re: Zeroing out instance variables

2010-04-17 Thread Paul Sanders
d like this. Pity us poor C++ folks. One of the worst design decisions in C++, IMO, is that objects are not zeroed on allocation by default. It leads to constructors like this: ivar1 = 0; ivar2 = 0; ivar3 = 0; ivar_p1 = NULL; ivar_p2 = NULL; ... Which is tedious an

Re: Zeroing out instance variables

2010-04-17 Thread Paul Sanders
es it would. We're lucky it's Saturday or he would probably have already poured cold water on the whole idea :). Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Re: Zeroing out instance variables

2010-04-17 Thread Paul Sanders
a-2010-01-22-toll-free-bridging-internals.html I see that my assumption that Toll-Free bridged CF and Obj-C types have the same internal layout was false. Instead, it's all smoke and mirrors. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: Zeroing out instance variables

2010-04-17 Thread Paul Sanders
> No, you misunderstand. There is (in the scheme I'm vaguely recalling) > _nothing_ inside the instances > which holds or points to something which holds the retain count. > > There is another data structure entirely which maps from object addresses to > a retain count. Yes I see, that's also w

Re: Zeroing out instance variables

2010-04-17 Thread Paul Sanders
7; one is copying from when zeroing out the object for reuse. Even then, all is not lost. Override retain and release to do nothing. Presumably, Ben, you have your own scheme for managing the lifecycle of these objects which is not based on retain counts

Re: Zeroing out instance variables

2010-04-17 Thread Paul Sanders
ng you iVars at offset class_getInstanceSize([NSObject class]). That way you don't care how many 'hidden' iVars NSObject has or what size they are. I think, in fact, that was Ken's intention. Paul Sanders. ___ Cocoa-dev mailing list (Coco

Re: method caller mixup

2010-04-17 Thread Paul Sanders
ethod names, this might be worth a look if you haven't already: http://developer.apple.com/Mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocSelectors.html#//apple_ref/doc/uid/TP30001163-CH23-SW1 Paul Sanders. ___ Cocoa-dev mailing list (C

Re: Wave form graph through Core Audio?

2010-04-23 Thread Paul Sanders
to target > more complex functionality. > Are there any code snippets around for sampling a sound file? Apart from this being the wrong list as already mentioned, you are looking for ExtAudioFile. This can read a variety of sound file formats and is v

Re: NSApplicationMain question

2010-04-23 Thread Paul Sanders
did, and, for what I am doing, I do not miss them. Tell you what though; taking in so much new material is very tiring, mentally. Get plenty of sleep and forget everything you know about Carbon. Paul Sanders. - Original Message - From: "Bill Appleton" To: "Michael

Re: Reason for menuNeedsUpdate notification?

2010-04-23 Thread Paul Sanders
NSMenuDidBeginTrackingNotification might do what you want. Note that, despite what the docs say, this is not sent on Tiger. Paul Sanders - Original Message - From: "David Reitter" To: Sent: Friday, April 23, 2010 4:31 PM Subject: Reason for menuNeedsUpdate notification? H

Re: NSApplicationMain question

2010-04-23 Thread Paul Sanders
> (i'm the guy who wrote supercard if that explains anything to the old-timers) It does. Respect. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Re: overwriting own bundle

2010-04-23 Thread Paul Sanders
upgraded'. This makes the whole procedure very simple. Paul Sanders. ___ 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.ap

Re: NSApplicationMain question

2010-04-23 Thread Paul Sanders
rminally weird. It works though, although as I say it took a while to put it all together, and I now have common code across the two platforms with a reasonably native look-and-feel, which is what I wanted. Tough luck about Linux, but then that's not important to me. Looks like

Re: NSApplicationMain question

2010-04-23 Thread Paul Sanders
s situation. It's a bit like the old Irish joke that goes 'What's the best way to get to Dublin?' -- 'Well I wouldn't start from here'. No offence intended to any Irish readers BTW, it's a terrific place. Paul Sanders. ___

Re: NSApplicationMain question

2010-04-23 Thread Paul Sanders
ugh there - plus the NS or CG Graphics context you can get by locking focus on the Window's content view for drawing in. I knew I'd get there in the end! Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: NSApplicationMain question

2010-04-25 Thread Paul Sanders
#x27;s ultimate disposal. setmenuitemtext contains a similar error. To catch problems like this early, enable 'zombies' (but not when checking for leaks!!): http://www.cocoadev.com/index.pl?NSZombieEnabled Paul Sanders. ___ Cocoa-dev mailing lis

Re: NSApplicationMain question

2010-04-26 Thread Paul Sanders
... It's a method that works. Apple's Cocoa framework docs are actually very good. They should all have been installed with Xcode. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: NSApplicationMain question

2010-04-26 Thread Paul Sanders
ings it can do are defined there. Paul Sanders. ___ 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/

Re: white screen windows at first

2010-04-26 Thread Paul Sanders
t at the end of your drawRect: method, but calling it too often hurts performance and, depending on exactly what is being drawn when, can cause 'screen flash'. Paul Sanders. - Original Message - From: "Bill Appleton" To: "cocoa-dev list" Sent: Monday, April

Re: NSApplicationMain question

2010-04-27 Thread Paul Sanders
he primary display, as reported by NSScreen, did not change. But it was a while ago so I could be wrong and the docs agree with you. This implies that the primary display can change at run time. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: NSApplicationMain question

2010-04-27 Thread Paul Sanders
erpret it however you like. Paul Sanders. ___ 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/Up

Re: why doesn't the compiler complain?

2010-04-27 Thread Paul Sanders
lt is probably for historical reasons. I'd like to see that changed. Unfortunately, setting it project-wide generates a warning (something like 'this flag pertains only to Objective-C') for .c and .cpp files, which is a bit of a pain, but one can p

Re: NSApplicationMain question

2010-04-27 Thread Paul Sanders
Actually, I think I was just plain wrong but what I meant was [[NSScreen screens] objectAtIndex: 0]. Paul Sanders. - Original Message - From: "Uli Kusterer" To: "Paul Sanders" Cc: "Cocoa-Dev (Apple)" Sent: Tuesday, April 27, 2010 10:34 PM Subject: Re: N

Re: white screen windows at first

2010-04-28 Thread Paul Sanders
implicity of doing things this way and Apple engineers have been nudging you in that direction. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moder

Re: white screen windows at first

2010-04-28 Thread Paul Sanders
drawRect: you need to call flushWindow yourself after calling unlockFocus to get reliable screen updates. Paul Sanders. - Original Message - From: Bill Appleton To: vincent habchi Cc: Paul Sanders ; cocoa-dev list Sent: Wednesday, April 28, 2010 7:29 PM Subject: Re: white screen windows

Re: white screen windows at first

2010-04-28 Thread Paul Sanders
w (or any of its ancestor views) is hidden so you can just give up in that case. I agree also that drawing within drawRect: is much the best way, but it occurs to me that you might have a ton of existing code that doesn't see life in those terms. I'd head in that direction tho

Re: Help with text input

2010-04-30 Thread Paul Sanders
the key codes generated by an Apple keyboard. There's a nifty little app out there called Ukelele which will display them. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comment

Re: Utility/Floating window with titlebar on left side

2010-05-06 Thread Paul Sanders
> Already tried NSBorderlessWindowMask, but that doesn't supports the close > button functionality, which is required in my case. You can create a close button via +[NSWindow standardWindowButton:forStyleMask:] I think NSBorderlessWindowMask is the only game in town here. P

Re: Overriding text size in NSTextStorage

2010-05-10 Thread Paul Sanders
an iVar in shouldChangeTextInRange:affectedCharRange:replacementString: It ain't pretty, and there's probably some detail to work out, but it works for me. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. C

Re: How to setup idle timer in 64-bit 10.6?

2010-05-10 Thread Paul Sanders
received. Then you will know when to take action. Paul Sanders. ___ 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

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Paul Sanders
> I tried a page on, but it didn't do the color highlighting You could try pastebin. It seems to be popular with the folks round here. Pau Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: Posix error 24

2010-05-15 Thread Paul Sanders
Use lsof from the command line. Paul Sanders. - Original Message - From: "The Geezer" To: Sent: Saturday, May 15, 2010 3:24 PM Subject: Posix error 24 I wrote a cocoa application that periodically gets a posix error 24. I know this means my app's number of open fil

Re: Figuring out what's causing redrawing

2010-05-15 Thread Paul Sanders
hat is constantly getting redrawn for > no apparent reason. Just a longshot: did you override one of the 'display...' methods and fail to call super? If so, that might cause trouble. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: UI blocking

2010-05-17 Thread Paul Sanders
27;t like that. I can't believe there's no > 'setBlockingMode' or something like that for CAAnimation. > > Thanks in advance! The approach I use is to subclass NSApplication and throw awat mouse, keyboard and gesture events in -[MySubclassedNSApplication sendE

Re: Simulating Text Input

2010-05-19 Thread Paul Sanders
sponding events, but I have > a hard time to simulate key strokes. ... I would take a look at the source code for VNC: http://sourceforge.net/projects/osxvnc/ Indeed, if you write a client that can talk to a VNC server you don't need to write your own serve

Re: Simulating Text Input

2010-05-19 Thread Paul Sanders
des is likely to be painful. Paul Sanders. ___ 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/Updat

Re: Calling allObjects memory allocation problem

2010-05-21 Thread Paul Sanders
reeping steadily up when the app was playing audio but otherwise idle. Paul Sanders. ___ 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)

Re: getting file creation date from NTFS

2010-05-22 Thread Paul Sanders
> Also be aware that not all file systems support the notion of > creation dates of their objects. I don't know off-hand if > NTFS does. It does. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: getting file creation date from NTFS

2010-05-23 Thread Paul Sanders
seem to be very reliable. I have several files where it post-dates the last modification date. Paul Sanders. - Original Message - From: Angelo Chen To: Ken Thomases ; Paul Sanders Cc: cocoa-dev@lists.apple.com Sent: Sunday, May 23, 2010 3:05 AM Subject: Re: getting file creation date

Re: getting file creation date from NTFS

2010-05-23 Thread Paul Sanders
builds to get st_birthtimespec. stat64 is deprecated in Snow Leopard, but seems unlikely to go away. I guess a belt-and-braces type of person would test the system version and weak link. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Re: getting file creation date from NTFS

2010-05-23 Thread Paul Sanders
sible to tell. But, luckily, it is summer :) Paul Sanders. ___ 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/

Re: getting file creation date from NTFS

2010-05-23 Thread Paul Sanders
sensible platforms, stat() returns UTC, as you'd expect. That statement I can now verify by experiment (which is good as I assumed that when I wrote the code). The docs do not say. Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: getting file creation date from NTFS

2010-05-24 Thread Paul Sanders
his in the runtime library source code. It's easy once you know where to look. You can even step through it in the debugger. It's true that Windows runs the CMOS clock in local time, but that is a detail. It has nothing to do with

Re: getting file creation date from NTFS

2010-05-24 Thread Paul Sanders
understand on the Mac. I am not a Windows fan boy. I just have a foot in both camps. Paul Sanders. ___ 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

Re: [Moderator] Re: getting file creation date from NTFS

2010-05-24 Thread Paul Sanders
What I meant was, let's not prolong the discussion, period. The snippet quoted below is incomplete. Nevermind. Paul Sanders. - Original Message - From: "Scott Anguish" To: "Paul Sanders" Cc: "Alastair Houghton" ; Sent: Monday, May 24, 2010 5:49

Re: setting tab stops in a document

2010-06-05 Thread Paul Sanders
what you are looking for. Setting them is an all-or-nothing affair so, typically, you get them, change what you want to change in a mutable copy of the NSDictionary returned and and then set them. Regards, Paul Sanders. ___ Cocoa-dev mailing list (C

Re: setting tab stops in a document

2010-06-07 Thread Paul Sanders
coa/conceptual/TextEditing/Tasks/BatchEditing.html Again, for what you are doing here this is not really relevant; the code you posted should work just fine. But if you are making a number of changes at the same time it is worth calling these methods. Regards, Paul Sanders. _

Re: Scrolling Behavior of NSTextView

2010-06-07 Thread Paul Sanders
size of the text (in terms of the amount of space it will take up on the display) and so (I surmise) scrollPoint: doesn't work as expected. In other words, the code you have now is correct. Regards, Paul Sanders. ___ Cocoa-dev mailing list

Re: Debugging sporadic crashes

2010-06-07 Thread Paul Sanders
On 7 Jun 2010, at 15:39, Gabriel Zachmann wrote: > > All kinds of suggestions, insights, and tips will be highly appreciated. > A quick and easy way to find out where an app is hung is to sample it in Activity Monitor. Regards, Pau

Re: Scrolling Behavior of NSTextView

2010-06-08 Thread Paul Sanders
documentation/cocoa/Conceptual/NSScrollViewGuide/Articles/Basics.html#//apple_ref/doc/uid/TP40003461-SW1 Regards, Paul Sanders ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Co

Re: Erasing drawn content

2010-06-08 Thread Paul Sanders
> Unfortunately this causes the background to turn black and not transparent. I > would need the view to become transparent > (so the WebView underneath is visible). Try this: [[NSColor clearColor] setFill]; NSRectFill (myRect); That's what I do. Regards,

Re: Erasing drawn content

2010-06-08 Thread Paul Sanders
e as YES - filling the content view with clearColor Then draw your rectangles in the content view of this window and the NSRectFill trick should work. Regards, Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Re: Erasing drawn content

2010-06-08 Thread Paul Sanders
need only draw those rectanges which are visible, of course. Kyle, I rather liked your stack of 'bees'. Regards, Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Erasing drawn content

2010-06-08 Thread Paul Sanders
both the web and overlay > view at the same time (and is also > efficient). Also, you can probably make your overlay window a child window of the window containing the webview. Then: - it will stay on top of it - it will move with it Regards, Paul Sanders. ___

Re: Erasing drawn content

2010-06-09 Thread Paul Sanders
es after calling super. It sounds almost too easy. Regards, Paul Sanders. ___ 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: NSAttributedString with columns

2010-06-14 Thread Paul Sanders
wrap to the start of > value column and not > wrap all the way to the beginning og the new line. Is this possible using > attributes and an > NSAttaributedString. Heres an example: I believe you are looking for - [NSMutableParagraphSty

Re: Getting Computer Name

2010-06-20 Thread Paul Sanders
ive until the current autorelease pool 'pops'. You can look at name (and probably temp, but I'm not sure) in the debugger, of course. Regards, Paul Sanders. - Original Message - From: Steve Steinitz To: cocoa-dev@lists.apple.com Sent: Sunday, June 20, 2010 11:10 AM

Re: Getting Computer Name

2010-06-20 Thread Paul Sanders
might be wrong with the setup of your project but at least now you have an idea of what to look for. Regards, -- Paul Sanders AlpineSoft http://www.alpinesoft.co.uk - Original Message - From: Steve Steinitz To: Paul Sa

Re: Getting Computer Name

2010-06-20 Thread Paul Sanders
adding the #include sort things out? Regards, Paul Sanders. ___ 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

Re: Getting Computer Name

2010-06-20 Thread Paul Sanders
> The correct import is #import > . So it is, sorry. It was half-way down my source file. Regards, Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. C

Re: Best way to determine if a directory is a package

2010-06-25 Thread Paul Sanders
ecommended by Jean-Daniel) I don't know. As usual in Mac-land, there are 6 ways of doing everything. Regards, Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Toolbar Icon Workflow

2010-06-26 Thread Paul Sanders
DF's. Just my $0.02. Regards, Paul Sanders. - Original Message - From: Richard Somers To: cocoa-dev@lists.apple.com Sent: Saturday, June 26, 2010 8:19 PM Subject: Toolbar Icon Workflow My current ad hoc work flow for toolbar icons which are geometric in nature. • Use "Ink

Re: Toolbar Icon Workflow

2010-06-27 Thread Paul Sanders
(space was at a premium!). And in fact it's not as good as it could be because it goes via an intermediate bitmap for cross-platform reasons. Using the PDF direct might look a bit better still. Regards, Paul Sanders. ___ Cocoa-dev ma

Re: Bypass Network System Preferences for DNS lookup

2010-07-02 Thread Paul Sanders
s a starting point (following on from Jens' suggestion): http://sourceforge.net/projects/adns/. Nice, simple source code which you can hack around, liberal license. No doubt there are other options out there. Regards, Paul Sanders. ___ Cocoa

How to catch [NSEvent dealloc]?

2010-07-07 Thread Paul Sanders
zling [NSEvent dealloc] (erk!) does anyone have an idea about how I might be able to catch an NSEvent object at the point of deallocation? Many thanks, Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: How to catch [NSEvent dealloc]?

2010-07-07 Thread Paul Sanders
and possibly mistakenly), I'm still supporting 10.4. I think I need to review this policy! Good idea though. Regards, Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: How to catch [NSEvent dealloc]?

2010-07-08 Thread Paul Sanders
from the field (just one) where my referenced object pointer was obviously stale so there must be a little loophole in there somewhere. Thanks for the input guys, much appreciated. Regards, Paul Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: Notification when displays are detected?

2009-12-29 Thread Paul Sanders
reconfigured. I find this useful. Paul Sanders. - Original Message - From: "Jacob Schwartz" To: Sent: Tuesday, December 29, 2009 6:15 PM Subject: Notification when displays are detected? Hey all, After some searching through the API, which apparently I am not good at,

Re: Notification when displays are detected?

2009-12-29 Thread Paul Sanders
: (NSNotification *) notification { ... } What object is 'self' in your scenario? It needs to exist for the life of the app, obviously. Paul Sanders. - Original Message - From: Jacob Schwartz To: Paul Sanders Cc: cocoa-dev@lists.apple.com Sent: Tuesday, December 29, 2009 6:47 PM S

Re: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause Crash

2009-12-31 Thread Paul Sanders
er cleanup you need to do. Just releae it at the end of the method. Paul Sanders. - Original Message - From: "Jerry Krinock" To: "Cocoa Developers" Sent: Thursday, December 31, 2009 5:36 PM Subject: NSDocument, NSManagedObjectContext do Stuff in -dealloc, Cause

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2010-01-01 Thread Paul Sanders
Check out NSTextView's setTypingAttributes: method. And look up the meaning of NSParagraphStyleAttributeName. It's really not so hard... Paul Sanders. - Original Message - From: "Joshua Garnham" To: "Graham Cox" Cc: Sent: Friday, January 01, 2010 12:

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2010-01-02 Thread Paul Sanders
ngest of spring chickens). There is a lot to know. I think it's Hillegass who recommends getting plenty of sleep. His book "Cocoa Programming for Mac OS X" might be worth buying (that will be $5 please Aaron :). Paul Sanders - Original Message - From: "Graham Co

Re: Setting the Line Height/ Line Spacing in an NSTextView.

2010-01-02 Thread Paul Sanders
Yep, that looks ok. I think pS is probably being returned as nil. You can check this in Xcode. In which case, you can add: if (pS == nil) pS = [NSParagraphStyle defaultParagraphStyle]; Paul Sanders. - Original Message - From: Joshua Garnham To: Paul Sanders Cc: cocoa-dev

Re: Why is [NSArray arrayWithObjects:] failing for me?

2010-01-04 Thread Paul Sanders
Essential reading: http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html The 'memory management rules' are not complex. A much bigger problem is avoiding memory leaks. Paul Sanders. - Original Message - From: "Charles Jenki

Re: Why is [NSArray arrayWithObjects:] failing for me?

2010-01-04 Thread Paul Sanders
a note of caution though: nothing is ever freed with this option enabled (which, when you're only debugging, is not really important). And here is the 'tao of debugging' for OS X, which has a useful section on memory-related matters: http://developer.apple.com/mac/library/te

Re: Bindings blues

2010-01-07 Thread Paul Sanders
I imagine bindings are an easy place to get lost in. Paul Sanders. - Original Message - From: To: Sent: Thursday, January 07, 2010 2:10 PM Subject: Re: Bindings blues On 7 Jan 2010, at 00:04, Rob Keniger wrote: > > I've fought this problem too, it's a regression in 10.6 as t

Re: Flicker Free Drawing

2010-01-08 Thread Paul Sanders
Correct. Nothing happens until the window is 'flushed' (which normally happens in the event loop). It is one of the joys of programming on the Mac (compared to Windows). Paul Sanders - Original Message - From: "David Blanton" To: "cocoa-dev List" Se

Re: Hiding the Window Content View

2010-01-08 Thread Paul Sanders
). You could also subclass the content view if you want to (you can do this in Interface Builder) and draw directly into that. Paul Sanders. - Original Message - From: "David Blanton" To: "Kyle Sluder" Cc: "cocoa-dev List" Sent: Friday, January 08, 2010 8

  1   2   3   >