Andreas posted a BankAccount and ATM tutorial. This nicely demonstrates some of the basic Tweak concepts such as fields, events, triggers, and handlers, as well as introducing UI aspects like players, costumes, updating etc.
While working on my SqueakJS VM, it became necessary to deconstruct floating point numbers into their mantissa and exponent parts, and assembling them again. Peeking into the C sources of the regular VM, I saw they use the frexp () and ldexp () functions found in the standard C math library. Unfortunately, JavaScript does not provide these two functions. But surely there must have been someone who needed these before me, right? Sure enough, a Google search came up with a few implementations. However, an hour later I was convinced none of them actually are fully equivalent to the C functions. They were imprecise, that is, deconstructing a float using frexp() and reconstructing it with ldexp() did not result in the original value. But that is the basic use case: for all float values, if [ mantissa , exponent ] = frexp (value) then value = ldexp ( mantissa , exponent ) even if the value is subnormal . None of the implementations (even the complex ones) re...
Comments
However, neither of us is a native speaker, so we may well get convinced otherwise if you have a really good suggestion (beAwareOf: feels a bit awkward, too).
Telling an object to beware of a normal event doesn't make sense to me. The update of a field value is not an abnormal or unexpected or dangerous event. Perhaps you mean beware because there's a danger you will overlook implementing a handler for this event that you probably really want to handle. But thats really a warning to the programmer rather than a message to the object.
How about beReadyFor: or respondTo: or watchFor: or takeActionOn: or the more prosaic but typical registerEvent:.
Don't know if you'll like any of these. In my opinion there all better than the implications of danger in bewareOf:. From what I've read, both you and Andreas express yourselves in English very well but you might want to solicit more input from other native speakers on this. I'm American by the way.
Cheers