Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Rant: Why does OS X not consider minus part of number?

Rant: Why does OS X not consider minus part of number?
Thread Tools
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 2, 2009, 07:38 AM
 
Something that's been bugging the hell out of me lately is when I double-click on any number in OS X the number gets selected but not the sign. So even if there is no space between the minus and the number, only the number gets selected. What's the logic behind that?
     
richwig83
Mac Elite
Join Date: Aug 2006
Location: London
Status: Offline
Reply With Quote
Jun 2, 2009, 08:10 AM
 
Not sure what the logic is but you're not alone!
MacBook Pro 2.2 i7 | 4GB | 128GB SSD ~ 500GB+2TB Externals ~ iPhone 4 32GB
Canon 5DII | EF 24-105mm IS USM | EF 100-400mm L IS USM | 50mm 1.8mkII
iMac | Mac Mini | 42" Panasonic LED HDTV | PS3
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Jun 2, 2009, 09:23 AM
 
Sounds like a stupid bug.

Did you report it to Apple ?

-t
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 2, 2009, 10:27 AM
 
Unless somebody comes up with some very good reasoning, I will.

But it's definitely not a new bug. It's in both Leopard and Tiger. It's as if Apple actually had a reason for this behavior...
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Jun 2, 2009, 11:50 AM
 
Windows does the same thing. Most likely it's reading the - as a hyphen. If it is a hyphen, it's doing the right thing. Of course one might argue that Apple could put in some more complicated logic there - including the minus/hyphen as part of the word if the word is only numbers - but OTOH it's a fairly minor thing to break symmetry over.
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 2, 2009, 03:24 PM
 
I try to stay away from Windows as good as I can. But the one editor I do actually use in Windows selects the sign with the number. Of course it also selects any proceeding comma as well so it's not perfect either.

RH and Scientific Linux OTOH have always done this properly. I don't see why OS X shouldn't be able to do it right.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 2, 2009, 04:09 PM
 
1-2=-1

How many words was that?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
richwig83
Mac Elite
Join Date: Aug 2006
Location: London
Status: Offline
Reply With Quote
Jun 2, 2009, 07:47 PM
 
Originally Posted by chuckit View Post
1-2=-1

how many words was that?
6
MacBook Pro 2.2 i7 | 4GB | 128GB SSD ~ 500GB+2TB Externals ~ iPhone 4 32GB
Canon 5DII | EF 24-105mm IS USM | EF 100-400mm L IS USM | 50mm 1.8mkII
iMac | Mac Mini | 42" Panasonic LED HDTV | PS3
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 3, 2009, 03:31 AM
 
Originally Posted by littlejj22 View Post
I have no idea of it.
So why post?
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Jun 3, 2009, 11:54 AM
 
^ My guess is that it was to distract from his being a spammer, judging by the fact that all posts by that user seem to have been deleted.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 3, 2009, 04:35 PM
 
Yep. Another one gone.
     
HazardousPaste
Fresh-Faced Recruit
Join Date: Apr 2009
Status: Offline
Reply With Quote
Jun 4, 2009, 02:25 AM
 
Originally Posted by P View Post
Windows does the same thing. Most likely it's reading the - as a hyphen. If it is a hyphen, it's doing the right thing. Of course one might argue that Apple could put in some more complicated logic there - including the minus/hyphen as part of the word if the word is only numbers - but OTOH it's a fairly minor thing to break symmetry over.
Even that wouldn't work. What if you format the date as
2009-6-4 ?
No reason that should get read as "1999."
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 4, 2009, 03:49 AM
 
I have no idea of it either.
     
dimmer
Mac Enthusiast
Join Date: Feb 2006
Status: Offline
Reply With Quote
Jun 7, 2009, 11:50 PM
 
Because it's not part of the number. Solution? Add one more click and the negative sign is included.
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 8, 2009, 05:21 AM
 
As somebody who majored in mathematics I can assure you that the sign belongs to the number.

The solution is Apple changes the selection behavior for numbers to the way it's done in Linux or Solaris. Or at the very least, offer an option for this kind of behavior. Anybody in science or engineering will appreciate it.
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Jun 8, 2009, 09:10 AM
 
Originally Posted by HazardousPaste View Post
Even that wouldn't work. What if you format the date as
2009-6-4 ?
No reason that should get read as "1999."
Why would the OS not recognize this as a date, given you set up this date format in the system preferences ?

Obviously, if your system is set up to display dates like 06/04/2009, then 2009-6-4 wouldn't get recognized as a date.

That would be expecting too much from the OS, since dates formats can be quite different from each other. Also, 6/4 could refer to a date, or a fraction. You can't expect the system to know.

-t
     
patrix
Junior Member
Join Date: Sep 2006
Status: Offline
Reply With Quote
Jun 8, 2009, 10:30 AM
 
Has nothing to do with minus, and everything to do with symbols.

#324235
+345345
-23545

Those will all select the number and not the symbol. Personnally I find it very convenient, as I often have to copy/paste numbers that have a # in front of them, and it's that much faster if I can just doubleclick without worrying about the # to be included as well.

I guess it's the opposite of everyone who's answered so far lol.
     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Jun 8, 2009, 11:03 AM
 
1½-click (ie. double-click and don't release the mouse-button), then drag a little bit to the left to include the minus.
     
turtle777
Clinically Insane
Join Date: Jun 2001
Location: planning a comeback !
Status: Offline
Reply With Quote
Jun 8, 2009, 12:20 PM
 
Originally Posted by TETENAL View Post
1½-click (ie. double-click and don't release the mouse-button), then drag a little bit to the left to include the minus.
FTW.

-t
     
dimmer
Mac Enthusiast
Join Date: Feb 2006
Status: Offline
Reply With Quote
Jun 13, 2009, 01:37 AM
 
"offer an option"

You are kidding right? How many System Preferences icons would you like? A zillion? "Options" make for a bad UI, and should be limited as much as possible. And, no, the hyphen is not part of the number, from a text point of view. Click one more time, get over your bad self.
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 13, 2009, 06:12 AM
 
I take it you missed the 2001 memo about defaults write.
     
dimmer
Mac Enthusiast
Join Date: Feb 2006
Status: Offline
Reply With Quote
Jun 13, 2009, 02:51 PM
 
The "No-one writes to the kernal" one?
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 13, 2009, 02:54 PM
 
Kernal?
     
dimmer
Mac Enthusiast
Join Date: Feb 2006
Status: Offline
Reply With Quote
Jun 13, 2009, 03:06 PM
 
Kernel in Dutch I guess! But for the joke/reference to work, kernal is better.
     
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Jun 13, 2009, 03:08 PM
 
Actually, not selecting the "-" is the way I like it, but...

Originally Posted by dimmer View Post
Click one more time, get over your bad self.
That doesn't work. If you click again, you get the entire line. Try it and see:

Lorem greek +9870 chinese -23432 nitpicky thread.
     
dimmer
Mac Enthusiast
Join Date: Feb 2006
Status: Offline
Reply With Quote
Jun 13, 2009, 03:15 PM
 
From Wiki:

"The KERNAL was known as kernel[1] inside of Commodore since the PET days, but in 1980 Robert Russell misspelled the word in his notebooks forming the word kernal. When Commodore technical writers Neil Harris and Andy Finkel collected Russell's notes and used them as the basis for the VIC-20 programmer's manual, the misspelling followed them along and stuck.[2]"

Eug: I sit corrected. While the behavior is consistent with TextEdit guidelines (one click: insert insertion point, two clicks select "word", three clicks select "sentence") I can see that it may be annoying. For example, if I get a phone number (333)-555-1223, should the double click select the whole thing or just the "word"? Didn't Apple Data Detectors use to be able to figure this out?

I still think a preference for the operation would be highly bad though,
     
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Jun 13, 2009, 03:33 PM
 
Originally Posted by dimmer View Post
For example, if I get a phone number (333)-555-1223, should the double click select the whole thing or just the "word"? Didn't Apple Data Detectors use to be able to figure this out?
That's actually sort of how it works on the iPhone, and it's even smarter than that.



     
TETENAL
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status: Offline
Reply With Quote
Jun 13, 2009, 03:38 PM
 
Originally Posted by dimmer View Post
From Wiki:
For example, if I get a phone number (333)-555-1223, should the double click select the whole thing or just the "word"?
It's possible to select this phone number as well as numbers with signs with just two clicks.

Mail, by the way, already detects phone numbers automatically.
( Last edited by TETENAL; Jun 13, 2009 at 03:46 PM. )
     
chabig
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status: Offline
Reply With Quote
Jun 15, 2009, 10:05 PM
 
Originally Posted by Simon View Post
As somebody who majored in mathematics I can assure you that the sign belongs to the number.
Sure, the sign belongs to a negative number. But what if it's a minus sign (the operator) and a positive number?
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 16, 2009, 02:52 AM
 
I haven't even mentioned (complex) expressions yet, just numbers. Let's fix the simple stuff first.

I have a column of numbers. Some with a plus, some with a minus, some with no sign. Nothing else. The fact that OS X can't do this right (like Windows) is pathetic. Linux OTOH has absolutely no problems. I have trouble imagining the message Apple wants to put out to scientists is that they should use Linux to edit data files.
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Jun 16, 2009, 03:46 AM
 
Have you reported it in the feedback box? This is the type of thing they might actually fix - they did add sorting by numbers to OS X, after all.

Having thought about it a bit, I think that "-" should not be considered a separator at all and should always be included in the word when doubleclicking. If you have to select half of a hyphenated word you can do so by dragging - wanting to select the entire date or number has to be a much more common occurrence.
The new Mac Pro has up to 30 MB of cache inside the processor itself. That's more than the HD in my first Mac. Somehow I'm still running out of space.
     
Simon  (op)
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jun 16, 2009, 03:48 AM
 
Originally Posted by P View Post
Have you reported it in the feedback box? This is the type of thing they might actually fix - they did add sorting by numbers to OS X, after all.
Yep. I've reported it. But it hasn't been fixed in the 10.5.x updates since. Don't know about SL though.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:20 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,