Xojo Conferences
XDCMay2019MiamiUSA

Extending a class in classic (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: Nevermind (Re: Extending a class in classic)
Next thread: (offlist) Re: allocation conflict...


macosx and unix paths   -   GOLD
  Extending a class in classic   -   Brad Hutchings
   Re: Extending a class in classic   -   Alfred Van Hoek
    Re: Extending a class in classic   -   Christian Schmitz
    Re: Extending a class in classic   -   Brad Hutchings
     Re: Extending a class in classic   -   Christian Schmitz
      Re: Extending a class in classic   -   Brad Hutchings
      Nevermind (Re: Extending a class in classic)   -   Brad Hutchings

Extending a class in classic
Date: 13.06.04 17:08 (Sun, 13 Jun 2004 09:08:50 -0700)
From: Brad Hutchings
I am having problems with extending a class (picture) by adding
read-only properties in the Classic version of REALbasic. If I compile
for Classic from REALbasic for Mac OS X, and try to use one of the
propertiies I define, the built Classic app quits on startup. If I try
to launch REALbasic Classic, I get the "system must restart" dialog.

Here's the definition:

REALproperty PictureExtension_Properties[] {
{
"CXG", "CXG_BitDepth", "integer", REALpropRuntimeOnly,
(REALproc) CXG_BitDepth,
(REALproc) NULL,
0, NULL, 0, NULL
},
}

Again, this works great on Mac OS X and Windows. Is this a known bug?

-Brad

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

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

Re: Extending a class in classic
Date: 13.06.04 17:19 (Sun, 13 Jun 2004 12:19:29 -0400)
From: Alfred Van Hoek
on 6/13/04 12:08 PM, Brad Hutchings at <email address removed> wrote:

> I am having problems with extending a class (picture) by adding
> read-only properties in the Classic version of REALbasic. If I compile
> for Classic from REALbasic for Mac OS X, and try to use one of the
> propertiies I define, the built Classic app quits on startup. If I try
> to launch REALbasic Classic, I get the "system must restart" dialog.
>
> Here's the definition:
>
> REALproperty PictureExtension_Properties[] > {
> {
> "CXG", "CXG_BitDepth", "integer", REALpropRuntimeOnly,
> (REALproc) CXG_BitDepth,
> (REALproc) NULL,
> 0, NULL, 0, NULL
> },
> }
>
> Again, this works great on Mac OS X and Windows. Is this a known bug?

First of all, I thought that REALRegisterClassExtension was not possible in
RB 5.x. I have a bug report on this since the birth of RB5, and we were told
to use the "extends" on methods, of course limiting the extending of classes
by methods only.

I haven't seen any messages from RS that we can use
REALRegisterClassExtension, but apparently you can on OSX and windows.

Known bug?: in a way yes....

Alfred

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

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

Re: Extending a class in classic
Date: 13.06.04 17:52 (Sun, 13 Jun 2004 18:52:07 +0200)
From: Christian Schmitz
Alfred Van Hoek <<email address removed>> wrote:

> First of all, I thought that REALRegisterClassExtension was not possible in
> RB 5.x.

It works here in all my plugins.

Mfg
Christian

Re: Extending a class in classic
Date: 13.06.04 17:57 (Sun, 13 Jun 2004 09:57:29 -0700)
From: Brad Hutchings
Wow, I had forgotten about that. With CXG, before 5, I was not
implementing the methods as a class extension, then about the time of
5, I think it was Joe (might not have been, but I need someone to blame
here, haha) who made a great case as to why I should make it a class
extension. So I did and then in one of the alphas for 5, we were told
that class extensions were dead. Sometime in the betas, they returned,
and somewhere in there, there were a few "you have to be furealbasickly
kidding me that class extensions went away" conversations.

But anyway... on Classic, the method extensions are no problem. It's
just the property extensions that have a problem now. I have some funny
feeling it's a struct alignment issue. I am using PowerPC alignment.
I'll test the others, see if I can figure this out?

Christian, just saw your message. Do you have field extensions that you
know to work on Classic builds? Curious...

-Brad

On Jun 13, 2004, at 9:19 AM, Alfred Van Hoek wrote:

> First of all, I thought that REALRegisterClassExtension was not
> possible in
> RB 5.x. I have a bug report on this since the birth of RB5, and we
> were told
> to use the "extends" on methods, of course limiting the extending of
> classes
> by methods only.
>
> I haven't seen any messages from RS that we can use
> REALRegisterClassExtension, but apparently you can on OSX and windows.
>
> Known bug?: in a way yes....
>
> Alfred

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

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

Re: Extending a class in classic
Date: 13.06.04 19:15 (Sun, 13 Jun 2004 20:15:42 +0200)
From: Christian Schmitz
Brad Hutchings <<email address removed>> wrote:

> Christian, just saw your message. Do you have field extensions that you
> know to work on Classic builds? Curious...

What is a "field extension"?

I've got a working class extension for the memoryblock class with a
property "bytesmbs as integer".

Mfg
Christian

Re: Extending a class in classic
Date: 13.06.04 20:18 (Sun, 13 Jun 2004 12:18:27 -0700)
From: Brad Hutchings
I mistyped. I meant "property".

Can you verify that REALbasic 5.5.2 Classic will start up successfully
with your plugin installed or does it crash at startup? If you make a
small test program that accesses the property, build for Classic, run
the result, does the app run? I have a feeling the answers to those
questions are yes and no.

Also, I have tried different alignment settings in the compiler,
problems only get worse if it's not "PowerPC".

-Brad

On Jun 13, 2004, at 11:15 AM, Christian Schmitz wrote:

> Brad Hutchings <<email address removed>> wrote:
>
>> Christian, just saw your message. Do you have field extensions that
>> you
>> know to work on Classic builds? Curious...
>
> What is a "field extension"?
>
> I've got a working class extension for the memoryblock class with a
> property "bytesmbs as integer".
>
> Mfg
> Christian

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

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