The original program was too big, so I wrote a little test program.
Strange, this time it does not crash, but it does not display any window. If
you uncomment the last (0, 0) point, it works fine.
Do you get the same results?
Markus
#include <Pt.h>
main(int argc, char *argv[])
{
PtArg_t arg[5];
PtWidget_t *window;
if ((window = PtAppInit(0, 0, 0, 0, NULL)) == NULL)
exit(-1);
PhPoint_t const pts[] = { { 10, 10 }, { 20, 20} /, { 0, 0 }/ };
PtWidget_t *rect = PtCreateWidget(PtRect, window, 0, arg);
PtSetResource(rect, Pt_ARG_POINTS, pts, 2);
PtRealizeWidget(window);
PtMainLoop();
}
“Wojtek Lerch” <wojtek@qnx.com> wrote in message
news:9i4tjt$mjn$1@nntp.qnx.com…
Markus Loffler <> loffler@ces.clemson.edu> > wrote:
All widgets derived from PtGraphic.
Sorry for my sloppy language, I mean of course my program crashes while
calling the PtSetResource()
I just put together a test app whose setup function looks like this:
PhPoint_t const pts[] = { { 10, 10 }, { 20, 20 } };
PtSetResource( ABW_pixel, Pt_ARG_POINTS, pts, 2 );
PtSetResource( ABW_poly, Pt_ARG_POINTS, pts, 2 );
PtSetResource( ABW_line, Pt_ARG_POINTS, pts, 2 );
PtSetResource( ABW_ellipse, Pt_ARG_POINTS, pts, 2 );
PtSetResource( ABW_bezier, Pt_ARG_POINTS, pts, 2 );
It does not crash. Is your code different from mine?
\
Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.
begin 666 graphic.cpp
M(VEN8VQU9&4@/%!T+F@^#0H-“FUA:6XH:6YT(&%R9V,L(&-H87(@F%R9W9;
M72D-“GL-“B @(%!T07)G7W0@(” @(” @(&%R9ULU73L-“B @(%!T5VED9V5T
M7W0@(” @("IW:6YD;W<[#0H-“B @(&EF(”@H=VEN9&]W(#T@4’1!<’!);FET
M# L(# L(# L(# L($Y53$PI2 ]/2!.54Q,0T(" @(" @97AI="@M,2D[
M#0H)#0H@("!0:%!O:6YT7W0@8V]N<W0@<'1S6UT@/2![('L@,3 L(#$P('TL
M('L@,C L(#(P?2 OBP@>R P+” P(‘TJ+R!].PT*(" @4’17:61G971?=" J
M<F5C=" ](%!T0W)E871E5VED9V5T*%!T4F5C=“P@=VEN9&]W+” P+"!A<F<I
M.PT*#0H@("!0=%-E=%)E<V]U<F-E*’)E8W0L(%!T7T%21U]03TE.5%,L(’!T
M<RP@,BD[#0H@(" -"B @(%!T4F5A;&EZ95=I9&=E=“AW:6YD;W<I.PT*#0H@
4(”!0=$UA:6Y,;V]P*"D[#0I]#0H
end