New topic: 

Textfield.appendText

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

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        jens bendig          Post subject: Textfield.appendTextPosted: 
Wed Mar 20, 2013 8:55 am                         
Joined: Tue Mar 06, 2007 11:01 am
Posts: 1014
Location: Bremen, Germany                Hi Guys,

I am coding with 2012R2. I have programmed a Textfield inside of a CC as an 
Observer. When the subject changes, this method is called
and the text should be appended. But (unlike other elements on my screen), 
nothing happens here. In the debugger, I can see, that the method is called, 
the String to append is there (txt) and has content, but the Textfield does not 
change. Not on the screen and not in the debugger. Is there something wrong 
with that method?

Thx,

Jens

// me.textProtocol is a TextField-Object, sitting inside a CC.
Function subjectChanged(obj as Subject) As Handshake
  if not obj isa Protocol then
  return new Failed(me.pObjectType+".subjectChanged(): Unknown Subject")
  end if
  
  dim pro as Protocol       <<-- unpack the sender
  pro=Protocol(obj)
  dim txt as string
  txt=pro.value()           <<-- unpack the message
  me.textProtocol.appendText(txt) <<-- nothing appears on screen: Why not?
  self.Window.Refresh()      <<-- necessary?
  return new OK()
End Function
   
                             Top                DaveS          Post subject: 
Re: Textfield.appendTextPosted: Wed Mar 20, 2013 10:02 am                       
          
Joined: Sun Aug 05, 2007 10:46 am
Posts: 4689
Location: San Diego, CA                try adding me.invalidate instead of 
self.refresh      
_________________
Dave Sisemore
MacPro, OSX Lion 10.7.4 RB2012r1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top                jens bendig          Post 
subject: Re: Textfield.appendTextPosted: Wed Mar 20, 2013 12:16 pm              
           
Joined: Tue Mar 06, 2007 11:01 am
Posts: 1014
Location: Bremen, Germany                Thank you, Dave. Does not help.
since "me" is a Container-control, i could only say:
 "me.textProtocol.invalidate()"

However, same Result, nothing on screen.

Ugly: "me.textProtocol.text=me.textprotocol.text+txt"
works.   
                             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