2:43 AM, Shawn Erickson wrote:
On Jun 28, 2008, at 12:13 AM, Chris <[EMAIL PROTECTED]> wrote:
NSExpression defines this method:
+ (NSExpression *)expressionForFunction:(NSString *)name arguments:
(NSArray *)parameters
and the doco provides this example:
[NSExpression expressionForFun
Hello,
Not sure where my problem is I've tried a few things and no success.
I am trying to output NSHTTPCookieStorage *cookies array to a table
view. Whenever I call the objectValueForTableColumn:row method the
app errors out, but if I leave it out the app launches displaying the
correct
ast, though: Objective-C
Garbage Collection works quite well in Leopard, and applications large
and small can use it quite effectively. I generally don't create new
Cocoa projects these days without turning on Objective-C GC support.
If you encounter
NSExpression defines this method:
+ (NSExpression *)expressionForFunction:(NSString *)name arguments:
(NSArray *)parameters
and the doco provides this example:
[NSExpression expressionForFunction:(@selector(random)) arguments:nil];
Isn't that wrong? Can you really pass a selector to a NSSt
it knows about them?
-- Chris
___
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 you
On Fri, Jun 27, 2008 at 10:09 AM, Peter Ammon <[EMAIL PROTECTED]> wrote:
>
> On Jun 25, 2008, at 7:27 PM, Chris wrote:
>
>>
>> The net effect is that NSPredicateEditor can't display a predicate like
>>
>> NOT (foo = "bar")
>>
>>
.
If you want to refer to an object, you should really refer to it via a
variable of appropriate type.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
C
Consider the following code, any NSPredicateEditor gurus:
NSPredicateEditorRowTemplate *tmpTemplate =
[[NSPredicateEditorRowTemplate alloc]
initWithCompoundTypes: [NSArray
arrayWithObjects: [NSNumber numberWithInt: NSNotPredicateType],
nil]];
NSPredicate * tmpPredicate =
ND or
OR, but not both from the user, even though the machinery seems to
know how to display things more complex.
On 25/06/2008, at 11:57 PM, Jim Turner wrote:
On Wed, Jun 25, 2008 at 1:08 AM, Chris <[EMAIL PROTECTED]> wrote:
Let's say I create a NSPredicateEditor a
Let's say I create a NSPredicateEditor and it looks like this:
[All] of the following are true:
[Name] equals [ ]
---
So the user enters say "Fred" and the predicate returned is "Name == Fred".
Later on, I reload that predicate in
ve guessed that one.
On 25/06/2008, at 12:52 AM, Jim Turner wrote:
On Tue, Jun 24, 2008 at 8:46 AM, Chris <[EMAIL PROTECTED]> wrote:
Hi!
This is very interesting information. Wish it was in the doco!
I have a custom view which wasn't responding to setObjectValue /
objectValue.
Whe
wrote:
On Tue, Jun 24, 2008 at 2:02 AM, Chris <[EMAIL PROTECTED]> wrote:
When the user clicks ok, then I call objectValue on the
NSPredicateEditor
and it calls predicateWithSubpredicates not on object "C", but on
object
"B", which is always going to be blank, because
Do a
man 3 sysctl
in the terminal and look for KERN_BOOTTIME
On 24/06/2008, at 10:51 PM, Stefan Hafeneger wrote:
Hi,
I'm looking for a Cocoa function like GetCurrentEventTime() for
Carbon to get the interval since system startup. Any ideas?
With best wishes,
Stefan_
Hi,
You should not be allocating either SpriteView or SpriteController if
they are referred to in the NIB. (which is the normal case).
Instead you go to the File's Owner object in interface builder, and go
to the Identity tab, and set the Class to be whatever class contains
your loadNib
I've got a NSPredicateEditor and I'm inheriting from
NSPredicateEditorRowTemplate to make a custom template. It implements
copyWithZone as the doco seems to imply I should. In Interface builder I
have a number of standard row templates, and I've added my custom one at the
end by setting the class i
one of the standard
data synchronization algorithms in the desktop application.
-- Chris
___
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
e to do this, but at least you
don't have to switch the application that runs on end-user systems
completely away from Core Data to use hand-generated SQL.
-- Chris
PS - As always, if there are capabilities you'd like to see in Core
Data or elsewhere in Cocoa, please file
"Data" class to "Person", the "arrayOfData" property
to "people", and the "newData" local variable to "newPerson".
Your code will read much more clearly that way: For example, you
won't be misled to thinking that the under
ate your model objects.
Is this about how you have your bindings configured now, or are they
set up differently?
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the lis
IIRC, you need to link against Quartz.
On Jun 20, 2008, at 12:46 PM, Omar Qazi wrote:
On Jun 20, 2008, at 9:09 AM, Dan Uff wrote:
Hi,
I am trying to make a Cocoa application using a Quartz Composer
file as output. Everything works fine when I Simulate the app in
IB, but when I actually
.
-- Chris
smime.p7s
Description: S/MIME cryptographic signature
___
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
o include
the prefix within the mark-up (the namespace can be dictated by the
default) so there needs to be a way of indicating whether or not a
prefix is included. You’re correct that you’d lose that information if
you were to save and then load it back in (so long as
onfusing you is that
you're using %i as the format specifier when you probably want to use
%x, or strictly speaking, %lx since you’re passing in a long.
- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin r
because passing nil
arguments is not like sending messages to nil.
- Chris
___
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
ou need to promote something that starts as a singleton to a
non-singleton.
-- Chris
___
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
On 12/06/2008, at 5:29 PM, Graham Cox wrote:
On 12 Jun 2008, at 5:03 pm, Chris Suter wrote:
In the original example, myNum was being passed as a argument
rather than having a message to sent to it and it’s often not safe
to pass nil objects as arguments.
Hmmm... well, what'
longlongValue] won’t (on some architectures at least).
- Chris
smime.p7s
Description: S/MIME cryptographic signature
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact
LElement *child = [NSXMLNode elementWithName:@"a:child" URI:@"http://www.tempurl.com
"];
You can look-up the prefix using NSXMLElement’s
resolvePrefixForNamespaceURI: method although you probably don’t need
to do that.
- Chris
smime.p7s
Description: S/MIME cryptographi
08/05/26/nsviewcontroller-the-new-c-in-mvc-pt-3-of-3/
And of course there's also some great information in the
NSViewController documentation.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin request
y a class cluster.
You keep insisting that Objective-C is designed in and behaves in a
way in which it simply does not. Please stop.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or m
would be to
give the ICU folks a hand at writing whatever bits of gunk are
required by Apple.
Cheers,
Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the
On Jun 9, 2008, at 11:17 AM, Hamish Allan wrote:
On Mon, Jun 9, 2008 at 7:02 PM, Chris Hanson <[EMAIL PROTECTED]> wrote:
The reason these kinds of methods have a return type of (id) is
that there
is no way to say "returns an object of the receiver's class." For
exa
On Jun 9, 2008, at 6:43 AM, Jonathan del Strother wrote:
Take a look at SenTestingKit (and particularly Chris Hanson's
excellent guide to setting it all up -
http://chanson.livejournal.com/182472.html).
Thanks for the kind words! I have a couple of additional posts on my
weblog wh
you send that aren't in the interface of the typed class,
however.
Thus you can say, perfectly validly:
NSMutableArray *mutableArray = [[NSMutableArray alloc] init];
NSArray *array = mutableArray;
This is perfectly fine. However, the compiler will give you a warning
if you try to send a
ed as an argument.
When you passed it an object of a different type, even a subclass,
you broke your promise to the compiler.
This is simply wrong.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin reques
ently flawed or that it should be avoided: It works
quite well both theoretically and in practice, and it supports the
development of large and well-performing applications.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Ple
On Jun 8, 2008, at 5:39 PM, John Engelhart wrote:
On Jun 7, 2008, at 7:11 PM, Chris Hanson wrote:
This won't happen because each message expression -- just as with
function-call expressions -- is a sequence point. The compiler
can't know what side-effects [data self] might h
I am never known to quail
At the fury of a gale,
And I'm never, never sick at C!
Chorus:
What, never?
GC:
No, never!
Chorus:
What, never?
GC:
Hardly ever!
Chorus:
He's hardly ever sick at C!
[...]
Chris
__
This won't happen because each message expression -- just as with
function-call expressions -- is a sequence point. The compiler can't
know what side-effects [data self] might have, so it can't re-order
the invocation to elsewhere.
-- Chris
_
configuration.
The only example I've found is AppeanceSample: a Carbon app which
does not have NSMainNibFile MainMenu in
the Info.plist. This key/value pair may be my problem.
How do you dynamically select between two version of MainMenu.nib in a
Cocoa document app?
Thank you,
Script
Editor, although even with event logging turned on that same mailbox
only takes 30 seconds or just over 6 milliseconds per message.
--
Chris Page - AppleScripter
The other, other AppleScript Chris
___
Cocoa-dev mailing list (Cocoa-dev@lis
On May 26, 2008, at 12:20 PM, Nathan wrote:
while(z=1);
In addition to what others said, change that from assignment "=" to
comparison "==".
-- Chris Page - Text Editor
An ASCII character walks into a bar. Bartender asks, “What’ll you
have?” ASCII charac
PowerPC 32-bit than when building for Intel 64-bit; for
one thing, the latter has differently-sized "int" and "long" types.
Similarly, if you're building for PowerPC with a deployment target of
10.3, but for Intel with a deployment target of 10.4, you
replacement technology,
and the replacements are defined practically right next to the
deprecated functionality.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the l
ject's instance
variables, or whether it will only call an objects property accessor/
mutator methods.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the
I have a NSSearchField and I am trying to detect when the user presses
the down arrow key to perform a specific action. This is no problem in
NSTextView with doCommandBySelector.
Is there a similiar way with NSSearchField?
Thanks for your help.
___
larly magic here. I just suspect that in some
cases, people have an "extra" window controller object in their nib
file, in addition to the window controller that loads the nib file and
acts as its owner (File's Owner).
-- Chris
__
@", self, textField);
That will log the description of the object itself, not just the value
you care about. I suspect that you will see two different window
controllers being created.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.app
the main thread,
take a snapshot of some model-level state you need to modify. Pass
that snapshot to an operation which manipulates it on some other
thread. When that operation is done, the modified snapshot's changes
are merged back on
atterns and
functionality as the frameworks helps ensure your own software will
fit in well and be approachable by those who work on it next.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests o
I have created a multidimensional array by creating 3 NSArray's (call
them childArray1, childArray2, childArray3) and them adding them to
one NSArray (call it parentArray). I am using predicate to search out
the array which finds the item I'm searching for. However, how I
return the name
look correct.
--
Chris Woods AIM: gnarrlybob MSN: [EMAIL PROTECTED]
[EMAIL PROTECTED] Y!: cjwoodsGTalk: [EMAIL PROTECTED]
http://bitspace.org/ ICQ: 21740987Skype: bitspace.org
___
Cocoa-dev mailing list (Coco
ld set the
content to an object that's contained by the file's owner, i.e. make
the file's owner a controller object that owns the NSObjectController
and has a reference/owns the content object.
- Chris
smime.p7s
Description: S/MIME cryptographic signature
rty.
What you get back from -mutableArrayValueForKey: is a representation
of the property itself, rather than to the array that is used to
implement the property; it will thus broadcast KVO change
notifications when it's mutated.
-- Chris
__
doing with this information?
-- Chris
___
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
also expect that you can observe your NSManagedObjectContext's
"hasChanges" property using KVO.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Conta
On May 10, 2008, at 11:40 AM, Jens Alfke wrote:
On 9 May '08, at 7:41 PM, Chris Hanson wrote:
(6) Leverage Cocoa framework features in your own code. For
example, you don't need to have setter methods that invoke -
setDirty:. You can just write a method like this
tation such that people used to other
frameworks don't just start automatically overriding -retain and -
release and so on because "that's how you do singleton classes in
Cocoa."
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@
ove,
only I was taught in Java.
You should really examine what it is you're trying to accomplish, try
to find out if there are any frameworks you can leverage, and perhaps
ask the community how it would accomplish that task. Don't j
d email from my application without using any email
client,and i've to send attachments also.
Why do you wish to bypass an e-mail client? That doesn't sound very
user friendly.
- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
That would make me suspect the way in which you are unzipping it, not the
way it's stored. I assume you are writing it to a file, and passing that to
your unzip routine? Is the issue there?
> From: Ben Einstein <[EMAIL PROTECTED]>
> Subject: Re: BLOBs, MySQL, hex. Oh my
>
> I was very surprise
string;
>>> length was all that mattered.
>>>
>>> Thanks,
>>> Ben Einstein
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.8 (Darwin)
>>
>> iEYEARECAAYFAkgi+Y0ACgkQlz6UVQtc2uw04wCfR77KlokLWAk533hza8gF3WqQ
>> X4EAoOMlM
iple threads, you'd be violating its API
contract by doing so.
There is nothing that causes more bugs in writing threaded code than
assumptions about what is and isn't safe at any given instant. You
can't assume, you must know.
-- Chris
x27;t just magically work with threads.
They would have to have some way to lock the object graph they're
reading from, and any code working with that object graph would also
have to lock it. And all locking would have to occur in the same
order and without dependencie
g or changing shared data, you need to be using
proper synchronization primitives. In special circumstances you can
use things like atomic operations or barrier primitives, but in
general if you're going to share data you must synchronize a
/NSXML.html
>.
Read that document first and it'll give you a pretty good overview of
what's available and where to look for figuring this sort of thing out.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do n
On May 3, 2008, at 3:52 PM, Jere Gmail wrote:
I want to list all the running apps and their windows.
Why, what do you hope to do with this information?
The answer to that will probably help us help you much better.
-- Chris
___
Cocoa-dev
foo" for string constants, to ensure that
they're created at runtime rather than memory-mapped from your plug-in.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator commen
es that can be
instantiated by +alloc/-init. Then, in your application, *just* use
+sharedCache to get at the cache. When the time comes that you need
separate instances for different purposes, you won't have to rip
anything out, and the work to *ensure* singleton-ness tends to be
bu
is wrong.
You mustn't drain or release autorelease pools in finally or catch
blocks because exception objects themselves are autoreleased.
It gets sorted out when a higher level autorelease pool is released.
This is documented somewhere in the docs.
- Chris
__
Hi Jerry,
On 29 Apr 2008, at 5:21 PM, Jerry Krinock wrote:
Is this a bug, or just me goofing things up again?
No, it's just a bug; you haven't goofed anything up.
It's been addressed, but as usual I can't comment on when the fix will
appear.
.chris
--
Chris Par
hange to a framework and then test your
application against that framework without installing that framework
wherever it needs to be installed.
For some people that's "inside the application's embedded Frameworks
directory" but for others that's "in
or, but if it's
for seeing if files will fit somewhere, it's a bit difficult to get an
exact figure because there's the additional space that might be
required in metadata files so care should be taken with how this
information is used.
- Chris
smime.p7s
Description: S/
this in his new CA book from
the Pragmatic Programmers).
--Chris
On Wed, 23 Apr 2008 16:08:38 -0400 "douglas a. welton" wrote:
Bob & Randall,
If all you want to do is slap some arbitrary text over a movie, I
would suggest that you take a look at using QTMovieLayer and
CA
ted here:
<http://developer.apple.com/documentation/Carbon/Reference/Resource_Manager/Reference/reference.html
>
- Chris
smime.p7s
Description: S/MIME cryptographic signature
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
On 24/04/2008, at 2:28 PM, Graham Cox wrote:
On 24 Apr 2008, at 12:59 pm, Chris Suter wrote:
The limits for resource forks are the same as for data forks
Not true - the ResourceMap contains some 24-bit pointers, or at
least it used to, as well as some 16-bit length fields as well
ost
users don't understand what they are and they just don't interoperate
nicely with other systems.
You can probably improve the user experience on OS X by storing the
Catalog ID (as well as other details) of the file so that if the two
files get separated you can easily find
e surely not loaded). I would have
thought that any security risks that exist from linking to other
frameworks are considered bugs which means that there won't be a list
of “safe” frameworks anywhere and if you find any issues, they need to
b
But the resource fork idea has the same issue if someone uses/sends/writes
to the file from the other 90% of the computers on the planet... (windows).
Doesn't it?
I think you're best tracking the info in your own data source, doing your
best to track and keep up with the user changing it outside y
o switch
from using a separate object to using File's Owner as an instance of
your NSWindowController subclass yourself.)
NSWindowController isn't the only class in Cocoa that works this way;
NSViewController also does, for similar reasons. It's a great
ould just always invoke its setter.
You haven't said how you're actually noticing that the selection in
one of your tables has changed; I assume you're either using an
NSTableView delegate method or a notification to do so.
-- Chris
___
ensures that the CFArrayRef returned by
LSCopyApplicationURLsForURL will have its lifetime managed by the
collector if GC is on, since -autorelease has no effect when GC is
on. This is also correct for non-GC, since NSMakeCollectable when GC
is off is effectively just a cas
abels must be followed by a statement.
- Chris
___
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/Unsubscr
he true cause of the problem is that labels (case labels and goto
labels) must be followed by a statement (which isn't a declaration).
So you could solve it by typing the following for example:
case 1:
; // empty statement
NSMutableArray *myArray = [[NSMutableArr
Aaron's book that covered it and then studied the Sketch example to
figure out the details that the book didn't cover. Between Sketch and
the documentation I was able to go rather far.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists
On 15/04/2008, at 8:12 PM, Mike Abdullah wrote:
NSURLDownload would be the one.
Or you can just use +[NSData dataWithContentsOfURL:].
- Chris
smime.p7s
Description: S/MIME cryptographic signature
___
Cocoa-dev mailing list (Cocoa-dev
rely on anything that isn't API. If there's something you can't
do within the API, please file a bug at <http://bugreport.apple.com/>
and describe what you're trying to create.
-- Chris
___
Cocoa-dev mailing list (Coco
"singleton" design pattern is a code smell, gets
in the way of comprehensive unit testing and makes test-driven
development and refactoring harder than it should be.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please d
ainst NSAppKitVersionNumber or calling Gestalt() to get
the OS version.
There's something you can put in the Info.plist that does this for
free. I forget exactly what it is but I'm sure it's easily found.
- Chris
smime.p7s
Description: S/MIME cry
is usually done directly on a graphics
card texture for efficiency, and thus you can't capture it this way.
You may have to resort to the Carbon-level window manager calls, which
read back from the window server (see Son of Grab sample under 10.5).
Cheers!
--Chris Ryland / Em Software, Inc.
, you should use the partition UUID but
that obviously only works for GUID partition maps so you're actually
better off using something else if that's what you want to do.
I hope this isn't for a competitor to one of our products. :-)
- Chris
smime.p7s
Descript
t)someMethodWhichTakes:(int64_t)foo;
#endif
and sprinkle those all over the place later too...
This:
- (NSInteger)someMethodWhichTakes:(NSInteger)foo;
is far more readable. :)
.chris
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
weekly announcement blog post.
NSCoder Night has no agenda, no speakers, and no preparation
required. All you need to do is show up with a laptop and hang out
with other people hacking on your Cocoa projects.
-- Chris
___
Cocoa-dev mailing l
f any principles that you seem to have
inferred.
-- Chris
___
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
e to see in the future, please file a bug at <http://bugreport.apple.com/
>. It's not a guarantee that it will happen, but it does ensure that
your input is heard by the Core Data team.
-- Chris
___
Cocoa-dev mailing list (Cocoa-dev@l
pts/Troubleshooting.html#//apple_ref/doc/uid/TP40002148-182809
>
- Chris
smime.p7s
Description: S/MIME cryptographic signature
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Conta
On 07/04/2008, at 9:39 AM, John Stiles wrote:
You can't be KVC compliant if you use prefixes like m_, so this
limits your potential for using things like bindings.
I think you can be KVC compliant but you have to define setters and
getters for everything.
-
On 04/04/2008, at 5:24 PM, Chris Markle wrote:
Chris S.,
Why do you not want it to be a child? The reason I ask is that if
your
requirement is that the spawned process isn't terminated when the
parent
dies, then NSTask will suffice. Whilst processes it spawns are
children,
they
Chris S.,
> Why do you not want it to be a child? The reason I ask is that if your
> requirement is that the spawned process isn't terminated when the parent
> dies, then NSTask will suffice. Whilst processes it spawns are children,
> they're in a different process group an
Chris S.,
> Why do you not want it to be a child? The reason I ask is that if your
> requirement is that the spawned process isn't terminated when the parent
> dies, then NSTask will suffice. Whilst processes it spawns are children,
> they're in a different process group an
901 - 1000 of 1057 matches
Mail list logo