realbasic-plugins
[Top] [All Lists]

Re: REALnewInstance used on Custom Classes in the IDE

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: REALnewInstance used on Custom Classes in the IDE
From: James Milne <james dot milne at mac dot com>
Date: Sat, 14 May 2005 22:10:13 +0100
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BEABD1A1 dot CA4D%vanhoek at mac dot com> <537499B8-6498-42D4-B4CF-591044AD562C at mac dot com> <42B65DE2-C4BA-11D9-B1EA-000A277A7E3C at einhugur dot com>
On 14 May 2005, at 21:53, Björn Eiríksson wrote:

On 14.5.2005, at 20:10, James Milne wrote:

Why are you calling REALnewInstance when you're running your plugin in the IDE anyway?

There are many reasons for such, if you have a calendar control then you need date object math for example to calculate the calendar days. Basically with complex controls then if not having objects in the IDE then we might as well draw a big black X in design mode and a text which says that older versions of REALbasic were better.

You give a good example.

I fear the REAL never designed their new Plugin Bridge in RB2005 to support using the internal classes in this way when drawing the IDE representation of your control.

It should probably be feasible to support using REALnewInstance on built-in classes, since the IDE itself is using them. This would allow you to create, for example. Date objects, which you use to draw the IDE representation of your control.

However, you might have to consider writing a simplified version of your control drawing code that can get by without relying on REALbasic runtime classes. For example, simply draw the framing of your Calendar control, but disable the piece of code that relies on the Date object when calculating which dates should be drawn in the Calendar grid.

It sounds like Alfred wants to be able to use REALnewInstance on classes that his plugin is registering. I don't think it will be feasible for RB 2005 to support, considering the way its plugin bridge system works. I would advise completely disabling any code which tries to instantiate classes registered by your plugin when running in IDE mode. You'll probably have to find ways to approximating the same functionality without having access to those classes.

--
James Milne_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>