I have a bunch of tiny pictures that I use as icons in a UI. Originally I made the UI in Morphic using direct manipulation (filing in the GIF icons by hand) but have encapsulated that stuff into code.
What is the best way to get the whole thing into a change set? I would guess the best thing would be to create class methods to generate the Forms, either from the original GIF data or some other form.
Is there an easy (or generally accepted) way to do this?
Thanks,
-Eric
Eric Scharff wrote:
I have a bunch of tiny pictures that I use as icons in a UI. Originally I made the UI in Morphic using direct manipulation (filing in the GIF icons by hand) but have encapsulated that stuff into code.
What is the best way to get the whole thing into a change set? I would guess the best thing would be to create class methods to generate the Forms, either from the original GIF data or some other form.
Is there an easy (or generally accepted) way to do this?
I've used the storeString of my forms in such situations. For icons with a small extent and small number of colors that works pretty well. If your icons are somewhat larger and more colorful, store a stringified version of their GIF data in a method instead, and unpack that into a class variable which serves as a cache for the thing.
Cheers, Hans-Martin
Here is an example using a well-known icon...
Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: (ReadStream on: 'R0lGODlhZABIAOYAAO7u/+zs+urq9Obm/+bm7uHh8d/f997e/+Hh6d3d4tjY99fX5dfX29XV 8NfX2tHR8c/P5dDQ0c7O08zM3MnJ5cjI08TE4MbG0cXFxcHB3L+/17+/zr+/xL29vba20ra2 xba2trOzzq+vs6ysvKurwqysrqenuqamtaampqWlsJ+fqp6etZycopmZnpKSnZKSlIyMoo2N lIyMjIaGm4SEkIWFi4SEhH5+kH5+gXt7e3R0fnR0dHJygWpqc2lpeWlpaWZmZmNjcl9fbl5e ZVpaWlZWV1NTYFJSUkxMV0pKVUpKSkJCQjw8RDo6OjExMSoqMSkpKSQkKiEhIRkZGRMTFRAQ EAgICAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAACH5BAQUAP8ALAAAAABkAEgAAAf/gAeCg4SF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