• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cloning a WOComponent?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cloning a WOComponent?


  • Subject: Re: cloning a WOComponent?
  • From: Jonathan Rochkind <email@hidden>
  • Date: Tue, 03 Dec 2002 10:30:11 -0600

Thanks; but it's not an issue of casting. The object returned is _not_ a MyComponent. A cast class raises an exception.

At 10:30 PM 12/2/2002 -0500, Thomas Peters wrote:
You should be able to cast the resultant WOComponent into your component
MyComponent.

maybe like this:

MyComponent comp = new MyComponent();

MyComponent acomp = (MyComponent)comp.clone();

Tom



----- Original Message -----
From: "Jonathan Rochkind" <email@hidden>
To: <email@hidden>
Sent: Monday, December 02, 2002 8:41 PM
Subject: cloning a WOComponent?


> WOComponent implements 'Cloneable', which suggests that I can clone
> WOComponents, true? But I've never used the Java cloning stuff before; I'm
> not sure what's going on.
>
> I have an instance of a particular custom WOComponent subclass, call it
> MyComponent. I can indeed call clone() on it, and no exception is
> thrown. But I seem to get back an instance simply of WOComponent, not of
> MyComponent. What's going on here?
>
> Is there any easy way to clone an instance of a particular WOComponent
> subclass for real?
>
> Thanks for any hints.
> --Jonathan
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >cloning a WOComponent? (From: Jonathan Rochkind <email@hidden>)
 >Re: cloning a WOComponent? (From: "Thomas Peters" <email@hidden>)

  • Prev by Date: Re: Why this new forum?
  • Next by Date: How to set a Session Variable during Login Logic
  • Previous by thread: Re: cloning a WOComponent?
  • Next by thread: Re: cloning a WOComponent?
  • Index(es):
    • Date
    • Thread