|
-
[RESOLVED] Custom Class named the same as Flash Class, problems?
All,
I understand it's probably best practice to name your custom classes differently than the built-in AS3.0 classes; however, what kind of problems could I run into if I don't?
Specifically, I have a class which, ideally I want to name DataProvider. But, as you know, there is already a DataProvider class on the Flash platform (used for list-based components and such).
Now, I don't think I'll ever use BOTH of those classes, so I'm assuming as long as I reference the correct DataProvider class in my import statements I should be ok?
What if I DO need to use both, is that even possible?
-
Yes, it's perfectly possible. Your DataProvider will be in a different package from the built in DataProvider. If you're using one or the other, just make sure you include the right one.
If for some weird reason you need to use both, you'll need to fully qualify the type name when you use it, which can be annoying.
-
Thanks, I'll probably just call my class DataSource or something, sometimes the best names are already taken by Flash, so it just got me thinking.
Tags for this Thread
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
|