Where did my object go? :(

I'm having a bit of trouble passing an object from one view to the next and I was really hoping someone could give me a hand.
I am using a table view that when an item is clicked, an object is passed to the next view based on the selected item. When the user clicks an object I retrieve the appropriate object for that row and then set the item property of the view controller they are being sent to:
iPhoneHelloWorldAppDelegate *appDelegate = (iPhoneHelloWorldAppDelegate *)[[UIApplication sharedApplication] delegate];
Item *item = (Item *)[appDelegate.items objectAtIndex:indexPath.row];
if(self.itemView == nil) {
ItemViewController *viewController = [[ItemViewController alloc] initWithNibName:@"ItemViewController" bundle:[NSBundle mainBundle]];
self.itemView = viewController;
[viewController release];
[self.itemView setItem: item]; *// ITEM IS SET HERE FOR NEXT VIEW*
[self.navigationController pushViewController:self.itemView animated:YES];
self.itemView.title = [item itemName];
If I step through the code and go to the line after the Item property is set I can call self.itemView.item and the correct object is returned to me. However, after the view is pushed if I stop the debugger in viewDidLoad of ItemViewController, the item property is now nil.
My item property is defined as follows in the ItemViewController.h:
@property (nonatomic, retain) IBOutlet Item *item;
So what I want to know is... where did my item go after I set it and pushed the view to current?
P.S. Why do these forums completely destroy source code...

My mistake, I misunderstood what you had said about how to format it.
I did some further tests to check the integrity of my object. In my item object's constructor I initialized a string with a random number in it. Stepping through I found that the constructor is only getting hit once, but even so by the time my object reaches the ItemViewController all of its fields have been nulled. Could someone show me how to manually implement my properties so that they are not generated for me? I'd like to slap some breakpoints in the setters to see if I can get a better feel for what's going on.
RootViewController.m (excerpt)
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Navigation logic -- create and push a new view controller
iPhoneHelloWorldAppDelegate *appDelegate = (iPhoneHelloWorldAppDelegate *)[[UIApplication sharedApplication] delegate];
Item *item = (Item *)[appDelegate.items objectAtIndex:indexPath.row];
if(self.itemView == nil) {
ItemViewController *viewController = [[ItemViewController alloc] initWithNibName:@"ItemViewController" bundle:[NSBundle mainBundle]];
self.itemView = viewController;
[viewController release];
[self.itemView setItem: item]; // self.itemView.item is always nil. even when item is not
[self.navigationController pushViewController:self.itemView animated:YES];
self.itemView.title = [item itemName];
//[item release];
//[self.itemView.itemDescription setText:[item itemDescription]]; // This call works fine.
ItemViewController.h
@interface ItemViewController : UIViewController {
IBOutlet UITextView *itemDescription;
Item *item;
SellViewController *sellView;
NSString *unique;
@property (nonatomic, retain) IBOutlet UITextView *itemDescription;
@property (nonatomic, retain) IBOutlet Item *item;
@property (nonatomic, retain) SellViewController *sellView;
@property (readwrite, assign) NSString *unique;
-(IBAction) sellItem : (id)sender;
@end
Item.h
@interface Item : NSObject {
NSString *itemName;
NSString *itemDescription;
int *itemPrice;
NSString *unique;
@property (nonatomic, retain) NSString *itemName;
@property (nonatomic, copy) NSString *itemDescription;
@property (readwrite, assign) int *itemPrice;
@property (nonatomic, retain) NSString *unique;
-(id)initWithName:(NSString*)name description:(NSString*)desc price:(int*)price;

Similar Messages

  • Where did the object guides go?

    I just upgraded to CS5 (from CS3) and one of the things I really liked was that in placing an object on a page there would appear guides showing me if it was centered or not. For some reason today, that has disappeared and I can't figure out how to get it back. Perhaps I somehow turned it off but don't know how.
    Any ideas?

    You've probably turned off the smart guides.  Go View > Grids & Guides > Smart Guides, or Ctrl + U.

  • Where did the History Column checkbox go?

    I am using jdeveloper 11g release 11.1.2.2.0.
    I was working through some of the storefront demo and the the instructions said.
    Open the Entity Object, Click the Attributes Tab, Select the History Column check box.
    I am unable to find a History Column check box on this version. where did it go?

    I think it is called Track Change History now - a drop down list.
    You can also look for it in the property inspector window.

  • Chose 'Export to Shared Services' on a calc script....where did it go?

    I accidentally right-click and choose 'Export to Shared Services' on a Calc script in EAS.
    the help file is not much...I am curious...where did this export to in Shared Services? What is the point of this feature?
    Thanks
    JTS

    Hi,
    I think it was Hyperion's original idea to share objects between applications which were known as models, so you could export outlines and calc scripts to shared services and then shared them across applications or to synchronize different applications.
    It is something that I have never seen really used and I am sure it was dropped after 9.2, though the option still existed to export in EAS but you couldn't manage models in 9.3
    I think it has all be superseeded with concepts like EPMA and LCM.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • New openbox! Where did my settings go?

    Ok now i am realy pissed.. I updated openbox, and now all of my settings has been ereased.. The theme is changed.. The menuitems is gone!
    No of the keyboard shortcuts works.. I cant start obconf.. I cant start the menu editor.. I cant open terminals.. Also my sweat traybar is also fucked..
    Where did my old settings go?
    *Trying a restart now*
    EDIT: It didnt help to restart.. Now firefox is the only thing working OK.. But the theme in firefox is changed too!
    WTF is going on! :evil:
    Can i revert to my old settings?
    EDIT2:
    Installing firefox again helped a bit. Now i can use firefox!
    If i could start obconf i may fix the rest without help..
    Getting this error:
    obconf: error while loading shared libraries: libobrender.so.1: cannot open shared object file: No such file or directory

    Oh yeah! Thank you all *waves bye to windows*
    Now.. How do I get the play - next - prevous - stop - volume buttons to work? And how do I see the "name" of the key? I remember it was a command with 3 letters or something.
    I know they are something like F13-F14-F15 and so on. But I wanna be sure

  • HP LaserJet Enterprise 500 551dn - where did the drivers go?

    I go to the download page to download the drivers for this 551dn.  I download all windows 7, 8, 8.1, 2008, 2012, so that i can put them on my print server.  I downloaded them from here..
    <http>//h20564.www2.hp.com/hpsc/swd/public/readIndex?sp4ts.oid=5081348&lang=en&lang=en&cc=lamerica_n...
    when i get the file, lets say for windows 7/64bit, i choose...
    HP LaserJet Enterprise 500 color M551 Printer Series PCL6 Print Driver (no Installer) 61.130.04.12834
    24 Sep 2014 21.3
    I get the file downloaded (LJEnt-color-M551-Drv-no-installer_12297.exe), i run it, get the security warning and Run.  the file extracts - then POOF, the installer is gone.
    where did the files go?  They aren't on the root of the C: drive, a folder/files were not created on my desktop, no files or folder created in my downloads folder.
    I was never asked for a file save location.... ???  really?   is this this basic stuff? 
    Where are the files?  this $$$ printer is a brick until i get drivers! 
    Thanks!
    Jason
    UPDATE- I FOUND THE FILES!!
    First of all, HP... i'm not impressed.
    All the files for all the drivers are in a series of temp folders...
    C:\Users\-myusername-\AppData\Local\Temp\3\7zS4A73
    really?
    hope this helps someone. 

    There is no change to this problem after 6 months since the last post. Put simply, and as stated in the previous posts, there is no way to scan a document and receive the image on your PC. If you are working with graphics for any length of time or want to create an image for inclusion as an image in a document or web page using this piece of equipment will not allow you to do so.
    Great shame as every other function works well - it cannot be beyond the wit of HP to include a Windows application that enables you to scan an image, receive it in the software you are using at the time (e.g. Outlook, Word, Photoshop...) and use it in your work.
    HP Printers several years older than this £1000+ Enterprise printer were able to do this simple job and have done so for a great many years. Just being able to use Microsoft's Fax and Scan would be start.

  • HT5312 I DO remember them but Apple chose to put them in Japanese and I can not change the language on Manage my Apple ID so I do not know if I made an error ,it threw me off , it was the wrong question Where did you fly to on your first Aiplane trip ? th

    I DO remember them but Apple chose to put them in Japanese and I can not change the language on Manage my Apple ID so I do not know if I made an error ,it threw me off , it was the wrong question Where did you fly to on your first Aiplane trip ? then I was unable to enter until 8 hours then called Apple Japan 4 times each time threy asked me would you like to speak with an English speaker,I said yes then they told me sorry today is Sunday no English speakers ,but they refused to speak Japanese, then I called 5th time and a kind guy could speak English we were on 1and 1/2 hours he got me to log in but the reset key chain could not be completed still pending.
    He said do not mess with that ! then I got a text from somewhere to reset 4 pins suddenly it was very strange I said to him that I got this pin this morning but it said you can use maximum 3 hours it had a UK number and I told him I do not like this and will not enter the code he said do not do it if it is from the UK and then I said to him ok you did a lot to help but we can not go any further ! and we cut of I went back to my computer to re do the ID but I found everything a mess so I call and a stupid sounding Japanese women with a squeaky voice came on I was calm at first and they want your phone number your IMEI number your iPhone serial number date of birth Address email address it takes 10 munutes to check then they ask what are you caling about so I try to explain my keychain is broken or problems with language security questions and can not change my pasword because the security question have failed me so it is ONE BIG HEADACHE AND I START I GET STRESSED she says Do want an ENGLISH speaker ,I say yes ,that guy i talked to earlier but I never got his name and first time I ever talked to him but they said he is not here so I said ok and then she said today is sunday so call back in the morning ,I said ,well ok in Japanese but they make you feel stupid because they do not want to speak Jap@anese with none natives and they are to busy,And they feel that I should not bother them ,then I say that Apple Japan is trying to refuse Apple foreign customers and then she wants to hang up and ask me to visit the shop ,but they are the same I have a very bad time with Apple Japan since they do not discuss software problems or security with customer meaning if you have a problem they ask you to come on a time 20 minutes max so they do hardware test and say you phone is fine then I say no I can not reset my ID they say you must call call centre so I am going around in circles ,When I call English it is usually Australia so if my problem is in Japan surely if do not want me to talk to them in Japanese and they ask me to call Australia but every time my call charge is expensive after asking them is this free because I have Apple care they say yes but when the call goes to Australia 0120 277 535 it might change to paid call so I call then I have to ask is this charging they say we can not give you that information ! so what can I do I have have been at the computer and phone all day on my day off work and in tre week I am so busy and can not use my phone I can not work without it ,this new technology for you ,they can not cope with the fact that the customer have problems yet they do not want to deal with us because they can not solve it and so it shows them to be useless they like to walk around in their cool tee shirts and retro shop but when it comes to functionality we are unwelcome they got the money so do not return because apple is perfect that nothing should go wrong .
    But it does somehow my English security answers do not work on a Japanese Question especialy if I did not choose that question I set  up the multiple choice In English and wrote the answers in English or Roman and set them langauge preferences in English, do you really think you can correctly write english name or word in Japanese they write a police patrol car  pato caa パトカア they do not have r and l .So it is my choice to make my security easy for me and as difficult for others to hack.But they also have patororoo choo meaning ' now patrolling ' so why they have pato caa patrol car and patoro patrol and have thousands of Chinese words kanji they can find patrol.
    I am getting off the topic but I am at a loss to fix this problem when they hold the keys and i have all the info to verify my ID.

    You have to enter the Apple ID and password. You are running into the Activation Lock
    iCloud: Find My iPhone Activation Lock in iOS 7
    Is there a way to find my Apple ID Name if I can't remember it?
    Yes. Visit My Apple ID and click Find your Apple ID. See Finding your Apple ID if you'd like more information.
    How do I change or recover a forgotten Apple ID Password?
    If you've forgotten your Apple ID Password or want to change it, go to My Apple ID and follow the instructions. SeeChanging your Apple ID password if you'd like more information.

  • How do I print a mirror image?  Where did the old functionality go?

    Within the last several months I was able to print a mirror image of my document to my HP DeskJet F4180 in high resolution. I don't know if it is the new HP drivers, or my new Snow Leopard OS but now I can' figure out how to do it again. I can grab a screen shot in and flip it in Preview but it ends up printing in low resolution.
    I have printed mirror images in the past from my PDF applciations and I think from Office 2008 (PowerPoint). I find no documents saved on my hard drive that come up saved as a reverse image so I suspect that I was using a printer feature not an application feature to print mirror images.
    Where did this functionality go?

    Found it!
    Use the check box marked Flip Image. Didn't is say mirror before?

  • Where did the Stream 7 drivers go?

    The support page for downloading drivers for the HP Stream 7 tablet (any model) has disappeared from the HP website.
    Navigating to the HP Stream 7 support page, Selecting "Software and Drivers", then "Go directly to software and drivers page", Operating System "Windows", then Version "Windows 8.1" (the only choices), then clicking the Update button, gives a message "No software or drivers are available for this product with the selected operating system. Please make a different selection, or visit the product homepage. " This happens using Firefox, IE 11, or Chrome.
    These drivers have been missing for at least a few weeks, and multiple forum users have also had no luck finding them. Before that time the drivers seemed to come and go randomly, but they've stayed missing now for weeks.  One dorum user has posted direct FTP links to the drivers, and they might be the latest version, but not really sure.
    Where did the drivers go, HP?

    This is for the 5701 as of a few days ago.
    http://ftp.hp.com/pub/softpaq/sp69001-69500/sp6930​7.exe
    http://ftp.hp.com/pub/softpaq/sp70001-70500/sp7027​5.exe
    http://ftp.hp.com/pub/softpaq/sp70001-70500/sp7034​0.exe
    http://ftp.hp.com/pub/softpaq/sp70001-70500/sp7033​9.exe
    http://ftp.hp.com/pub/softpaq/sp70001-70500/sp7033​7.exe
    http://ftp.hp.com/pub/softpaq/sp69001-69500/sp6930​8.exe
    http://ftp.hp.com/pub/softpaq/sp69001-69500/sp6930​5.exe
    http://ftp.hp.com/pub/softpaq/sp69001-69500/sp6930​9.exe

  • I have a wish list in my itunes on my pc but it is not on my itunes on my ipad2.  When I scroll down my movies tab it is not under quick links---- where did it go?

    I have a wish list in my itunes on my computer but i can't find it in my itunes on my ipad2.  I went to my movies tab and it is not there in my quick links.  Where did it go?  For that matter why does the itunes store/account look different on my ipad as opposed to my computer?  There is a lot of links missing from my ipad2 itunes -------

    To my knowledge, the wish list has never been in the iTunes app. It certainly isn't now. You can comment to Apple here:
    http://www.apple.com/feedback/

  • When I open iPhoto its asks me what photo library I want to use.  I already have a photo library that i've been using for 2 years, where did it go? and why am I being asked now to choose a library or "create new" what happened to all my photos?

    When I open iPhoto it asks me to choose a photo library.  I already have a libary with photos and events in it that I've been using for 2 years.  Where did it go?  What happened to all my photos

    We have no way of knowing what goes on on your machine. All we can tell is that your iPhoto library is missing and iPhoto can't find it. If you can't find then I the only thing you can do is restore from your Back Up.
    Regards
    TD

  • Can someone tell me how to find my photos?I backed up my iPhone but Photostream was not on.pictures are not on my laptop so where did they go?

    Can someone tell me how to find my photos?I backed up my iPhone but Photostream was not on.pictures are not on my laptop so where did they go?

    Welcome to the Apple Community.
    Backing up does not transfer your photos to your computer, if you don't want to enable photo stream, you will need to transfer your photos when your device is connected to your computer using iTunes.

  • I rented a movie on my iPad. It began to download but then it disappeared. The movie appears in my rented videos, but when I click it, it says, "video rented but not downloaded. Go to downloads to manage downloads". Where did my downloads go?

    I rented a movie on my iPad. It began to download but then it disappeared. I freed up a ton of storage space to make sure I had the room for it. The movie appears in my rented videos, but when I click it, it says, "video rented but not downloaded. Go to downloads to manage downloads". Where did my downloads go? I re-booted my iPad, signed off/on iTunes etc. I can't find a folder with downloadable items anywhere. ITunes just tells me, "you've already rented this video. Do you want to rent it again?" What happened to my movie?

    Did you check the Videos app?

  • HT201365 When I upgraded my iPhone 4s to IOS7, I lost all my app icons. Where did they go? Interestingly they are still listed in notifications and I could play words with friends when I got a message on the home screen that it was my turn (but still no i

    When I upgraded my iPhone 4s to IOS7, I lost all my app icons. Where did they go? Interestingly they are still listed in notifications and I could play words with friends when I got a message on the home screen that it was my turn (but still no icon)

    Hey linfrommi,
    Thanks for the question. I understand that you are having trouble locating some application after the update to iOS 7. To troubleshoot this issue, let’s reset the home screen layout of your iPhone, which should move all of your applications to the second “page”:
    Reset iPhone settings - iPhone
    http://help.apple.com/iphone/7/#/iph7a2a9399b
    Reset Home Screen Layout:  Returns the built-in apps to their original layout on the Home screen.
    Thanks,
    Matt M.

  • I can no longer find Software Update on my laptop.  Running 10.10.1.  What happened to it?  Where did it go?

    I am running 10.10.1 MacBook Pro (Retina,15-inch, Late 2013) w/ 2 GHz Intel Core i7, and can no longer find Software Update on my laptop.  It is not in the menu under the Apple logo.  It canot be found in the applications list through Preferences.
    Can someone please explain what happened to it? 
    Where did it go? 
    Why?
    Thank you!
    Storm Petrol

    The Software Update item in the Apple menu has been REPLACED by the App Store. It is still present in the system if you go to About This Mac, where you will see "Software Update..." as one of the buttons in the Overview section of the information window that appears. The difference here is that the App Store menu option will only launch the App Store's main landing page, whereas the Software Update button will launch the store and then check for any system and other updates available.

Maybe you are looking for

  • My ipod touch says no wifi what can i do to fix it

    why does my ipod touch say no wifi

  • Vendor family representation in SKU

    Hi All, I've requirement at my client where the vendor's family of products drive number of functions: It's primarily like the product hierarchy, but it is the vendor's product classification we need to capture The standard PRODH field we're using to

  • EngineGetParameters(ElGamalCi pher.java:120)

    I am doing a project which I need to encryt and decrypt a file. I downloaded the "cryptix-openpgp-20050418-snap" and used the examples. First I run the "GenerateAndWriteKey.java" which creates the public and private keys. I compile the "Encrypt.java"

  • MAC Address Vendor Codes for Apple?

    Does anyone know if there's a current list of MAC address vendor codes that have been assigned to Apple? I've found a few by searching but I'm not sure how recent they are.

  • Setting in HR infotypes for case sensitive text

    Hello - I have a custom infotype with a couple of free-text fields included within it.  Right now all text that is entered into these fields is automatically converted to upper case.  I would like to disable this feature and allow the data to be save