Hi,

addPopUp() actually adds it to the systemManager and thus the method call
parents the popup and it appears on the screen. createPopUp() just calls
addPopUp() after it has created the instance for you from the Class ref.

I would say it's a convenience method for calling new(), you could even
create your own popup manager impl and change the actual functionality of
it's interface through polymorphism.

Mike

On Wed, Sep 10, 2008 at 4:10 PM, Boon Chew <[EMAIL PROTECTED]> wrote:

>
> What's the process/criteria in deciding whether to use createPopUp vs
> addPopUp?  They seem interchangeable.  What is it that you can do with one
> that you can't do with the other? Which one do you use the most?
>
> [-] The doc says:
> "You can use the addPopUp() method of the PopUpManager to create a pop-up
> window without defining a custom component." Can't you do that with
> createPopUp as well?
>
> [-] The doc also says "...Using the addPopUp() method may be preferable to
> using the createPopUp() method if you have to pop up a simple dialog box
> that is never reused elsewhere.  However, it is not the best coding practice
> if the pop-up is complex or cannot be reused elsewhere..."
>
> It doesn't really explain why it's not the best practice if the pop-up is
> complex or cannot be reused elsewhere.
>
> To me it seems to be more convenient to use addPopUp because I can do
> whatever I want to the dialog instance before I pass it to addPopup( ) but
> that's more theorizing than from actual field experience.
>
> - boon
>
>
>  
>



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to