Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6345189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:46:25+00:00 2026-05-24T20:46:25+00:00

I am trying to establish a PIM listener that will update a MainScreen where

  • 0

I am trying to establish a PIM listener that will update a MainScreen where all the contacts of the phone are listed.

What I am doing is the following:

  • I am loading for one time only a form called ContactsForm and I am storing it into the RuntimeStore

  • I created a PIMListListener to listen for all the changes that will occur in the address book.

  • When a contact is added, I am adding it to the contactsForm successfully

  • When a contact is removed, I am facing a big problem deleting it :S!!!

I am getting this exeption: “IllegalArgumentException”; this exception’s text is : UiEngine accessed without holding the event lock. I know such errors and I know how to resolve them. So I used the following code:

UiApplication.getUiApplication().invokeLater( new Runnable() { public void run() {
  synchronized(UiApplication.getEventLock()) {
     uiContacts.vm.delete(uiContacts.vm.getField(j));
  }
}});

This should resolve the problem. But I keep getting this error again and again. How to resolve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:46:26+00:00Added an answer on May 24, 2026 at 8:46 pm

    Listeners, like the PIMListListener, do not receive their callbacks in the same Application context as your UiApplication. So, in your code, UiApplication.getUiApplication() doesn’t really work the way you’d expect it to.

    The best thing to do would be to store a reference to your UiApplication in a place where the callback can reach it (during initialization of the UiApplication, perhaps), and then replace UiApplication.getUiApplication().invokeLater(...) with myUiApp.invokeLater(...), where myUiApp is the reference to your UiApplication which you stored earlier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write some Python code that will establish an invisible relay between
all I am trying to establish peer to peer (UDP) communication via firefox extension.
I am trying to establish an abstract class. I want to ensure that any
I'm trying to establish a connection to a server that sends 401 Authentication Error
I am trying to establish equality of three equal variables, but the following code
We're getting the following error when trying to establish a connection to a database
I am trying to establish USB communication as host. I am following the examples
Just trying to establish whether prototype can do something like $$('#ID a:last').css('color','#111'); Any ideas
im trying to establish and access a session from my servlet, but I can't
I am trying to establish upper / lower bound in my stored procedure below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.