Re: Indexing broken for one project

2022-02-12 Thread Kirk Kerekes via Cocoa-dev
Sort of straw-grasping I would try with Xcode under these circumstances… Try changing the target CPU/OS setting to something else, build, and see if the indexing works. If it does, make the minimal changes needed to appropriately build your target. If it doesn’t, discard straw. Kirk

Cocoa dylib access by C program

2020-11-13 Thread Kirk Kerekes via Cocoa-dev
Change your .c files to .m. Then you can use objective-c calls _in_ your C code. Objective C is a proper superset of C, and so you just need to inform the compiler of your intent by changing the file extension(s). Kirk Kerekes (iPhone) > Message: 1 > Date: Fri, 13 Nov 2020 11:16:23

Need for Swift

2019-10-11 Thread Kirk Kerekes via Cocoa-dev
onomous vehicle software. What they have ended up is a kind of disciplined, compiling Python — not really a bad concept, given the goals. I would not want to be at the mercy of a vehicle piloted by C++. Or Objective-C, for that matter. (And I happily use ObjC every day). Kirk K

Re: Cocoa-dev Digest, Vol 16, Issue 63

2019-07-26 Thread Kirk Kerekes via Cocoa-dev
> what I really want is to do is drag a couple of URLs into System Preferences? > ?Full Disk Access? list, and that one accepts only lists of URLs, as far as I > know. > > Now, I want it to look like a user is only dragging an icon of my application > (which he/she really does), but applicatio

Re: Mysterious write-only SMB behavior (Kirk)

2017-05-01 Thread Kirk Kerekes
-0500 > From: Kirk > To: cocoa-dev@lists.apple.com > Subject: Mysterious write-only SMB behavior > Message-ID: <8be95449-f93e-4847-ae39-4f45f63c5...@gmail.com> > Content-Type: text/plain; charset=us-ascii > > I have Cocoa application that does a specialized tas

Mysterious write-only SMB behavior

2017-04-28 Thread Kirk
directories that it creates are visible. If this rings a bell with anyone, I would appreciate a clue, which would be one more than I have now. Kirk Kerekes (iPhone) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: array = [NSArray new] or array = [NSArray array]?

2016-08-19 Thread Kirk
array = [NSArray new] and array = [NSArray array] -- Should be interchangeable under ARC. Kirk Kerekes (iPhone) > On Aug 19, 2016, at 12:22 PM, cocoa-dev-requ...@lists.apple.com wrote: > > array = [NSArray new] or array = [NSAr

RE:Sprite Kit app won’t operate in foreground

2016-08-02 Thread Kirk
I also have such an app. No SpriteKit in it, so there's one variable eliminated. It also is magically rejuvenated by running it from Xcode. No log messages on the phone. Kirk Kerekes (iPhone) > On Aug 2, 2016, at 2:00 PM, cocoa-dev-requ...@lists.apple.com wrote: > > S

Re: NSPredicate and custom sort selector

2014-05-30 Thread Kirk
A string is a string - the user's input will have the ratioValue property available. Up to you to sanity check the user input of course. Kirk Kerekes (iPhone) On May 30, 2014, at 4:56 PM, Trygve Inda wrote: >> Create a property-styled category on NSString that returns the nu

Re: NSPredicate and custom sort selector

2014-05-30 Thread Kirk
C collection operations. Kirk Kerekes (iPhone) ___ 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: Help with Help

2014-05-07 Thread Kirk
hat Apple's own iWork apps use online help pages that open in Safari. Perhaps that is a hint. Kirk Kerekes (iPhone) > On May 7, 2014, at 12:08 PM, cocoa-dev-requ...@lists.apple.com wrote: > > Send Cocoa-dev mailing list submissions to >cocoa-dev@lists.apple.com > &g

Job listing: Cocoa/CoreAudio Contract

2014-01-28 Thread Kirk
, but the code will be provided to our end users as part of a documentation package (industry contractual requirement). They will ignore it, as usual. Questions/proposals/quotations to: kirkkere...@gmail.com. *** Kirk Kerekes (iPhone) ___ Cocoa-dev

Re: existence of objects

2013-05-06 Thread Kirk
If you would benefit from looser coupling between objects, consider NSNotification and friends. Kirk Kerekes (iPhone) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: Convert spelled out numbers to digits?

2013-03-28 Thread Kirk
meric value. There will be edge cases and ambiguities. Is "seventy, three" {70,3} or 73? Only the specifics of your app can decide. Cocoa offers several tools that can parse text into words with varying degrees of sophistication. Kirk Kerekes (iPhone) On Mar 28, 2013, at 7:4

Re: Convert spelled out numbers to digits?

2013-03-27 Thread Kirk
: edolecki PSN: eric_dolecki > Imagineric > > > On Wed, Mar 27, 2013 at 3:51 PM, Kirk wrote: >>NSNumberFormatter * nf = [[NSNumberFormatter new] autorelease]; >>[nf setNumberStyle: NSNumberFormatterSpellOutStyle]; >>NSLog(@"Survey Says...%@

Re: Convert spelled out numbers to digits?

2013-03-27 Thread Kirk
t;thirteen point five" ** This was under iOS. Personally, I was gobsmacked at the results. Kirk Kerekes (iPhone) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the l

Fwd: Uploading photos to iCloud programatically

2013-02-12 Thread Kirk
From: Kirk Date: February 12, 2013, 2:10:40 PM CST To: "balaji06n...@gmail.com" Subject: Re: Uploading photos to iCloud programatically Use AppleScript (on iPhoto) on the Mac and ALAssetsLibrary on iOS. Both let you have remarkably capable access to the user's photo lib

Re: Distributed Objects

2012-08-27 Thread Kirk
from applicationDidFinishLaunching: . Any main thread startup ops that can be deferred to that time are invoked from there. If nothing else, it helps reduce dock-bounce time. It might be obsolete voodoo - I've been doing it for more than a decade. Kirk Kerekes (iPhone) On Aug 27, 201

Re: Distributed Objects

2012-08-27 Thread Kirk
There isn't a run loop running yet at applicationDidFinishLaunching:. Defer your code with performSelector: afterDelay:0 Kirk Kerekes (iPhone) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: Displaying '%' in the UI (Velocityboy)

2012-04-19 Thread Kirk Kerekes
On Apr 18, 2012, at 2:00 PM, cocoa-dev-requ...@lists.apple.com wrote: > Re: Displaying '%' in the UI (Velocityboy) As a possibly more clear alternative to escaping the %, you could use: [NSString stringWithFormat:@"%.0f%@",ratio1, @"%"] Or, even more cocoa-fied ObjC: [NSString stringWithForma

RE: Stenography

2012-04-02 Thread Kirk Kerekes
For the sake of later Googlers, the word is "Steganography" (. "Stenography" is writing in shorthand. NSBitMapImageRep allows individual pixel access. On Apr 1, 2012, at 12:16 AM, cocoa-dev-requ...@lists.apple.com wrote: > Message: 9 > Date: Tue, 27

Re: Cocoa-dev Digest, Vol 8, Issue 415

2011-06-09 Thread Kirk Kerekes
On Jun 8, 2011, at 1:09 PM, cocoa-dev-requ...@lists.apple.com wrote: > Re: Login item not hidden > My app should execute several tasks fired by several timers. Actually the > app must remain open in order to fire the timers, and this is not what my > client wants. He wants the tasks run as hidde

Re: UI Design on iPad

2011-04-23 Thread Kirk
Trust me. You need to read the docs until you understand why this is totally the wrong direction to be taking. Make a whole-hearted commitment to using the standard UI as much as possible. After all, it is a big part of why the platform is #1. When you properly use standard UI elements, you

RE:Trouble with design pattern

2011-02-18 Thread Kirk Kerekes
NSNotification is your friend. When your custom views do something notable, they should post or enqueue an NSNotification containing the relevant info. Presumably you will have subscribed your NSDocument to those notifications in your override of -windowControllerDidLoadNib. This way the vie

Re: LOCATING MEDIA FILES IN MACINTOSH

2011-01-07 Thread Kirk Kerekes
I may have missed it, but I don't believe anyone has mentioned my first choice in this sort of task: -- the programmatic interface to Spotlight: "Introduction to Spotlight Query Programming Guide" combined with UTIs: "Introduction t

re: NSDictionary key types

2011-01-07 Thread Kirk Kerekes
If you are insufficiently confused, I thought I would add some additional confusion. 1. Don't worry overmuch about hash values. Particularly, never succumb to the temptation to store them persistently. The -hash algorithm for a particular class may vary with OS version. It certainly h

RE: Obscuring an NSString (Adam Gerson)

2010-12-02 Thread Kirk Kerekes
If you convert the NSString into an NSData,(dataUsingEncoding:) and then Base64 encode it into an NSString, doesn't that get you what you want? > I am writing an NSString to a file and I would like to obscure it in a > two way reversible fashion. It doesn't have to be major hacker proof, > just

RE:Instantly delete a directory without recursion?

2010-10-04 Thread Kirk Kerekes
> Is there a way to delete a directory instantly and completely without > first deleting all its subdirectories and files recursively? The hierarchical structure that you see is not "real" -- directories are not physical containers for the files that they appear to contain. The directory hierarc

Re: Distributed object vending problem

2010-09-22 Thread Kirk Kerekes
Others seem to have found -- to be useful. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the m

re; Distributed object vending problem

2010-09-20 Thread Kirk Kerekes
> How do I send messages to a server's vended object without having to include > the server's entire dependency tree? Incorporate the methods that you actually need for remote interaction into a protocol that is defined in a separate .h file, and #import it at both ends of the connection. You

RE:decodeObjectForKey without definition

2010-08-20 Thread Kirk Kerekes
Open the file in a hex editor (0xED, for example), if it has the text "plist" near the beginning, it may have been archived with NSKeyedArchiver. If instead it displays 0x3 or 0x4 followed by 0xb followed by "typedstream" or "streamtyped" at the beginning of the file, it was probably archived wi

RE:Sample code for "simple" sharing using Bonjour?

2010-07-28 Thread Kirk Kerekes
might be useful. ___ 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)list

Re: Reading in UTF-8 to Data

2010-07-16 Thread Kirk Kerekes
In the first page of Google hits for "nsstring quoted-printable"" This is at least a starting point. ___ Cocoa-dev mailing list

Re: Adding an image to a project

2010-07-14 Thread Kirk Kerekes
Google for "OpenCV Cocoa" -- there is at least one Google Code hosted project, and many other hits. I'll bet someone has solve this and many other similar problems already. Don't struggle, Google. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: NSPredicate to exclude specific elements??

2010-03-21 Thread Kirk Kerekes
I suggest that you need to provide the actual code you are using to generate the NSPredicate, because what you are wanting to do just isn't that hard. The problem may not be in the predicate format string. I would have used @"NOT CONTAINS[cd] %@" as my first pass, and been quite surprised if i

RE: NSDictionary trouble

2010-01-19 Thread Kirk Kerekes
> I wish NSDictionary (NSMutableDictionary actually) could handle > arbitrary mappings of one type of object to another, without copying > the keys. A string makes a good key most of the time but what about > the case where you want to do the reverse mapping, to find the string > which you have as

RE: Analyzer in error?

2010-01-14 Thread Kirk Kerekes
AFAIK, yes. Please file a bug to add to the ones I have filed on this and similar behaviors. On Jan 13, 2010, at 9:49 PM, cocoa-dev-requ...@lists.apple.com wrote: > Message: 10 > Date: Thu, 14 Jan 2010 12:54:46 +1100 > From: Graham Cox > Subject: Analyzer in error? > To: Cocoa-Dev List > Mess

Re: Search multiple / all properties in single NSPredicate statement

2010-01-13 Thread Kirk Kerekes
Create a property for the target class that concatenates the text value of all the other properties of interest, and then search on that? On Jan 13, 2010, at 9:46 AM, cocoa-dev-requ...@lists.apple.com wrote: > Message: 5 > Date: Tue, 12 Jan 2010 17:10:10 -0800 > From: Mike Chambers > Subject: S

Re: Cocoa-dev Digest, Vol 7, Issue 57

2010-01-13 Thread Kirk Kerekes
Create a property for the target class that concatenates the text value of all the other properties of interest, and then search on that? On Jan 13, 2010, at 9:46 AM, cocoa-dev-requ...@lists.apple.com wrote: > Message: 5 > Date: Tue, 12 Jan 2010 17:10:10 -0800 > From: Mike Chambers > Subject: S

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Kirk Kerekes
In my testing NSDictionary's objectForKey: is extremely fast, with NSSet's member: coming in second and everything else trailing waayyy back. I was using simple immutable keys and complex, mutable objects, which may have affected the results. YMMV. So if you make a dictionary where the ZIPs ar

Subject: Re: NSEvent timestamp is zero

2010-01-07 Thread Kirk Kerekes
> 1. I have an NSButton that toggles an operation between active and suspended. > 2. At some point the operation completes and I process the results of the > operation. > 3. The user can still toggle the operation for the few seconds that the > result is being processed. > Don't discard, preve

Re: GC crash due to being naughty

2009-10-16 Thread Kirk Kerekes
... This led me to generate a new hypothesis: that I am an idiot. I have now proven that hypothesis to my full satisfaction. ... A remarkably universal observation. I certainly have made it many times about myself. One of my rules of thumb about Cocoa coding is "Code for your Inner Idiot

Re: Stability on Snow Leopard

2009-09-23 Thread Kirk Kerekes
I _strongly_ suggest that you (at least temporarily) use the LLVM/ CLANG compilers in XCode, and use the "build and analyze" option that is then available. By the time you have fixed every issue that CLANG finds, I suspect that 90% of your crashes will have evaporated, as well as quite a few

Re: When do I need to override hash?

2009-08-21 Thread Kirk Kerekes
AFAIK, NSDictionary specifies that it COPIES keys, and RETAINS objects. Thus even if you were to use an NSMutableString as a key, you could not mutate the key in the NSDictionary. So the only way you are likely to get into trouble with keys is if you do troublesome things like use oddball m

RE: A simple DO situation - point me in the right direction!

2009-08-20 Thread Kirk Kerekes
I need to implement a system where I can verify the number of running copies of my app on a local network against a site license. I thought DO might be a good way to implement this. Consider using just Bonjour for this -- with careful implementation of the name and type service strings, you ca

Re: Cmd+key shortcuts not being sent to NSWindow on Tiger

2009-08-10 Thread Kirk Swenson
On Aug 10, 2009, at 11:04 PM, Uli Kusterer wrote: On Aug 8, 2009, at 3:30 AM, Kirk Swenson wrote: - (id) windowWillReturnFieldEditor: (NSWindow*) aWindow toObject: (id) anObject { // myTextFieldEditor is a member variable, so there will only be one of them. if

Re: Cmd+key shortcuts not being sent to NSWindow on Tiger

2009-08-07 Thread Kirk Swenson
dialogs with multiple edit fields. [myTextFieldEditor setFieldEditor: YES]; } return myTextFieldEditor; } There may be a better solution out there, but this seems to work. Kirk Swenson Senior Software Engineer KCP Technologies

Re: NSString -componentsSeparatedByString: line break

2009-07-27 Thread Kirk Kerekes
How about: [array filterUsingPredicate:[NSPredicate predicateWithFormat:@"SELF.length > 0"]]; "LIKE" is awfully fancy for the purpose. On Jul 27, 2009, at 2:03 PM, cocoa-dev-requ...@lists.apple.com wrote: Date: Mon, 27 Jul 2009 12:36:27 -0500 From: Chase Meadors Subject: Re: NSString -com

Re: NSSocketPort initRemoteWithTCPPort is never valid

2009-07-15 Thread Kirk Kerekes
An NSSocketPort is intended for use with Distributed Objects and NSConnection or, at least, to communicate with another NSSocketPort at the other end. The documentation used to state this, possibly erroneously. It no longer does so: "NSSocketPort is a subclass of NSPort that represents a BSD

Re: Long term performance of NSConnection

2009-07-06 Thread Kirk Kerekes
Use Activity Monitor (or other tool of your choice) to check for a port leak. ___ 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)l

Re: [Newbie] Displaying an NSImage inside an NSTextField?

2009-06-30 Thread Kirk Kerekes
An alternative to the other ideas presented previously: Read up on NSAttributedString. Use NSTextAttachment to attach your image to an NSAttributedString, and then use -setAttributedStringValue to set the string in your NSTextField. This has worked nicely for me with the cells in NSTableVie

Re: repeatable random numbers in an object

2009-06-17 Thread Kirk Kerekes
___ 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: Doc kind from extension

2009-06-11 Thread Kirk Kerekes
UTIs will get you there. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

RE: SQLite/MySQL BLOB-creator application needed.

2009-05-28 Thread Kirk Kerekes
So I need a simple OS X application (either an existing desktop application, or a simple command-line application) that can serialize a PNG image into a BLOB (keeping all metadata, etc.) for access by a SQLite (or any SQL-type DB) engine (used within a Cocoa/iPhone application). AFAIK a SQLite3

Re: String Comparison and return values

2009-05-26 Thread Kirk Kerekes
Consider the pattern: [[thing description] isEqualToString: someString]; All objects will return a string for description. Whether it is meaningful in your terms is a whole other issue. NSNumber will return a sensible numeric string. NSString will return itself. Generally, property-list obj

Re: Network Reachability APIs

2009-05-21 Thread Kirk Kerekes
I may have missed it, but I think that an essential point about the Reachability API has been left unmentioned: The OS Reachability API does its work without annoying the user -- something that is quite difficult to guarantee with roll-your-own versions. Believe it or not, there are still d

Re: microsoft file formats in cocoa

2009-05-18 Thread Kirk Kerekes
-- And it is easy to wrap in a Cocoa wrapper -- I've done so. The interface is appended to this email. The libxls open source project on sourceforge.net allows you to read and parse .xls files. This library works under OSX - I know, I'm one of the developers :-) // // XLSWorkbook.h // PE

RE: File formats for multi-doc app: packages, single files or zipped alternatives

2009-05-17 Thread Kirk Kerekes
Serialized NSFileWrapper? ___ 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 Subscripti

Re: Subject: detect option key on startup

2009-05-10 Thread Kirk Kerekes
have the full capabilities of Cocoa available during your initialization. On May 9, 2009, at 5:58 PM, Mitchell Livingston wrote: In what method would that need to be in to get the key on startup? I tried without luck in init and awakeFromNib. On Saturday, May 09, 2009, at 0

RE: Subject: detect option key on startup

2009-05-09 Thread Kirk Kerekes
How About: ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) ___ 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-admin

RE: Distributed Objects via Bonjour?

2009-05-08 Thread Kirk Kerekes
Good DO demo code is rather scarce, and the best-practices are highly dependent on the target OS. For one example showing about every permutation imaginable, and a little-recognized simplified Bonjour strategy, try: The demo

RE: How to clone a mutable dictionary

2009-04-24 Thread Kirk Kerekes
Simple, brute-force method: archive the dictionary, then unarchive it. The result is a 1-line "deep copy". Of course, that assumes that all the dictionary objects/keys support archiving. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pl

RE: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Kirk Kerekes
You don't have to use NSInvocation -- you could instead define a category on NSView that wrapped setActivated: ( STANDARD COMPOSED IN MAIL WARNING ) - (void) setActivatedWithObjectValue: (id) value { [self setActivated: [value boolValue]]; } OR - (void) setActivatedWithObjectValue: (

Re: filteredArrayUsingPredicate and points

2009-04-16 Thread Kirk Kerekes
Something like: [NSPredicate predicateWithFormat: @"containsPointString %@ == YES", NSStringFromPoint(point)]; On Apr 16, 2009, at 5:24 AM, Alexey Baev wrote: On Apr 15, 2009, at 19:59:39, Kirk Kerekes wrote: Untested suggestion: Try adding a method to MyDot that will

RE:filteredArrayUsingPredicate and points

2009-04-15 Thread Kirk Kerekes
Untested suggestion: Try adding a method to MyDot that will accept the NSStringFromPoint representation, and then reference that method in your predicate, supplying a NSStringFromPoint as the object to be searched for. - (BOOL)containsPointString:(NSString *) stringRepresentation {

Re: SQLite and Unicode

2009-04-07 Thread Kirk Kerekes
To break your text into sentences, I suggest swiping componentsSeparatedByCharacterRunFromSet: from: -- and create a character set of your sentence-splitting characters to prime it with. If you need to preserve

RE:Beachball on Lengthy Task

2009-04-05 Thread Kirk Kerekes
Along with threads and various asynchronous techniques already mentioned, you should also consider creating a separate UI-less "foundation tool" to perform your lengthy task, controlled with NSTask in your main app. This yields all of the benefits of a thread, with none of the threading pit

RE: Best Practice for reading a string with NSScanner

2009-04-04 Thread Kirk Kerekes
It looks like you have tabular data to deal with, like punch cards. That means that you can assume a fixed character position for the beginning of each column in the table. And your code can infer those positions the same way you would -- by looking at the source file. Or you can just manua

Re: Best way to modify user input into NSTextView

2009-03-31 Thread Kirk Swenson
tText:, testing for the string to be replaced, and then passing the replacement string to [super insertText:]. Of course, to use this approach you have to implement windowWillReturnFieldEditor:toObject: in your window controller to return your derived class when asked. Kirk Swenson KCP Tec

Re: The fieldEditor and a focus ring

2009-03-02 Thread Kirk Swenson
rPath bezierPathWithRect:focusRingBounds]; [path setClip]; [path fill]; [NSGraphicsContext restoreGraphicsState]; [self unlockFocus]; Essentially the same code is working for me, except that I'm not calling the setClip method. Have you tried without the call to setClip? Kirk Swenson KCP Technol

Re: NSTask Leaking...

2009-01-30 Thread Kirk Kerekes
t-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes This code won't compile for me. Where is the referenced libCdsaCrypt.h file? -- Rob Keniger On 30/01/2009, at 10:50 AM, Kirk Kerekes wrote: // must include Security framework to use this // Tiger or

Re: NSTask Leaking...

2009-01-29 Thread Kirk Kerekes
// must include Security framework to use this // Tiger or later for SHA256 #import "libCdsaCrypt.h" @implementation NSData (DataDigest) - (NSData *) digestWithCDSAType:(CSSM_ALGORITHMS) algorithm { // does not validate algorithm selection, let the framework worry about that. NSData

Re: Configuring NSNumberFormatter non-programmatically

2008-12-23 Thread Kirk Swenson
string (with the currency symbol). Kirk Swenson KCP Technologies ___ 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 Hel

Re: NSSocketPort == BSD Socket

2008-12-05 Thread Kirk Kerekes
Well it looks like you ought to be able to use NSPortMessage's sendBeforeDate: method, if you are seeking a pure NSPort-and-friends technique, but I've never tried that. It actually looks like it might be handy, if it works. It would handle some of the overhead tasks that otherwise one must

Re: NSSocketPort == BSD Socket

2008-12-04 Thread Kirk Kerekes
-[NSSocketPort socket] returns a file descriptor. Write to it. Init an NSFileHandle with it. (-[NSFileHandle initWithFileDescriptor:]) It's all just sockets/files/descriptors. But "raw messaging" is not the same as writing raw bytes to a TCP stream. All that means is that you can use the s

Re: Cocoa-dev Digest, Vol 5, Issue 2074

2008-12-04 Thread Kirk Kerekes
"It is *possible* to use NSSocketPort to create a socket which you then communicate with using other techniques, but you can't use NSSocketPort directly to talk to a non-Cocoa app." While the documentation used to imply this, it did not appear to be true then, and the documentation no longer a

Re: Command-clicking table column -- radar://6407526

2008-11-30 Thread Kirk Kerekes
Done: Now that I have done that I eagerly anticipate the post that shows me my bonehead error. On Nov 30, 2008, at 2:02 PM, [EMAIL PROTECTED] wrote: I was surprised to discover that command-clicking NSTableView columns does not appear to function as per the standard interface guidelines

Command-clicking table column

2008-11-30 Thread Kirk Kerekes
In at least Leopard, I was surprised to discover that command-clicking NSTableView columns does not appear to function as per the standard interface guidelines (discontinuous selection): "A Command-click should result in a discontinuous selection. With discontinuous selection, in which th

Re: How to implement float min(float x, ...) ?

2008-11-17 Thread Kirk Kerekes
How to implement float min(float x, ...) ? I suggest you not use var_arg functions if you can avoid them. So I propose a different path. As a jumping-off point, here is a category method on NSData that assumes that "self" (the NSData instance) is an array of floats: (The -floats category

Re: How to count composed characters in NSString?

2008-09-28 Thread Kirk Kerekes
Users don't see characters, they see glyphs. If you want your count to maximally agree with user perception, you need to be counting glyphs, not characters. See NSLayoutManager, esp: - (NSRange)glyphRangeForCharacterRange:(NSRange)charRange -- and friends. If you are showing strin

Re: Inter-machine notifications

2008-09-11 Thread Kirk Kerekes
I would look at Distributed Objects again. It really isn't intrinsically "client-server" oriented any more than Cocoa is. A client-server architecture is just one way to use the distributed object functionality. It does tend to be easier to have a single- source-for-truth to keep things orga

Re: How to create a GUID?

2008-09-07 Thread Kirk Kerekes
@implementation NSString (KKUUIDString) + (NSString *) UUIDString { CFUUIDRef UIDRef; NSString *uidString; UIDRef = CFUUIDCreate(NULL); uidString = (NSString *)CFUUIDCreateString(NULL, UIDRef); CFRelease(UIDRef); return [uidString autorelease]; } @e

Re: global NSMutableDictionary

2008-07-29 Thread Kirk Kerekes
Consider class methods instead of globals. See: Unmentioned there is the additional advantage of lazy initialization: (composed in Mail) + (NSMutableDictionay *) myGlobalDict { static NSMutableDictionary * result = nil; if(!result)

Re: GNUStep, OpenStep, NextStep, Cocoa port?

2008-03-08 Thread Kirk Kerekes
IMNTBHO, OpenStep/GnuStep are not useful means for achieving cross- platform GUI applications, at least not if the platforms are OS-X and Win32. Anyone who would disagree should point two out. OTOH, Cocotron, while spottily incomplete, is Doing