News for hackers. Stuff that matters.
Re:Twitter for Mac is incapable of accepting certain letters... by dkonofalski on Wednesday October 30, 2019 @03:28PM (#21401554)
What could possibly be the reason for this? I mean...there's got to be some kind of validation that's going wrong here but I don't see any validation scheme that would include standard alphabetical characters.
Re:Twitter for Mac is incapable of accepting certain letters... by Aqua_Geek on Wednesday October 30, 2019 @03:30PM (#21401578)
https://twitter.com/NolanOBrien/status/1189585020232462340

> Root cause is Catalina regression that fails keyboard inputs when a UIKeyCommand is registered for the same key. UIResponder chain regression most likely.

Re:Twitter for Mac is incapable of accepting certain letters... by dkonofalski on Wednesday October 30, 2019 @03:37PM (#21401644)
That doesn't seem like the root cause to me. It sounds like they have events set up for the UI prior to login which doesn't really make sense. The regression in Catalina may have exposed it but the regression is not the cause of this, as far as I can tell.
Re:Twitter for Mac is incapable of accepting certain letters... by shawnz on Wednesday October 30, 2019 @05:48PM (#21403168)
While you may not believe they made the best design choice, there's nothing functionally wrong about the choice they made. According to the docs, their method should work just the same. So I don't think it's fair to say that's the cause of the bug.
Re:Twitter for Mac is incapable of accepting certain letters... by dkonofalski on Wednesday October 30, 2019 @07:18PM (#21404073)
>nothing functionally wrong about the choice they made

Sure there is... The app would capture those as shortcuts instead of as user input. You know...exactly what's happening here. If this interferes with writing tweets also then that should be easy to figure out.

As I said above, I'm not saying it's not because of the regression but it's more likely to me that Twitter messed it up. Otherwise, why is no other app experiencing this issue if it was done "according to the docs".

Re:Twitter for Mac is incapable of accepting certain letters... by shawnz on Friday November 01, 2019 @06:03PM (#21424158)
> Otherwise, why is no other app experiencing this issue if it was done "according to the docs".

Well, like you say, it's not common to use shortcut keys without modifiers right? So it doesn't seem that surprising to me that nobody noticed the regression.

Re:Twitter for Mac is incapable of accepting certain letters... by userbinator on Wednesday October 30, 2019 @09:38PM (#21404892)
At (the old) Microsoft, that would absolutely be considered a regression --- code that used to work no longer does.

https://devblogs.microsoft.com/oldnewthing/20031224-00/?p=41...

As Linus Torvalds would say, "WE DO NOT BREAK USERSPACE!"

Re:Twitter for Mac is incapable of accepting certain letters... by giovannibajo1 on Thursday October 31, 2019 @04:05AM (#21406588)
The application is brand new, and is built on a brand new macOS API. Nobody broke anything. The point is whether the bug is due to Twitter’s usage of the APIs, or the APIs themselves.
Re:Twitter for Mac is incapable of accepting certain letters... by akersten on Wednesday October 30, 2019 @03:36PM (#21401631)
Ugh, yucky. Surprising lack of quality control on Apple's part - surely they should have tested typing into a text field at some point during the testing; don't most programs register a shortcut key or two?

But there are also some UI fails on Twitter's side here too - like clearing the password field after clicking Show Password and typing more, and preventing arrow key navigation within the field.

Re:Twitter for Mac is incapable of accepting certain letters... by gfosco on Wednesday October 30, 2019 @04:38PM (#21402401)
Not surprising any longer... There's a whole class of Mac Mini's (including the latest revision) where if you install Catalina, the HDMI port dies.
Re:Twitter for Mac is incapable of accepting certain letters... by scintill76 on Wednesday October 30, 2019 @05:03PM (#21402694)
As in, permanently breaks the hardware? Or just won't function with that software version?
Re:Twitter for Mac is incapable of accepting certain letters... by bangonkeyboard on Wednesday October 30, 2019 @05:50PM (#21403188)
"For those that are going to revert back to Mojave as a solution, a number of people are noting that this does not fix the issue (it didn't for me), indicating there is perhaps some sort of firmware update taking place with Catalina that will not be rolled back when you install Mojave."

— https://forums.macrumors.com/threads/catalina-causing-issues...

Re:Twitter for Mac is incapable of accepting certain letters... by gfosco on Wednesday October 30, 2019 @06:19PM (#21403479)
Rolling back worked for me, but the workaround is using the USB-C to HDMI dongle. (and I think I needed the dongle to downgrade.)
Re:Twitter for Mac is incapable of accepting certain letters... by kompakt on Wednesday October 30, 2019 @04:56PM (#21402609)
Ya I've seen those, that's completely crazy.
Re:Twitter for Mac is incapable of accepting certain letters... by dkonofalski on Wednesday October 30, 2019 @03:39PM (#21401668)
>don't most programs register a shortcut key or two?

Yes which is exactly why I think it's likely he's being disingenuous about the root cause of this. Shortcut keys typically need modifier keys and, even in the instance where they don't, there has to be some check from the app to determine whether an input field or the main window has focus.

To be clear, I'm not saying it's 100% certain that this isn't an Apple issue but, based on Twitter's track record with their apps, this likely is on Twitter.

Re:Twitter for Mac is incapable of accepting certain letters... by mackey on Wednesday October 30, 2019 @05:00PM (#21402669)
Are you an iOS/Mac developer? Because in this case it sounds like the UIKit/AppKit isn't respecting the responder chain, which would be an Apple bug.
Re:Twitter for Mac is incapable of accepting certain letters... by lilyball on Wednesday October 30, 2019 @05:17PM (#21402847)
It's entirely possible where in Catalyst if a UIKeyCommand is registered that uses a non-modified letter, it overrides text input. Having said that, I can't imagine why Twitter for Mac would have solo-letter key commands registered during the login flow, and if they did then I can't imagine why they wouldn't also interfere during tweet composing. Or rather, I can imagine, but the scenarios I'm constructing would imply extremely contorted view controller hierarchies that make no sense.
Re:Twitter for Mac is incapable of accepting certain letters... by MikeBeas on Wednesday October 30, 2019 @05:26PM (#21402950)
Can’t imagine why this would cause it to delete all input in the field when one of those characters is typed in using “reveal password” mode though. If you enable reveal, type in a string containing b, and then switch off reveal mode and add another character, it deletes the whole password. If it was just dropping inputs that would be one thing but this seems to be aggressively refusing to allow them in the field.
Re:Twitter for Mac is incapable of accepting certain letters... by mackey on Wednesday October 30, 2019 @05:51PM (#21403204)
It sounds like its specific to secure text fields, which I assume is why it doesn't interfere with tweeting. But thats a fair question about setting those up before login. My guess is those registrations aren't happening at the login VC level, or maybe in some global container VC. But I don't think that matters too much, because there are certainly use cases where you might want to show a secure text field even when logged in and you want shortcuts registered.
Re:Twitter for Mac is incapable of accepting certain letters... by dkonofalski on Wednesday October 30, 2019 @07:20PM (#21404087)
I am and that's why this is so surprising to me. No other app is reporting this type of behavior and Twitter is known for shitty Mac apps. I highly doubt that the regression could cause this unless it was done incorrectly to begin with. Otherwise, UIKit/AppKit would be doing the same for every other app. We may hear about that in the next day or two but, until that happens, I have a feeling this is all on Twitter.
Re:Twitter for Mac is incapable of accepting certain letters... by mackey on Wednesday October 30, 2019 @09:36PM (#21404884)
It looks like its reproducible in a sample project.

https://twitter.com/nolanobrien/status/1189623346033381376?s...

Re:Twitter for Mac is incapable of accepting certain letters... by dkonofalski on Thursday October 31, 2019 @04:03PM (#21413104)
That doesn't mean much if they implemented it in the exact same way they did for the full app. Unless we see this happening in other apps, I'll default to the implementation being the problem rather than the API itself.
Re:Twitter for Mac is incapable of accepting certain letters... by fortran77 on Wednesday October 30, 2019 @04:24PM (#21402199)
This is a new app written just for Catalyst, right?
Re:Twitter for Mac is incapable of accepting certain letters... by machello13 on Wednesday October 30, 2019 @04:40PM (#21402428)
Eh? Twitter for Mac is a Catalyst application that only works on Catalina and newer. It's most likely a bug in Catalyst that's causing it.
Re:Twitter for Mac is incapable of accepting certain letters... by userbinator on Wednesday October 30, 2019 @09:32PM (#21404861)
Every time I see things like this, it makes me feel glad I chose Win32 (actually Win16, not that it matters all that much...) as my first platform to start learning to write GUI apps for, and didn't switch over to the Apple side of things after that; the "move fast and break things" mentality was already somewhat noticeable in Apple back then, whereas Microsoft (the "old MS", not the "new MS") was more concerned with "protecting your investment in the platform". In my experience, core functionality bugs like this just don't occur with Windows, probably because there's far less rewrite-churn[1].

I know Windows has had various UI frameworks come and go over the years, but they're all fundamentally layers on top of the underlying stable Win32. For Mac I'd not really dug into how to write GUIs, but I know there's things like Carbon, Cocoa, etc., and those seem to be the base itself, and change significantly or are even entirely removed at the whim of Apple. Is there any stable GUI API on the Mac at all?

There's also this, which is frankly quite terrifying: https://news.ycombinator.com/item?id=11638367

[1] https://news.ycombinator.com/item?id=21174947

Re:Twitter for Mac is incapable of accepting certain letters... by saagarjha on Thursday October 31, 2019 @03:28AM (#21406423)
> There are many places which look unimplemented, with only stub functions present.

Note that the open source releases often get things scrubbed or ifdef'd out of them.

> There's also this, which is frankly quite terrifying

I fail to see your point.

Re:Twitter for Mac is incapable of accepting certain letters... by userbinator on Thursday October 31, 2019 @07:36AM (#21407621)
Note that the open source releases often get things scrubbed or ifdef'd out of them.

I mean things like TODO comments, not deliberate censorship.

I fail to see your point.

You don't notice anything wrong with the insane complexity to do almost nothing? A similar near-nothing app would be 1/10th the size on Windows, if not smaller.

Re:Twitter for Mac is incapable of accepting certain letters... by saagarjha on Thursday October 31, 2019 @07:52AM (#21407701)
I see nothing wrong with that app, since it’s purposefully convoluted. Apple’s application frameworks are written in and meant to be accessed through Objective-C so trying to write an app in C is going to require a lot of hacks and additional complexity. A simple application can be written in under a dozen lines of Swift or Objective-C code. (For an idea of how insane what you linked is, consider trying to use a C++ library from C: you’d need to hand-mangle the function names, and if you want to pass in parameters that were C++ objects you’d need to lay out their vtables and fields correctly, and…you get my point. It’s not anywhere near representative of what the normal development experience would be like.)
Re:Twitter for Mac is incapable of accepting certain letters... by userbinator on Friday November 01, 2019 @07:40AM (#21417755)
It's not "purposefully convoluted", and I'm not talking about "normal development experience", but rather the larger amount of non-essential complexity it shows; and as anyone should be aware, complexity is always an opportunity for bugs, regardless of whether it's something you would see or write or even be aware of in the "normal development experience". Combine that with Apple's attitude of constant churn and it's not hard to see how bugs can multiply easily.

Using a C++ library from C is not hard because objects map to structures in a straightforward manner (and in fact early C++ compilers were C++ to C translators), and you would need to use structures anyway, unless the library was obtusely designed with nonessential complexity. That's how the Win32 API works too (with the exception of the bloated COM stuff.)

Re:Twitter for Mac is incapable of accepting certain letters... by shaki-dora on Wednesday October 30, 2019 @10:11PM (#21405051)
Cocoa and the Foundation framework have been around longer than MacOS / OS X, i. e. more than 20 years. How many different concepts has Microsoft called ".NET" since then?
Re:Twitter for Mac is incapable of accepting certain letters... by umanwizard on Thursday October 31, 2019 @08:46AM (#21408113)
Regardless of the flavor of the month, the difference is Microsoft is still supporting most of their old frameworks. You can still go write an MFC app today, for example. (VB6 is a major unfortunate exception, I will admit).
Re:Twitter for Mac is incapable of accepting certain letters... by ChristianBundy on Wednesday October 30, 2019 @03:31PM (#21401587)
Maybe some over-zealous shortcut handler that's preventing keystroke events from bubbling up? It's interesting that shift-b produces "B" but just b with caps-lock doesn't produce any characters.
Re:Twitter for Mac is incapable of accepting certain letters... by Felk on Wednesday October 30, 2019 @05:38PM (#21403067)
but why would it work with a revealed password then? and why would typing one of those characters, hiding the password and then typing anything else clear the entire password? I'd really like to know what the heck is happening here
Re:Twitter for Mac is incapable of accepting certain letters... by kevin_thibedeau on Wednesday October 30, 2019 @03:32PM (#21401592)
Probably a poorly implemented test for accidental caps lock. Shift key means you really wanted a capital.