Closed latenitefilms closed 8 years ago
The code which converts data types from their internal representation to lua was designed to be useful in a larger context, perhaps eventually being added to one of our internal frameworks so it doesn't have to be repeated. However, now that I've played with axuielement for a while, I think I can remove most of the "extra types" since they aren't relevant to Accessibility.
This is a long way of saying that the module currently has code to identify variable types it will never use... and some of them are newer than 10.10... if the conversion code ever gets made into a reusable library, additional code should be added to detect the OS version and work around this... however, the simplest fix, which I can include in some updates I plan to add tonight, is to simply remove the data types that I now know Accessibility never uses.
Awesome - thank you!!
I fixed this by commenting out lines 156 and 157 in internal.m:
//lua_pushstring(L, "CVMetalTexture") ; lua_seti(L, -2, (lua_Integer)CVMetalTextureGetTypeID()) ;
//lua_pushstring(L, "CVMetalTextureCache") ; lua_seti(L, -2, (lua_Integer)CVMetalTextureCacheGetTypeID()) ;
The current version at https://github.com/asmagill/hs._asm.axuielement/ has these extraneous types removed as well, but since I'm still working on the search rewrite, I hadn't really posted about it yet! Guess I should have here, but glad you got it working for you for now!
No worries at all! Thanks @asmagill!
I just tried using axuielement on one of our iMac running 10.10.5 and it breaks Hammerspoon with the following error: