Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7082613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:04:33+00:00 2026-05-28T07:04:33+00:00

I’ve recently upgraded my Xcode version to 4.2 – and now it’s giving a

  • 0

I’ve recently upgraded my Xcode version to 4.2 – and now it’s giving a load of warnings/issues from the Three20 source – and by a load of warnings I mean around 30 warnings.

Most of them seem to be the following:

Property access result unused – getters should not be used for side effects.

Here are a few examples from just one file in the Three20 source:

TTMessageController.m – line 542

- (NSString*)subject {
  self.view; // << warning here
  for (int i = 0; i < _fields.count; ++i) {
    id field = [_fields objectAtIndex:i];
    if ([field isKindOfClass:[TTMessageSubjectField class]]) {
      UITextField* textField = [_fieldViews objectAtIndex:i];
      return textField.text;
    }
  }
  return nil;
}

TTMessageController.m – line 556

- (void)setSubject:(NSString*)subject {
  self.view; // << warning here
  for (int i = 0; i < _fields.count; ++i) {
    id field = [_fields objectAtIndex:i];
    if ([field isKindOfClass:[TTMessageSubjectField class]]) {
      UITextField* textField = [_fieldViews objectAtIndex:i];
      textField.text = subject;
      break;
    }
  }
}

TTMessageController.m – line 576

- (void)setBody:(NSString*)body {
  self.view; // << warning here
  _textEditor.text = body;
}

I could go on… and on.

But why does three20 do this? – It seems strange to just call a getter and do nothing with it – is it some kind of initialisation?

Whatever it is – Xcode 4.2 doesn’t seem to like it… how can I get rid of these warnings?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:04:34+00:00Added an answer on May 28, 2026 at 7:04 am

    Adding self.view to those methods will make sure that the view is actually loaded and initialized.

    A UIViewController derived object will usually not load the actual view until it is forced to do so. Commonly once that view is added onto a superview/window.

    By referencing a view controller’s view this way, you force that view to be loaded right away.

    Three20 does this within property setters and getters to work around a faulty program flow.

    Lets assume it was not doing so and lets also assume you call one of those setters/getters before the view (and its subviews) is/are initialized. As a result, for example the setBody: method would try to assign the given string towards a nil-object. It would not crash but also would not have any effect.

    This way of working within viewcontrollers does however lead to a bypass on lazy loading of the connected views. Overall there is no need to worry, it will work properly but I would always recommend against doing it the way three20 does. Do resist on “fixing” these warnings by removing these lines as Three20 itself relies on these side effects of its getter-methods. As per the comment from xlc0212, you may however change these lines to [self view];, the result will remain but the warnings will disappear.

    From my experience, even though Three20 will throw warnings like crazy on Xcode4/LLVM3, you should generally not encounter real-life issues. It never failed for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.