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
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
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
> 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
modifies (renames) and relocates remain visible, and
> 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)
>
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
For the sake of later Googlers, the word is Steganography
(http://en.wikipedia.org/wiki/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 Mar
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 hidden.
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
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
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:
http://goo.gl/JGgVQ Introduction to Spotlight Query Programming
Guide
combined with UTIs:
http://goo.gl/9AxdT Introduction to
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
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
hierarchy
Others seem to have found
http://www.thotzy.com/THOTZY/Distributed_Objects_Demo.html
-- 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
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
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 with
http://www.thotzy.com/THOTZY/Distributed_Objects_Demo.html 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
In the first page of Google hits for nsstring quoted-printable
http://stackoverflow.com/questions/491678/can-you-translate-php-function-quoted-printable-decode-to-an-nsstring-based-ob
This is at least a starting point.
___
Cocoa-dev mailing list
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
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 it
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
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 graham@bigpond.com
Subject: Analyzer in error?
To:
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
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
...
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
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
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
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
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 c.ed.m...@gmail.com
Subject:
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
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
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
http://www-cs-faculty.stanford.edu/~knuth/programs/rng.c
___
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
UTIs will get you there.
http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319-CH201-SW1
___
Cocoa-dev mailing list
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
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
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
-- 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
//
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
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 06:48PM, Kirk Kerekes kirkkere...@gmail.com
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
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:
http://thotzy.com/THOTZY/Distributed_Objects_Demo.html
The demo
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)
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:
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 accept
To break your text into sentences, I suggest swiping
componentsSeparatedByCharacterRunFromSet:
from:
http://thotzy.com/THOTZY/ComponentsSeparatedByCharacterRunFromSet%3A.html
-- and create a character set of your sentence-splitting characters to
prime it with.
If you need to preserve
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
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
// 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
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
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
-[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
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
Done: radar://6407526
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
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
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
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
@implementation NSString (KKUUIDString)
+ (NSString *) UUIDString
{
CFUUIDRef UIDRef;
NSString *uidString;
UIDRef = CFUUIDCreate(NULL);
uidString = (NSString *)CFUUIDCreateString(NULL, UIDRef);
CFRelease(UIDRef);
return [uidString autorelease];
}
Consider class methods instead of globals. See:
http://www.thotzy.com/THOTZY/Robust_Cocoa_Coding.html
Unmentioned there is the additional advantage of lazy initialization:
(composed in Mail)
+ (NSMutableDictionay *) myGlobalDict
{
static NSMutableDictionary * result = nil;
if(!result)
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, http://groups.google.com/group/cocotron-dev while
spottily incomplete, is Doing
60 matches
Mail list logo