Re: cloning a WOComponent?
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.