Xojo Conferences
XDCMay2019MiamiUSA

Operator Convert To (Real Studio Plugins Mailinglist archive)

Back to the thread list
Next thread: hidden classes


macosx and unix paths   -   GOLD
  Operator Convert To   -   Alfred Van Hoek
   Re: Operator Convert To   -   Mars Saxman
   Re: Operator Convert To   -   Mars Saxman
   Re: Operator Convert To   -   Alfred Van Hoek

Operator Convert To
Date: 29.06.05 04:16 (Tue, 28 Jun 2005 23:16:20 -0400)
From: Alfred Van Hoek
A plugin defines a REALobject and under the hood implements an RB
canvas control and exposes it to RB by implementing
myClass.Operator_Convert() as Canvas. It does not appear that RB at
runtime will evaluate myClass also as a RectControl, when new
MenuHandlers on a subclass of myClass were created.

For example: A NewMenuHandler of EditCut does not activate the EditCut
menuItem at runtime when the underlying canvas has the focus.

Alfred

_______________________________________________
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>

Re: Operator Convert To
Date: 02.07.05 19:34 (Sat, 2 Jul 2005 11:34:01 -0700)
From: Mars Saxman

On Jun 29, 2005, at 8:19 PM, Alfred Van Hoek wrote:

> MyClass is a RectControl but not registered as such. MyClass is a
> canvas but not registered as such.

I'm still having some trouble following your explanation here. Are
you saying that you have created some non-control class in your
plugin and given it an Operator_Convert() As RectControl, and so you
expect that when you drop an instance of the class onto a window it
will be treated as though it actually were a RectControl?

I can see where that idea might come from, but the conversion
mechanism does not work that way. It does not change what a class
_is_; it does not change the results of the IsA operator. From the
compiler's point of view, MyClass is whatever it was registered as,
and no more. The fact that it can be converted to a RectControl is
only interesting if you are passing an instance of MyClass as a
parameter or storing it in a variable whose type is RectControl.

Mars Saxman
REAL Software
_______________________________________________
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>

Re: Operator Convert To
Date: 29.06.05 22:46 (Wed, 29 Jun 2005 14:46:59 -0700)
From: Mars Saxman

On Jun 28, 2005, at 8:16 PM, Alfred Van Hoek wrote:

> A plugin defines a REALobject and under the hood implements an RB
> canvas control and exposes it to RB by implementing
> myClass.Operator_Convert() as Canvas. It does not appear that RB at
> runtime will evaluate myClass also as a RectControl, when new
> MenuHandlers on a subclass of myClass were created.

I'm a little confused by your expectations here. Is 'myClass' a
RectControl, or isn't it? If it is not a RectControl, I'm not sure
why you expect it to have menu handlers.

Mars Saxman
REAL Software

_______________________________________________
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>

Re: Operator Convert To
Date: 30.06.05 04:19 (Wed, 29 Jun 2005 23:19:10 -0400)
From: Alfred Van Hoek

On Jun 29, 2005, at 5:46 PM, Mars Saxman wrote:

> On Jun 28, 2005, at 8:16 PM, Alfred Van Hoek wrote:
>
>> A plugin defines a REALobject and under the hood implements an RB
>> canvas control and exposes it to RB by implementing
>> myClass.Operator_Convert() as Canvas. It does not appear that RB at
>> runtime will evaluate myClass also as a RectControl, when new
>> MenuHandlers on a subclass of myClass were created.
>
> I'm a little confused by your expectations here. Is 'myClass' a
> RectControl, or isn't it? If it is not a RectControl, I'm not sure why
> you expect it to have menu handlers.

MyClass is a RectControl but not registered as such. MyClass is a
canvas but not registered as such. When a subclass of myClass is
dropped on the window it in essence becomes a rectControl similar to an
invisible REALcontrol. MyClass even implements a width and height,
displays it "physically" and can respond to menuhandlers. MyClass is a
composite view of RB native controls.

Therefore it would make sense that a Class1 in general when dropped on
a window could have a focus and is a rectcontrol. I was trying to tell
REALbasic that myClass can be converted to a canvas using
Operator_Convert submitting the canvas instance REALbasic knows
about... That's all,

best,

Alfred

_______________________________________________
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>