Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. does anyone know why

does anyone know why

Scheduled Pinned Locked Moved The Lounge
question
24 Posts 20 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Jim Crafton

    Because it's *specifically* used in ObjectiveC, which predates Apple's use of it, actually ask Brad Cox about it. YES and NO clearly indicate you're in ObjectiveC land, not C, so it's just a way to separate the two. Also given the style in ObjectiveC to have sentence like readability, it's not that surprising.

    ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Oh

    D Offline
    D Offline
    Douglas Troy
    wrote on last edited by
    #9

    Jim Crafton wrote:

    Also given the style in ObjectiveC to have sentence like readability, it's not that surprising.

    I believe it should be updated to reflect the almost hippie like status of the Apple culture:

    if (TotallyBogus(NSObjectDude))
    {
    throw BogusDude();
    }
    else
    {
    NSObjectDude.Cool = "Awesome";
    }


    :..::. Douglas H. Troy ::..
    Bad Astronomy |VCF|wxWidgets|WTL

    1 Reply Last reply
    0
    • B bulg

      apple thinks they can get away with BOOL values of "YES" and "NO" ?

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #10

      Are iYes and iNo supported? When we are forced to use those values I think we will have a problem.

      L J 2 Replies Last reply
      0
      • B bulg

        apple thinks they can get away with BOOL values of "YES" and "NO" ?

        D Offline
        D Offline
        dighn
        wrote on last edited by
        #11

        "does anyone know why apple thinks they can get away with BOOL values of \"YES\" and \"NO\" ?" Yes.

        1 Reply Last reply
        0
        • B bulg

          apple thinks they can get away with BOOL values of "YES" and "NO" ?

          J Offline
          J Offline
          JimmyRopes
          wrote on last edited by
          #12

          bulg wrote:

          apple thinks they can get away with BOOL values of "YES" and "NO" ?

          Because they can. :-D

          Simply Elegant Designs JimmyRopes Designs
          Think inside the box! ProActive Secure Systems
          I'm on-line therefore I am. JimmyRopes

          1 Reply Last reply
          0
          • B bulg

            apple thinks they can get away with BOOL values of "YES" and "NO" ?

            T Offline
            T Offline
            The Nightcoder
            wrote on last edited by
            #13

            Well... in my CCBool function (a CBool replacement for VBScript), they can. I acknowledge True, T, Yes, Y and X as true, everything else as false. Or, to quoute a famous RFC... in good protocol design, you should be liberal in what you accept and pedantic about what you send (or something like that).

            Peter the small turnip (1) It Has To Work. --RFC 1925[^]

            1 Reply Last reply
            0
            • B bulg

              apple thinks they can get away with BOOL values of "YES" and "NO" ?

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #14

              what is wrong with "YES" and "NO"? or do you want "YES", "NO", "Cancel"? :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


              H 1 Reply Last reply
              0
              • P Paul M Watt

                Are iYes and iNo supported? When we are forced to use those values I think we will have a problem.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #15

                As well as iDon'tKnow?

                Visit http://www.notreadytogiveup.com/[^] and do something special today.

                J G 2 Replies Last reply
                0
                • L Lost User

                  As well as iDon'tKnow?

                  Visit http://www.notreadytogiveup.com/[^] and do something special today.

                  J Offline
                  J Offline
                  Jim Crafton
                  wrote on last edited by
                  #16

                  I think that would be

                  if ( YES == [iDont know] )
                  {
                  NSLog( @"I don't know" );
                  }

                  ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Oh

                  1 Reply Last reply
                  0
                  • G Gary Wheeler

                    It's a California thing; truth and falsehood are so, well, relative to one's life situation, you know?

                    Software Zen: delete this;

                    M Offline
                    M Offline
                    Marc Clifton
                    wrote on last edited by
                    #17

                    Gary Wheeler wrote:

                    It's a California thing

                    In that case, I would have assumed that a bool would equate to "Gay" and "Straight". Marc

                    Will work for food. Interacx

                    G 1 Reply Last reply
                    0
                    • L Luc Pattyn

                      what is wrong with "YES" and "NO"? or do you want "YES", "NO", "Cancel"? :)

                      Luc Pattyn [Forum Guidelines] [My Articles]


                      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                      H Offline
                      H Offline
                      Hans Dietrich
                      wrote on last edited by
                      #18

                      I think he wants  YES  NO  CANCEL  with an optional checkbox  

                      Do Not Ask Me Again
                      . :)

                      Best wishes, Hans


                      [Hans Dietrich Software]

                      B 1 Reply Last reply
                      0
                      • B bulg

                        apple thinks they can get away with BOOL values of "YES" and "NO" ?

                        R Offline
                        R Offline
                        Roger Wright
                        wrote on last edited by
                        #19

                        Yes.

                        "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                        1 Reply Last reply
                        0
                        • H Hans Dietrich

                          I think he wants  YES  NO  CANCEL  with an optional checkbox  

                          Do Not Ask Me Again
                          . :)

                          Best wishes, Hans


                          [Hans Dietrich Software]

                          B Offline
                          B Offline
                          bulg
                          wrote on last edited by
                          #20

                          I want a bool to be true or false. Not Yes or No! It's Objective C not bloody Prolog!!! The only time I want something in my program to evaluate to a "Yes" is when someone buys the damn thing. >.< I also loathe the IB & IBOutlet crap. CS4 got it so much more right, that I wish I could use it for a suitable native language.

                          1 Reply Last reply
                          0
                          • M Marc Clifton

                            Gary Wheeler wrote:

                            It's a California thing

                            In that case, I would have assumed that a bool would equate to "Gay" and "Straight". Marc

                            Will work for food. Interacx

                            G Offline
                            G Offline
                            Gary R Wheeler
                            wrote on last edited by
                            #21

                            Hmm... I would think sexuality would be better represented by a double whose value ranges between +1.0, exclusively heterosexual, and -1.0, exclusively homosexual (or vice versa).

                            Software Zen: delete this;
                            Fold With Us![^]

                            M 1 Reply Last reply
                            0
                            • L Lost User

                              As well as iDon'tKnow?

                              Visit http://www.notreadytogiveup.com/[^] and do something special today.

                              G Offline
                              G Offline
                              Gary R Wheeler
                              wrote on last edited by
                              #22

                              I believe the mnemonic is iDunno, or possibly iGuess.

                              Software Zen: delete this;
                              Fold With Us![^]

                              1 Reply Last reply
                              0
                              • G Gary R Wheeler

                                Hmm... I would think sexuality would be better represented by a double whose value ranges between +1.0, exclusively heterosexual, and -1.0, exclusively homosexual (or vice versa).

                                Software Zen: delete this;
                                Fold With Us![^]

                                M Offline
                                M Offline
                                Marc Clifton
                                wrote on last edited by
                                #23

                                Gary R. Wheeler wrote:

                                Hmm... I would think sexuality would be better represented by a double whose value ranges between +1.0, exclusively heterosexual, and -1.0, exclusively homosexual (or vice versa).

                                Funny you mention that. I was talking with someone who says that psychologists believe that it's rare that people are on one extreme or the other. I guess the theory is that the majority of people fall between -1 and 0 or 0 and 1, and some cross over 0. I don't know. I think most of psychology is BS, but I guess like anything, it has its uses, up to a point. Marc

                                Will work for food. Interacx

                                1 Reply Last reply
                                0
                                • P Paul M Watt

                                  Are iYes and iNo supported? When we are forced to use those values I think we will have a problem.

                                  J Offline
                                  J Offline
                                  Jeff Circeo
                                  wrote on last edited by
                                  #24

                                  lol :-D

                                  Take a look at my corner of the net at Code Research Center

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups