🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Request for examples of NILoginPanel

#1756
From: A. Chase Turner
Date: Tue, 06 Oct 1992 16:22
77 lines
3230 bytes
I am having difficulties using NILoginPanel in NeXT OS 3.0.  Neither the  
 
3.0 Documentation nor NeXTAnswers AQ697 clarify the ambiguity about the nature of call backs to the delegate after a validation has been performed. A similar question was posted to comp.sys.next.programmer by clu@malihh.hanse.de (Carsten Lutz) in March 1992: no one has posted a solution 
 
 in response to his question yet...

In the code fragment below, 
runModalWithValidation:InDomain:withUser:withInstruction:allowChange
always returns FALSE even though I have established a connection with a netinfo domain.  IsValidLogin: always returns TRUE if I use either runModal:*** or runModalWithValidation:*** with an INVALID password.

I have supplied a code fragment below.  Comments or other code fragments with NILoginPanel are welcome...

chase_turner@stumpy.cs.orst.edu

======================================================================
- (BOOL) loadKernel
{
	id	authorizationPanel = [NILoginPanel new];
	id	domainPanel	= [NIDomainPanel new];
	id	aDomain = [NIDomain alloc];

	//status indicators
	unsigned niResult;
	BOOL	loginValidP = FALSE;
	BOOL	verificationP = FALSE;
		
	[domainPanel runModal];
	[aDomain init];

	// This is to ensure I am passing a legitimate domain connection to the NILoginPanel instance
	niResult = [aDomain setConnection: [domainPanel domain]];

	assert (niResult == NI_OK);

	// the following ALWAYS returns FALSE
	loginValidP = [authorizationPanel runModalWithValidation:self
				inDo 
main:[aDomain getDomainHandle]
				withUser:"root"
				withInstruction:"A relocatable kernel needs to be loaded.  Please issue the root password in order to continue."
				allowChange:FALSE];

	// the following ALWAYS returns TRUE even with incorrect passwords
	verificationP = [authorizationPanel isValidLogin: self];

	[aDomain disconnectFromCurrent];
	[aDomain free];

	if (loginValidP == TRUE) {
	.....(etc)
ents with NILoginPanel are welcome...

chase_turner@stumpy.cs.orst.edu

======================================================================
- (BOOL) loadKernel
{
	id	authorizationPanel = [NILoginPanel new];
	id	domainPanel	= [NIDomainPanel new];
	id	aDomain = [NIDomain alloc];

	//status indicators
	unsigned niResult;
	BOOL	loginValidP = FALSE;
	BOOL	verificationP = FALSE;
		
	[domainPanel runModal];
	[aDomain init];

	// This is to ensure I am passing a legitimate domain connection to the NILoginPanel instance
	niResult = [aDomain setConnection: [domainPanel domain]];

	assert (niResult == NI_OK);

	// the following ALWAYS returns FALSE
	loginValidP = [authorizationPanel runModalWithValidation:self
				inDo
Technical Details
Message-ID: <1992Oct06.162216.15706@CS.ORST.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!orstcs!orstcs!usenetusenet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!orstcs!orstcs!usenetusenet
From: chase@stumpy.cs.orst.edu (A. Chase Turner)
Newsgroups: comp.sys.next.programmer
Subject: Request for examples of NILoginPanel
Keywords: NILoginPanel
Message-ID: <1992Oct06.162216.15706@CS.ORST.EDU>
Date: 6 Oct 92 16:22:16 GMT
Article-I.D.: CS.1992Oct06.162216.15706
Sender: usenet@CS.ORST.EDU
Reply-To: Chase_Turner@stumpy.cs.orst.edu
Organization: Oregon State University, Computer Science Dept
Lines: 77
Nntp-Posting-Host: stumpy.cs.orst.edu