Article View: comp.sys.amiga.tech
Article #3971Lattice 5.04 BUG
From: George Armhold
Date: Mon, 11 Jun 1990 03:41
Date: Mon, 11 Jun 1990 03:41
146 lines
3757 bytes
3757 bytes
While trying to design a custom requester for a program I'm writing, I
seem to have come across a bug in Lattice 5.04. Whenever I try to
assign a custom bitmap to a requester, the compiler fails with CXERR
22. If I take the same exact code, and set the image data pointer to
NULL, the code compiles fine. Has this been fixed in 5.05? (I'm still
waiting for it to arrive.) Or am I doing something wrong here?
Here's the offending code:
struct IntuiText ok_text =
{
0, /* FrontPen */
1, /* BackPen */
JAM1, /* Draw Mode */
4, 4, /* LeftEdge, TopEdge of text */
NULL, /* default font */
(UBYTE *)"OK", /* text */
NULL /* no more IntuiText's */
};
struct Gadget ok_gadget =
{
NULL, /* NextGadget */
100, 15, /* LeftEdge, TopEdge */
10, 10, /* Width, Height */
GADGHCOMP, /* flags */
RELVERIFY |
ENDGADGET, /* activation flags */
REQGADGET, /* GadgetType */
NULL, /* GadgetRender */
NULL, /* SelectRender */
&ok_text, /* pointer to an IntuiText */
NULL, /* mutual exclude */
NULL, /* special info */
0, /* GadgetId */
NULL, /* UserData */
};
SHORT ok_border_points[]=
{
0,0,
10,0,
10,10,
0,10,
0,0
};
struct Border ok_gadget_border =
{
0,0, /* LeftEdge, TopEdge */
0,0, /* FrontPen, BackPen */
JAM1, /* DrawMode */
5, /* number of points in ok_border_points */
ok_border_points, /* pointer to the array of points */
NULL, /* NexBorder */
};
USHORT chip my_image_data[84]=
{
0x00FF,0x8000,
0x0700,0x7000,
0x18F0,0x0C00,
0x27E0,0x0200,
0x4800,0x0100,
0x9100,0x4080,
0x90AA,0x8080,
0x8080,0x8080,
0x4041,0x0100,
0x2041,0x0200,
0x1822,0x0C00,
0x0622,0x3000,
0x01FF,0xC000,
0x0150,0x2000,
0x0205,0x4000,
0x0150,0x2000,
0x0205,0x4000,
0x0150,0x2000,
0x0205,0x4000,
0x01FF,0x8000,
0x003C,0x0000,
0x0000,0x0000,
0x00FF,0x8000,
0x070F,0xF000,
0x181F,0xFC00,
0x37FF,0xFE00,
0x6EFF,0xBF00,
0x6F55,0x7F00,
0x7F7F,0x7F00,
0x3FBE,0xFE00,
0x1FBE,0xFC00,
0x07DD,0xF000,
0x01DD,0xC000,
0x0000,0x0000,
0x00AF,0xC000,
0x01FA,0x8000,
0x00AF,0xC000,
0x01FA,0x8000,
0x00AF,0xC000,
0x01FA,0x8000,
0x0000,0x0000,
0x0000,0x0000
};
struct Image about_image =
{
0, 0, /* LeftEdge, TopEdge */
25, 21, /* Width, Height */
2, /* Depth */
my_image_data, /* ImageData */
0x03, 0x00, /* PlanePick, PlaneOnOff */
NULL /* NextImage */
};
struct Requester About_req =
{
NULL, /* OlderRequester- used by intuition */
100,25, /* LeftEdge, TopEdge */
201, 40, /* Width, Height */
0, 0, /* RelLeft, RelTop */
&ok_gadget, /* address of first gadget */
&ok_gadget_border, /* address of border structure */
&ok_text, /* pointer to an intuitext */
PREDRAWN, /* flags */
0, /* BackFill */
NULL, /* ReqLayer- used by intuition */
NULL, /* ReqPad1- used by intuition */
&about_image, /* pointer to my image data */
/* ^^^^^^^^^^^ if we set this to NULL, the code compiles ok. */
NULL, /* RWindow- used by intuition */
NULL, /* ReqPad2- used by intuition */
};
Technical Details
Message-ID:
<Jun.10.23.41.18.1990.385@steely.rutgers.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mailrus!uwm.edu!psuvax1!rutgers!aramis.rutgers.edu!topaz.rutgers.edu!steely.rutgers.edu!armholdShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mailrus!uwm.edu!psuvax1!rutgers!aramis.rutgers.edu!topaz.rutgers.edu!steely.rutgers.edu!armhold From: armhold@steely.rutgers.edu (George Armhold) Newsgroups: comp.sys.amiga.tech Subject: Lattice 5.04 BUG Keywords: CXERR 22 Message-ID: <Jun.10.23.41.18.1990.385@steely.rutgers.edu> Date: 11 Jun 90 03:41:22 GMT Organization: Rutgers Univ., New Brunswick, N.J. Lines: 146