BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-20-2009, 05:01 AM   #1 (permalink)
New Member
 
Join Date: Mar 2009
Model: 8100
PIN: N/A
Carrier: java
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling UI from Library

Please Login to Remove!

Hi All,

I am new to blackberry,i wanted to know how is it possible to call a UI function from library ?

Thankx,
Offline  
Old 03-20-2009, 08:27 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

You certainly can. You must make sure any calls you make are from the UiApplication event thread.
Offline  
Old 03-22-2009, 01:01 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Nov 2008
Location: Sioux Falls, SD
Model: 9530
PIN: N/A
Carrier: Verizon Wireless
Posts: 65
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Handy piece of code:

Code:
synchronized(Application.getEventLock()) 
{
	// Put UI update code here
}
It's also useful to read the Javadoc for the method: Application.getEventLock().
__________________
Handspring >> Palm >> BB Pearl >> BB Storm

Tumblog: http://www.geekkink.com
Blog: http://www.zechariahs.org/blog
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.