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 9177103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:15:19+00:00 2026-06-17T17:15:19+00:00

Overiding IGridItemRenderer.prepare() function and doing some stuff. override public function prepare(hasBeenRecycled:Boolean):void { cb.selected =

  • 0

Overiding IGridItemRenderer.prepare() function and doing some stuff.

override public function prepare(hasBeenRecycled:Boolean):void
{
  cb.selected = grid.selectionContainsIndex(rowIndex);//cb is CheckBox itemrenderer
}

when this prepare function called? and how many times? and what it does?
while debugging I noticed that this method was continuously called,
Is there any performance issues by overriding this method?

  • 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-06-17T17:15:20+00:00Added an answer on June 17, 2026 at 5:15 pm

    In flex, item renderers are constructed, destroyed and recycled automatically by the framework. It tries to recycle previously unused object to save resources.

    The prepare is called when the item renderer is affected to a new row, cell, object, …

    You can use it to initialize some labels, fields, …

    If in debug you noticed is “continuously called” it is probably because of the following workflow:
    – the item gain focus, framework calls prepare()
    – your IDE stops in the method, then your application lost focus
    – once you finished to debug, your application re gained focus, then the prepare method is called,
    – etc, …

    In definitive, either you use bindings to {data.myFields} to display the values automatically when the data object is affected (silently through the prepare method), otherwise you override this method to prepare some attributes for display.

    In term of performance, everything should be similar.

    HIH

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

Sidebar

Related Questions

I am overriding the onBackPressed method in my app : public void onBackPressed() {
I'm overriding the drawRect: method in a custom UIView, and I'm doing some custom
Just overriding Equals in TKey does not help. public override bool Equals(object obj) {
I am overriding a Grid, adding some customer features. One of the features is
I understand overriding a method/function redefines its implementation in the derived class from its
I am overriding the addItem() function of an array collection and I would like
How to avoid overriding? public partial class test : System.Web.UI.Page { StringBuilder sb =
When overriding a non-virtual method in Java, use of the @Override annotation is recommended,
Normal overriding would work this way: class Fruit { public: string color(); }; string
I am overriding the backbutton with a onBackPressed() function how do I also detect

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.