A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: running into problems with static variables.

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    6

    running into problems with static variables.

    my main class is Editor

    my sub class is a CustomTextField

    i need my Editor to keep track of what the active CustomTextField is, since there can be more than one.

    i want to have a variable, activeTextField:String to keep track of the active CustomTextField. i created getters and setters on editor to keep track of activeTextField.

    how do i call these getters and setters from the editor w/out using static getters and setters on the editor?

    this has to be confusing to read because i am utterly confused writing it... my apologies in advance..

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Why would CustomTextField extend Editor? Or are you misusing the term "sub class"?

    Also, activeTextField should be type CustomTextField, not String. You want to store the textfield, not the name of the textfield.

    I don't understand why any of this needs to be static. Why did you start down that road?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center