home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.open-look
- Path: sparky!uunet!das.wang.com!wang!news
- From: zong@huey.cs.huji.ac.il (Yaniv Azriel)
- Subject: Starting out
- Organization: Mail to News Gateway at Wang Labs
- Date: 15 Sep 92 16:26:09 GMT
- Message-ID: <5628@shum.huji.ac.il>
- Sender: news@wang.com
- Lines: 51
-
- Hallo everyone.
- I have began to program to the OpenLook GUI today, approx 10 hours ago!)
-
- I copied this simple hello program from a book by Dan Heller, compiled and
- linked. On running it sang the usual segmentation fault blues and grinded to a
- halt. The debugger claims the segmentation fault was generated by an obscure
- routine by the name of XrmStringToQuarkList.
-
- Well, it all chineese to me. Now i am not a novice programmer, but having spend
- a whole working day, trying to execute an hello program, i am considering
- going back to Motif, which i had abondoned after taking one quick glance at an
- OpenLook application - pure beauty. I include the source, and hope some one can
- straighten me out.
-
- #include <xview/xview.h>
- #include <xview/frame.h>
- #include <xview/panel.h>
-
- Frame frame;
-
- main (argc, argv)
- int argc;
- char *argv[];
- {
- Panel panel;
- void quit();
- xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL);
- frame = (Frame)xv_create (NULL, FRAME, FRAME_LABEL, argv[0],
- XV_WIDTH, 200,
- XV_HEIGHT, 100, NULL);
- panel=(Panel)xv_create (frame, PANEL, NULL);
- (void) xv_create (panel, PANEL_BUTTON, PANEL_LABEL_STRING, "quit",
- PANEL_NOTIFY_PROC, quit, NULL);
-
- xv_main_loop(frame);
- exit(0);
- }
-
- void quit()
- {
- xv_destroy_safe(frame);
- }
-
- Thanks all.
-
- PS. i am running the Xview toolkit, on a sun4 (running unix.. and X11). Am i
- making sense at all ?
- -------------------------------------------------------------------------------
- Yaniv Azriel zong@huey.huji.ac.il Users are irrelevant...
- -------------------------------------------------------------------------------
-
-