Skip navigation.
Home
The QNX Community Portal

View topic - Login with Password application

Login with Password application

Isn't the name clear?

Login with Password application

Postby Melvin » Wed Apr 08, 2009 5:44 am

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 );

}
Melvin
New Member
 
Posts: 9
Joined: Wed Nov 05, 2008 9:41 am

RE: Login with Password application

Postby juanplacco » Wed Apr 08, 2009 1:26 pm

What's the problem?
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm

RE: Login with Password application

Postby Melvin » Thu Apr 09, 2009 6:54 am

What is the problem in the above code..
Application is not working...., its just shutting down
Melvin
New Member
 
Posts: 9
Joined: Wed Nov 05, 2008 9:41 am

RE: Login with Password application

Postby juanplacco » Thu Apr 09, 2009 12:59 pm

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
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm


Return to GUI Programming

Who is online

Users browsing this forum: Google [Bot] and 2 guests