An issue about @property (nonatomic, copy)

I am a fresh man in iPhone SDK development area. I write a interface Person and implement protocol
NSCopying and it can work properly. I write another interface MyTableViewController to inherit UITableViewController, and MyTableViewController has a property person, which is a declared as
@property (nonatomic, copy). The source code is something like follows:
//Person.h
@interface Person : NSObject<NSCopying>
//Person.m
- (id)copyWithZone:(NSZone *)zone
NSLog(@"copy");
//other code
@class Peson;
@interface MyTableViewController : UITableViewController
Person *person;
@property (nonatomic, copy) Person *person;
However, when I use following souce code,
Person *p2 = p1;
I can't see the log "copy" output. If I use
Person *p2 = [p1 copy];
I can see the log "copy".
Any one know what's the root cause of this issue. Thanks a lot.

laurent has half of it. The important point to remember is that you can't invoke a setter when you use direct assignment. For example, assuming p1 points to an instance of Person:
// this line just assigns the value of p1 to a second pointer, p2.
Person *p2 = p1;
// this would cause Person::copyWithZone to be invoked:
Peson *myPeson = [[Peson alloc] init];
myPeson.person = p1;
// the 2nd line above has exactly the same meaning as:
[myPeson setPerson:p1];
// assuming setPerson is @synthesized, copy is used because of the @property attribute

Similar Messages

  • Can any body send me some issues about mail sending .

    can any body send me some issues about mail sending .
    thanks alot !
    mail to :<i><b>[email protected]</b></i>

    HI
    GOOD
    GO THROUGH THIS CODE
    REPORT ZTSAPMAIL.
    DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.
    DATA: BEGIN OF X_OBJECT_HD_CHANGE.
    INCLUDE STRUCTURE SOOD1.
    DATA: END OF X_OBJECT_HD_CHANGE.
    DATA: BEGIN OF X_OBJCONT OCCURS 10.
    INCLUDE STRUCTURE SOLI.
    DATA: END OF X_OBJCONT.
    DATA: BEGIN OF X_OBJHEAD OCCURS 0.
    INCLUDE STRUCTURE SOLI.
    DATA: END OF X_OBJHEAD.
    DATA: BEGIN OF RAW_HEAD.
    INCLUDE STRUCTURE SORH.
    DATA: END OF RAW_HEAD.
    DATA: BEGIN OF X_RECEIVERS OCCURS 0.
    INCLUDE STRUCTURE SOOS1.
    DATA: END OF X_RECEIVERS.
    PARAMETERS: RECEIVER LIKE X_RECEIVERS-RECNAM. " Name
    *BUILD MESSAGE HEADER
    MOVE 'Sort field goes here' TO X_OBJECT_HD_CHANGE-OBJSRT. " Sort field
    MOVE 'Name of the object goes here' TO X_OBJECT_HD_CHANGE-OBJNAM. " Name
    MOVE 'Document title goes here' TO X_OBJECT_HD_CHANGE-OBJDES. " Title
    MOVE 'F' TO X_OBJECT_HD_CHANGE-OBJSNS. " Functional OBJECT
    MOVE 'E' TO X_OBJECT_HD_CHANGE-OBJLA. " Language
    Object type of the new document
    MOVE 'RAW' TO X_OBJECT_TYPE.
    CLEAR X_OBJCONT.
    MOVE 'Contents of mail' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    CLEAR X_OBJCONT-LINE. APPEND X_OBJCONT.
    MOVE 'More contents' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    MOVE 'Still more contents'
    to x_objcont-line.
    APPEND X_OBJCONT.
    MOVE ' ' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    Specific header (Dependent on the object type, here RAW)
    REFRESH X_OBJHEAD.
    DESCRIBE TABLE X_OBJCONT LINES RAW_HEAD-RAWSIZ.
    MOVE RAW_HEAD TO X_OBJHEAD.
    APPEND X_OBJHEAD.
    *RECEIVERS table
    CLEAR X_RECEIVERS.
    REFRESH X_RECEIVERS.
    MOVE RECEIVER TO X_RECEIVERS-RECNAM. " Name
    MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type
    MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
    MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
    APPEND X_RECEIVERS.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    folder_id = 'OUTBOX'
    forwarder = x_forwarder
    object_fl_change = x_object_fl_change
    OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE
    object_id = x_object_id
    OBJECT_TYPE = X_OBJECT_TYPE
    OUTBOX_FLAG = 'X'
    OWNER = SY-UNAME
    store_flag = x_store_flag
    importing
    object_id_new = x_object_id_new
    sent_to_all = x_sent_to_all "May need to use
    TABLES
    OBJCONT = X_OBJCONT
    OBJHEAD = X_OBJHEAD
    objpara = x_objpara
    objparb = x_objparb
    RECEIVERS = X_RECEIVERS.
    Firstly SAP Mail
    A SAP mail is a mail internal to the SAP system. It is a very good forum to exchange information with other users. Using a SAP mail in ABAP code facilitates exchange of automatic messages at various stages of the business process. It is easy to use and saves many hassles involved in using workflows for exchanging messages.
    The ABAP code to send a sap mail is built around the FM SO_OBJECT_SEND which has the following pattern.
    call function 'SO_OBJECT_SEND'
    exporting
    EXTERN_ADDRESS = ' '
    FOLDER_ID = ' '
    FORWARDER = ' '
    OBJECT_FL_CHANGE = ' '
    OBJECT_HD_CHANGE = ' '
    OBJECT_ID = ' '
    OBJECT_TYPE = ' '
    OUTBOX_FLAG = ' '
    OWNER = ' '
    STORE_FLAG = ' '
    DELETE_FLAG = ' '
    SENDER = ' '
    CHECK_ALREADY_SENT = ' '
    importing
    object_id_new =
    sent_to_all =
    tables
    OBJCONT =
    OBJHEAD =
    OBJPARA =
    OBJPARB =
    receivers =
    PACKING_LIST =
    ATT_CONT =
    ATT_HEAD =
    NOTE_TEXT =
    exceptions
    active_user_not_exist = 1
    communication_failure = 2
    component_not_available = 3
    folder_not_exist = 4
    folder_no_authorization = 5
    forwarder_not_exist = 6
    note_not_exist = 7
    object_not_exist = 8
    object_not_sent = 9
    object_no_authorization = 10
    object_type_not_exist = 11
    operation_no_authorization = 12
    owner_not_exist = 13
    parameter_error = 14
    substitute_not_active = 15
    substitute_not_defined = 16
    system_failure = 17
    too_much_receivers = 18
    user_not_exist = 19
    x_error = 20
    others = 21.
    THANKS
    MRUTYUN

  • Issue about web analysis

    Hi guys,
    I am facing an issue about Web Analysis. When I use the version pre-9, I can access web analysis directly with html client or java client.Then I set each user with each POV. Now I am using EPM11, I can just access web analysis by workspace.Then if I would like to access java client, I click Tools->links->web analysis studio. While I access html client by clicking explore in the workspace toolbar. However, if the user doesn't belong to admin group, I can't find the explore toolbar. Then I can't access html client. As we know, not all web analysis users should be admin users. This issue puzzles me very much. Is there someone who can give some good suggestions? Thanks a lot.

    The user needs the 'Explorer' role to see the 'Explore' button. The user does not need admin privs for this.
    To access Web Analysis Studio directly, go to http://<server-name>:19000/WebAnalysis/WebAnalysis.jsp or http://<server-name>:16000/WebAnalysis/WebAnalysis.jsp.
    G'luck
    Andy

  • Issue about IDoc Adapter Receiver Channel's Performance

    Hi Everyone,
    Currently, I am working on a scenario of File -Integration Process - IDoc in XI 3.0 with patch level 16. The scenario works fine when it process one/two/three files in parallel, and the IDocs arrive R/3 system quite fast. But when I try four files in parallel, the whole XI server blocks, I can not do anything even logon Integration Builder, and the IDocs arrive R/3 brokenly, sometime with the invterval to 10 minutes. When the XI comes back, I found all the four integration processes finish successfully and each transaction works fine and fast. What's more, after I change the IDoc Adapter receiver channel to a File Adapter receiver channel, it works fine for even 20 files in parallel. So I think it is some issue about IDoc Adapter receiver channel. Does anyone have the same experience as me? Any comments will be appreciate.
    Regards,
    Nick

    Hi Nick,
    Can you check this Blog-
    /people/sreekanth.babu2/blog/2005/01/05/delayed-xi-message-processing
    May be useful.
    How are you picking the files .. You can try with EOIO options while picking the file.
    But if you use BPM, it is not applicable. It will act as a EO only.
    Check this SAP Note- 833740
    Thanks,
    Moorthy

  • Any known issue about running Swing application in WTS?

    *{color:#0000ff}Is there any known issue about running Swing Application in Windows Terminal Server?{color}*
    It is started using JWS from internet (I mean, it checks if there is an avaiable update and updates or just fun).
    _*{color:#800000}+The problem is that just one machine can open the application at the same time+*_
    _*{color}*_
    *{color:#666699}Is there any config in java or jws to run properly several instances of the application (terminal clients)?{color}*
    Edited by: Franzisk on Sep 24, 2007 6:16 PM

    876587 wrote:
    ... and that cause the other threads cannot access the JNI. The same application works fine on other Solaris 10 machines.
    Different environments mean just that. So something could be causing it outside java.
    Additionally if anything at all is different in the execution data, such as even a name having a different size, then it would change the execution path.
    Which would cause a problem in the JNI code to manifest itself on only one box. Probably isn't a pointer bug but all sorts of odd behavior can result from that.

  • Issues about Windows Azure Active Directory

    issues about Windows Azure Active Directory

    Hello,
    Microsoft Azure forums are over here:
    http://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?category=windowsazureplatform%2Cazuremarketplace%2Cwindowsazureplatformctp
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?&lt;=\G.{2})'|%{if($_){[char][int]&quot;0x$_&quot;}})

  • A very urgent deployment issue about DBAdapter

    Hello All,
    I have a very urgent deployment issue about DBAdapter.
    That DBAdapter is connect to DB2 AS400 Database. I have a developing database (jdbc:as400://server01/TEST) and a production database (jdbc:as400://server01/PROD).
    During developing, I used DBAdapter wizard to create it, and import some tables, and set the Adapter to use jabc/DB2DS as connection information for easily deployment later.
    Then I deploy to Production. I configured Data-source.xml and oc4j-ra.xml rightly; I set DB connection point to production database. But the DBAdapter still write into developing Database.
    I checked the DBAdapter, the imported tables are something like this, TEST.table1, TEST.table2. And there are a lot "TEST" located in DB2Writer_toplink_mapping.xml, DB2Writer.xml, TEST.schema, DB2Writer.table1.ClassDescriptor.xml.
    This TEST is refrer to the TEST in connect String jdbc:as400://server01/TEST.
    I think this might be the reason cause the problem. As to production database, "TEST" should replaced by "PROD". If I changed it manually, I have to change every time when switch between TEST and PROD. And I also don't know if it is safe to do it? (I tried, and bring some toplink mapping problem)
    By the way, for Oracle Database, because we use 2 instances for testing and production with same schema name, and do not have this issue.
    Anyone could help and many thanks.
    Kerr
    Message was edited by:
    Kerr

    Hi Kerr,
    The idea is to set up all connections in the BPEL or ESB services with logical names, e.g. typically of the form eis/DB/MyFinancialSystem or eis/DB/MyLogisticsSystem. This way, you do not have to modify code when deploying it onto different environments that serve different purposes.
    When moving your services through their lifecyle, on every environment you deploy these to you will have the same logical connections configured on each instance, e.g. for DEV, QA, SIT, UAT and PROD. Only, in case of QA the actual physical connection is configured to point to the QA instance of the systems that your services interact with whereas in case of UAT it points to the UAT instance of the same system.
    Maybe your problem is caused by connecting as user "SomeUser" when running the DB Adapter wizard during development and actually selecting objects from a different schema than you used to connect with, e.g. "Test" in your case.
    Hth,
    Sjoerd

  • What is about remote client copy?

    hi
    pls send me about remote client copy
    regards,
    jana

    Hi All,
        This is the web site that is built to help the consultant who is having problem in implimentation, support & while practice. But you are playing is this to gain point Both the reddy. from morning you ask the query & other on replays. this in not fair.
    Stop this things immediatly.
    pherasath

  • Issues about Asus

    In my previous messages, I mentioned that I was planning on buying an Asus Gaming computer (Asus G75). However, I've been reading some issues about these notebooks recently. Few of them are like unworking (is there such a word??) touchpads, freezes and shutdowns etc. What are your oppininon about the brand Asus? Spending that much money and not getting it back..does it sound familiar with Asus? Or is it only 1% of Asus users complaining about their faulty notebooks and I've been reading them? Thanks for helping

    As a computer builder of 10+ years, I swear by ASUS.
    As B&P said, there's going to be bad apples in any manufacturing process.
    You also have to take complaints with a grain of salt; someone with a laptop without issues isn't really going to go out of their way to make a post/statement about it.
    If you like my post, or solution to your issue/question, go ahead and click on the little star by my name and/or accept the post as the Solution. It makes me happy.
    I'm NOT an employee of Best Buy, or Geek Squad, though I did work as an Agent for a year 5 years ago. None of my posts are to be taken as the official stance that Best Buy will take on your situation. My advice is just that, advice.
    Unfortunately, that's the bad luck of any electronic, there's going to be bad Apples... wait that's a horrible pun.

  • Issues about seniority

    Dear experts!
    Now I'm getting some issues about seniority.
    - The first, I want to get number of months that employee work since employee started working in the company.
    - Second, I want to move the value to wage type.
    How do I do?
    Help me, please.
    Regards Huy!

    first one
    Check if there is any  FM is there
    or else u can check with the Stadrad report of employee Entry and Leveig report
    second one
    wht value u want to move the wage type can u be some more clear

  • 3 issues about material determination

    Hello Gurus,
          there are 3 issues about material determination , I don't know how and wher to configure them .
       (1)  I want to choose whether or not you want to re-run material determination when the delivery is
    created.
      (2)  I want use the some attributes in the material and customer master records to exclude a
    particular material from product selection. This means, for example, that all the materials that have
    been rejected in the customer master will not be included by the system when it determines a
    substitution material.
    (3) I want to deal with shortfall cases (in which only the available quantity is confirmed, and it is less than the order quantity) by passing the shortfall quantity on to materials planning. In this case, an additional sub-item is generated with a specifically defined material.
    thanks very much!

    (1) I want to choose whether or not you want to re-run material determination when the delivery is
    created.
    hi no need to re run the material determination
    (2) I want use the some attributes in the material and customer master records to exclude a
    particular material from product selection. This means, for example, that all the materials that have
    been rejected in the customer master will not be included by the system when it determines a
    substitution material.
    hi in this case i thing this is related to listing and exclusin (for more info in search of sdn type listing and exclusion)
    (3) I want to deal with shortfall cases (in which only the available quantity is confirmed, and it is less than the order quantity) by passing the shortfall quantity on to materials planning. In this case, an additional sub-item is generated with a specifically defined material.
    this is possible by activating availability check and TOR transfer of requirement (for more info in search of sdn type availability check and TOR )

  • Where do we post issues about bad apple customer support

    where do we post issues about bad apple customer support?

    Well, these are user-to-user forums. I'm not sure that posting complaints about Apple customer support here would be a) productive (what can we really do?) and b) acceptable under the terms of use, though I'm not sure. My inclination would be to write a letter directly to Apple. Even in this email age, "real" letters seem to command more attention.
    Best of luck.

  • I have some issue about FaultHandling for polling

    I have Some Issue about Faults Handling for Polling.
    In Order to inserting to Table in My DB, I did use BindingFaults After Polling,
    Consider of Performance, I did not use Merge so that Created Variables did have no element.
    Conclusively, Can I use BindingFaults in Any Polling Strategy ?

    sunil j --
    You have erroneously posted your question in a user forum dedicated to Project Online, an enterprise project management application.  I would recommend that you repost your question in a more relevant user forum.  Hope this helps.
    Dale A. Howard [MVP]

  • Any issue about Apple Bluetooth mouse ???

    Hello there
    I was reading so many issues about the Apple Bluetooth mouse in the Apple Store page for this item.
    I was reading it because i want to change my Kensington PilotMouse for the Apple mouse. Actually i have so many issues with the PilotMouse, like the lately wake up on the sytem startup, battery eater and so many times work in slowly way.
    I don't want nothing of this with the Apple mouse and i read all of this in the feedback pages. I love the 3 buttoms from the PilotMouse but i prefer the technically "no problem way" from Apple.
    Any of you know any issue about the Apple Bluetooth mouse (before go to store for one) ???
    I have a good experience with the Apple Bluetooth keyboard (i have one), but i don't know nothing about the mouse.
    Thanks for any recommendations or comment about this item.

    Hello junihh:
    I use one myself and it has performed flawlessly. I have no other data except my personal experience.
    If you scan this forum, you will find posts about problems. Those are not representative - only people with problems post.
    Barry

  • Any known issues about ISA B2C website?

    Hello,
    Are there any known issues about ISA B2C website? I am trying to create a new user account & Country field is not getting populated. So even if I enter all the information, it gives error "Make an entry in all fields where required ".
    Please help.
    Thanks,
    Harsha

    i've tried to reset the phone as well, by shutting it off and turning it back on.
    This is a Restart, not a Reset. A reset is pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    someone i know also has the same issue
    Maybe an ATT issue?
    Other options...
    -Reseat SIM card
    -Get a new SIM card

Maybe you are looking for

  • IPhone 4 will not charge from wall... help!

    I've had my iPhone 4 for going on two years and never had any major issues with it. As of the last couple days, I'm having a major problem charging my phone. In the beginning, it wouldn't charge from the wall or via USB on my laptop. However, it woul

  • FLASH CMS websites - secured pages

    Hi, I’m looking for a way to build FLASH websites, which the user will be able to edit and control its content himself. You know, a CMS website, but then totally build in FLASH. I already started Googling on this a bit and came across these 2 things

  • Source system settings DB Connect

    trying to change the IP settings for source system get message :Source system default settings are maximun values; input adjusted.. Source system is DB connect, any idea how can change settings? It is correctly in BW : sbiw and spro set to correct le

  • The control chart in the sampling method does not match the insp. char. Mes

    The control chart in the sampling method does not match the insp. char. Message no. QD240 how solve?????

  • Ownership: Group hierarchy

    Dear all, I'm looking for examples and concepts how to set up hierarchies with several levels and relation between the subsidiaries in the ownership application of BPC. We are using: BPC 7.5 / MS / IFRS Starter Kit How can I set up a structure like t