🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1559

How the heck do I alloc a simple window?

#1559
From: Scott R Violet
Date: Fri, 16 Oct 1992 16:44
35 lines
1443 bytes
HI,
	I have been programming on the NeXT off and on for a while
now.  And I just recently wanted to make a small little window without
using IB.  But, I have had no luck at all!!!  I was wondering if
anyone could possibly give me some suggestions on why the following
chuck of code might not work.  It compiles fine, but upon running it I
get a bus error.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#import <appkit/Window.h>
#import <appkit/graphics.h>

void main() {
  id duhWindow;
  NXRect duhRect = {{10.0, 10.0}, {100.0, 100.0}};
  duhWindow = [[Window alloc] initContent:&duhRect
		style:NX_TITLEDSTYLE
		backing:NX_BUFFERED
		buttonMask:NX_ALLBUTTONS
		defer:NO];

}

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

I then compiled it in the following way:
> cc test.m -lNeXT_s

Any suggestions on why this would give me a bus error?
NOTE: I am doing this under 3.0.
Thanks in advance,
-- 

		-Scott Violet (xepo@csd4.csd.uwm.edu)
Technical Details
Message-ID: <1bmrgjINN287@uwm.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!uwm.edu!csd4.csd.uwm.edu!xepo

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!uwm.edu!csd4.csd.uwm.edu!xepo
From: xepo@csd4.csd.uwm.edu (Scott R Violet)
Newsgroups: comp.sys.next.programmer
Subject: How the heck do I alloc a simple window?
Date: 16 Oct 1992 16:44:03 GMT
Organization: Computing Services Division, University of Wisconsin - Milwaukee
Lines: 35
Distribution: usa
Message-ID: <1bmrgjINN287@uwm.edu>
NNTP-Posting-Host: 129.89.7.4
Originator: xepo@csd4.csd.uwm.edu