realbasic-nug
[Top] [All Lists]

Re: Why is object passing across RBScript context, not safe?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Why is object passing across RBScript context, not safe?
From: Charles Yeomans <yeomans at desuetude dot com>
Date: Sat, 29 Jan 2005 13:36:18 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20050129133823 dot 465AA6D4041 at lists dot realsoftware dot com> <4721b6136109bc125c3a21be928fbfb0 at elfdata dot com> <144d28e18443c60a96ff135f3719f0b0 at elfdata dot com>

On Jan 29, 2005, at 10:43 AM, Theodore H.Smith wrote:

Why is passing objects across RBScript contexts, not safe?

We definitly need some way to pass objects across contexts. This gets around much of RBScript's current crippled design.

Will RB6 have an uncrippled RBScript? In that case, we may be better off not reinventing the wheel by working around RBScripts crippledness.

Here's my ideas on why RBScript object passing across contexts might be bad:

1) Different object memory system. What if we create an object in RBScript, store a ref to it in RB, and then finish our RBScript. Perhaps by then, all the objects will have been destroyed, but now we have a ref to an object which was destroyed?

2) Naming collisions. What if we have two classes, which have the same name, but different class definitions? This will obviously crash! (or even worse, silently malfunction.)

3) Naming collisions across RBScript contexts. What if you create an RBScript object, and pass it from one RBScript to another?


4) It opens a gaping security hole for applications.

Charles Yeomans

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

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

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