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

  • SEARCH
  • Home
  • 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 478725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:43:14+00:00 2026-05-13T00:43:14+00:00

Within PB6.5.1 and PB9.0: Question 1: In itemchanged event: return 1 In itemerror event:

  • 0

Within PB6.5.1 and PB9.0:

Question 1:
In itemchanged event:
return 1
In itemerror event:
return 3
At runtime,the sequence of events fired is:
itemchanged–>itemerror–>itemchanged–>itemerror
Why is each event fired twice?

Question 2:
In itemchanged event:
return 1
In itemerror event:
return 2
At runtime,the focus did not move to the next cell.
Why?

Thanks.

  • 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-13T00:43:15+00:00Added an answer on May 13, 2026 at 12:43 am

    Question 1: By returning 3 from itemerror, you have rejected the data, which clears the column and triggers the itemchanged again.

    As to philosophically why PowerBuilder is designed to work in this fashion, I suspect they thought it would follow the principal of least surprise i.e. they were anticipating people asking why rejecting the input did not trigger itemchanged.

    Question 2: The itemchanged event overrides itemerror. In itemchanged you rejected the input and prevented focus changing; in itemerror you now accept the input, but you have not removed the block on focus changing. You should return 2 from itemchanged, since you can then control whether you allow focus to change from the itemerror event, by returning either 1 or 3.


    In case anyone is reading this question without the powerbuilder help files handy:

    return values for itemchanged:

    0 (Default) Accept the data value
    1 Reject the data value and do not allow focus to change (triggers itemerror)
    2 Reject the data value but allow the focus to change (triggers itemerror)

    return values for itemerror:

    0 (Default) Reject the data value and show an error message box
    1 Reject the data value with no message box
    2 Accept the data value
    3 Reject the data value but allow focus to change

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

Sidebar

Related Questions

Within each site collection, it is possible to group search scopes for display in
Within a SOA individual services should not interact with each other . When given
Within Symphony CMS, I want to be able to have an XML document which
Within an asp.net MVC app, I'm trying to find rooms which have a guest/client,
Within a Javascript object ( testObject ) I am populating an array with objects
Within my ajax call if an error is received I have an alert :
Within a for loop, I'm using the following code to convert from one date
Within Google Spreadsheets, how can I retrieve the max and min values of a
Within Magento orders, there is the option to send the customer a notification to
Within my code I have list items like this; <div id=content> <ul class=kwicks> <li

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.