[vwnc] VW question...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] VW question...

Rick Flower
Just a stupid question that I hadn't bothered to ask in the past.. I'm  
working on some unit tests that
make use of the #resource/#resources methods and other setup/teardown  
methods.. If I want to
copy an existing class as a template for a new class, I create a new  
class, copy existing methods
from existing class to new class and go on my merry way..

However, I was wondering if there was a way to select a class and say  
duplicate where it would
copy and then name the new class something like "classDuplicate" or  
similar..  Anyway, if there
is, then great -- if not, then I'll just continue doing what I've been  
doing thus far.. Thx!

-- Rick
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] VW question...

Steven Kelly
[vwnc] VW question...
If you want to copy a class and existing methods, I'd imagine subclassing it would be the normal way. Or more likely, making the common parts into an abstract superclass, with the original class and your new class as subclasses of that.
 
If you really want to duplicate code, I don't know of a command in the browser to do that. I guess you could file out the class, change its name in the file, then file it in again.
 
Cheers,
Steve

From: [hidden email] on behalf of Richard E. Flower
Sent: Fri 7/4/2008 21:32
To: vwnc-list
Subject: [vwnc] VW question...

Just a stupid question that I hadn't bothered to ask in the past.. I'm 
working on some unit tests that
make use of the #resource/#resources methods and other setup/teardown 
methods.. If I want to
copy an existing class as a template for a new class, I create a new 
class, copy existing methods
from existing class to new class and go on my merry way..

However, I was wondering if there was a way to select a class and say 
duplicate where it would
copy and then name the new class something like "classDuplicate" or 
similar..  Anyway, if there
is, then great -- if not, then I'll just continue doing what I've been 
doing thus far.. Thx!

-- Rick
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] VW question...

Boris Popov, DeepCove Labs (SNN)
There's a parcel/package called ClassCloning that adds a menu item to
RB...

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
Behalf
> Of Steven Kelly
> Sent: Friday, July 04, 2008 12:11 PM
> To: vwnc-list
> Subject: Re: [vwnc] VW question...
>
> If you want to copy a class and existing methods, I'd imagine
subclassing
> it would be the normal way. Or more likely, making the common parts
into
> an abstract superclass, with the original class and your new class as
> subclasses of that.
>
> If you really want to duplicate code, I don't know of a command in the
> browser to do that. I guess you could file out the class, change its
name

> in the file, then file it in again.
>
> Cheers,
> Steve
> ________________________________
>
> From: [hidden email] on behalf of Richard E. Flower
> Sent: Fri 7/4/2008 21:32
> To: vwnc-list
> Subject: [vwnc] VW question...
>
>
>
> Just a stupid question that I hadn't bothered to ask in the past.. I'm
> working on some unit tests that
> make use of the #resource/#resources methods and other setup/teardown
> methods.. If I want to
> copy an existing class as a template for a new class, I create a new
> class, copy existing methods
> from existing class to new class and go on my merry way..
>
> However, I was wondering if there was a way to select a class and say
> duplicate where it would
> copy and then name the new class something like "classDuplicate" or
> similar..  Anyway, if there
> is, then great -- if not, then I'll just continue doing what I've been
> doing thus far.. Thx!
>
> -- Rick
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] VW question...

Dennis smith-4
In reply to this post by Rick Flower
I gather from another post there is a package that adds this.
However, what I have always done is a FileOut of the class,
then edit it to change all the original name to the new name then
file-in.



Richard E. Flower wrote:

> Just a stupid question that I hadn't bothered to ask in the past.. I'm  
> working on some unit tests that
> make use of the #resource/#resources methods and other setup/teardown  
> methods.. If I want to
> copy an existing class as a template for a new class, I create a new  
> class, copy existing methods
> from existing class to new class and go on my merry way..
>
> However, I was wondering if there was a way to select a class and say  
> duplicate where it would
> copy and then name the new class something like "classDuplicate" or  
> similar..  Anyway, if there
> is, then great -- if not, then I'll just continue doing what I've been  
> doing thus far.. Thx!
>
> -- Rick
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>  

--
Dennis Smith                         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              sip:[hidden email]
Canada         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] VW question...

Rick Flower
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Cool.. I loaded ClassCloning and it works like a charm in 7.6.. Thanks  
for the tip!  Makes life painless!

On Jul 4, 2008, at 12:20 PM, Boris Popov wrote:

> There's a parcel/package called ClassCloning that adds a menu item to
> RB...
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> [hidden email]
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the message
> header. Unless otherwise indicated, it contains information that is
> private and confidential. If you have received it in error, please
> notify the sender and delete the entire message including any
> attachments.
>
> Thank you.
>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]] On
> Behalf
>> Of Steven Kelly
>> Sent: Friday, July 04, 2008 12:11 PM
>> To: vwnc-list
>> Subject: Re: [vwnc] VW question...
>>
>> If you want to copy a class and existing methods, I'd imagine
> subclassing
>> it would be the normal way. Or more likely, making the common parts
> into
>> an abstract superclass, with the original class and your new class as
>> subclasses of that.
>>
>> If you really want to duplicate code, I don't know of a command in  
>> the
>> browser to do that. I guess you could file out the class, change its
> name
>> in the file, then file it in again.
>>
>> Cheers,
>> Steve
>> ________________________________
>>
>> From: [hidden email] on behalf of Richard E. Flower
>> Sent: Fri 7/4/2008 21:32
>> To: vwnc-list
>> Subject: [vwnc] VW question...
>>
>>
>>
>> Just a stupid question that I hadn't bothered to ask in the past..  
>> I'm
>> working on some unit tests that
>> make use of the #resource/#resources methods and other setup/teardown
>> methods.. If I want to
>> copy an existing class as a template for a new class, I create a new
>> class, copy existing methods
>> from existing class to new class and go on my merry way..
>>
>> However, I was wondering if there was a way to select a class and say
>> duplicate where it would
>> copy and then name the new class something like "classDuplicate" or
>> similar..  Anyway, if there
>> is, then great -- if not, then I'll just continue doing what I've  
>> been
>> doing thus far.. Thx!
>>
>> -- Rick
>> _______________________________________________
>> vwnc mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] VW question...

Dennis smith-4
In reply to this post by Steven Kelly


Steven Kelly wrote:
[vwnc] VW question...
If you want to copy a class and existing methods, I'd imagine subclassing it would be the normal way. Or more likely, making the common parts into an abstract superclass, with the original class and your new class as subclasses of that.
I often want to do that -- just to get the method patterns right -- or sometimes because I want to split a class
into two -- and its not reasonable to do it by means of the RB a method at a time -- simpler to copy the class
and then delete what I don't want.

These are usually not subclasses one of the other, but maybe have a common superclass.

So cloning a class is really useful sometimes.

 
If you really want to duplicate code, I don't know of a command in the browser to do that. I guess you could file out the class, change its name in the file, then file it in again.
 
Cheers,
Steve

From: [hidden email] on behalf of Richard E. Flower
Sent: Fri 7/4/2008 21:32
To: vwnc-list
Subject: [vwnc] VW question...

Just a stupid question that I hadn't bothered to ask in the past.. I'm 
working on some unit tests that
make use of the #resource/#resources methods and other setup/teardown 
methods.. If I want to
copy an existing class as a template for a new class, I create a new 
class, copy existing methods
from existing class to new class and go on my merry way..

However, I was wondering if there was a way to select a class and say 
duplicate where it would
copy and then name the new class something like "classDuplicate" or 
similar..  Anyway, if there
is, then great -- if not, then I'll just continue doing what I've been 
doing thus far.. Thx!

-- Rick
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

-- 
Dennis Smith                 		         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@...
Canada			         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc