realbasic-nug
[Top] [All Lists]

Re: Pictures Arrays

To: "REALbasic Network Users Group" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Pictures Arrays
From: Mel Patrick <mel at wabbitwanch dot com>
Date: Sun, 29 Feb 2004 18:22:43 -0800
References: <C7E2103F-6A4C-11D8-9B5C-00039375E146 at domainsoftworx dot com> <497704E4-6A51-11D8-B0BD-000393C0FE92 at 006 dot co dot uk> <E8A47C18-6AB9-11D8-B16D-00039375E146 at domainsoftworx dot com> <F18F1F68-6B0D-11D8-A166-000A95E5BFF4 at wabbitwanch dot com> <a06010247bc6844d7e0f1 at [10 dot 0 dot 1 dot 2]>

On 29-Feb-04, at 5:42 PM, Thomas Reed wrote:

Assume for a moment, you have a global array of PICTures (either created with New Picture or OpenAsPicture)

BTW, I note your spelling "PICTure", which seems to imply an assumption that a REALbasic Picture object is Mac PICT data. This is not the case. A REALbasic Picture can contain a PICT, but it can also contain JPEG, TIFF, BMP, etc. Just a small clarification.

This comes from writing assembler for too many years (68K) when PICT ruled...:-) Old habits die the hardest...


Can you just assign Nil to the array variable to dispose of the picture or is there a better way to do it?

Certainly, this will dispose of the Picture (assuming there are no other references to it).

Secondly, if you wanted move a PICTure from one array subscript to another one, it seems to me that you can't use a A(1)=A(2) sort of thing

There's absolutely no reason you can't do this, unless you are expecting A(1) to subsequently contain a *copy* of the object in A(2). This is not the case -- A(1) and A(2) will now each contain a reference to the same object.

Thanks to all who replied, I wasn't quite sure.

As I have learned numerous times from this list, better ask than assume and spend countless hours finding self induced bugs..:-)

Mel Patrick
wCEO Wabbit Wanch Design
mel at wabbitwanch dot com


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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

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