Giter Club home page Giter Club logo

Comments (3)

mxcl avatar mxcl commented on June 27, 2024

Hmm. I guess we could call mutableCopy in the mutable path. Hah.

Otherwise we can remove the mutable paths. They aren't important IMO. They were added in a pull request.

I've tested this kind of thing with mutableArray, and IIRC the objects respond to the mutable selectors, but they crash if you call them, so it's a strange area of objc.

Since we are categories we can't have a category for NSString and NSMutableString, or at least, in my testing, this did not work, hence the strange checks for mutability in the methods we have.

I'm leaning towards removing the mutability parts, I think it is not possible to properly support them.

from chuzzlekit.

mxcl avatar mxcl commented on June 27, 2024

Also, you didn't want the textField’s string to be chuzzled anyway! I'm not sure if we should consider this ChuzzleKit’s fault or UIKit’s though.

Still I feel sticking with immutability is what I intended for this library, and what people expect.

from chuzzlekit.

tgaul avatar tgaul commented on June 27, 2024

Yeah, I hadn't realized it returned a pointer to it's representation string, so I fixed that in our code by making an immutable copy. It's something I'll be sure to remember in the future when using UITextView.

I think ideally chuzzle would avoid mutating objects in place, as that would seem to be safest.

I'm personally not sure about how it does whitespace trimming either. What's happening in my case is the string that's a URL parameter was a user-entered value in a text field. It turns out that I do my own whitespaces trimming, but who's to say that some app doesn't want to include spaces or newlines or tabs at the beginning/end of the string it's passing as a URL parameter?

from chuzzlekit.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.