Search Results

Search found 2474 results on 99 pages for 'bundle'.

Page 21/99 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • RubyGem version error: activesupport(1.4.4 not = 3.0.0.beta) (Gem::LoadError)

    - by Denis
    Hello, I want to use the last version of rails, in my Gemfile: gem 'rails', '3.0.0.beta3' When trying to start my server I get this error, do you know how I can fix this issue? $rails s /Library/Ruby/Site/1.8/rubygems.rb:777:in `report_activate_error': RubyGem version error: activesupport(1.4.4 not = 3.0.0.beta) (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems.rb:211:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:246:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:245:in `each' from /Library/Ruby/Site/1.8/rubygems.rb:245:in `activate' from /Library/Ruby/Site/1.8/rubygems.rb:1056:in `gem' from /usr/bin/rails:18 bundle install return Your bundle is complete! gem list give me activesupport (3.0.0.beta3, 2.3.5, 2.2.2, 1.4.4)

    Read the article

  • how to use console use in Symfony2

    - by Elzo Valugi
    I found the console and run it like this: root@valugi-laptop:/var/www/sandbox/hello# php console Symfony version 2.0.0-DEV - hello Usage: Symfony [options] command [arguments] Options: --help -h Display this help message. --quiet -q Do not output any message. --verbose -v Increase verbosity of messages. --version -V Display this program version. --color -c Force ANSI color output. --no-interaction -n Do not ask any interactive question. --shell -s Launch the shell. Available commands: help Displays help for a command (?) list Lists commands assets :install bundle :pharize container :graphviz doctrine :generate-proxies init :application :bundle router :debug Displays current routes for an application :dump-apache But I cannot run any of those commands. I am trying like this: php console Symfony -h But I get [InvalidArgumentException] Command "Symfony" is not defined. Any suggestions?

    Read the article

  • Passenger Bundler::PathError

    - by firecall
    So I'm going around in circles with this - I'm using a fork of the Paperclip Rails gem to get it to work with Rails3. Works fine on my OSX box with Passenger. But on my server (CentOS 5) I get this this error: git://github.com/lmumar/paperclip.git (at rails3) is not checked out. Please runbundle install(Bundler::PathError)Blockquote I tried Bundle Pack, but that doesnt pack gems from github. I read a post about setting the parh to the BUNDLE_HOME in my application.rb file which I tried: ENV['BUNDLER_HOME']="~/.bundle/ruby/1.8/bundler/gems/" But that doesnt work. Any ideas anyone? I dont know what else to do and have no idea how to debug or trace the problem further :( Passenger version 2.2.11. thanks.

    Read the article

  • How to use Maven2 with Apache Sling?

    - by Jerome Baum
    Google doesn't help, neither does a stackoverflow.com search, and browsing through Apache Sling documentation doesn't show any solution so here goes: How can I best use Maven2 with Apache Sling? Basically as far as I see the entire application code will need to be placed in the JCR repository, but I need it versioned. There is some documentation about OSGi bundles that could contain resources, but isn't it kind of overkill to create a bundle with a bunch of Java code to talk to Sling when all I want to do is load some files to corresponding URLs? What I was hoping for is something like jetty:run that will automatically deploy a WAR into a new Jetty instance. Ideally the goal for Sling would run Sling and then load the specified content -- is there some Maven2 plugin for this right now? Or is the bundle-based solution the "canonical" way of doing this?

    Read the article

  • Setup Padrino with DataMapper and MySQL database

    - by Ivo Sabev
    Hello I am trying to setup a Padrino project using DataMapper and MySQL on my Mac OSX Snow Leopard. I have the necessary gems: dm-core data_objects do_mysql mysql (linked to my original Mac OSX installation) But when I try to start the padrino with PADRINO START from the console, I get the following error: /Users/ivolution/.bundle/ruby/1.9.1/gems/dm-core-0.10.2/lib/dm-core/adapters/mysql_adapter.rb:3:in `require': no such file to load -- do_mysql (LoadError) But as I said I do have do_mysql gem installed so there shouldn't be such error, I did bundle install in my project folder before trying to start Padrino. Any ideas?

    Read the article

  • Getting XText to work

    - by Calmarius
    I know you don't like helping others in their homework but I have to make an XText grammar, write a sample code that matches this grammar and compile it to a html file. The lecturer showed us the steps and everything worked for him... He said "It's so simple it will be a 10 minute work for you". And I believed that. However at home almost nothing works as expected. And of course no more lectures to go only the exam avaits me where I have to show what I done to pass. Moreover the e-mail I sent him bounced back by the mailer-demon... I got Xtext along with Eclipse IDE from the xtext website and I unpacked it and I followed the steps in the official tuturial to get the default project template to work. The tutorial is found here: http://wiki.eclipse.org/Xtext/GettingStarted Now I'm at the step "Model". It says open the "MyModel.mydsl" I do that but the editor does not opened. It said: "Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml." Since everything is generated, the error message does not helped me... There was an option to look at the stack trace (it was mile long) and on the top of it there was an exception: java.lang.IllegalStateException: The bundle has not yet been activated. Make sure the Manifest.MF contains 'Bundle-ActivationPolicy: lazy'. I opened Manifast.MF and Bundle-ActivationPolicy: lazy was set... I googled for the solution but no avail. It drove me nuts and I gave up. I have no experience with Eclipse and Java and XText, I just want to do my homework and forget everything until I will need it again... Anyone have experience with XText? Any help appreciated. ps: I will be on it too and I might resolve the problem in several hours. But now I am at a loss.

    Read the article

  • best-practices for displaying new view controllers ( iPhone )

    - by Tristan
    I need to display a couple of view controllers (eg, login screen, registration screen etc). What's the best way to bring each screen up? Currently for each screen that I'd like to display, I call a different method in the app delegate like this: Code: - (void) registerScreen { RegistrationViewController *reg = [[RegistrationViewController alloc] initWithNibName:@"RegistrationViewController" bundle:nil]; [window addSubview:reg.view]; } - (void) LoginScreen { LoginViewController *log = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; [window addSubview:log.view]; } It works, but I cant imagine it being the best way.

    Read the article

  • iPhone Provisioning Profile problems...

    - by James
    I have already successfully submitted two apps to the app store, so I should be able to do it by now, right? With my most recent app, however, I'm having a bear of a time with getting the Application Identifier or Bundle Identifier set up. In my distribution profile, I have included the identifier "com.jmock.irowbeta", and then copied it exactly into the the app's Info.plist file under "Bundle Identifier". In the past, this has done the trick, but now I'm getting the error Provisioning profile 'irow beta' specificies the identifier 'com.jmock.irowbeta' which doesn't match the current setting 'com.yourcompany.irow-beta'. So it seems that its somehow still using the default of com.yourcompany.APPLICATION_NAME, but it shouldn't after I have changed it in the Info.plist, right? I think this means that xcode isn't recognizing that PLIST for some reason, because when I change the name of the icon file, for example, or other such attributes, nothing changes. If this is the problem, how do I make xcode recognize the PLIST? Otherwise, what the heck is going on? Thanks, James

    Read the article

  • Rails: simple bundler question with ruby-openid

    - by Joern Akkermann
    Hi! I just installed the ruby-openid gem and then bundled it by entering gem 'ruby-openid', :require => 'openid' in the gemfile. Then I started bundle install and bundle lock. Everything worked fine so far. But how can I now access the classes of ruby-openid. OpenID::method won't work for me. It raises a not found error. What have I forgot or done wrong? I'm absolutely new to bundler and the internet full of solutions for various versions, but I need one solution that's surely working. I'm thankful for any help!

    Read the article

  • OCUnit testing an embedded framework

    - by d11wtq
    I've added a Unit Test target to my Xcode project but it fails to find my framework when it builds, saying: Test.octest could not be loaded because a link error occurred. It is likely that dyld cannot locate a framework framework or library that the the test bundle was linked against, possibly because the framework or library had an incorrect install path at link time. My framework (the main project target) is designed to be embedded and so has an install path of @executable_path/../Frameworks. I've marked the framework as a direct dependency of the test target and I've added it to the "Link Binary with Libraries" build phase. Additionally I've add a first step (after it's built the dependency) of "Copy Files" which simply copies the framework to the unit test bundle's Frameworks directory. Anyone got any experience on this? I'm not sure what I've missed.

    Read the article

  • Change the text of a UILabel in viewDidLoad() programmatically

    - by HelloWorld
    Hi everybody. I'm a beginneri iPhone developer. My code is the following: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { displayLabel = [[UILabel alloc] initWithFrame:CGRectMake(80, 20, 230, 40)]; [self.view addSubview:displayLabel]; } return self; } // - (void)viewDidLoad { [super viewDidLoad]; displayLabel.text = @"abc"; } I want to change the label text in viewDidLoad methond,but it can't change label text. I hope i explained my scenario. Sorry for my English. Greetings, dy.

    Read the article

  • R cannot be resolved - android error

    - by MaurizioPz
    Hi, I just downloaded and installed the new android sdk. I wanted to create a simple application to test drive it. the widzard creates this code: package eu.mauriziopz.gps; import android.app.Activity; import android.os.Bundle; public class ggps extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } but ecplise give me this error R cannot be resolved on this line setContentView(R.layout.main); can any one explain me why? ps. I do have an xml file named main.xml under res/layout/

    Read the article

  • Activity Indicator not displaying based on whether the UIWebView is loading or not...

    - by Jack W-H
    Hi folks Sorry if this is an easy one. Basically, here is my code: MainViewController.h: // // MainViewController.h // Site // // Created by Jack Webb-Heller on 19/03/2010. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "FlipsideViewController.h" @interface MainViewController : UIViewController <UIWebViewDelegate, FlipsideViewControllerDelegate> { IBOutlet UIWebView *webView; IBOutlet UIActivityIndicatorView *spinner; } - (IBAction)showInfo; @property(nonatomic,retain) UIWebView *webView; @property(nonatomic,retain) UIActivityIndicatorView *spinner; @end MainViewController.m: // // MainViewController.m // Site // // Created by Jack Webb-Heller on 19/03/2010. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "MainViewController.h" #import "MainView.h" @implementation MainViewController @synthesize webView; @synthesize spinner; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { NSURL *siteURL; NSString *siteURLString; siteURLString=[[NSString alloc] initWithString:@"http://www.site.com"]; siteURL=[[NSURL alloc] initWithString:siteURLString]; [webView loadRequest:[NSURLRequest requestWithURL:siteURL]]; [siteURL release]; [siteURLString release]; [super viewDidLoad]; } - (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller { [self dismissModalViewControllerAnimated:YES]; } - (void)webViewDidFinishLoad:(UIWebView *)webView { [spinner stopAnimating]; spinner.hidden=FALSE; NSLog(@"viewDidFinishLoad went through nicely"); } - (void)webViewDidStartLoad:(UIWebView *)webView { [spinner startAnimating]; spinner.hidden=FALSE; NSLog(@"viewDidStartLoad seems to be working"); } - (IBAction)showInfo { FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil]; controller.delegate = self; controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:controller animated:YES]; [controller release]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [spinner release]; [webView release]; [super dealloc]; } @end Unfortunately nothing is ever written to my log, and for some reason the Activity Indicator never seems to appear. What's going wrong here? Thanks folks Jack

    Read the article

  • problem in loading images from web

    - by Lynnooi
    hi, I am new in android and had developed an app which get images from the website and display it. I got it working in emulator but not in real phones. In some device, it will crash or take very long loading period. Can anyone please help me or guide me in improving it as i'm not sure whether the way i loads the images is correct or not. Here are the code i use to get the images from the web and display accordingly. if (xmlURL.length() != 0) { try { URL url = new URL(xmlURL); SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); /* Get the XMLReader of the SAXParser we created. */ XMLReader xr = sp.getXMLReader(); /* * Create a new ContentHandler and apply it to the * XML-Reader */ xr.setContentHandler(myExampleHandler); /* Parse the xml-data from our URL. */ xr.parse(new InputSource(url.openStream())); /* Parsing has finished. */ /* * Our ExampleHandler now provides the parsed data to * us. */ ParsedExampleDataSet parsedExampleDataSet = myExampleHandler.getParsedData(); } catch (Exception e) { } } if (s.equalsIgnoreCase("wallpapers")) { Context context = helloAndroid.this.getBaseContext(); for (int j = 0; j <= myExampleHandler.filenames.size() - 1; j++) { if (myExampleHandler.filenames.elementAt(j).toString() != null) { helloAndroid.this.ed = myExampleHandler.thumbs.elementAt(j) .toString(); if (helloAndroid.this.ed.length() != 0) { Drawable image = ImageOperations(context, helloAndroid.this.ed, "image.jpg"); file_info = myExampleHandler.filenames .elementAt(j).toString(); author = "\nby " + myExampleHandler.authors.elementAt(j) .toString(); switch (j + 1) { case 1: ImageView imgView1 = new ImageView(context); imgView1 = (ImageView) findViewById(R.id.image1); if (image.getIntrinsicHeight() > 0) { imgView1.setImageDrawable(image); } else imgView1 .setImageResource(R.drawable.empty_wallpaper); tv = (TextView) findViewById(R.id.filename1); tv.setText(file_info); tv = (TextView) findViewById(R.id.author1); tv.setText(author); imgView1 .setOnClickListener(new View.OnClickListener() { public void onClick(View view) { // Perform action on click Intent myIntent1 = new Intent( helloAndroid.this, galleryFile.class); Bundle b = new Bundle(); b.putString("fileID",myExampleHandler.fileid.elementAt(0).toString()); b.putString("page", "1"); b.putString("family", s); b.putString("fi",myExampleHandler.folder_id.elementAt(folder).toString()); b.putString("kw", keyword); myIntent1.putExtras(b); startActivityForResult( myIntent1, 0); } }); break; case 2: ImageView imgView2 = new ImageView(context); imgView2 = (ImageView) findViewById(R.id.image2); imgView2.setImageDrawable(image); tv = (TextView) findViewById(R.id.filename2); tv.setText(file_info); tv = (TextView) findViewById(R.id.author2); tv.setText(author); imgView2 .setOnClickListener(new View.OnClickListener() { public void onClick(View view) { // Perform action on click Intent myIntent1 = new Intent( helloAndroid.this, galleryFile.class); Bundle b = new Bundle(); b.putString("fileID",myExampleHandler.fileid.elementAt(1).toString()); b.putString("page", "1"); b.putString("family", s); b.putString("fi",myExampleHandler.folder_id.elementAt(folder).toString()); b.putString("kw", keyword); myIntent1.putExtras(b); startActivityForResult( myIntent1, 0); } }); break; case 3: //same code break; } } } } } private Drawable ImageOperations(Context ctx, String url, String saveFilename) { try { InputStream is = (InputStream) this.fetch(url); Drawable d = Drawable.createFromStream(is, "src"); return d; } catch (MalformedURLException e) { e.printStackTrace(); return null; } catch (IOException e) { e.printStackTrace(); return null; } } public Object fetch(String address) throws MalformedURLException, IOException { URL url = new URL(address); Object content = url.getContent(); return content; }

    Read the article

  • Android app in eclipse

    - by Colin
    Hello everybody, i've searched for days but cant find an answer, perhaps you guys can help. I'm creating an android app in eclipse, it all works just one thing is bugging me. this is my main.java: package com.test; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Toast; public class Main extends Activity implements OnClickListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Add Click listeners for all buttons View firstButton = findViewById(R.id.btn_rassen); firstButton.setOnClickListener(this); View secondButton = findViewById(R.id.button2); secondButton.setOnClickListener(this); } // Process the button click events @Override public void onClick(View v) { switch(v.getId()){ case R.id.btn_rassen: Intent j = new Intent(this, Webscreen.class); j.putExtra(com.test.Webscreen.URL, "http://www.google.com/"); startActivity(j); break; case R.id.button2: Intent k = new Intent(this, Webscreen.class); k.putExtra(com.test.Webscreen.URL, "http://notworkingurltotest.com"); startActivity(k); break; } } } now when it calls the webview.java the page called shows up but not the buttons i created in the layout xml page. does anybody have any idea why this is? your help is much appreciated! ohw this is my webscreen.java package com.test; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.Window; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Toast; public class Webscreen extends Activity { public static final String URL = ""; private static final String TAG = "WebscreenClass"; private WebView webview; private ProgressDialog progressDialog; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.webscreen); this.getIntent().getExtras(); this.webview = (WebView) findViewById(R.string.webview); String turl = getIntent().getStringExtra(URL); Log.i(TAG, " URL = "+turl); WebView webview = new WebView(this); setContentView(webview); final Activity activity = this; webview.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } public void onLoadResource (WebView view, String url) { if (progressDialog == null) { progressDialog = new ProgressDialog(activity); progressDialog.setMessage("Bezig met laden..."); progressDialog.show(); } } public void onPageFinished(WebView view, String url) { if (progressDialog.isShowing()) { progressDialog.dismiss(); progressDialog = null; } } public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { Intent myIntent = new Intent(); myIntent.setClassName("com.test", "com.test.Main"); startActivity(myIntent); Toast.makeText(activity, "Laden van onderdeel mislukt, probeer het later nog eens! ", Toast.LENGTH_LONG).show(); progressDialog.show(); } }); webview.loadUrl(turl); } } webscreen.xml layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <!-- <1> --> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/url" android:layout_height="wrap_content" android:layout_width="wrap_content" android:lines="1" android:layout_weight="1.0" android:hint="http://" android:visibility="visible" /> <Button android:id="@+id/go_button" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="go_button" /> </LinearLayout> <!-- <2> --> <WebView android:id="@string/webview" android:layout_width="fill_parent" android:layout_height="0dip" /> </LinearLayout>

    Read the article

  • Android app crashes when I change the default xml layout file to another

    - by mib1413456
    I am currently just starting to learn android development and have created a basic "Hello world" app that uses "activity_main.xml" for the default layout. I tried to create a new layout xml file called "new_layout.xml" with a text view, a text field and a button and did the following changes in the MainActivity.java file: setContentView(R.layout.new_layout); I did nothing else expect for adding a new_layout.xml in the res/layout folder, I have tried restarting and cleaning the project but nothing. Below is my activity_main.xml file, new_layout.xml file and MainActivity.java activity_main.xml: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="org.example.androidsdk.demo.MainActivity" tools:ignore="MergeRootFrame" /> new_layout.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /> <EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:ems="10" > <requestFocus /> </EditText> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /> MainActivity.java file package org.example.androidsdk.demo; import android.app.Activity; import android.app.ActionBar; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.os.Build; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.new_layout); if (savedInstanceState == null) { getFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()) .commit(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_main, container, false); return rootView; } } }

    Read the article

  • My app has some basic problems, and it stops working

    - by user2882662
    I am writing a basic application which contains two activities. Both contain a TextView showing the title and the first one contains an EditText in which the user types a message and clicks on a button on its side, the second activity is launched which shows the message the user types. It has the following problems: The title (the first TextView in both the activities) doesn't show in the middle of the line, despite of the android:gravity="center_horizontal" attribute. The EditText in the first activity does not show at all. When I click on the button, the app stops saying "Unfortunately Write n Display and stopped.", rather than launching the second activity at all. I don't have adequate knowledge about logcat, but I have followed the steps somebody had told me, that is WindowOpen Perspective Other DDMS Then run the app and select the package name from the Devices and click on log cat, select the exception(s) and export to text file. All contained in the text file is : : E/(): Device disconnected: 1 Since I am not sure of using log cat, so I am posting a screenshot to make clear what I have done. CODE OF FIRST ACTIVITY: - package com.practice.myfirstapp1; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.EditText; //import android.view.Menu; public class MainActivity extends Activity { public static final String key_name="com.practice.firstApp.key"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } private void sendMessage(View view){ Intent intent= new Intent(this, SecondActivity.class); EditText editText=(EditText) findViewById(R.id.EditText1_MainActivity); String key_value= editText.getText().toString(); intent.putExtra(key_name, key_value); startActivity(intent); } } LAYOUT OF FIRST ACTIVITY: - <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" > <TextView android:id="@+id/TextView1_MainActivity" android:layout_alignParentTop="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@+string/title_MainActivity" android:gravity="center_horizontal" android:textStyle="bold"/> <EditText android:id="@+id/EditText1_MainActivity" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_below="@+id/TextView1_MainActivity" android:hint="@string/EditText_MainActivity" android:textStyle="italic" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/TextView1_MainActivity" android:layout_toRightOf="@id/EditText1_MainActivity" android:text="@string/Button_MainActivity" android:onClick="sendMessage"/> </RelativeLayout> CODE OF SECOND ACTIVITY: - package com.practice.myfirstapp1; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.widget.TextView; class SecondActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.activity_second); Intent intent= getIntent(); String intent_value= intent.getStringExtra(MainActivity.key_name); TextView textView= new TextView(this); textView= (TextView) findViewById(R.id.TextView2_SecondActivity); textView.setText(intent_value); } } LAYOUT OF SECOND ACTIVITY: - <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" tools:context=".SecondActivity"> <TextView android:layout_alignParentTop="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@+string/title_SecondActivity" android:gravity="center_horizontal" android:textStyle="bold"/> <TextView android:id="@+id/TextView2_SecondActivity" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </RelativeLayout> STRINGS RESOURCE FILE:- <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">Write n Display</string> <string name="action_settings">Settings</string> <string name="title_MainActivity">WRITE</string> <string name="EditText_MainActivity">Your Message here</string> <string name="Button_MainActivity">Send</string> <string name="title_SecondActivity">DISPLAY</string> </resources> ANDROID MANIFEST FILE: - <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.practice.myfirstapp1" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" android:debuggable="true" > <activity android:name="com.practice.myfirstapp1.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="com.practive.myfirstapp1.SecondActivity" android:label="@string/app_name"> </activity> </application> </manifest>

    Read the article

  • How to navigate clicking row to another UITableView ?

    - by Meko
    Hi. I am trying to show detailed UItable view when clicking on row. I used - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; photoListViewController = [[PhotoListViewController alloc]initWithNibName:@"PhotoListViewController" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:photoListViewController animated:YES]; [photoListViewController release]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; } This PhotoListViewController is an empty UITableViewController. As I know UITableViewCOntroller has a navigation controller implemented and I don`t have to create navigation controller. But When I clicked on row it does not navigate to second view.AM I have to make some connection on nib file?I only created this PhotoListViewController in File-New-UIViewCOntroller and selected UITableView. EDIT : SOLVED I solved my problem.I should use UINAvigation object.I thought that UITable has it but there was no ))

    Read the article

  • Why does headless PDE Build omit directories I've specified in build.properties's bin.includes?

    - by Woody Zenfell III
    One of my Eclipse plug-ins (OSGi bundles) is supposed to contain a directory (Database Elements) of .sql files. My build.properties shows: bin.includes = META-INF/,\ .,\ Database Elements/ (...which looks right to me.) When I build and run from within my interactive Eclipse IDE, everything works fine: calls to Bundle.getEntry(String) and Bundle.findEntries(String, String, bool) return valid URL objects; my tests are happy; my code is happy. When I build via headless ant script (using PDE Build), those same calls end up returning null. My tests break; my code breaks. I find that Database Elements is quietly but simply missing from my plug-in's JAR package. (META-INF and the built classes still make it in there fine.) I scoured the build log (even eventually invoking ant -verbose on the relevant portion of the build script) but saw no mention of anything helpful. What gives?

    Read the article

  • i cannot see movie playing in iphone simulator

    - by Neelam Roy
    Hi, i have created a application that plays movie on button click..my application is running without any warning or error. But i am not able to see the movie don't know why? I have added the Media player framework and also imported the #import in viewController.h my button action code is as follow... -(IBAction)playMyMovie:(id)sender{ NSBundle *bundle =[NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"jumps" ofType:@"mov"]; NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain]; MPMoviePlayerController *theMovie =[[MPMoviePlayerController alloc] initWithContentURL:movieURL]; theMovie.scalingMode = MPMovieScalingModeAspectFill; [theMovie play]; } Please tell me what i am missing..

    Read the article

  • Switching xib's in iPhone SDK?

    - by NextRev
    I'm having issues with switching xib's when I try to from my second view into the third. I get into the second view from the first like this... -(IBAction)startButtonClicked:(id)sender{ Number2ViewController *screen = [[Number2ViewController alloc] initWithNibName:nil bundle:nil]; screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:screen animated:YES]; [screen release]; } But when I'm in the second view trying to get to the third view, the app crashes... -(IBAction)nextButtonClicked:(id)sender{ Number3ViewController *screen = [[Number3ViewController alloc] initWithNibName:nil bundle:nil]; screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:screen animated:YES]; [screen release]; } I know how to go into one view and then immediately back using [self dismissModalViewControllerAnimated:YES]; How do you just keep going to different views though without having to go back first?

    Read the article

  • iPHone: Unit/Logic Tests initWithNibName

    - by pion
    I have setup my Logic Tests following the instructions on http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html. I could test a couple classes successfully. But I got error when testing the following: - (id)init { if (self = [super initWithNibName:@"Foo" bundle:nil]) { ... } return self; } The error message is -[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "Foo" My question: Did I do something wrong? Missed something? or I cannot test -initWithNibName using Logic Tests technique. Thanks in advance for your help.

    Read the article

  • ec2_bundle_vol fails with error LoadError

    - by Koran
    Hi, I am a newbie in amazon ec2 setup. I have now setup a machine to my taste - and I now want to bundle it. I am running the following command from the launched instance - root@domU-21-34-67-26-ED-Z4:~# ec2-bundle-vol -r i386 -d /mnt \ -p ACT-VOL -u 8940-1355-4155 -k /tmp/pk-key.pem \ -c /tmp/cert.pem -s 10240 \ -e /mnt,/root/.ssh,/home/ubuntu/.ssh ruby: No such file or directory -- /home/ubuntu/ec2tools/ec2-api-tools-1.3-46266/lib/ec2/amitools/bundlevol.rb (LoadError) The ruby version is 1.8.7. I searched internet and installed libruby1.8-extras etc too, but to no avail. I also tried running it from site_ruby (/usr/local/lib/site_ruby) - but no use. I tried installing 1.8.6 version of ruby, but was unable to find a way to do so too. Any help would be much appreciated. Thanks, K

    Read the article

  • [iPhone] presentModalViewController not working

    - by ryyst
    Hi, here's my code: ViewController *vc = [[ViewController alloc] initWithNibName:@"TableView" bundle:nil]; [self.navigationController presentModalViewController:vc animated:YES]; //[self setView:[vc view]]; If I call it, nothing happens. However, if I change it to: ViewController *vc = [[ViewController alloc] initWithNibName:@"TableView" bundle:nil]; //[self.navigationController presentModalViewController:vc animated:YES]; [self setView:[vc view]]; The view appears just fine (without the transition, of course). What am I doing wrong? Is there anything special you have to take care of when initializing the view controller? I tried to copy as much as possible from Apple's examples, but I can't get this to work... Thanks for any input! -- Ry

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >