New topic: 

webpage.show from httpsocket

<http://forums.realsoftware.com/viewtopic.php?t=41313>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        wakatanka          Post subject: webpage.show from 
httpsocketPosted: Fri Nov 04, 2011 11:45 am                         
Joined: Thu Feb 01, 2007 12:35 pm
Posts: 7                Hi i've a web project with two pages.
In the first one i have a login system (2 fields, a button and an httpsocket).
When i click the login button i have this code:

Code:  Dim form as Dictionary
  
  // create and populate the form object
  form = New Dictionary
  form.value("user") = login.Text
  form.value("password") = password.Text
  
  // setup the socket to POST the form
  login_sck.setFormData form
  
  
  login_sck.Post("http://*.*.*.*/login.php";)


in the socket pagereceived event i have this code:

Code:  dim user as String
  dim js as new JSONItem(content)
  user = js.Lookup("user","none")
  
  if utente <> "none" then
  WebPage2.Show
  end


webpage2.show give me nilobjectexception.

if i put the code webpage2.show on a button in webpage1, it works flawless.

please help me.

thank you so much   
                             Top                Thom McGrath          Post 
subject: Re: webpage.show from httpsocketPosted: Fri Nov 04, 2011 3:22 pm       
                Site Admin                
Joined: Tue May 06, 2008 1:07 pm
Posts: 958
Location: Greater Hartford Area, CT                Are you certain it triggers 
a NilObjectException and not a SessionNotAvailableException?      
_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.  
                             Top                wakatanka          Post 
subject: Re: webpage.show from httpsocketPosted: Fri Nov 04, 2011 3:39 pm       
                  
Joined: Thu Feb 01, 2007 12:35 pm
Posts: 7                yes, i confirm nilobjectexception, if i change the code 
with:

Code:  dim utente as String
  dim wp as new WebPage1
  dim js as new JSONItem(content)
  utente = js.Lookup("codice","nessuno")
  
  if utente <> "nessuno" then
  wp.Show
  end
  


i've got a SessionNotAvailableException   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to