🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
1 messages
1 total messages Started by A. Chase Turner Tue, 06 Oct 1992 16:22
Request for examples of NILoginPanel
#1756
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads