realbasic-plugins
[Top] [All Lists]

Re: RegisterModule or class, AFTER PluginEntry()

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: RegisterModule or class, AFTER PluginEntry()
From: James Milne <james dot milne at mac dot com>
Date: Wed, 12 Jan 2005 10:04:40 +0000
Cc: "valentina-beta at lists dot macserve dot net" <valentina-beta at lists dot macserve dot net>, REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BE0ABEFE dot 27091%sunshine at public dot kherson dot ua>
 
On Wednesday, January 12, 2005, at 09:48AM, Ruslan Zasukhin <sunshine at public 
dot kherson dot ua> wrote:

>On 1/12/05 11:32 AM, "James Milne" <james dot milne at mac dot com> wrote:
>
>>>> Hi All,
>>>> 
>>>> Is it possible to register another class/module/else
>>>> Not in the PluginEntry() function, but LATER ?
>>>> In some other function ?
>>>> 
>>>> Any technical limitations present here?
>>>> Or we must be able do this ?
>>> 
>>> So anybody can comment ?
>> 
>> It's not possible.
>> 
>> REALbasic expects you to have registered everything your plugin provides in
>> the PluginEntry function.
>> 
>> The REALbasic plugin loader loads all the plugins it can find and calls each
>> plugin's PluginEntry() function. It assumes that after it has called all the
>> PluginEntry functions that all the resources provided by the plugin have been
>> registered. It then sorts out dependencies by resolving superclasses for
>> plugin classes, etc, so that you can have inter-plugin dependencies.
>> 
>> I'd say that you can safely assume none of the REALRegister* Plugin API
>> functions are usable outside of the PluginEntry() function.
>
>I see, thank you James.
>
>Yes I see 100% crashes.
>
>Bad. Then I have problems....may be somebody have an idea.
>
>Task is next:
>
>* when REALbasic starts and loads plugin we have in the
>    /Library/CFMSupport/Vcomponents folder with our dlls and other stuf.
>
>    in particular this folder contains several XML files, which
>    during PluginEntry() we parse and build error constants for V4RB.
>
>
>* Now I want allow to RB developers build Application,
>    and move all files (DLLs and rest) into Application folder,
>    to have distribution as SINGLE FOLDER.
>
>For this developer will need self assign directory where these files are.
>But developer can do this only AFTER PluginEntry().
>
>Hmm, so plugin self during PluginEntry() must try to find where are required
>files....well I think this is the only solution.

It should be possible to have the plugin find the parent folder for the 
application it is running inside.

If you call:

ProcessInfoRec curProcessInfo;
GetProcessInformation( kCurrentProcess, &curProcessInfo );

you can then retrieve an FSSpec for the current process out of the 
ProcessInfoRec.

I'd suggest you search inside the application's folder first, then look in your 
/Library/CFMSupport/Vcomponents folder.

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