realbasic-nug
[Top] [All Lists]

Re: Class Question

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Class Question
From: Tim Jones <tjmac@tolisgroup.com>
Date: Fri, 31 Jul 2009 08:23:58 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <4A7257C5.9060902@rochester.rr.com>
References: <4A7257C5.9060902@rochester.rr.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
On Jul 30, 2009, at 7:32 PM, Tom Russell wrote:

I am doing something dumb and cannot see it.

Here's what I have:

A class called "TheNewFiles".

Then I have a global property called "NewFiles() as TheNewFiles"

Then in a thread I have this:

 dim fileprops As TheNewFiles
 fileprops = New TheNewFiles


Then farther in my code I have this:

           fileprops.CRC = somedata
           fileprops.MyID = somedata
           fileprops.Path = somedata
           fileprops.name = somedata
           fileprops.f =somedata
           // NewFiles.Append fileprops

Set your values as above without the Append, but add a new method to your class called Clone and then work with the Cloned values:

Sub Clone() As NewFiles
        Dim theProps As New TheNewFiles

        theProps.CRC = Me.CRC
        theProps.MyID = Me.MyID
        theProps.Path = Me.Path
        theProps.name = Me.Name
        theProps.f = Me.f
        
        Return theProps
End Sub

Then call:

NewFiles.Append fileprops.Clone

Tim


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>