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

  • SEARCH
  • Home
  • 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 625853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:21:20+00:00 2026-05-13T19:21:20+00:00

self.flipsidenavigationbar=aNavigationBar; why here is needed self? (otherwise it crashes) [flipsidenavigationbar pushnavigationietm……..]; why here self

  • 0
self.flipsidenavigationbar=aNavigationBar;  

why here is needed self? (otherwise it crashes)

[flipsidenavigationbar pushnavigationietm........]; 

why here self is not needed?

note that flipsidenavigationbar is an iVar declared as property and synthesized.

thank you

Alex

  • 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-13T19:21:20+00:00Added an answer on May 13, 2026 at 7:21 pm

    is flipsidenavigationbar declared as a “retain” property type? My guess as to what’s happening is this.

    The dot-syntax method as you’ve written it is equivalent to

    [self setFlipsidenavigationbar:aNavigationBar];
    

    and this method call is probably retaining the aNavigationBar object when you set it. When you call

    flipsidenavigationbar = aNavigationBar;
    

    you are not retaining it, it’s likely being released before you want it to be and causing your crash.

    You can read more about dot syntax in Obj-C, it’ll probably help you with problems like this in the future.


    The other two posters said it better, but it’s very important to remember that these two lines:

    self.myViewA = myViewB;
    myViewA = myViewB;
    

    Have the potential to be completely unrelated. Dot syntax is only shorthand for a method call, and you have the potential to make that method call do anything you want. It’s important that, instead of having a rule for dealing with properties like you mention in your comment

    i understand that when one needs to
    set/initialize a property you need to
    put there ‘self’. but, when you ‘tell’
    it to do something (in this case to
    push) you don’t need self.

    you should understand exactly what is going on, so you know what the effects of your dot-syntax usage are. It’s confusing, I know, but it’s really not hard and everyone picks it up pretty quickly. Good luck!

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

Sidebar

Related Questions

self.close() is working fine in IE but not in Mozilla. Does anyone know what
self.logger.info(msg) popinstance=poplib.POP3(self.account[0]) self.logger.info(popinstance.getwelcome()) popinstance.user(self.account[1]) popinstance.pass_(self.account[2]) try: (numMsgs, totalSize)=popinstance.stat() self.logger.info(POP contains + str(numMsgs) + emails)
Pretty self-explanatory, I tried google and got a lot of the dreaded expertsexchange, I
Pretty self explanatory question. Is there any reason to use one or the other?
Assuming self-registration is used to install components as part of a larger installer program,
This is a self-explanatory question: Why does this thing bubble into my try catch's
As a self-taught computer programmer, I'm often at a loss to estimate the O()
If you were to self-fund a software project which tools, frameworks, components would you
Other than self.class.send :method, args... , of course. I'd like to make a rather
Question is pretty self explanitory. I want to do a simple find and replace,

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.