Re: v13 - Plugin inside component

2017-11-17 Thread Tim Nevels via 4D_Tech
On Nov 17, 2017, at 9:33 AM, Chip Scheide wrote:

> The host after completion of the component will not be in my control.
> 
> to install a plugin...
> the component will need to have a table - with a blob. In the blob will need 
> to be the plugin.
> 
> upon initialization of the component I can:
> check to see if the plugin is already installed
> if not
> blob to document into the plugins folder for the host (creating the plugins 
> folder for the host if needed)
> then create a shortcut/alias to the newly installed plugin inside the 
> component's plugin folder (which I will have to create as it will not be 
> there in a compiled/built component)
> then force a restart of the host so the plugin is loaded -- users will love 
> that...
> 
> - how do I find the component database (to create the shortcut/alias)
> - I do not have a language reference at hand - is there a command to create 
> an alias/shortcut?

Chip,

The fact of the matter is that when you create a component that uses a plugin, 
any plugin, installing the component in a host database has an additional step. 
That’s just how it is. Always been that way. There is really no way to simplify 
it. It is an install issue. 

When you develop the component you need the plugin in the component’s Plugins 
folder. But when you install the component in a host database the component can 
only access plugins that are in the host databases Plugins folder. 

Component work has two modes of operation. Development of the component all by 
itself. Then later component usage in a host database. Each has different 
considerations. And to use the component in a host requires installation. And 
that installation has an addition step if you use plugins from the component. 

You say “then force a restart of the host so the plugin is loaded -- users will 
love that…”. Users are never involved in any of this. Only a 4D Developer can 
install a component. And all 4D Developers know about plugins. So your “users” 
are really 4D Developers. Once the 4D Developer installs the component and 
installs any necessary plugins in the host Plugins folder all the work is done. 
It’s a one time thing.

The install instructions are this:

1. Put the component in the “Components” folder of the host.
2. Put the plugin in the “Plugins” folder of the host. 

When you deliver the component it will not have the plugin inside the 
component. It will be outside all by itself. So that the “user”, the 4D 
Developer, will see 2 items and your install instructions will tell them what 
to do. This is not a big deal.

I think you are spending too much time trying to automate something that really 
does not need to be automated. 

Tim


Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Plugin inside component

2017-11-16 Thread Keisuke Miyako via 4D_Tech

> 2017/11/17 9:58、Chip Scheide <4d_o...@pghrepository.org> のメール:
>
> The host after completion of the component will not be in my control.
>
> to install a plugin...
> the component will need to have a table - with a blob. In the blob will need 
> to be the plugin.

that sounds like overkill.
just use COPY DOCUMENT which works for folders since v13.

a plugin is a folder, so you would need means to archive and extract the folder 
if you were to use BLOB.

besides, local tables are totally inaccessible in a component's execution 
context, so you would need to use some kind of external DB to store the BLOB.

technically you could use Get 4D folder(Database folder)+"Plugins"+Folder 
separator to locate the host's plugins folder, but injecting a plugin to host 
feels very violent and wrong. but if you do, there is no need to create an 
alias. see previous post. but you would have to restart the host.

If you can instruct users to install your component in their host,
I can't see why you can't also tell them to install the plugin too.

> upon initialization of the component I can:
> check to see if the plugin is already installed
> if not blob to document into the plugins folder for the host (creating the 
> plugins folder for the host if needed)
> then create a shortcut/alias to the newly installed plugin inside the 
> component's plugin folder (which I will have to create as it will not be 
> there in a compiled/built component)
> then force a restart of the host so the plugin is loaded -- users will love 
> that...




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Plugin inside component

2017-11-16 Thread Chip Scheide via 4D_Tech
The host after completion of the component will not be in my control.

to install a plugin...
the component will need to have a table - with a blob. In the blob will need to 
be the plugin.

upon initialization of the component I can:
check to see if the plugin is already installed
if not
 blob to document into the plugins folder for the host (creating the plugins 
folder for the host if needed)
 then create a shortcut/alias to the newly installed plugin inside the 
component's plugin folder (which I will have to create as it will not be there 
in a compiled/built component)
then force a restart of the host so the plugin is loaded -- users will love 
that...


- how do I find the component database (to create the shortcut/alias)
- I do not have a language reference at hand - is there a command to create an 
alias/shortcut?

> the plugins folder of a component is never loaded.
> the component's plugins folder can be empty,
> since the plugin is always called in the host's context.
> 
> so you have two options:
> 
> 1
> 
> install the plugin for both the host and component, during development.
> use the application build dialog to create a compiled component,
> which will automatically exclude the plugins folder.
 
> 2
> 
> install the plugin for the host only.
> create an alias/shortcut/symlink to the hosts plugin inside the 
> component's plugins folder.
> whether the alias is transportable or not depends on the type of 
> alias you create.


> -
> 
> you can also install the plugin inside the application, but that 
> would break the app signature on mac.
> besides, in client/server. a plugin installed inside the server app 
> is not transmitted to the client.
cant do that as I don't have control over the host, or host environment.

 
> http://doc.4d.com/4Dv16R4/4D/16-R4/Developing-and-installing-4D-components.200-3330168.en.html
> 
>> Do I need to copy the plugin from the component's plugin folder to 
>> the host's?
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

Hell is other people 
 Jean-Paul Sartre
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Plugin inside component

2017-11-16 Thread Chip Scheide via 4D_Tech
to do this in code something like this?
get database folder
if mac 
 add structure name look for plugins folder
   if not in existence create it
   copy plugin from component plugin folder
if windows
 look for plugins folder
  create if needed
  copy from inside component plugin folder

I'm not sure how to get component plain folder
in 4D folder look for component (folder) and open?

what if the user changes the name of the component???

THanks

 

On Fri, 17 Nov 2017 09:43:49 +1100, Wayne Stewart via 4D_Tech wrote:
> Chip,
> 
> Yep, that should do the trick
> 
> 
> Regards,
> 
> Wayne
> 
> 
> [image: --]
> Wayne Stewart
> [image: http://]about.me/waynestewart
> 
> 
> 
> On 17 November 2017 at 09:35, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com
>> wrote:
> 
>> I have a plugin - Keisuke's Get Folder Size - which is installed
>> (plugin folder) of a database which is itself a component.
>> 
>> I have tested the use of the plug, directly from inside the component,
>> and it works as expected.
>> However, I am finally testing a lot of new code from a host database
>> (which uses the component).
>> 
>> In the host database, I am calling a method from the component which
>> uses Keisuke's plugin. I am getting an error from the host database
>> 'the method does not exist.
>> 
>> Do I need to copy the plugin from the component's plugin folder to the
>> host's?
>> Thanks
>> Chip
>> ---
>> Gas is for washing parts
>> Alcohol is for drinkin'
>> Nitromethane is for racing
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Plugin inside component

2017-11-16 Thread Chip Scheide via 4D_Tech
Thanks
On Fri, 17 Nov 2017 09:43:49 +1100, Wayne Stewart via 4D_Tech wrote:
> Chip,
> 
> Yep, that should do the trick
> 
> 
> Regards,
> 
> Wayne
> 
> 
> [image: --]
> Wayne Stewart
> [image: http://]about.me/waynestewart
> 
> 
> 
> On 17 November 2017 at 09:35, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com
>> wrote:
> 
>> I have a plugin - Keisuke's Get Folder Size - which is installed
>> (plugin folder) of a database which is itself a component.
>> 
>> I have tested the use of the plug, directly from inside the component,
>> and it works as expected.
>> However, I am finally testing a lot of new code from a host database
>> (which uses the component).
>> 
>> In the host database, I am calling a method from the component which
>> uses Keisuke's plugin. I am getting an error from the host database
>> 'the method does not exist.
>> 
>> Do I need to copy the plugin from the component's plugin folder to the
>> host's?
>> Thanks
>> Chip
>> ---
>> Gas is for washing parts
>> Alcohol is for drinkin'
>> Nitromethane is for racing
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Plugin inside component

2017-11-16 Thread Wayne Stewart via 4D_Tech
Chip,

Yep, that should do the trick


Regards,

Wayne


[image: --]
Wayne Stewart
[image: http://]about.me/waynestewart



On 17 November 2017 at 09:35, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com
> wrote:

> I have a plugin - Keisuke's Get Folder Size - which is installed
> (plugin folder) of a database which is itself a component.
>
> I have tested the use of the plug, directly from inside the component,
> and it works as expected.
> However, I am finally testing a lot of new code from a host database
> (which uses the component).
>
> In the host database, I am calling a method from the component which
> uses Keisuke's plugin. I am getting an error from the host database
> 'the method does not exist.
>
> Do I need to copy the plugin from the component's plugin folder to the
> host's?
> Thanks
> Chip
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

v13 - Plugin inside component

2017-11-16 Thread Chip Scheide via 4D_Tech
I have a plugin - Keisuke's Get Folder Size - which is installed 
(plugin folder) of a database which is itself a component.

I have tested the use of the plug, directly from inside the component, 
and it works as expected.
However, I am finally testing a lot of new code from a host database 
(which uses the component).

In the host database, I am calling a method from the component which 
uses Keisuke's plugin. I am getting an error from the host database 
'the method does not exist. 

Do I need to copy the plugin from the component's plugin folder to the 
host's?
Thanks
Chip
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**