I'd like to have a method determine the name of the method that
invoked it -- as an NSString.
For example
- (void) method1 {
[someObject method2];
}
- (void) method2 {
// here, I'd like to be able to find the name of the caller
// in this example, that would be
Must have been late yesterday, I tried that then but it gave nothing,
this morning my Mac was more friendly and it works perfect. Thanks!
Alex
On 9 mrt 2008, at 04:27, Nick Zitzmann wrote:
On Mar 8, 2008, at 6:01 PM, Alexander Griekspoor wrote:
what is now the blessed way of obtaining the
On 8 Mar '08, at 1:57 PM, Trygve Inda wrote:
Is this expected? Can I rely on it? I will never need to change
dict, but I
am modifying items within a known sub Dictionary.
Don't rely on this; it's entirely possible this behavior could change
in the future, causing your app to throw an
Hi,
In my app I need to get the icon for my HDD.
For this I need to get the bundle with identifier
com.apple.iokit.IOStorageFamily.
How can i get this bundle?
Any help would be greatly appreciated.
Wishes,
Nick
___
Cocoa-dev mailing list
On Mar 9, 2008, at 6:48 AM, Nick Rogers wrote:
In my app I need to get the icon for my HDD.
For this I need to get the bundle with identifier
com.apple.iokit.IOStorageFamily.
How can i get this bundle?
Any help would be greatly appreciated.
Please do at least some minimal searching.
On Mar 9, 2008, at 12:48 PM, Nick Rogers wrote:
Hi,
In my app I need to get the icon for my HDD.
For this I need to get the bundle with identifier
com.apple.iokit.IOStorageFamily.
How can i get this bundle?
Since this kernel extension won't probably change its name and location:
I want to detect when a screen's resolution has changed, so I can
resize and re-center my main window. Does
NSWindowDidChangeScreenProfileNotification do what i want? If the
user moves the window (into a differently-sized widow, causing a
change), it looks like I could trap/check at
Is it enough then to take the dictionary I get back and do a [dict
mutableCopy]?
Will this cascade down to the subdicts (dicts within the top level
dict).
No it won't. mutableCopy only operates on one particular object and
not all its contained objects. While that behavior does
I think maybe you missed the existence of _cmd. Both self (this
object) and
_cmd (this selector) are passed as implicit arguments to every
Objective-C
method.
You can also call __func__ from within a method call, I use this often,
NSLog(@%p %s,self,__func__); // Thanks James Bucanek
Jon
On Mar 9, 2008, at 10:12 AM, Doug Knowles wrote:
I'd like to set a breakpoint on the outline view or the field to see
what's
causing the cancellation, but I can't find a good candidate.
Any debugging suggestions?
I'd suggest trying -resignFirstResponder on NSTextView and its
I need more control when the user creates objects in my application.
I'm using an NSTreeController with CoreData (via Bindings). I have a
parent object that does double duty as a child object thru parent and
child relationships.
Parent and child objects need to be initialized diferently. Parent
Blindingly obvious, now that I've seen the light. Found the problem.
Thanks, Nick, for taking the moment to help me out.
Doug K;
On Sun, Mar 9, 2008 at 1:15 PM, Nick Zitzmann [EMAIL PROTECTED] wrote:
On Mar 9, 2008, at 10:12 AM, Doug Knowles wrote:
I'd like to set a breakpoint on the
Hi Jim,
Maybe I should just send my queries directly to you in the future
since you always seem to be the one answering :)
I think traversing the window list is not worth it for what I am doing
(it'll be on my blog soon). While the definition for -isSheet is
somewhat odd, I think it
if you look at the count of representations of that NSImage, you will
find several sizes. (Assuming, of course, that the original .icns file
contained multiple representations of different sizes.)
--
m-s
On 09 Mar, 2008, at 09:28, Nick Rogers wrote:
Hi,
I have a icon file (.icns) with 10
On Mar 9, 2008, at 10:50 AM, Trygve Inda wrote:
In Carbon I could do:
CFPropertyListCreateDeepCopy (kCFAllocatorDefault, localDict,
kCFPropertyListMutableContainersAndLeaves);
Is there a NSDictionary way to do this?
The above. An NSDictionary is toll-free bridged to CFDictionaryRef,
so
On Sun, Mar 9, 2008 at 4:45 PM, Tony Becker [EMAIL PROTECTED] wrote:
If you're on Leopard, there is a new backtrace(3) call.
If you're on Tiger, it's a little more complex...
You can use the compiler function
(long)__builtin_return_address(0)
to find the
On Mar 9, 2008, at 2:59 PM, stephen joseph butler wrote:
On Sun, Mar 9, 2008 at 4:45 PM, Tony Becker [EMAIL PROTECTED] wrote:
If you're on Leopard, there is a new backtrace(3) call.
If you're on Tiger, it's a little more complex...
You can use the compiler function
Agreed, I forgot to add that warning.
I was using it to put fingerprints against alloc calls, retain/release
cycles, and some other methods so I could track down memory leaks and
some less then compliant code in debug builds.
It should not end up in release builds.
On Mar 9, 2008, at 6:06
ObjectAlloc and other Apple developement tools already record memory
calls (retain, release, alloc, ...) full trace. You really doesn't
need to reinvent the wheel to find leaks.
Le 9 mars 08 à 23:17, Tony Becker a écrit :
Agreed, I forgot to add that warning.
I was using it to put
Interesting approach, Tony.
However, __builtin_return_address isn't an object, so
stringWithFormat throws an exception when given the %@ token. It
should be %u (or %U ?? - I'm not sure of the difference).
So, just so I could step through the code in the debugger, I wrote:
int
Dear all,
The problem, shorty:
I cannot undo a bounded control's value in the KVO events chain
A) The situation
(I'm not using a Mac right now, so some names might be wrong.)
- multiple nibs, some controls with bounded
On Mar 9, 2008, at 12:09, Peter Hoerster wrote:
I have a background application which displays a floating utility
window on request via hotkey. If the user clicks any item in my
window, the window of the formerly front application gets
deactivated. This is unfortunate because the utility
The NSLog(v) documentation says:
NSLogv writes the log to STDERR_FILENO if the file descriptor is
open. If that write attempt fails, the message is sent to the syslog
subsystem, if it exists on a platform, with the LOG_USER facility
(or default facility if LOG_USER does not exist), with
Larry,
I believe it's expected behavior on Leopard, though you may want to
file a bug at least against the documentation. The following links
provide more information on this topic:
http://lapcatsoftware.com/blog/2008/01/06/logging-in-leopard/
Hmm, OK. I've opened radar #5789236; we'll see what Apple says.
- lc
On Mar 10, 2008, at 12:17 AM, Jeff Johnson wrote:
Larry,
I believe it's expected behavior on Leopard, though you may want to
file a bug at least against the documentation. The following links
provide more information
25 matches
Mail list logo