Macros...why have i forgotten this.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Macros...why have i forgotten this.

4D Tech mailing list
Hi.

I think old age has crept up on me.

I have some macros which I use in my development structure. I want those macros to work client server(i normally develop on single user).

 The Macros V2 folder is next to the .4db at the same level as plug ins, components folders etc. In Client server thie Macros V2 folder does not get copied to the client cache.

I seem to remember tackling this before but cant find what i did and cant remember how to get the macros on the ’server’  to auto implement on the client.


Thanks to anyone who can set me straight




Nigel Greenlee
**********************************************************************
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:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Macros...why have i forgotten this.

4D Tech mailing list
On Jun 14, 2017, at 2:47 AM,Nigel Greenlee wrote:

> I think old age has crept up on me.
>
> I have some macros which I use in my development structure. I want those macros to work client server(i normally develop on single user).
>
> The Macros V2 folder is next to the .4db at the same level as plug ins, components folders etc. In Client server thie Macros V2 folder does not get copied to the client cache.
>
> I seem to remember tackling this before but cant find what i did and cant remember how to get the macros on the ’server’  to auto implement on the client.
>
> Thanks to anyone who can set me straight

The "Macros v2” currently lives at “~/Library/Application Support/4D/Macros v2/“ on macOS. It is not automatically distributed to 4D Clients when running 4D Server. If you want this you have 2 options:

1. Put a copy of “Macros v2” in your “Resources” folder. That will get it automatically to your 4D Client “Resources” folder. Then write some code to move it to it’s final home at “~/Library/Application Support/4D/Macros v2/“ .

2. Put “Macros v2” folder in a component next to the .4DB or .4DC file. The macro .xml will then be automatically distributed to 4D Client AND 4D will integrate the macros with the other macros already on the 4D Client machine. This allows you to include some macros with a component and 4D will recognize them. It’s a feature most do not know about. I know it works because I’ve used it in 2 of my own components.

Tim

********************************************
Tim Nevels
Innovative Solutions
785-749-3444
[hidden email]
********************************************

**********************************************************************
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:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Macros...why have i forgotten this.

4D Tech mailing list
Tim

Thanks. I found the second of those options by accident(when i added a macro V2 folder to a component)..but its not the way for me to go in this case…what is annoying about that actually is that it means i have to removed any macros from my component before I install because that macro is getting called instead of the macro i have in the host database(and so gets an error because the ‘call back’ method it is calling is in the component and not shared with the client). That makes using a macro when developing a plug in a bit of a pain because you need to remove it before you distribute the component. Anyone else found this?

I think i remember doing it the option 1 way before and will do that again.


Nigel Greenlee

> On 14 Jun 2017, at 15:28, Tim Nevels via 4D_Tech <[hidden email]> wrote:
>
> On Jun 14, 2017, at 2:47 AM,Nigel Greenlee wrote:
>
>> I think old age has crept up on me.
>>
>> I have some macros which I use in my development structure. I want those macros to work client server(i normally develop on single user).
>>
>> The Macros V2 folder is next to the .4db at the same level as plug ins, components folders etc. In Client server thie Macros V2 folder does not get copied to the client cache.
>>
>> I seem to remember tackling this before but cant find what i did and cant remember how to get the macros on the ’server’  to auto implement on the client.
>>
>> Thanks to anyone who can set me straight
>
> The "Macros v2” currently lives at “~/Library/Application Support/4D/Macros v2/“ on macOS. It is not automatically distributed to 4D Clients when running 4D Server. If you want this you have 2 options:
>
> 1. Put a copy of “Macros v2” in your “Resources” folder. That will get it automatically to your 4D Client “Resources” folder. Then write some code to move it to it’s final home at “~/Library/Application Support/4D/Macros v2/“ .
>
> 2. Put “Macros v2” folder in a component next to the .4DB or .4DC file. The macro .xml will then be automatically distributed to 4D Client AND 4D will integrate the macros with the other macros already on the 4D Client machine. This allows you to include some macros with a component and 4D will recognize them. It’s a feature most do not know about. I know it works because I’ve used it in 2 of my own components.
>
> Tim
>
> ********************************************
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> [hidden email]
> ********************************************
>
> **********************************************************************
> 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:[hidden email]
> **********************************************************************

**********************************************************************
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:[hidden email]
**********************************************************************