[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: Custom patterns
- To: firstname.lastname@example.org
- Subject: Re: Fwd: Custom patterns
- From: "Mark A. Tapia" <email@example.com>
- Date: Tue, 4 Jan 1994 09:32:02 -0500
- Cc: firstname.lastname@example.org
On Mon Jan 3 13:24:47 1994, Andrew Newell Mickish writes
in response to Karsten Poecks suggestion of 19 DEC to use
the variant record for pattern:
>> (defparameter *my-pattern*
>> (make-record :pattern
>> :b0 238
>> :b7 119))
> I tried this, but I got the error
> > Error: :B0 is not a field of record :PATTERN
> > Valid fields are: (:ARRAY)
> Is the technique above supposed to work?
The short answer is it is not the MPW standard!
> It seems reasonable to want to supply the values of the fields when
> the record is created, rather than calling %put-byte afterwards.
> Does the documentation for the pattern record
> on p. 715 imply that this is possible?
It is if you only use the old record definition (included below).
This problem occurs when first using the standard quickdraw file
(require quickDraw) and then using the quickdraw interface file
On Mon, 1 Nov 1993, I asked Bill St. Clair about this problem:
>2. The pattern record definition does not contain variant structures.
Bill St. Clair responded:
> The problem that you mention with the Pattern record is NOT a bug.
> You may have become accustomed to the definition that was
> distributed with MCL 1.3.2 and earlier in the
> file, but those variants were invented by somebody here. The MPW
> interfaces contain no such variants, only the array of 8 bytes as
> specified in the newer MCL interface file.
The following fragments show that the two record definitions are incompatible.
;;Record definition from ccl:library:interface;quickDraw.lisp
(defrecord (Pattern :handle) (array (array :unsigned-byte 8)))
;;Record definition from ccl:library;records.lisp
(variant ((w0 integer)
((bytes (array byte 8)))
((array (array :unsigned-byte 8)))))