New topic: 

NilObjectException When Referring to WebPage?

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

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        johnnyaction314          Post subject: NilObjectException When 
Referring to WebPage?Posted: Wed Feb 27, 2013 1:44 am                         
Joined: Tue Feb 26, 2008 3:39 pm
Posts: 33                Hi Everyone, long time RS user but new to WE. I have a 
EasyTCPSocket subclass that connects to a server on a Mac and is receiving data 
from other computers about events that are performed in the software. These 
notifications are sent from the socket to an intermediate module which figures 
out where in the software this new data applies. So long story short, I am 
trying to receive data and then update listboxes, etc depending on what the new 
data is. When I try to reference any webpage in the software directly from the 
socket subclass in the ReceivedMessage event I get a NilObjectException on any 
lines of code that are attempting to directly reference the webpage. If I leave 
the ReceivedMessage event empty in the subclass but move the code into 
ReceivedMessage event of the socket instance I do not get this same exception 
and everything works fine.

So basically just wondering if this is a bug or some nuance to how web edition 
works that I am not aware of? Thanks in advance!   
                             Top                taylor-design          Post 
subject: Re: NilObjectException When Referring to WebPage?Posted: Wed Feb 27, 
2013 2:47 am                         
Joined: Wed Mar 22, 2006 11:15 am
Posts: 607
Location: Southern California                WebPages belong to WebSessions, 
one WebSession per browser connection. So you have to get the WebSession you 
want to update, and then get the page through it.

WebApplication has methods for iterating through the available sessions. Also 
take a look at WebSessionContext. For some code you will need to set that up.   
   
_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 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