Re: Beginners question
Re: Beginners question
- Subject: Re: Beginners question
- From: kishore <email@hidden>
- Date: Fri, 4 Mar 2005 14:25:13 +0530
The method you are calling is
calend<x-tad-bigger>e</x-tad-bigger>rDate but you have to call
calend<x-tad-bigger>a</x-tad-bigger>rDate
Check the spelling of the selector.
On 03-Mar-05, at 5:33 AM, Ronald Hofmann wrote:
Hi everybody,
I am doing my first small project. Right now I´m trying to put the current date into a text field.
I connected the text field properly in IB and declared it my MyDocument.h with: IBOutlet NSTextField *dateTime;
in my MyDocument.h I have the following:
#import <Foundation/NSCalendarDate.h>
- (IBAction)awakeFromNib
{
NSCalendarDate *now;
now=[NSCalendarDate
calenderDate];
[dateTime setObjectValue:now];
}
When compiling I´m gettig this error:
2005-03-03 00:55:56.683 Downloader[522] *** +[NSCalendarDate
calenderDate]: selector not recognized
I´m confused why I receive this. Can somebody please give me a hint?
Regards, Ronald
===============
Am 03.03.2005 um 00:28 schrieb Antonio Ferraioli:
Hello,
I hope my english will be clear enough:
- I develop a program that I cannot always test directly
- remote final users help me with testing
- those user are not developers and does not have developer tools installed
on their machines
- actually they can activate a logging mode and produce
a log file containing a trace of the program execution
- this log is generated introducing a couple of NSLog calls
in many important methods ( i use some macros to do this)
the result of the macro explosion is very similar to the following
- (void) foo
{
if (gDebugging) NSLog(@"foo - Enter");
--
-- ......
-- ......
-- the method code
-- ......
-- ......
if (gDebugging) NSLog(@"foo - Exit");
}
- recently I discovered a very interesting feature of the gcc compiler
the "-finstrument-functions" compile option
activating this option force the compiler to automatically introduce
a couple of calls before entering and after exiting of all my methods
those calls are directed to the following functions:
/** According to gcc documentation: called upon function entry */
static UInt32 callDeep = 0;
void __attribute__((__no_instrument_function__))
__cyg_profile_func_enter(void *this_fn, void *call_site)
{
callDeep++;
NSLog(@"enter %p", this_fn);
}
/** According to gcc documentation: called upon function exit */
void __attribute__((__no_instrument_function__))
__cyg_profile_func_exit(void *this_fn, void *call_site)
{
NSLog(@"exit %p", this_fn);
callDeep--;
}
- this is a very interesting feature and could permit me to creare
a trace solution for my program very powerful
1) I could enable and disable tracing in a single point
without adding macros to all the methods of my program
2) I could generate a log that graphically shows nested calls
------------ enter Method One
------------------- enter Method Two
------------------- exit Method Two
------------ exit Method One
- and finally, if you are not too tired for this long description,
my question
I need some explanation on how I could use the input parameters
of the two called functions
__cyg_profile_func_enter(void *this_fn, void *call_site)
__cyg_profile_func_exit(void *this_fn, void *call_site)
the "this_fn" should (I'm not sure) be a ponter to the function/method
called between the enter and the exit __cyg... functions
I arrived to convert this address to the called function name
using the "atos" terminal command,
I'd like to know if it possible (and how) to make this conversion
directly from my tracing routines without the need to use the atos command
(my remote users does not have atos installed on their "non developer" machines)
I gave a look to the dyld(3) manual but with no success
also some information about the meaning of the call_site parameter
could be very interesting for me
thank you all fo reading all this
and eventually to help me finding a solution
sincerely
antonio
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden