4 Replies - 3906 Views - Last Post: 28 January 2013 - 03:46 PM

#1 Ged2323  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-January 13

Total beginner question

Posted 23 January 2013 - 02:00 PM

-(IBAction)buttonPressed:

(id) sender decisionText_.text=@”Go for it!”;


Why is there the .text after decisionText_.text?
Regard G
Is This A Good Question/Topic? 0
  • +

Replies To: Total beginner question

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5480
  • View blog
  • Posts: 11,762
  • Joined: 02-June 10

Re: Total beginner question

Posted 23 January 2013 - 02:52 PM

That's a property of the control decisionText_

I assume decisionText_ is a textbox or label or button... something that can display text.

Well you can't say the Textbox = "Go for it" but you can say that the .Text of the Textbox = "Go for it"

Its like saying... Open the house. Well, you can't do that with a chainsaw. But you can open the door of the house.
Was This Post Helpful? 0
  • +
  • -

#3 Ged2323  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-January 13

Re: Total beginner question

Posted 28 January 2013 - 02:33 PM

So .text can be changed into other properties?
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5480
  • View blog
  • Posts: 11,762
  • Joined: 02-June 10

Re: Total beginner question

Posted 28 January 2013 - 02:57 PM

I don't know what you're asking.. 'can be changed into other properties'.

The .Text of a Textbox is just a string. You can do anything with it that you can do to a string.

string demo = TextBox1.Text + TextBox2.Text;
//Assuming Textbox1.Text == "yogi"
//Assuming Textbox2.Text == "bear"
// demo will equal "yogibear"


int, decimal and the other numeric types can try to parse a string to get a value.

But until I can understand your question better I'm not sure what to tell you.

This post has been edited by tlhIn`toq: 28 January 2013 - 02:58 PM

Was This Post Helpful? 0
  • +
  • -

#5 Ged2323  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-January 13

Re: Total beginner question

Posted 28 January 2013 - 03:46 PM

No that's fine thanks for the help understanding it.

No thanks for your help its much clearer.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1