Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Class' constructor in REALmethodDefinition (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: KeyDown events not comming on REALbasic 2008r2
Next thread: Wrong Plugin list


macosx and unix paths   -   GOLD
  Class' constructor in REALmethodDefinition   -   Alfred Van Hoek
   Re: Class' constructor in REALmethodDefinition   -   Joe Strout
   Re: Class' constructor in REALmethodDefinition   -   Norman Palardy
   Re: Class' constructor in REALmethodDefinition   -   Alfred Van Hoek
    Re: Class' constructor in REALmethodDefinition   -   Christian Schmitz
     Re: Class' constructor in REALmethodDefinition   -   Alfred Van Hoek
   Re: Class' constructor in REALmethodDefinition   -   Norman Palardy

Class' constructor in REALmethodDefinition
Date: 03.06.08 02:20 (Mon, 02 Jun 2008 21:20:27 -0400)
From: Alfred Van Hoek
In RB2008r2 it appears that a class' constructor is not automatically
called anymore? The constructor is explicitly called by the classname
not by "Constructor" in the plugin. The plugin functions ok in earlier
versions of RB.

Any insight?

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

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

Re: Class' constructor in REALmethodDefinition
Date: 03.06.08 02:40 (Mon, 2 Jun 2008 19:40:15 -0600)
From: Joe Strout
On Jun 2, 2008, at 7:20 PM, Alfred Van Hoek wrote:

> In RB2008r2 it appears that a class' constructor is not automatically
> called anymore? The constructor is explicitly called by the classname
> not by "Constructor" in the plugin. The plugin functions ok in earlier
> versions of RB.

That syntax was deprecated years ago, and has finally been removed.
Rename your constructors "Constructor".

Best,
- Joe

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

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

Re: Class' constructor in REALmethodDefinition
Date: 03.06.08 03:48 (Mon, 2 Jun 2008 20:48:02 -0600)
From: Norman Palardy

On 2-Jun-08, at 7:40 PM, Joe Strout wrote:

>
> On Jun 2, 2008, at 7:20 PM, Alfred Van Hoek wrote:
>
>> In RB2008r2 it appears that a class' constructor is not automatically
>> called anymore? The constructor is explicitly called by the classname
>> not by "Constructor" in the plugin. The plugin functions ok in
>> earlier
>> versions of RB.
>
> That syntax was deprecated years ago, and has finally been removed.
> Rename your constructors "Constructor".

About 4 to be precise :P
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

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

Re: Class' constructor in REALmethodDefinition
Date: 03.06.08 13:31 (Tue, 03 Jun 2008 08:31:03 -0400)
From: Alfred Van Hoek

On Jun 2, 2008, at 10:48 PM, Norman Palardy wrote:

>
> On 2-Jun-08, at 7:40 PM, Joe Strout wrote:
>
>>
>> On Jun 2, 2008, at 7:20 PM, Alfred Van Hoek wrote:
>>
>>> In RB2008r2 it appears that a class' constructor is not
>>> automatically
>>> called anymore? The constructor is explicitly called by the
>>> classname
>>> not by "Constructor" in the plugin. The plugin functions ok in
>>> earlier
>>> versions of RB.
>>
>> That syntax was deprecated years ago, and has finally been removed.
>> Rename your constructors "Constructor".
>
> About 4 to be precise :P
> _______________________________________________

Don't want to rant but haven't seen this in the version history of the
plugin SDK.

Further,

REALnewInstance does not provide a valid instance anymore, and this
had to be replaced with

REALnewInstanceWithClass(REALGetClassRef("");

It seems that deprecation is enforced.

And what is the replacement for

REALInterfaceRoutine,

Then, the plugin still does not work, it raises a NilObjectException
in the Event Loop when clicking on the control or pressing a key when
the control has the focus, and the Globals pane of the REALbasic IDE
shows " Modules(3) " but only lists "Encodings" and "Runtime".


Alfred


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

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

Re: Class' constructor in REALmethodDefinition
Date: 03.06.08 13:45 (Tue, 3 Jun 2008 14:45:20 +0200)
From: Christian Schmitz
Alfred Van Hoek <<email address removed>> wrote:

> REALnewInstance does not provide a valid instance anymore, and this
> had to be replaced with
>
> REALnewInstanceWithClass(REALGetClassRef("");

REALnewInstance(char*) seems to work for me if the user has this class
in their code, too.

So things like

dim c as CFStringMBS = NewCFStringMBS("Hello")

work, because CFStringMBS is referenced.

> Then, the plugin still does not work, it raises a NilObjectException
> in the Event Loop when clicking on the control or pressing a key when
> the control has the focus, and the Globals pane of the REALbasic IDE
> shows " Modules(3) " but only lists "Encodings" and "Runtime".

I have plugins raising NilObjectExceptions if REALnewInstance is called
with an unknown class name. (not used in the application source)

Gruß
Christian

-

Re: Class' constructor in REALmethodDefinition
Date: 03.06.08 15:25 (Tue, 03 Jun 2008 10:25:09 -0400)
From: Alfred Van Hoek

On Jun 3, 2008, at 8:45 AM, Christian Schmitz wrote:

> Alfred Van Hoek <<email address removed>> wrote:
>
>> REALnewInstance does not provide a valid instance anymore, and this
>> had to be replaced with
>>
>> REALnewInstanceWithClass(REALGetClassRef("");
>
> REALnewInstance(char*) seems to work for me if the user has this class
> in their code, too.
>
> So things like
>
> dim c as CFStringMBS = NewCFStringMBS("Hello")
>
> work, because CFStringMBS is referenced.
>
>> Then, the plugin still does not work, it raises a NilObjectException
>> in the Event Loop when clicking on the control or pressing a key when
>> the control has the focus, and the Globals pane of the REALbasic IDE
>> shows " Modules(3) " but only lists "Encodings" and "Runtime".
>
> I have plugins raising NilObjectExceptions if REALnewInstance is
> called
> with an unknown class name. (not used in the application source)

Thanks, but to recapitulate:

We know that REALnewInstance will only work if REALbasic has not
stripped out classes. We are not using REALnewInstance, but use
REALnewInstanceWithClass and we test the outcome for possible invalid
instances. All instances created:

Canvases,
Scrollbars,
Toolbars,
Timers,
MenuItems,
ContextualMenus,

and,

intrinsic classes belonging to this plugin

are valid,

and the creation of cursor instances using the IBeamCursor,
ArrowCursor global methods,

are valid two.

The plugin instance is correctly created, is up and running,
responding, but any interaction by the mouse or the keyboard raises a
NIlObjectException, and we don't know from where. The plugin also
defines a Module, and we wonder if that might be the culprit because
the Debugger sees 3 modules but lists only two?

Anyone?

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

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

Re: Class' constructor in REALmethodDefinition
Date: 03.06.08 15:23 (Tue, 03 Jun 2008 08:23:17 -0600)
From: Norman Palardy

On 3-Jun-08, at 6:31 AM, Alfred Van Hoek wrote:

>
> On Jun 2, 2008, at 10:48 PM, Norman Palardy wrote:
>
>>
>> On 2-Jun-08, at 7:40 PM, Joe Strout wrote:
>>
>>>
>>> On Jun 2, 2008, at 7:20 PM, Alfred Van Hoek wrote:
>>>
>>>> In RB2008r2 it appears that a class' constructor is not
>>>> automatically
>>>> called anymore? The constructor is explicitly called by the
>>>> classname
>>>> not by "Constructor" in the plugin. The plugin functions ok in
>>>> earlier
>>>> versions of RB.
>>>
>>> That syntax was deprecated years ago, and has finally been removed.
>>> Rename your constructors "Constructor".
>>
>> About 4 to be precise :P
>> _______________________________________________
>
> Don't want to rant but haven't seen this in the version history of the
> plugin SDK.

It's been generally deprecated in the RB language for all kinds of
constructors - plugins and RB code




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

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