On Sep 15, 2008, at 03:49 , Markus Spoettl wrote:
Hi List,
I just know it must be there but I can't see it. How can I get to
the NSTimeZone for a given NSDate. When using -description: the date
got a time zone, so it's stored in there but how on earth can I get
to it? I only need the
On Sep 15, 2008, at 12:56 AM, Jason Coco wrote:
All NSDate objects are stored as seconds since the reference date
(Jan 1 1970 00:00 GMT) and so are always GMT. The description is
using the default time zone to adjust the date. You can get the
default time zone with [NSTimeZone
Le 15 sept. 08 à 09:56, Jason Coco a écrit :
On Sep 15, 2008, at 03:49 , Markus Spoettl wrote:
Hi List,
I just know it must be there but I can't see it. How can I get to
the NSTimeZone for a given NSDate. When using -description: the
date got a time zone, so it's stored in there but
On Sep 15, 2008, at 05:35 , Jean-Daniel Dupas wrote:
Le 15 sept. 08 à 09:56, Jason Coco a écrit :
On Sep 15, 2008, at 03:49 , Markus Spoettl wrote:
Hi List,
I just know it must be there but I can't see it. How can I get to
the NSTimeZone for a given NSDate. When using -description:
Hi List,
I just know it must be there but I can't see it. How can I get to
the NSTimeZone for a given NSDate. When using -description: the date
got a time zone, so it's stored in there but how on earth can I get to
it? I only need the GMT offset (numerically, not as string), in case
I am trying to copy a file using NSFilemanagers
copyPath:toPath:handler: method.
The (Tiger) documentation says: File or directory attributes—that
is, metadata such as owner and group numbers, file permissions, and
modification date—are also copied.
Well, the attributeModDate is not.
So
On Thu, Sep 11, 2008 at 3:11 PM, Benjamin Stiglitz [EMAIL PROTECTED] wrote:
By the way, another way to implement this is to set a property in a
subclass of NSArrayController inside its -arrangeObjects: method.
I found this
Ken Thomases wrote:
[quote]
Note that if you don't make your operation concurrent in this
sense, but you queue it in an NSOperationQueue, that queue will still
run it asynchronously, in its own thread, concurrently with other
operations. It's just that, for non-concurrent operations,
Excerpts from John Love's message of Mon Sep 15 11:02:21 -0400 2008:
I must be doing something terribly wrong, because when I start up the
NSOperationQueue that does some time consuming calculations, I do not
get back control of my application until after the lengthy calculation
is
I found this
informationhttp://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindi
ngs/Tasks/filtering.html#//apple_ref/doc/uid/20002302-128168-CJBCJCAIabout
overriding -arrangeObjects: Since I need to return several different
arrays of objects (active, new, and prior) how is this
I've read all the docs and the archives of this list, but I can't seem
to find what's wrong with my code:
(in MyWindowController)
@interface MyWindowController : NSWindowController
{
IBOutlet NSMatrix* matrix;
}
@end
@implementation MyWindowController
- (void)windowDidLoad
{
//
I had a panel controlled by a window controller that needed access to
code in the main window's window controller. Panels are key windows,
but not main windows. The responder chain rolls up through the
panel's window controller (the key window chain) and then up through
the main window's
On 9/15/08 2:45 PM, Brett Powley said:
Second problem (which you'll see if you change the NSLog): counter is
unsigned, so it *never* turns negative.
And gcc can catch these kinds of things!
$ gcc-4.2 -framework Cocoa -std=c99 -Wall -Wextra ~/Desktop/test.m
/Users/sean/Desktop/test.m: In
Yes,
at this line:
NSString *n = [o someMethod].someProperty;
the -someMethod method body is literally executed twice (control isn't
handed back to the calling function until after the second return
self;.
- (MyTestClass *)someMethod
{
NSLog(@someMethod called);
return self;
}
I'm no fan of these newfangled Objective-C 2.0 features that you
whippersnappers seem so excited about (call me old fashioned), but I'm
giving properties a shot, especially now that I'm working on some
stuff for [REDACTED].
I've notice something strange with properties that I hope someone can
On Sep 15, 2008, at 11:02 , John Love wrote:
I must be doing something terribly wrong, because when I start up
the NSOperationQueue that does some time consuming calculations, I
do not get back control of my application until after the lengthy
calculation is complete. Here are the
On Sep 15, 2008, at 11:34 AM, Sean McBride wrote:
And gcc can catch these kinds of things!
$ gcc-4.2 -framework Cocoa -std=c99 -Wall -Wextra ~/Desktop/test.m
/Users/sean/Desktop/test.m: In function 'main':
/Users/sean/Desktop/test.m:7: warning: comparison of unsigned
expression
= 0 is
On 9/15/08 12:48 PM, Charles Srstka said:
-Wall yes, but -Wextra can get pretty obnoxious. In my experience,
that one tends to flood you with unused parameter warnings every
time you have an IBAction that doesn't use the sender parameter, or
you have a notification handler that doesn't use the
On Sep 15, 2008, at 10:31, Jason Coco wrote:
You /should/, however, autorelease your NSOperation since your queue
will retain it when you add it and release it when it completes.
This sounds plausible, but I can't find anything in the documentation
promising that NSOperationQueue will
On Sep 15, 2008, at 11:54 AM, Sean McBride wrote:
On 9/15/08 12:48 PM, Charles Srstka said:
-Wall yes, but -Wextra can get pretty obnoxious. In my experience,
that one tends to flood you with unused parameter warnings every
time you have an IBAction that doesn't use the sender parameter, or
Software Developer - COCOA
Company:Confidential
Job ID#:08082102
# of Positions: 1
Job Type: Full Time Permanent or Contract on-site
Location: San Jose, Ca
Contact:Darren Tessitore ([EMAIL PROTECTED])
Position
Working from the simple NSXMLParser example from
http://weblog.bignerdranch.com/?p=48
I suggest you use parser:didStartElement:... to look for customer
and begin accumulating fields, and use parser:didEndElement:... to
note completion of first_name, last_name, etc and react accordingly.
In
On Sep 15, 2008, at 12:57 PM, Michael Ash wrote:
gcc allows you to disable individual warnings. So using -Wall -Wextra
-Wno-unused-parameter will give you all of the good warnings with
none of the annoying unused parameter ones. In practice, this single
warning is the only one I've found in the
On 9/15/08 12:17 PM, Nathan Kinsinger said:
Well, to each his own. I find it is a worthwhile tradeoff. For
action
methods, just do:
- (IBAction)handleButton:(id)sender
{
(void)sender;
...
}
There is also #pragma unused, it's kind of ugly but is specific
about the parameter
Hmm,
Here is the assembly i think we can take a guess why
NSString *n = [[o someMethod] someProperty];
0x5d42 +0550 mov-0x28(%ebp),%edx
0x5d45 +0553 lea0x56a8(%ebx),%eax
0x5d4b +0559 mov(%eax),%eax
0x5d4d +0561 mov%eax,0x4(%esp)
0x5d51
On Sep 15, 2008, at 11:24, Sean McBride wrote:
'#pragma unused' will cause some compilers to warn unknown pragma.
Though, since this is the Cocoa list, and Cocoa is not really
portable,
I guess it doesn't matter.
There's also the convenient macro __unused, which seems to work fine
for
On 14.9.2008, at 10:45, Nathan Kinsinger wrote:
On Sep 12, 2008, at 3:56 PM, Kai wrote:
When NSXMLParser hits a character entity like auml; (- German
umlaut 'ä'), it sends parser:resolveExternalEntityName:systemID: to
its delegate and if this is not implemented or returns nil,
On Mon, Sep 15, 2008 at 9:37 AM, Loren Brichter
[EMAIL PROTECTED] wrote:
I'm no fan of these newfangled Objective-C 2.0 features that you
whippersnappers seem so excited about (call me old fashioned), but I'm
giving properties a shot, especially now that I'm working on some
stuff for
Hello,
Is it safe to use -[NSApplication targetForAction:] with non-action
selectors? For example, selectors that have more than one argument,
non-id first argument, or return values?
The documentation for targetForAction:to:from: seems to imply it just
does a respondsToSelector: on
On Sep 15, 2008, at 14:04 , Quincey Morris wrote:
On Sep 15, 2008, at 10:31, Jason Coco wrote:
You /should/, however, autorelease your NSOperation since your queue
will retain it when you add it and release it when it completes.
This sounds plausible, but I can't find anything in the
On Sep 15, 2008, at 1:45 PM, Kai wrote:
Of course if the content really is XHTML you should really be using
an HTML parser and not an XML one.
No, it isn’t. Just needs some way to encode all German characters.
I’ll have to investigate whether simply using utf8 encoding is an
option,
Hi All,
Was wondering if somebody could answer how thread safe NSXMLParser is, as
I need to use it with NSURL set to remote server and the response could take
a while, so this why I want to put off into another thread.
While I can see it can be used with a NSURL, is there a way I can do a
On Sep 15, 2008, at 1:04 PM, Quincey Morris wrote:
On Sep 15, 2008, at 10:31, Jason Coco wrote:
You /should/, however, autorelease your NSOperation since your queue
will retain it when you add it and release it when it completes.
This sounds plausible, but I can't find anything in the
Of course there's always std::vector bool ;-) usually at 1 bit per
bit...
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
Thanks for the tip. So I ended up going the route of making my .m files into
.mm files, and using std::vector vectorBOOL to store
On Mon, Sep 15, 2008 at 2:43 PM, Alex Reynolds [EMAIL PROTECTED] wrote:
Of course there's always std::vector bool ;-) usually at 1 bit per
bit...
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
Thanks for the tip. So I ended up going the route of
On Sep 15, 2008, at 4:43 PM, Alex Reynolds wrote:
Is there a difference in the underlying storage between vectorBOOL
and
vectorbool?
Yes! std::vector is a class template. There's a generic
implementation provided that works with any type (within certain
constraints), but there's a
Hi all,
There have been discussions in the past about the fact that
relationships in Core Data are unordered (sets) instead of ordered
(arrays). I have a vague question about this...
In my model: entity 'Department' has a to-many relationship to entity
'Employee' named 'employees'. There are a
On Mon, Sep 15, 2008 at 5:43 PM, Alex Reynolds [EMAIL PROTECTED] wrote:
Are there any downsides to creating Cocoa-based applications in Objective
C++?
If you're switching to Objective-C++ just to get std::vector, I would
strongly suggest you reconsider. There are plenty of issues regarding
Hi-
On Sep 15, 2008, at 2:55 PM, Sean McBride wrote:
b) add an attribute named 'index' (value 1 to 6) and code methods
named
employee1, etc. in my NSManagedObject subclass?
Certainly do the second one, unless there's some factor in your
business logic that demands exactly six employees,
BOOL vs. bool aside (as well as a couple methods that return NSString*
and throw NSException) I wanted to take a stab at making this particular
class more portable.
If I wrote it closer to the C++ STL spec, I could more easily use it in
other contexts while writing my larger application in
Jason,
I haven't read this yet, so I'm not sure if it will be useful or
not, but it may... assuming you have two computers that you can use,
anyway.
HTH, J
http://developer.apple.com/technotes/tn2008/tn2108.html
I hadn't seen that, thanks.
Regards,
Patrick
On Sep 15, 2008, at 14:35, Ken Thomases wrote:
It's possible that it's not safe to release a NSOperation until
after it returns YES to [NSOperation isFinished].
I don't think there needs to be anything specific in the
documentation. In the absence of a documented exception, we should
On Sep 15, 2008, at 5:16 PM, Alex Reynolds wrote:
I also wanted to learn a bit about Objective-C++.
What are the issues that involve exceptions? I find that
NSExceptions I have in my larger application still work when I poke
those.
In the 32-bit runtime, Objective-C exceptions and C++
On Sep 15, 2008, at 5:18 PM, Quincey Morris wrote:
On Sep 15, 2008, at 14:35, Ken Thomases wrote:
It's possible that it's not safe to release a NSOperation until
after it returns YES to [NSOperation isFinished].
I don't think there needs to be anything specific in the
documentation. In
Hi All,
Does anyone know what I need to connect from OS X to a MySQL DB and
run a few queries?
This would be from Objective-C or C++.
Any examples?
What should I be downloading?
Thanks,
-Jason
___
Cocoa-dev mailing list
I've been using MySQL-Cocoa and it works fine... Light, fast, easy:
http://mysql-cocoa.sourceforge.net/
Documentation is sparse (non-existent), but it's a simple API that you can
easily see by looking at the code. Had to recompile for intel, but that
wasn't a big deal.
From: J. Todd Slack
On Sep 15, 2008, at 18:59 , J. Todd Slack wrote:
Hi All,
Does anyone know what I need to connect from OS X to a MySQL DB and
run a few queries?
This would be from Objective-C or C++.
Any examples?
What should I be downloading?
The MySQL C API is distributed with MySQL, so if you have
On 16 Sep 2008, at 6:01 am, Robert Martin wrote:
I wonder whether Button Cells are built to provide double-click
actions (seems kind of weird if they do).
Well, it works for me. In my case I have a palette of tool buttons.
The single-click selects the tool, but the double-click provides
It's not safe... once the target is found (using respondsToSelector:, you're
right), the action is performed with:[target performSelector:actionSelector
withObject:sender];
which means that anything but an object as a sender will potentially crash.
The only safe thing you can image is to have an
On 16 Sep 2008, at 6:13 am, Dave Dribin wrote:
Is it safe to use -[NSApplication targetForAction:] with non-action
selectors? For example, selectors that have more than one argument,
non-id first argument, or return values?
The documentation for targetForAction:to:from: seems to imply it
On Sep 15, 2008, at 6:30 PM, Julien Jalon wrote:
It's not safe... once the target is found (using
respondsToSelector:, you're right), the action is performed with:
[target performSelector:actionSelector withObject:sender];
which means that anything but an object as a sender will potentially
On Sep 15, 2008, at 3:13 PM, Dave Dribin wrote:
Hello,
Is it safe to use -[NSApplication targetForAction:] with non-action
selectors? For example, selectors that have more than one argument,
non-id first argument, or return values?
The documentation for targetForAction:to:from: seems to
On Sep 15, 2008, at 6:35 PM, Graham Cox wrote:
What exactly are you trying to do?
I'd say it's not safe, since that usage isn't anticipated, or
necessary. If you could perhaps outline why you think you need it a
better solution can be suggested.
I've got, say, an info panel that needs to
On Sep 15, 2008, at 6:56 PM, Graham Cox wrote:
I think you have this a bit backwards, possibly.
You still have to get notified when the first responder changes in
order to tell your info panel to reorganise itself, so why not use
that notification to directly obtain the correct target?
Anyone?
I notice that this question has been asked numerous times in various
forums across the 'net, with not one answer. So clearly it's an issue
that several people have run into, but met with stony silence.
Apparently the Font Panel UI is quite broken yet very few have ever
noticed!
Sorry if this is a bit basic, but I can't figure out why my preference panel
only comes up the first time. Second and subsequent times, nothing happens.
I have this code linked to Preferences menu item:
- (IBAction)preferences:(id)sender {
if (nil == preferencesController) {
Jason,
Check out the CocoaMYSQL bundled framework, aka MCPKit. It is quite easy
to use, and there is an example app (cocoamysql).
My personal feelings are that we should all be using ODBC to connect to
these DBs, however there is ODBC support under cocoa is presently pretty
dicey, so we are
On Sep 15, 2008, at 19:16:04, Rick Mann wrote:
According to the docs:
http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/Articles/ManagingPopUpItems.html
You typically bind the contentObjects value of the button to the
arrangedObjects of an array controller, and the
Well, I'm using garbage collection. Anyway, I turned that option off in IB, but
nothing changed.
--- On Mon, 9/15/08, Chris Hanson [EMAIL PROTECTED] wrote:
From: Chris Hanson [EMAIL PROTECTED]
Subject: Re: NSWindowController
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Cc:
On 16 Sep 2008, at 11:55 am, Chris Idou wrote:
- (IBAction)preferences:(id)sender {
if (nil == preferencesController) {
preferencesController = [[NSWindowController alloc]
initWithWindowNibName:@Preferences owner:self];
}
[preferencesController showWindow:self];
}
In the NIB, the
That fixes it, but I thought the owner in this case was the owner of the
NSWindowController, not the File's owner of the NIB.
NSWindowController has an owner property. But if you're saying the owner is
the File's owner, which is the NSWindowController itself, then what is the
owner property
On 16 Sep 2008, at 1:44 pm, Chris Idou wrote:
That fixes it, but I thought the owner in this case was the owner of
the NSWindowController, not the File's owner of the NIB.
-initWithWindowNibName:owner: expects you to pass the object that is
represented by File's Owner in the NIB.
62 matches
Mail list logo