btc / allegro

Allegro Composer for iOS
2 stars 1 forks source link

make AEXMLElement.safeValue generic function usable for Int and Rational #252

Open niklele opened 7 years ago

niklele commented 7 years ago
  1. I wasn't able to use the Int() function or Int.Init() function as the parse function in safeValue because Swift couldn't resolve the function to the one that takes in String and returns Int? This will remove the need for the function safeValueInt() so that all cases use the generic function

  2. Rational doesn't have an initializer from String to Rational? so making that will also allow for more uses of the generic function.

see Extensions/AEXMLElement.swift

btc commented 7 years ago

Let's talk about this on Sat. I think I can be helpful here.

btc commented 7 years ago

Is this a beta priority? Can we push this back until after? If we can push it back, please remove its milestone. @niklele

edit: I removed its milestone. If it's important, re-add it.