Problems loading text to xib using plist in tableview's selected cell

I am developing an app that starts with a grouped tableview cell.  Each cell has an image, text, and description from a plist.  When a cell is chosen a xib is loaded by a view controller in the plist.  I want to load into the xib some text, an image, and a sound file that is in the plist (dict for that cell).  This way I don't have to have lots of view controllers and xibs.  I have been able to load the xib using this method but I can't get the images and text to load.  I have been able to do it when I don't have a grouped table view but when I add the grouping in the plist the connection is lost.  below is my code.  Could someone look at it and tell me where I've gone wrong, how to correct it, or another way to do what I want to do?
I know I am not calling the right array and then dictionary but I don't know how to correct this.  Help please.
//  RootViewController.h
//  TableViewPush
#import <UIKit/UIKit.h>
@interface RootViewController :  UITableViewController <UITableViewDelegate, UITableViewDataSource>  {
NSArray *tableDataSm;
@property (nonatomic, retain) NSArray *tableDataSm;
@end
//  RootViewController.m
//  TableViewPush
#import "RootViewController.h"
#import "Location One.h"
#import "HowToUseViewController.h"
#import "TableViewPushAppDelegate.h"
@implementation RootViewController
@synthesize tableDataSm;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    const NSDictionary *const row = [self rowForIndexPath:indexPath];
    NSString *wantedClassName = [row objectForKey:@"controller"];
    UIViewController *const vc = [[NSClassFromString (wantedClassName) alloc] init];
    NSLog(@"controller is -%@-", wantedClassName);
    [self.navigationController pushViewController:vc animated:YES];
    TableViewPushAppDelegate *appDelegate = ( TableViewPushAppDelegate *)[[UIApplication sharedApplication]delegate];
    appDelegate.myImage = [[NSString alloc]initWithFormat:@"%@",[[tableDataSm objectAtIndex:indexPath.row]objectForKey:@"picture"]];
NSLog(@"%@", appDelegate.myImage);
appDelegate.textView = [[NSString alloc]initWithFormat:@"%@",[[tableDataSm objectAtIndex:indexPath.row]objectForKey:@"description"]];
    [vc release];
//  TableViewPushAppDelegate.h
//  TableViewPush
#import <UIKit/UIKit.h>
@class RootViewController, HowToUseViewController;
@interface TableViewPushAppDelegate : UIViewController <UIApplicationDelegate>  {
    NSString *myImage;
    NSString *textView;
    UIWindow *window;
    UINavigationController *navigationController;
    HowToUseViewController *howToUseViewController;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet RootViewController *viewController;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@property(retain,nonatomic)NSString *myImage;
@property(retain,nonatomic)NSString *textView;
@end
//  TableViewPushAppDelegate.m
//  TableViewPush
#import "TableViewPushAppDelegate.h"
#import "RootViewController.h"
@implementation TableViewPushAppDelegate
@synthesize window;
@synthesize navigationController;
@synthesize viewController;
@synthesize myImage;
@synthesize textView;
//  Location One.h
//  TableViewPush
#import <UIKit/UIKit.h>
#import "RootViewController.h"
@interface   Location_One: UIViewController  {
    IBOutlet UIImageView *imageOne;
IBOutlet UITextView  *textViewTwo;
@property (nonatomic, retain) UITextView *textViewTwo;
@property (nonatomic, retain) UIImageView *imageOne;
@end
//  Location One.m
//  TableViewPush
#import "Location One.h"
#import "TableViewPushAppDelegate.h"
@implementation Location_One
@synthesize textViewTwo;
@synthesize imageOne;
-(id) init{
    if((self = [super initWithNibName:@"Location One" bundle:nil])){
    return self;
- (void)viewDidLoad {
       NSLog(@"InView did load");
[super viewDidLoad];
    TableViewPushAppDelegate *appDelegate = (TableViewPushAppDelegate *)[[UIApplication sharedApplication]delegate];
textViewTwo.text = [[NSString alloc] initWithFormat:@"%@", appDelegate.textView];
NSString *path = [[NSString alloc]initWithFormat:@"%@",appDelegate.myImage];
UIImage *img = [UIImage imageNamed:path];
    [imageOne setImage:img];
plist 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
     <dict>
          <key>header</key>
          <string>85710</string>
          <key>rows</key>
          <array>
               <dict>
                    <key>text</key>
                    <string>52 Glass Illusions Studio</string>
                    <key>detailText</key>
                    <string>150 S Camino Seco, #119</string>
                    <key>image</key>
                    <string>VisualFEight.png</string>
                    <key>controller</key>
                    <string>Location_One</string>
                    <key>picture</key>
                    <string>VisualOne.png</string>
                    <key>audio</key>
                    <string>AudioOne.mp3</string>
                    <key>description</key>
                    <string>TextOne</string>
               </dict>

I think you problem lies in this part.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath {
    const NSDictionary *const row = [self rowForIndexPath:indexPath];
    NSString *wantedClassName = [row objectForKey:@"controller"];
    UIViewController *const vc = [[NSClassFromString (wantedClassName) alloc] init];
    NSLog(@"controller is -%@-", wantedClassName);
    [self.navigationController pushViewController:vc animated:YES];
    TableViewPushAppDelegate *appDelegate = ( TableViewPushAppDelegate *)[[UIApplication sharedApplication]delegate];
    appDelegate.myImage = [[NSString alloc]initWithFormat:@"%@",[[tableDataSmobjectAtIndex:indexPath.row]objectForKey:@"picture"]];
NSLog(@"%@", appDelegate.myImage);
appDelegate.textView = [[NSString alloc]initWithFormat:@"%@",[[tableDataSm objectAtIndex:indexPath.row]objectForKey:@"description"]];
    [vc release];
specifically the underlined part.  does this need modifying or completely rewritten.

Similar Messages

  • Load Text and Attribute using same DataSource

    Hi,
    Is it possible to load text and attributes using same datasource? If yes than how can this be done?
    Thank you,
    CD

    Yes you are right in that case it will be an attribute , and in the report show it as display attribute. If you want to apply the text at Infoobject level,
    (1) In the change mode of Iinfoobject , check both with Master data and Text boxes , in the Master data /text tab
    (2) Make Flexible or direct update
    (3) Create 2 Infopackages one loading from ATTR data source and the other from TEXT data source respectively.
    hope it helps,

  • Problem loading text master data for one value

    Hi guru's,
    We are trying to load texts for an standard characteristic (data element : Char 30). The problem comes with characteristic value 4700112703/04/19 , all other values load correct but this one is recognized by SAP as an incorrect value. It seems, by the PSA explanation, that the / is incorrect.
    Do you know why this value is incorrect ? Is there any way to load this record to the characteristic ?
    Thanks in advance.

    Hi,
    In RSKC specify the value as ALL_CAPITAL which would allow all the necessary and SAP supported values(including /) to come into BW.
    Refer this blog for more information
    /people/sap.user72/blog/2006/07/23/invalid-characters-in-sap-bw-3x-myths-and-reality-part-2
    Regards,
    Rik

  • PDF forms have problems displaying text and only appears when the field is selected

    Hello,
    I created some pdf forms to distribute to the company clients. But we are having some people complaining about the text visibility. When they have work in team, the pdf that they receive from a third person often appears unfill or without text, the text is only visible when the field is selected. I need to find a solution for this because our company products are base on this forms.
    If there is any addition information that I should add to understand what is happening and how to fix it, I'll be happy to write it.
    In the company, we all have mac and the forms where created innitially in Adobe acrobat 9 pro, but we have now Adobe acropabt XI pro.
    The users have both Mac and Windows systems.
    Thank you,

    This is usually caused by the form being filled-in and saved by a Mac user who is using the Preview application to view the PDF. More information is here: http://kb2.adobe.com/community/publishing/885/cpsid_88564.html
    It is a good idea to inform your users that Adobe Reader (or Acrobat) should be used to work with the forms.

  • How to get applet to load text file and use it

    The applet is loaded from my site and the short text file is updated by a perl script in my cgi-bin, which is called whenever someone loads the html that loads my applet.
    The text file is just a counter string and I'd like to use it to display #.gif's at a certain place on the applet window (no problem there if I can get the text file into the applet).
    How would I get the applet to load the text file into a string or array?
    It has a running thread and I'd like it to update it periodically.

    I believe you can do that with Class.getResourceAsStream.
    Or you can do it explicitly with java.net.* stuff.

  • Problem loading a schema document using Java XDK

    I have an XSD file which I am attaching a portion of at the end
    of this message. If I use
    xmlns="http://www.w3.org/1999/XMLSchema" it will not recognize
    the "simpleContent" tag because I assume it did not exist in
    this version.
    If I use "http://www.w3.org/2000/10/XMLSchema" I get an error
    saying that I have an invalid reference file. If I use
    "http://www.w3.org/2001/XMLSchema" then it doesn't recognize any
    "element" tag.
    I'm trying to load the schema document with:
    (XMLSchema)builder.build(URL)
    Thanks for your help.
    <?xml version="1.0"?>
    <schema targetNamespace="http://www.example.com/component"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:c="http://www.example.com/component"
    elementFormDefault="qualified">
    <element name="component">
    <complexType>
    <element name="general_info" type="c:general_infoType"/>
    <element name="protocol" type="c:protocolType"/>
    <element name="security" type="c:securityType"/>
    <attribute name="id" type="ID"/>
    </complexType>
    </element>
    <element name="architecture" type="string"/>
    <element name="city" type="string"/>
    <element name="comp_name" type="string"/>
    <element name="domain" type="string"/>
    <element name="email" type="string"/>
    <element name="framework" type="string"/>
    <element name="function" type="string"/>
    <element name="keyword" type="string"/>
    <element name="language" type="string"/>
    <element name="licensing" type="string"/>
    <element name="p_version" type="string"/>
    <element name="phone_no" type="string"/>
    <element name="platform" type="string"/>
    <element name="protocol" type="string"/>
    <element name="provider_name" type="string"/>
    <element name="primary_cat" type="string"/>
    <element name="secondary_cat" type="string"/>
    <element name="std" type="string"/>
    <element name="standard_name" type="string"/>
    <element name="state" type="string"/>
    <element name="street_addr" type="string"/>
    <element name="url" type="string"/>
    <element name="vendor_name" type="string"/>
    <element name="version" type="string"/>
    <element name="zip_code" type="string"/>
    <complexType name="general_infoType">
    <element ref="c:comp_name"/>
    <element ref="c:version"/>
    <element name="vendor" type="c:vendorType"/>
    <element name="compatibility" type="c:compatibilityType"/>
    <element name="categories" type="c:categoriesType"/>
    <element ref="c:function" maxOccurs="unbounded"/>
    <element ref="c:domain"/>
    <element name="keywords" type="c:keywordsType"/>
    <element ref="c:licensing"/>
    <element name="sys_req" type="c:sys_reqType"/>
    </complexType>
    <... It continues ...>

    Which version of XDK are you using? I'am using XDK 9.0.2B and I
    can't reproduce the problem.

  • Problem loading text books

    I know its probably deeply unfashionable but I want to read books on my ipod
    I have downloaded some text books and I have loaded them into the notes section on my ipod but the full text is not available I get the introduction and a bit of the first chapter then it stops mid sentence.
    Does anyone know what I am doing wrong.
    Thanx
    sony vaio   Windows XP  

    Probably nothing. The iPod can only display the first 4kb of text as explained here.
    http://docs.info.apple.com/article.html?artnum=93850

  • Loading Text Datatype account members using rule file

    Hi,
    I have seen some blogs but still having the issue to load the text data type value to my Planning application.
    I am using EPM 11.1.2.1, my planning application has 3 plan type including workforce where i have few attributes of employee(position, role,location etc) free text input using planning webform. so i define those account members as Text data type.
    Note: we don't have ODI or any other tool used for metadata or Data loading.
    I am using **Outline Load utility** to refresh my dimension , do we have a way to load text data type using load rule. i tried using Load rule and getting following error
    \\ Invalid number in data column
    "010"     "1000"     "Budget"     "Draft1"     "Local" "Hsp_InputValue"     "Jan"     "Fong, Siu Lung (Felix), 4"     "FY12"     "sr sft eng"     "testing test"
    please guide me if any other way to load the text data i am getting in the employee file.
    -KK

    You can use the outline load utility to load data, there are examples available at http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_admin/ch05s02s01.html
    If you are trying to load using an essbase rules file then you will experience issues trying to load text to essbase, essbase only stores a numeric value for planning text data and it is the planning relational database that stores the text value, this is why the outline load utility would be better to use.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • BI 7.0 : Error in loading text of a Master Data with a data source time dep

    I have a problem loading text from the data source(time dep) to the Master Data.
    For instance if the Data Source 0EVALGROUP1_TEXT is time dependent as there are the fields DATETO and DATEFROM, while i create the transformation these 2 fileds does not have any target fields. After i create the infopackage and execute it to load into the PSA, i have a error message : the message says "An error occurred in the source system."and "The error occurred in Extractor "; and the PSA is empty.
    Can anyone tell me if there is an OSS note to apply for this kind of problem, actually we are running under SAPKW70015 SAP_BW.
    Thanks for your help.

    Hi,
    Pl try the below
    The l_dta data target that you want to load is an InfoObject (master data or text
    table).
    You must declare this for the InfoProvider in Transaction RSD1.
    You do this on the 'Master Data/Text' tab by assigning any InfoArea to the InfoObject.
    The InfoProvider (that is, this InfoObject) is then displayed below this InfoArea in
    the InfoProvider tree.
    Rregards,
    Senthil

  • Problem displaying dynamically loaded text in Flash CS3

    I created a Flash CS3 application that does not display
    dynamically loaded text (from internal AS3 scripts) on 3/6 of my
    client's computers. All computers run IE 6 and Flash Player 9. I
    cannot replicate the problem on any computer in my department. The
    problem seems to be related to Flash Player 9 or a browser
    setting/IT restriction. Has anyone encountered this? If so, have
    you found a solution?
    If I cannot find a solution, then I will need to almost
    completely redo the application.
    One slightly insane idea I have considered is to, if
    possible, convert dynamically loaded text to an image real-time. Is
    that possible?
    Btw, I have created a font in my library. Should I try
    manually embedding the font from the Properties menu and selecting
    all characters?
    Thanks in advance.

    yes, even though you may be using a font from the library,
    you still have to specify that each text field that uses that font
    embeds the font, and you'll need to select all characters(well not
    all, unless you require all the different scripts of the world -
    upper-case, lower-case, numerals and punctuation usual suffices).
    I bet if you checked, the computers where the font did not
    appear did not have the font on their system.
    Good luck
    Craig

  • Problem – loading HTMLtext from a text file

    Problem – loading HTMLtext from a text file
    Hi, I have a dynamic text set up to render text as HTML and I
    am loading the text into the text object by using the code below.
    var loadText:LoadVars = new LoadVars();
    loadText.load("Nyheter.txt");
    loadText.onLoad = function(success){
    if(success){
    Nyheter_txt.htmlText = this.VariabelTekst;
    The textfile looks like:
    VariabelTekst=<p align
    ="Right">(13.11.2006)</p><p><b><font
    size="12">This is the tittle</b></p><p>Here
    comes the text</p>
    It works almost fine but the first problem is that the
    paragraph text in the textfile should be written in Norwegian. This
    involves some Nordic characters. By default these characters are
    just shown as small square in the text control when running the
    flash file. If I try to enter these characters in the textbox
    “Include these characters” within the dialog for
    embedding, the text within the bold tag of the text file is not
    shown when the text is rendered. It looks as if it effect the HTML
    rendering of the text. The Nordic characters are still not showing
    but instead the small square placeholders for the characters are
    gone.
    Am I doing it wrong, or is there a work around for solving
    this problem?
    Any ideas?
    TIRislaa

    Problem – loading HTMLtext from a text file
    Hi, I have a dynamic text set up to render text as HTML and I
    am loading the text into the text object by using the code below.
    var loadText:LoadVars = new LoadVars();
    loadText.load("Nyheter.txt");
    loadText.onLoad = function(success){
    if(success){
    Nyheter_txt.htmlText = this.VariabelTekst;
    The textfile looks like:
    VariabelTekst=<p align
    ="Right">(13.11.2006)</p><p><b><font
    size="12">This is the tittle</b></p><p>Here
    comes the text</p>
    It works almost fine but the first problem is that the
    paragraph text in the textfile should be written in Norwegian. This
    involves some Nordic characters. By default these characters are
    just shown as small square in the text control when running the
    flash file. If I try to enter these characters in the textbox
    “Include these characters” within the dialog for
    embedding, the text within the bold tag of the text file is not
    shown when the text is rendered. It looks as if it effect the HTML
    rendering of the text. The Nordic characters are still not showing
    but instead the small square placeholders for the characters are
    gone.
    Am I doing it wrong, or is there a work around for solving
    this problem?
    Any ideas?
    TIRislaa

  • Loading text file with flash lite 3.0 problem

    Hello,
    I recently ran into a problem with loading a plain text file with Flash Lite 3.0.
    I know there is a way to load name/value pairs using LoadVars class or XML file using XML class. Both methods work great, but these classes parse the data loaded and I need to load just a plain text - no pairs or xml structure. (its because Im loading specific file format, so I can't make any changes to it)
    There is a simple way how to achieve this in Flash using Actionscript 2 by extending the LoadVars class and overriding the onData() method. I used it plenty of times and it works fine.
    There is an example of implementation:
    // the PlainData.as file
    class PlainData extends LoadVars {
        function onData(str) {
            trace(str)
            this.onLoad(true);
    // now in the main file
    var my_data:PlainData = new PlainData();
    my_data.load("my3dmodel.obj");
    This code traces unchanged content of my3dmodel.obj file.
    The problem comes when I try to run this code using Flash Lite 3.0. The code stops working just by changing player version in publish settings to Flash Lite 3.0. It doesnt display any error, but also doesnt trace any content.
    Is there a reason why you cant override onData method in LoadVars class in lite version of flash or am I doing something wrong?
    (also overriding onLoad() method works fine in Flash Lite)
    Ondrej

    Thanks Man
    But i m very unhappy !!! :-(
    1M data to transfer my mp3 files is very small !!! hehehe
    Thanks a lot
    See ya
    Carlos Eduardo Burko - Curitiba - Brazil - Macromedia
    Certified Professional
    "biskero" <[email protected]> escreveu na
    mensagem
    news:e98nrb$a6e$[email protected]..
    > Ciao Carlos,
    >
    > yes you can load mp3. The only issue is that the FL2
    will need to load the
    > entire mp3 in memory which mean you are limited to the
    avalable memory and
    > also
    > there is a limitation of 1M data transfer.
    > Try to create a sample application to test it. You need
    to use the
    > loadSound
    > API.
    >
    > Alessandro
    >

  • Amazon website does not load properly. Text only. Using Windows XP. Cache clearing does not work.

    The amazon.com website will only load text, although it does load an occasional image. I am using windows xp, firefox version 8.0

    See High contrast schemes:
    * http://www.microsoft.com/enable/products/windowsxp/default.aspx
    Reload web page(s) and bypass the cache.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Cmd + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode

  • Cannot directly open the browser from the icon. "problem loading webpage" and "timed out" are the messages. Access was accomplished by using yahoo messenger and opening my email. if I attempt to open a new page, I recieve the aforementioned warnings.

    no link to open access to the internet. I used Yahoo Messenger, clicked on the 'mail icon' and since Firefox is my default it opened and I was able to continue from there. If I try to click File, open New Page, I get the "problem loading webpage" and "connection timed out" messages

    changed my homepage to Yahoo. Now Firrefox works but still cannot access ANYTHING 'Google"!

  • Since itunes and apple tvs latest update I have had problem wtching movies on apple tv via my itunes can any one help, movie takes a very long time to load sometimes never, it use to work really well, whats going on please help?

    Since itunes and apple tvs latest update I have had problem wtching movies on apple tv via my itunes can any one help, movie takes a very long time to load sometimes never, it use to work really well, whats going on please help?

    You might find useful information in item D1 of Time Machine Troubleshooting.

Maybe you are looking for

  • USB Card Reader no longer works after Lion update.

    My USB card reader/writers no loger work since I "upgraded" to Lion 10.7.4. All was well with Snow Leopard, but with no built-in SD card reader I must rely on USB readers. Anyone know how to fix this issue? Are there updates avaiable or coming soon t

  • Wifi connection drops down. [SOLVED]

    Hi, I'm having some issues with the wifi, in my notebook lenovo b5070. The main problem is that the connection drops down after 20, 30 minutes. I tried to change from NetworkManager to Wicd, but that didn't change anything. I also tried to create a p

  • How can i smooth my graph?

    hello guys. i want to smooth out my graph so i can distinguish big peaks (pitches) in it from other spurious smaller peaks.how can i do that?is there a way to make it more visual easy for someone to see the big peaks or to emphasize even more the big

  • Restore windows error, restore windows error

    Hi. My Finder keeps coming up with the message "The application "Finder" unexpectedly quit while trying to restore its windows" and it gives me the option to restore the windows. Whether I chose to restore or not, nothing happens. The screen keeps fl

  • Pairing iphone 3G with bluetooth Plantronics voyager PLT 510

    Hello! This is my problem: I have a bt. headset Plantronics voyager 510 which I want to use with my IPhone 3G. I make my headset discoverable, my phone recognize it, and with no code, I can use (talk). All time when bluetooth is "on" my IPhone keep s