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 "method
On Sun, Mar 9, 2008 at 4:44 AM, Stuart Malin <[EMAIL PROTECTED]> wrote:
> 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 b
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 u
>
> 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
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 (Cocoa-d
On Mar 9, 2008, at 5:58 AM, Trygve Inda wrote:
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
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. H
I don't think you really want to access the content of a private
kernel extension.
If your drive is mounted use -[NSWorkspace iconForFile:], else you
should use Icon Manager functions to retreive the disk icon
IconRef iconRef;
OSStatus err = GetIconRef(kOnSystemDisk, kSystemIconsCreator,
Le 9 mars 08 à 13:23, Jean-Daniel Dupas a écrit :
I don't think you really want to access the content of a private
kernel extension.
If your drive is mounted use -[NSWorkspace iconForFile:], else you
should use Icon Manager functions to retreive the disk icon
IconRef iconRef;
OSStatus err
On Mar 9, 2008, at 1:40 PM, Scott.D.R wrote:
Greetings everyone.
Maybe many of us have enabled the time machine function for our
leopards. Very cool machine.
I am interested in the time machine preference panel. When you open
it, there is a slider-like switch allow you to enable or disable
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:
myBundl
Hi,
I have a icon file (.icns) with 10 icons in it and i want to create
an NSImage with only the 32x32 icon from this file.
Currently I'm doing:
NSImage *anIcon = [[NSImage alloc] initWithContentsOfFile:iconPath];
which results in a very big 128x128 icon.
Regards,
Nick
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 beh
It depends if you need to be notified when someone presses the button
(or key), or if you just need to check whether it's currently down or
not.
If you want to be notified when they press the mouse button globally,
look up CGEventTapCreate in the Xcode documentation. This could
either be
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
Jo
I have an outline view in which I initiate editing of a particular column
value when a new item is inserted into the outline.
Recently (perhaps with the upgrade to Leopard), I've started seeing the
behavior where the text field abruptly cancels the edit and discards the
changes, for no apparent rea
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
superclasse
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
o
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 th
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 shoul
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 go
I guess the assumption on the AppKit's part is that a particular panel/
window will not be recycled as both a sheet and a panel within an
application. This kinda makes sense as there can only be a single
modal panel up at a time, but there can be multiple sheets. Therefore
the method is not
On Mar 9, 2008, at 10:05 AM, [EMAIL PROTECTED] wrote:
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, caus
Thanks Jon and Shem. I spaced out the existence of _cmd and was
unaware of __func__
As I best understand their distinction:
__func__ is generated at compile time (a C-string)
_cmd is part of the Obj-C runtime (a SEL)
Since I am writing a new method, I can accomplish my goal
Hi,
If I use a rounded textured segmented control (the type finder uses in
its toolbar of the windows to switch between column, browser view
etc.) and fill a segment with one of the new template images like
NSListViewTemplate, then when that segment is selected the image is
nicely inverte
Hello List
Are OSADictionaryView and OSADictionaryController as featured in the
IB 3 Open Scripting Kit plug-in viable in cocoa?
The OSAKit header contains no interface for these classes, though
OSADictionaryView exists as a nib within the OSAKit framework bundle.
All enlightenment grateful
I am using NSURLDownload and NSURLRequest to download 2 different types of
data (A & B)... Both of which are related to the same class so they share
delegate methods.
In my delegate, when there is an error or successful completion I need to
call one "process method" for A and a different one for B
If I use a rounded textured segmented control (the type finder uses
in its toolbar of the windows to switch between column, browser view
etc.) and fill a segment with one of the new template images like
NSListViewTemplate, then when that segment is selected the image is
nicely inverted. How
Hello,
I have a multiple-page text view, much like the one in TextEdit, except that
mine has a custom clip view that draws a shadow around the view it contains and
the page view gets different text storages swapped in and out of it (using
NSTextStorage's -addLayoutManager:). All of which makes
On Mar 9, 2008, at 2:28 PM, Nick Rogers wrote:
Hi,
I have a icon file (.icns) with 10 icons in it and i want to create
an NSImage with only the 32x32 icon from this file.
Currently I'm doing:
NSImage *anIcon = [[NSImage alloc] initWithContentsOfFile:iconPath];
which results in a very big
On 9 Mar 2008, at 19:18, Stuart Malin wrote:
Thanks Jon and Shem. I spaced out the existence of _cmd and was
unaware of __func__
As I best understand their distinction:
__func__ is generated at compile time (a C-string)
_cmd is part of the Obj-C runtime (a SEL)
Since I am
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 address of your caller. Alas, there is no
__builtin_return_symbol()
Someth
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 t
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
(long
I tried the dlsym() path, but couldn't make it work for me. I always
got back nil;
Maybe somebody else had more luck.
On Mar 9, 2008, at 5: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
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 P
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 fingerpr
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 pid
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 value
Hi,
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 window should do something in
the other progr
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 w
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/
http://boredzo.org/blog/archives/2008-01-19/n
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 on
Hi,
I'm new to Cocoa development...I've started an app that's going to be a
simple Audio Unit host. Anyway, when I start up my app, in the Run Log I
these errors
2008-03-10 02:30:08.571 StretchFix[2232] CFLog (0): CFMessagePort:
bootstrap_register(): failed 1103 (0x44f), port = 0x3103, name =
'co
On 10/03/2008, at 5:34 PM, Kevin Dixon wrote:
Hi,
I'm new to Cocoa development...I've started an app that's going to
be a
simple Audio Unit host. Anyway, when I start up my app, in the Run
Log I
these errors
2008-03-10 02:30:08.571 StretchFix[2232] CFLog (0): CFMessagePort:
bootstrap_reg
48 matches
Mail list logo