🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How can one initialize "FormCell" to arbitrary values ??

#166
From: Alex Makarewycz
Date: Wed, 22 Jul 1992 00:43
56 lines
1881 bytes
Hello -

	Scenario:

	Using Interface Builder I have constructed a front end to one of  
my Fortran programs.  Currently, I use a Form Class containing 5 Cells  
which hold the values of my Fortran program variables.  By typing in  
numbers into the FormCell Fields while building the application in I.B.  
causes default values to appear in the cells upon launching the  
application.  But those values don't get placed into their respected  
variables unless I systematically select a Cell and press Enter.  How can  
I make my application automatically initialize the variables corresponding  
to the FormCells?  



	Sample Code 


/*  Wave.h   */
/*  WaveInstance is an Instance of Object   */
/*  Input is an outlet of WaveInstance, it is connected to the Form   */
{
	id Input;
	int a;
}

- PointsPerWave:sender;
@end




/*  Wave.m    */
/*  PointsPerWave is an action of WaveInstance, its connection is from  */
/*   a FormCell in the Form   */
/*   "a" is the variable which is assigned the value in the form cell */
- PointsPerWave:sender;
{
	a=[Input IntValue]
	return self;
}


	Once Again!

	How can I set a=10 upon program initialization without having to  
call the PointsPerWave method.   Should I force a call to the  
PointsPerWave method?  How would one force a method?


Thanks -

Alex Makarewycz

makarewy@rft31.nas.nasa.gov
Technical Details
Message-ID: <1992Jul22.004307.579@nas.nasa.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!news
From: makarewy@rft31.nas.nasa.gov (Alex Makarewycz)
Newsgroups: comp.sys.next.programmer
Subject: How can one initialize "FormCell" to arbitrary values ??
Keywords: initialize default
Message-ID: <1992Jul22.004307.579@nas.nasa.gov>
Date: 22 Jul 92 00:43:07 GMT
Sender: news@nas.nasa.gov
Organization: NAS Program, NASA Ames Research Center, Moffett Field, CA
Lines: 56