Anyone want to take a stab at explaining to me as thoroughly as
possible why
[super respondsToSelector: aSelector]
doesn't actually do what it looks like it should do?
Bonus points if you can explain why I can override the
respondsToSelector:(SEL)aSelector method in my object and
On Sat, May 31, 2008 at 1:22 AM, Russ McBride [EMAIL PROTECTED] wrote:
It seems like either an infinite loop should occur if respondsToSelector is
really being called on self, or it should return NO if it's called on super,
in which case my delegate method in self should never get called.
If
Hi team,
Thank for giving me answer.
I want to do one small clock for my iPhone but i can't understand
how can i get current system time?
I have read about NSDate, NSTimer but i can't understand how to
use that class for getting current system time?
Please guide
On 30 May 08, at 23:22, Russ McBride wrote:
Anyone want to take a stab at explaining to me as thoroughly as
possible why
[super respondsToSelector: aSelector]
doesn't actually do what it looks like it should do?
Keep in mind that, ordinarily, respondsToSelector: is implemented on
On 30 May '08, at 11:40 PM, haresh vavdiya wrote:
I want to do one small clock for my ** but i can't
understand
If you keep using that word here even after repeated warnings, the
moderator is going to ban you. I am not kidding.
I have read about NSDate, NSTimer but
On 30 May 08, at 23:40, haresh vavdiya wrote:
Thank for giving me answer.
I want to do one small clock for my iPhone but i can't
understand
how can i get current system time?
I have read about NSDate, NSTimer but i can't understand
how to
use that class for
On May 30, 2008, at 11:40 PM, haresh vavdiya wrote:
I have read about NSDate, NSTimer but i can't understand how to use
that class for getting current system time?
You could use +[NSDate date], as it according to the documentation:
Creates and returns a new date set to the current
On 30 May '08, at 7:16 PM, Jeremy wrote:
Now, I need to figure out how to use set GET, but I think that is
working. The problem and it is crashing is because it is being
encoded by every other method.
What? That sentence was incomprehensible. Apologies if you're not a
native English
On May 30, 2008, at 11:43 PM, Jens Alfke wrote:
If you actually want to ask a question of your class's superclass,
you have to do so directly:
[[[self class] superclass] instancesRespondToSelector: aSelector]
Well... yeah... you *can* do that.
But *don't do that*. (And I know Jens
On May 31, 2008, at 1:22 AM, Russ McBride wrote:
Anyone want to take a stab at explaining to me as thoroughly as
possible why
[super respondsToSelector: aSelector]
doesn't actually do what it looks like it should do?
Bonus points if you can explain why I can override the
On 30 May '08, at 11:55 PM, Bill Bumgarner wrote:
On May 30, 2008, at 11:43 PM, Jens Alfke wrote:
If you actually want to ask a question of your class's superclass,
you have to do so directly:
[[[self class] superclass] instancesRespondToSelector: aSelector]
Well... yeah... you
Responding to myself:
On May 31, 2008, at 1:52 AM, Ken Thomases wrote:
To do what you want, you can use [MySuperClass
instancesRespondToSelector:aSelector]. Note, you have to name the
specific class you want to check. You can't use [self superclass]
because that's dynamic -- the result
On Sat, May 31, 2008 at 3:16 PM, j o a r [EMAIL PROTECTED] wrote:
On May 31, 2008, at 12:10 AM, Michael Ash wrote:
If you're adventurous and foolish you can extract your superclass
without needing to hard-code any class names:
#import objc/objc-runtime.h
...
Class superclass = ((struct
On May 31, 2008, at 12:21 AM, Rick Mann wrote:
I registered to observe changes in the number column of my tree
controller:
[mItemsController addObserver: self
forKeyPath: @selection.number
options: (NSKeyValueObservingOptionNew)
On May 31, 2008, at 12:23 AM, Michael Ash wrote:
Assume the following class hierarchy:
A - B - C - D - E
In the implementation of B, you write [self superclass]. Now your
method executes with self set to an instance of E. What do you get?
I would propose that you should re-examine your
On May 31, 2008, at 00:32:30, j o a r wrote:
Search for NSKeyValueObservingOptionNew here:
Already using that:
[mItemsController addObserver: self
forKeyPath: @selection.number
options: (NSKeyValueObservingOptionNew)
I've got an NSTreeController and associated view. I use -
awakeFromInsert to set default values for the entities created as a
result of calling -add. I'd like for one of the fields to take on the
same value as the currently-selected entity. Can I get at that from
within -awakeFromInsert?
Hi Friends,
I have got current system time but it is not refreshed automatically
means whenever i run the application it will give me cuurent time but then
after i have to again refresh my application then it display current time.
But i want to do it display time like digital clock.
So what
On May 31, 2008, at 2:43 AM, j o a r wrote:
On May 31, 2008, at 12:23 AM, Michael Ash wrote:
Assume the following class hierarchy:
A - B - C - D - E
In the implementation of B, you write [self superclass]. Now your
method executes with self set to an instance of E. What do you get?
I
Hello List,
I just came across a strange thing with initializing an
NSInvocationOperation object that I wanted to share and see if this is
a bug in either the docs or the framework:
I had this
NSInvocationOperation *theOp = [[NSInvocationOperation alloc]
On Sat, May 31, 2008 at 3:43 PM, j o a r [EMAIL PROTECTED] wrote:
On May 31, 2008, at 12:23 AM, Michael Ash wrote:
Assume the following class hierarchy:
A - B - C - D - E
In the implementation of B, you write [self superclass]. Now your
method executes with self set to an instance of E.
On May 30, 2008, at 11:16 AM, Fritz Anderson wrote:
On 30 May 2008, at 4:17 AM, Steven Hamilton wrote:
Also, any warnings or errors I get in xcode appear twice in the
bubbles. Anyone know why that is?
By default, new Xcode projects are set to the Release
configuration (because all
Keeping the clock display updated is not Cocoa's responsibility; it is
yours. I would personally suggest that after each update of the
display you set a timer for when the next update is due.
On 31 May 2008, at 09:01, haresh vavdiya wrote:
Hi Friends,
I have got current system time but
If you method is something like:
- (void)func1
then you should use @selector(func1) without the colon.
On May 31, 2008, at 2:06 AM, Markus Spoettl wrote:
NSInvocationOperation *theOp = [[NSInvocationOperation alloc]
initWithTarget:self
On May 31, 2008, at 2:01 AM, haresh vavdiya wrote:
Hi Friends,
I have got current system time but it is not refreshed
automatically
means whenever i run the application it will give me cuurent time
but then
after i have to again refresh my application then it display current
time.
On Sat, May 31, 2008 at 8:48 AM, Rick Mann [EMAIL PROTECTED] wrote:
On May 31, 2008, at 00:32:30, j o a r wrote:
Search for NSKeyValueObservingOptionNew here:
Already using that:
Read it again:
The change dictionary doesn't contain old and new values. This is not
your fault, it's due to a
To get all the nodes in the tree I do a depth-first search (10.5
only). Add the first method in an NSTreeNode category and the second
to a category on NSTreeController.
// NSTreeNode_Extensions
- (NSArray *)descendants;
{
NSMutableArray *array = [NSMutableArray array];
for
On Sat, May 31, 2008 at 10:03 AM, Hamish Allan [EMAIL PROTECTED] wrote:
On Sat, May 31, 2008 at 8:48 AM, Rick Mann [EMAIL PROTECTED] wrote:
On May 31, 2008, at 00:32:30, j o a r wrote:
Search for NSKeyValueObservingOptionNew here:
Already using that:
Read it again:
The change dictionary
Hi Friends,
I have successfully get current time but now i want to to digital
clock but for that i need to have current minute and hours, so how can i get
this?
I found some method of NSCalenderDate which give us hours and
minutes i can't get current time and date it display
I think you want to schedule the connection for the
NSModalPanelRunLoopMode runloop mode. This is the mode that is used
for modal windows.
On May 31, 2008, at 7:28 AM, Torsten Curdt wrote:
A bit puzzled ...seems like I need some advise here.
From a NSWindowController I create a modal
I have a button Print Label. I would like it to say Print Labels
when more than one label is selected in the Tree Controller view. Is
it possible to do this with Alt. Titles and bindings in IB? Or must
I write code?
Since Stephen's value transformer reply answers your question from
On May 31, 2008, at 4:27 AM, Rick Mann wrote:
After adding a new entity to my tree controller, how can I
programmatically open the first column (a text cell)
Again, this is confusing - entity is not the same as instance.
Also, I assume by 'column' you mean that of a table view or outline
Jens,
Thanks for that bit. And I am a native english speaker. It was late
when I typed that. :D But Thanks for NSURLConnection suggestion and
will look into it.
Jeremy
I have often felt that programming is an art form, whose real value
can only be appreciated by another versed in the
On May 31, 2008, at 16:09, Michael Vannorsdel wrote:
I think you want to schedule the connection for the
NSModalPanelRunLoopMode runloop mode. This is the mode that is used
for modal windows.
You mean with scheduleInRunLoop:forMode: ? ...but that's only
available since 10.5
cheers
--
On Fri, May 30, 2008 at 3:33 PM, John Love
[EMAIL PROTECTED][EMAIL PROTECTED]
wrote:
Here's some code snippets that I'm having problems with .. the code is
sorta working in that an alert *window* appears, but not as a drop-down
sheet as I think the following calls for: (and even when
HI.
Obj-C, Cocoa.
1) How to mount USB drive from folder /dev/ by means of API?
FSMountServerVolumeSync, FSMountLocalVolumeSync, other method. Utilits
are not used. Please example.
2) Why USB drive is not mounted when the screensaver is on?
More NSLog data:
2008-05-31 12:33:51.001 Calculate Medical[1926:10b] NSWindow does not
support utility styleMask 0x10
2008-05-31 12:33:51.023 Calculate Medical[1926:10b] NSWindow does not
support utility styleMask 0x10
2008-05-31 12:33:55.434 Calculate Medical[1926:10b] *** -[NSAlert
On 31 May '08, at 8:07 AM, Torsten Curdt wrote:
I think you want to schedule the connection for the
NSModalPanelRunLoopMode runloop mode. This is the mode that is
used for modal windows.
You mean with scheduleInRunLoop:forMode: ? ...but that's only
available since 10.5
I don't know
I saw you using that in your included code so I thought you were ok
with it. For Tiger I can only suggest using secondary thread
processing as the cleanest approach. Or you can reconsider using a
modal window.
On May 31, 2008, at 9:07 AM, Torsten Curdt wrote:
You mean with
5/31/08 10:40 AM, also sprach [EMAIL PROTECTED]:
- (void) endCalculateSheet:(NSWindow*)theSheet code:(int)returnCode
info:(void*)contextInfo {
if (returnCode == NSAlertDefaultReturn) { // Good Bye!
NSLog(@Default Button clicked); // does not log this entry
}
On 31 May '08, at 9:31 AM, Peter Burtis wrote:
Question: Is there a way to set the credentials before you initiate
the request? Or a way to force the request to use credentials even
if the site doesn't return an Authentication Required response? I
can't find one.
IIRC, there isn't one.
On May 31, 2008, at 18:55, Jens Alfke wrote:
On 31 May '08, at 8:07 AM, Torsten Curdt wrote:
I think you want to schedule the connection for the
NSModalPanelRunLoopMode runloop mode. This is the mode that is
used for modal windows.
You mean with scheduleInRunLoop:forMode: ? ...but that's
On 31 May '08, at 9:40 AM, John Love wrote:
2008-05-31 12:33:55.434 Calculate Medical[1926:10b] *** -[NSAlert
endErrorSheet:code:info:]: unrecognized selector sent to instance
0x16ed20
That's an exception being thrown. There's no such (public) Cocoa
method -endErrorSheet:code:info:, so
I am writing an application that could seriously benefit from a good
graphing API. Of course, the simplest solution to this would be if
Apple opened up GraphKit for Cocoa developers. Sadly, that seems not
to be in the near future, so I'm looking at alternatives.
While there are some
On Sat, May 31, 2008 at 11:11 AM, Jonathan del Strother
[EMAIL PROTECTED] wrote:
On Sat, May 31, 2008 at 10:03 AM, Hamish Allan [EMAIL PROTECTED] wrote:
On Sat, May 31, 2008 at 8:48 AM, Rick Mann [EMAIL PROTECTED] wrote:
On May 31, 2008, at 00:32:30, j o a r wrote:
Search for
On May 31, 2008, at 03:11:51, Jonathan del Strother wrote:
I could've sworn that was fixed in Leopard, actually. Anyone tried
it?
I have ;-)
--
Rick
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
On May 31, 2008, at 07:30:16, I. Savant wrote:
Can I get at that from within -awakeFromInsert?
Yes, through some incredible acrobatics, you probably could, but
then that would be like walking right up to the MVC design pattern
and b**ch-slapping it right in the face. ;-)
Yes, of
On 31 May '08, at 10:14 AM, Torsten Curdt wrote:
Indeed - modal is smelly ...and I have considered non-modal. It
would make my life easier. But since I have just integrated your
exception handling into the FeedbackReporter framework ...wouldn't
you expect the dialog that pops up in case
Le 31 mai 08 à 19:14, Torsten Curdt a écrit :
On May 31, 2008, at 18:55, Jens Alfke wrote:
On 31 May '08, at 8:07 AM, Torsten Curdt wrote:
I think you want to schedule the connection for the
NSModalPanelRunLoopMode runloop mode. This is the mode that is
used for modal windows.
You
On May 31, 2008, at 1:19 AM, Michael Vannorsdel wrote:
If you method is something like:
- (void)func1
then you should use @selector(func1) without the colon.
Indeed. Thank you.
Regards
Markus
--
__
Markus Spoettl
smime.p7s
Description: S/MIME
I have a current date and time method that returns a result in an
NSTextField.
-(IBAction)returnCurrentDateAndTime:(id)sender
{
NSCalendarDate *current;
current = [NSCalendarDate calendarDate];
[mDateReceiver setObjectValue:current];
}
I need the date to remain static indefinitely
On 31 May '08, at 11:14 AM, vince wrote:
What's the best way to maintain the value of the textField using
Bindings?
I've never worked with user defaults using bindings, but it's really
easy to do programmatically:
To store:
[[NSUserDefaults standardUserDefaults] setObject: [textfield
Jonathan, thank you for the excellent example on working with the
containers. That will certainly be useful.
On May 31, 2008, at 02:57:36, Jonathan Dann wrote:
If you're using Core Data, can't you fetch all your managed objects
and determine the one with the max vaule?
Well, I would
On May 31, 2008, at 4:22 AM, haresh vavdiya wrote:
I have successfully get current time but now i want to to
digital
clock but for that i need to have current minute and hours, so how
can i get
this?
I found some method of NSCalenderDate which give us hours and
minutes i
Well, I would have thought so, but I don't know enough about
CoreData to actually get at the objects without the tree controller.
I would've thought I could do that just off the tree controller,
using @max, too.
1 - Create a fetch request for your desired entity.
2 - Create a sort
Is there a way to send an email from me to someone else
programatically, and also to see how many unread emails you have?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
On May 31, 2008, at 12:05:58, I. Savant wrote:
1 - Create a fetch request for your desired entity.
2 - Create a sort descriptor for the key whose max value you're
interested in.
3 - Set the fetch request's sort descriptor to the above.
4 - Create any predicates needed for filtration (ie,
On May 31, 2008, at 07:34:30, I. Savant wrote:
NSTableView and NSOutlineView have a method -
editColumn:row:withEvent:select: ... Make sure your tree controller
has fetched and rearranged its objects (and if your view is an
outline view, the corresponding item for your new instance is
On 31 May 2008, at 19:47, Rick Mann wrote:
Jonathan, thank you for the excellent example on working with the
containers. That will certainly be useful.
You're welcome, but I apologise, I forgot the -rootNodes method that
one of the tree controller methods I sent you calls! This method
The problem is, I don't know how to determine to which row that
newly-added object corresponds in the table view.
If you're targeting Leopard, you can force the tree controller to -
fetch: (so it's updated) then I believe you can ask the outline view
for its -rowForItem: ... if you're
The problem is, I don't know how to determine to which row that
newly-added object corresponds in the table view. Is there any way?
I suppose it's the current-selected row, since it's set up to select
on add. Is there a more elegant way to find out, though (i.e., what
if adding didn't
On May 31, 2008, at 13:31:10, I. Savant wrote:
That's one way, so long as you force a fetch first.
So, I'm not really sure what fetch does. In my case, I either a new
document or one that was opened, and the instances are all loaded and
managed by the tree controller, and the UI is in
Wow, really? No way to just get at all the items in the tree
controller with some key path, then use @max? It seems that this
would be possible with an NSArray:
In addition to Jonathan's comments, to be fair, you did ask, ... I
don't know enough about CoreData to actually get at the
Hi,
I'm currently writing an app that creates a complex hierarchy of CALayers.
Everytime I animate one of the layers, I get a memory leak.
In order to investigate the issue, I created a simple Cocoa project in which
I only added a CustomView and the following code for this view :
@implementation
Hello,
I'm trying to figure out how to use NSExpressions in a predicate but
find the documentation a bit deficient.
Here is what I want to do: I have an array - array A - containing
objects with a title and subtitle property. I want to filter this
array so it only contains the objects in array
Hello,
first of all, I´m new to Cocoa and I need some Informations about the
possibilities in Cocoa to plan a new Project of mine.
I want to access all Messages of my Mail.app Account. So, there is no
API for Mail.app but I´ve read something about the ScriptingBridge and
found that
On 31 May 2008, at 21:43, Rick Mann wrote:
Can category methods act as KVC properties?
Yep, the -flattenedObjects method I gave you asks the array of tree
nodes valueForKey:@descendants. -descendants was the NSTreeNode
method I posted.
Jon
smime.p7s
Description: S/MIME
On 31 May 2008, at 17:37, Torsten Curdt wrote:
On May 31, 2008, at 18:27, Jonathan Dann wrote:
Hi Guys,
Just a quick one. I would expect renaming a file named HELLO.TXT
to hello.txt (or another variant where the case of a few letters
change) with -moveItemAtPath:toPath:error: to be
On 31 May 2008, at 18:17, Jens Alfke wrote:
On 31 May '08, at 9:27 AM, Jonathan Dann wrote:
Just a quick one. I would expect renaming a file named HELLO.TXT
to hello.txt (or another variant where the case of a few letters
change) with -moveItemAtPath:toPath:error: to be allowed. As it
On May 31, 2008, at 13:31:10, I. Savant wrote:
If you're targeting Leopard, you can force the tree controller to -
fetch: (so it's updated) then I believe you can ask the outline view
for its -rowForItem: ... if you're targeting Tiger, it's not as
straightforward due to proxy objects.
On Sat, May 31, 2008 at 4:35 PM, Jonathan Dann [EMAIL PROTECTED] wrote:
On 31 May 2008, at 18:17, Jens Alfke wrote:
Try using the system call rename. (Use man 2 rename to see the
documentation.)
Call -fileSystemRepresentation on your path strings to convert them to
appropriate C strings.
On May 31, 2008, at 16:39, Stéphane Droux [EMAIL PROTECTED]
When I run the program in MallocDebug, the memory usage goes up
every time the timer function is executed. If I change the animation
to be on l2 instead of l1, or if I create l2 as a sublayer of
mainLayer, the memory usage
Thomas Wickl wrote:
first of all, I´m new to Cocoa and I need some Informations about the
possibilities in Cocoa to plan a new Project of mine.
I want to access all Messages of my Mail.app Account. So, there is no
API for Mail.app but I´ve read something about the ScriptingBridge and
found
On 31 May 2008, at 22:51, stephen joseph butler wrote:
On Sat, May 31, 2008 at 4:35 PM, Jonathan Dann [EMAIL PROTECTED]
wrote:
On 31 May 2008, at 18:17, Jens Alfke wrote:
Try using the system call rename. (Use man 2 rename to see the
documentation.)
Call -fileSystemRepresentation on your
Whoops, I sent this yesterday but didn't hit reply-all...
Thanks Joel, I just took a look at the PDFAnnotationEditor example.
It seems to be doing all of it's transformations in the PDFView
subclass. I'm not sure if I am able to do this since I would like to
perform the impositions by
New attempt. Instead of intercepting the text key in my shape
CopyWithZone, I tried the obvious thing of subclassing NSTextStorage, adding
the copying/mutablecopying protocols using the same copy technique of
creating a new object initialized with the original. Even without the
protocols,
array controllers are not fully KVO compliant.
they don't return change values.
On May 31, 2008, at 3:21 AM, Rick Mann wrote:
I registered to observe changes in the number column of my tree
controller:
[mItemsController addObserver: self
forKeyPath:
On May 31, 2008, at 4:00 PM, Nathan wrote:
Is there a way to send an email from me to someone else
programatically, and also to see how many unread emails you have?
the first part is asked here often. search the archives at www.cocoabuilder.com
if there is no API (and there isn't) you need
On May 30, 2008, at 5:04 AM, Vijay Malhan wrote:
An Example:
mTable = member instance for your TableView
mData = member array which provides the data-objects.
Put the following code at a place where your table and data-source
array is initialized. Like in awakeFromNib: method.
Here I'm
On May 31, 2008, at 6:11 AM, Jonathan del Strother wrote:
On Sat, May 31, 2008 at 10:03 AM, Hamish Allan [EMAIL PROTECTED]
wrote:
On Sat, May 31, 2008 at 8:48 AM, Rick Mann [EMAIL PROTECTED]
wrote:
On May 31, 2008, at 00:32:30, j o a r wrote:
Search for NSKeyValueObservingOptionNew
I have an array controller in IB that is used by a popup menu in a
table view column. I would like those menu items to be sorted. Is
there a quick, mostly-IB way to configure that? The presence of a sort
descriptor binding for the NSArrayController makes me think it should
be pretty
On May 28, 2008, at 08:02 AM, Jens Alfke wrote:
Importing messages from Mail via AppleScript may not be fast enough
— my highly scientific estimate* is a couple of messages a second.
Importing someone's entire mail archive would take a long time.
I just did a test and it's quite fast if
On 31 May '08, at 6:19 PM, Chris Page wrote:
I'm seeing average times of one to two milliseconds per message
(e.g., 7 seconds for a mailbox with 4,660 messages) on a 2.5GHz Quad
G5.
When I run that, Script Editor and Mail both lock up for quite a while
(and Script Editor's RPRVT grows
On 31 May '08, at 2:07 PM, Thomas Wickl wrote:
Where can I find information what is possible with Mail.app and the
Scripting Bridge? Is there a description or referenz about all
scripting possibilities in Mail.app?
In the Script Editor appplication, choose Open Dictionary... from
the
Basically NSString's floatValue and doubleValue methods only work when
the numbers use the US style dot separator (as opposed to other locale
separators such as a comma). If your NSString might contain non-US
separators (or other formatting differences) you'll have to use
NSScanner to do
Hello List,
I'm having troubles deciphering the documentation. I have doubles
stored in a text file which always use the dot . as decimal
separator. When converting the strings to doubles the conversion to be
locale independent. The NSString:doubleValue documentation says:
This method
86 matches
Mail list logo