Login with Password application

Hi Sir,

  I am creating an photon application,in which opening an

window with a login and password in another window can u please ]
guide me in this application,

Please check the code i have used:

but it is not working.

/* Y o u r D e s c r i p t i o n /
/
AppBuilder Photon Code Lib /
/
Version 2.03 */

/* Standard headers */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

/* Local headers */
#include “ablibs.h”
#include “abimport.h”
#include “proto.h”

#include <Pt.h>

int
ok_fnc( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t *cbinfo )

{
        
          PtArg_t  args[1];
          PtWidget_t  *group; 
        

           /* eliminate 'unreferenced' warnings */
           widget = widget, apinfo = apinfo, cbinfo = cbinfo;


 PtGetResource (ABW_nameText, Pt_ARG_TEXT_STRING, &name, 10);
		PtGetResource (ABW_base_txt_PasswordSaved, Pt_ARG_TEXT_STRING, &pswd, 10);

	   	if ((strcmp(name, "swetha") == 0) || (strcmp(pswd, "spa") ==0))
		{      
        	
         	PtRealizeWidget(group);
 		}
 		else
 		{
	    	ApError( ABW_base, 0, "Sender", "Invalid Input! Try again", NULL );

	  
  		}		 

		return( Pt_CONTINUE );

}

What’s the problem?

What is the problem in the above code…
Application is not working…, its just shutting down

And when do you run ok_fnc function?. Which event trigger this callback? Are the widgets “nameText” and “base_txt_PasswordSaved” already realized?

Your are realizing widget “group”, and according to what I see “group” is a not initialized pointer… ?? This kills any app… Take a look…

Regards,
JM