Xojo Conferences
XDCMay2019MiamiUSA

REALclassRef and the precreation of a window (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: Mach-O Plugins in Console Applications
Next thread: Tabpanel problem


macosx and unix paths   -   GOLD
  REALclassRef and the precreation of a window   -   Alfred Van Hoek
   Re: REALclassRef and the precreation of a window   -   Joseph J. Strout
    Re: REALclassRef and the precreation of a window   -   Alfred Van Hoek

REALclassRef and the precreation of a window
Date: 10.11.04 06:28 (Wed, 10 Nov 2004 00:28:45 -0500)
From: Alfred Van Hoek
I am using dynamic access api's and would want to create a window, "create"
in the sense that it is a template to be used in Rb with the "new" operator
or in the plugin with "REALnewInstance".

I am able to instantiate a window in runtime by calling

REALnewInstance("Window");

and can set certain properties like the window rect, but fail to be able to
set the composite and frame = 9 (metal). These failures are understandable,
because the window is created at runtime with REALnewInstance. I would like
to set the properties first, and then call REALnewInstance.

There might be a workaround if RB would allow "REALnewInstance" to work with
a custom name like "Window1". Unfortunately,

REALnewInstance("Window1"):

leads to a nil object. Calling "new window1" in rb and feeding the instance
to the plugin will allow manipulation of the window by the plugin, however,
it defies the purpose of the plugin.

I thought about the keyword "class" in rb, which might be the equivalent of
"REALclassRef" of the plugin api. However, defining a method in the plugin,
like

"doSomething(xwin as class)"

leads to the premature exiting of rb during loading of the plugin. RB reads
it as an invalid plugin format. For your info, defining

dim xwin as class

appears to be legal in rb, while I am ignorant about usage of this keyword
"class" in rb.

Any suggestions?

Alfred

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

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

Re: REALclassRef and the precreation of a window
Date: 10.11.04 15:31 (Wed, 10 Nov 2004 08:31:28 -0600)
From: Joseph J. Strout
If I understand what you're trying to do, you need to make a class in
your plugin whose super is Window. In its initializer method, you
should (I think) be able to set the properties as you like them,
including Frame. If that doesn't work, try defining a Constructor
method and do it there.

Then of course you can instantiate this class using REALnewInstance.
Of course it won't have any controls on it, so the utility of this
technique is quite limited, but I assume you have some good purpose
for it.

HTH,
- Joe

Re: REALclassRef and the precreation of a window
Date: 10.11.04 18:55 (Wed, 10 Nov 2004 12:55:15 -0500)
From: Alfred Van Hoek
on 11/10/04 9:31 AM, Joseph J. Strout at <email address removed> wrote:

> If I understand what you're trying to do, you need to make a class in
> your plugin whose super is Window. In its initializer method, you
> should (I think) be able to set the properties as you like them,
> including Frame. If that doesn't work, try defining a Constructor
> method and do it there.

No, it exhibits the same problem in the initializer, and defining a
constructor method does not get called by REALnewInstance.

Instantiating the subclassed window from rb shows the same, composite and
metal are not honored, while these boolean properties can be set...

Alfred

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

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