[DIRECT-L] V4MD: question: Xtra which create another Xtra ?

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jul 16 21:29:25 CDT 2004


On 7/16/04 9:07 PM, "Troy Rollins" <troy at rpsystems.net> wrote:

> On Jul 16, 2004, at 1:39 PM, Ruslan Zasukhin wrote:

Hi Troy,

>> So can we do in Lingo something as:
>> 
>> 
>>         db = new (Xtra "Vdatabase")
>> 
>>         tbl = db.CreateTable( "Person" )
>> 
>> 
>> Here tbl must be of type (Xtra "VTable")
>> 
>> Is this possible in Lingo?
> 
> I know less about Valentina than you do about Lingo (e.g. almost
> nothing). When, was "Xtra VTable" instantiated? During the create table
> process? 

Yes, function CreateTable() must create new instance of "Xtra Vtable"

Again, each normal OO language can do this.
This is not related to Valentina itself.
This is issue of *language*.

> Is this something Valentina normally does (instantiate the
> VTable xtra "behind the scenes)? Or does VTable normally have to be
> called like -
> 
> tbl = new(Xtra "VTable")

Troy, Valentina do not have such feature now in Lingo.

This is why I ask about this.
I'd like to do this for Lingo developers, but it seems no way. :-(
Lingo cannot do this.

And NO, the DREAM is that we must not do
    tbl = new(Xtra "VTable")


> Either way, I would think it would be possible, but the Xtra developer
> would have to make that work. Is there something in the createTable
> method which instantiates the VTable xtra and returns what Director
> needs to access it?

I want to do this, but I do not see way how.

So question is:

    Have anybody see at least one other Xtra
    which can do such tricks?


>> If yes, then how effective this ?
>> 
>> If no, then why no ?  :-)
> 
> I don't know, why does Valentina require two xtras for one database?

Because each Xtra should play role of different *objects* of different
*classes*.

One database can have several tables.
    Each table can have several fields.
One database can have several cursors in the same time.
    
If you look on Valentina 1.x or Arca you will see that both use tricks as
      reference to field  // V4MD
      selectionid         // Arca

Which contains some magic numbers. This is simply tricks.
In such way works *procedural* languages, but not OO.

If still not clear I can give 2 examples of code and syntax for
procedural style and for OO style.

>> Lingo looks claims that it have some OO features.
>> So why it not have such basic feature of OO language ?
>> 
> 
> Ask Macromedia that one. Lingo is OOP in a generic OOP sense, but it
> isn't C or RealBasic, and doesn't try to be.

Macromedia do not answer for now on Xtra-dev list.

So, I wonder if somebody have see that other third-party Xtras create and
return behind scene other Xtra ?


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list