-
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..
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|