Re: v18 and 4D Write Classic - does it work ?

2020-02-06 Thread Peter Jakobsson via 4D_Tech
Many thanks for that comprehensive and extensive commentary Tim !

Looks like I have my work cut out. All the 4D Write code I have is in a 
component and the component makes around 30 calls or so to 4D Write. There’s no 
raw host calls anywhere. Hopefully it will be do-able but will take your advice 
and read the manuals in depth.

Thanks again !

Regards

Peter

> On 5 Feb 2020, at 16:07, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Warning: You may not going like what I have to say below

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

Re: v18 and 4D Write Classic - does it work ?

2020-02-05 Thread Tom Benedict via 4D_Tech
Ditto what Tim said. His description of the process is comprehensive and 
realistic. I had about 120 methods and forms to re-write. Took 3 months, but 
hasn’t been deployed due to a constraint on testing resources. Some level of 
support for Automated Testing in 4D would be nice in a case like this.

Tom Benedict

> On Feb 5, 2020, at 08:07, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> On Feb 5, 2020, at 8:42 AM, Peter Jakobsson wrote:
> 
>> I’m going to be making the leap from v15 to v18. I think the biggest 
>> transition will be moving to 4D Write Pro as I have quite a lot of legacy 4D 
>> Write code to deal with.
>> 
>> In the meantime, does anybody have experience of migrating big 4D Write 
>> codebases ? What are the major gotchas ?
> 
> Warning: You may not going like what I have to say below. You are late to the 
> game and a direct v15 to v18 upgrade may be very challenging. This is a long 
> post for everyone that is going to move to v18+ some day and is currently 
> using the 4D Write Plugin.
> 
> I’ve done a big code rewrite from 4D Write Plugin to 4D Write Pro in v17. 
> There are many gotchas. 
> 
> You will need to throw away all of your 4D Write Plugin code and start over, 
> from scratch to do duplicate the functionality using 4D Write Pro code. There 
> is no one-to-one, command-to-command mapping between the two. Some things in 
> 4D Write Plugin code that take 10 lines of code now take 2 lines in 4D Write 
> Pro. Some things you can’t do at all, and don’t want to or need to do. In 
> some cases you have to use styled text commands to do operations on 4D Write 
> Pro areas whereas with 4D Write Plugin there was a plugin command. 
> 
> 4D Write Pro is based on an object field and an object variable. Some things 
> are done by manipulating properties of that object. You will spend a lot of 
> time tracking down what those property names are and how to set and change 
> them to accomplish what you did with 4D Write Plugin commands. The 
> documentation for 4D Write Pro is divided between 4D Write Pro commands — 
> which there are very few compared to 4D Write Plugin’s many commands — and 
> object property manipulation and styled text commands. Some native 4D object 
> commands also work and are needed to make changes to 4D Write Pro objects and 
> areas. 
> 
> You also manipulate 4D Write Pro object areas using “standard actions” that 
> can be assigned to a form button or UI element. You also sometimes need to 
> invoke one of these actions to accomplish what you need that in 4D Write 
> Plugin you did with a 4D Write command. You use the INVOKE ACTION command for 
> that. It’s a new way of doing things that takes some getting used to. Read 
> the docs. Then read them again so you get a sense in your mind of what you 
> must do with standard actions and the INVOKE ACTION command. 
> 
> https://doc.4d.com/4Dv17/4D/17/Using-4D-Write-Pro-standard-actions.200-3726284.en.html
> 
> 4D Write Pro implements probably 95% of the 4D Write Plugin features and 
> capabilities. Might be 99%, but it is not 100%. Maybe you will not miss the 
> 5%, maybe you will. You’ll find out when you get into the complete rewrite of 
> your code. No, I don’t have a complete list of the missing 5%. For my project 
> I lost 2-3 small features that I was able to live with. Convenience things 
> for the user interface and to help users that were not a big deal. 
> 
> It took me two full 8 hour days of 4D Write Pro immersion to get my head 
> around how it works when compared to how 4D Write Plugin works. Maybe you 
> only have 50 lines of 4D Write Plugin code that you need to convert. Then you 
> have maybe a day or two of work and you are done. If you have 200+ lines of 
> 4D Write Plugin code spread over 50+ project methods and form object methods, 
> it’s gonna be a multi-day project. You have to factor in retesting 
> EVERYTHING. That adds the most time to the rewrite. Testing EVERYTHING again. 
> 
>> Will legacy 4D Write work in v18 in the meantime or do we need to migrate to 
>> 4D Write Pro to even run it ? (When I try it it invokes license privilege 
>> errors everywhere).
> 
> 4D Write Plugin is 32bit only. v18 is 64bit only. So zero 4D Write Plugin 
> code will run. You can keep the 4D Write Plugin around after the v18 
> conversion so you can still read the 4D Write Plugin code, but none of it 
> will execute. It’s 32bit and 4D v18 is 100% 64bit. 
> 
>> Many thanks for any tips
> 
> My advice is to not move from v15 to v18. Instead, move from v15 to v17 
> first. 4D Write Plugin still works just fine in v17 32bit. And it can coexist 
> with 4D Write Pro. Same license works for both. So you can fork your code and 
> keep all the current 4D Write Plugin code and form areas working just as they 
> are. Users can continue to use them with the 32bit client. 
> 
> 4D Write Pro also works just fine with 4D v17 32bit. So you can run 4D v17 
> 32bit and do all the testing and coding for 4D Write Pro. You 

Re: v18 and 4D Write Classic - does it work ?

2020-02-05 Thread Tim Nevels via 4D_Tech
On Feb 5, 2020, at 8:42 AM, Peter Jakobsson wrote:

> I’m going to be making the leap from v15 to v18. I think the biggest 
> transition will be moving to 4D Write Pro as I have quite a lot of legacy 4D 
> Write code to deal with.
> 
> In the meantime, does anybody have experience of migrating big 4D Write 
> codebases ? What are the major gotchas ?

Warning: You may not going like what I have to say below. You are late to the 
game and a direct v15 to v18 upgrade may be very challenging. This is a long 
post for everyone that is going to move to v18+ some day and is currently using 
the 4D Write Plugin.

I’ve done a big code rewrite from 4D Write Plugin to 4D Write Pro in v17. There 
are many gotchas. 

You will need to throw away all of your 4D Write Plugin code and start over, 
from scratch to do duplicate the functionality using 4D Write Pro code. There 
is no one-to-one, command-to-command mapping between the two. Some things in 4D 
Write Plugin code that take 10 lines of code now take 2 lines in 4D Write Pro. 
Some things you can’t do at all, and don’t want to or need to do. In some cases 
you have to use styled text commands to do operations on 4D Write Pro areas 
whereas with 4D Write Plugin there was a plugin command. 

4D Write Pro is based on an object field and an object variable. Some things 
are done by manipulating properties of that object. You will spend a lot of 
time tracking down what those property names are and how to set and change them 
to accomplish what you did with 4D Write Plugin commands. The documentation for 
4D Write Pro is divided between 4D Write Pro commands — which there are very 
few compared to 4D Write Plugin’s many commands — and object property 
manipulation and styled text commands. Some native 4D object commands also work 
and are needed to make changes to 4D Write Pro objects and areas. 

You also manipulate 4D Write Pro object areas using “standard actions” that can 
be assigned to a form button or UI element. You also sometimes need to invoke 
one of these actions to accomplish what you need that in 4D Write Plugin you 
did with a 4D Write command. You use the INVOKE ACTION command for that. It’s a 
new way of doing things that takes some getting used to. Read the docs. Then 
read them again so you get a sense in your mind of what you must do with 
standard actions and the INVOKE ACTION command. 

https://doc.4d.com/4Dv17/4D/17/Using-4D-Write-Pro-standard-actions.200-3726284.en.html

4D Write Pro implements probably 95% of the 4D Write Plugin features and 
capabilities. Might be 99%, but it is not 100%. Maybe you will not miss the 5%, 
maybe you will. You’ll find out when you get into the complete rewrite of your 
code. No, I don’t have a complete list of the missing 5%. For my project I lost 
2-3 small features that I was able to live with. Convenience things for the 
user interface and to help users that were not a big deal. 

It took me two full 8 hour days of 4D Write Pro immersion to get my head around 
how it works when compared to how 4D Write Plugin works. Maybe you only have 50 
lines of 4D Write Plugin code that you need to convert. Then you have maybe a 
day or two of work and you are done. If you have 200+ lines of 4D Write Plugin 
code spread over 50+ project methods and form object methods, it’s gonna be a 
multi-day project. You have to factor in retesting EVERYTHING. That adds the 
most time to the rewrite. Testing EVERYTHING again. 

> Will legacy 4D Write work in v18 in the meantime or do we need to migrate to 
> 4D Write Pro to even run it ? (When I try it it invokes license privilege 
> errors everywhere).

4D Write Plugin is 32bit only. v18 is 64bit only. So zero 4D Write Plugin code 
will run. You can keep the 4D Write Plugin around after the v18 conversion so 
you can still read the 4D Write Plugin code, but none of it will execute. It’s 
32bit and 4D v18 is 100% 64bit. 

> Many thanks for any tips

My advice is to not move from v15 to v18. Instead, move from v15 to v17 first. 
4D Write Plugin still works just fine in v17 32bit. And it can coexist with 4D 
Write Pro. Same license works for both. So you can fork your code and keep all 
the current 4D Write Plugin code and form areas working just as they are. Users 
can continue to use them with the 32bit client. 

4D Write Pro also works just fine with 4D v17 32bit. So you can run 4D v17 
32bit and do all the testing and coding for 4D Write Pro. You can also run the 
4D Write Plugin code in 4D v17 32bit. So you can test the current 4D Write 
Plugin code against the new 4D Write Pro code. That’s how I did all my 
conversion work. 

You will also need to convert all the 4D Write BLOB fields to an object field 
for 4D Write Pro. If you are storing 4D Write areas in a table in a BLOB field, 
create a new object field to store the 4D Write Pro area. To convert 4D Write 
BLOB field to 4D Write Pro object field use code like this:

[LetterTemplates]LetterPro:=WP New([LetterTemplates]Letter_)


Re: v18 and 4D Write Classic - does it work ?

2020-02-05 Thread UKVetDerm via 4D_Tech
For the 4D write side of things I would use v17 r 4 (I think) 32 bit to 
facilitate using the two systems side by side in a fairly modern environment.
Not everything available in WP (v18) was sorted at that stage so I would make 
this an interim step as v18 seems fairly complete.

Hope this help

Steve

On 05/02/2020, 14:38, "4D_Tech on behalf of Peter Jakobsson via 4D_Tech" 
<4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote:

Hi

I’m going to be making the leap from v15 to v18. I think the biggest 
transition will be moving to 4D Write Pro as I have quite a lot of legacy 4D 
Write code to deal with.

In the meantime, does anybody have experience of migrating big 4D Write 
codebases ? What are the major gotchas ?

Will legacy 4D Write work in v18 in the meantime or do we need to migrate 
to 4D Write Pro to even run it ? (When I try it it invokes license privilege 
errors everywhere).

Many thanks for any tips

Peter

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

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

Re: v18 and 4D Write Classic - does it work ?

2020-02-05 Thread Bernd Fröhlich via 4D_Tech
Peter Jakobsson:

> I’m going to be making the leap from v15 to v18. I think the biggest 
> transition will be moving to 4D Write Pro as I have quite a lot of legacy 4D 
> Write code to deal with.
> 
> In the meantime, does anybody have experience of migrating big 4D Write 
> codebases ? What are the major gotchas ?
> 
> Will legacy 4D Write work in v18 in the meantime or do we need to migrate to 
> 4D Write Pro to even run it ? (When I try it it invokes license privilege 
> errors everywhere).

Hi Peter,

the last version where you can run 4D Write and WritePro side by side is the 
32-Bit Version of V17R4.
I have used that version to let my users continue with 4D Write and alongside 
that rewrote all code to use WritePro so that I could switch back and forth 
when something did not work as expected.
When everything was working I removed all old 4D Write code and switched to V18.
It is A LOT of work and I´m glad I´ve got that behind me.

You will have to write everything completely from scratch since WritePro uses a 
very different approach than 4D Write.
Once you get the hang of it, it´s OK but now you have to use commands from 3 
areas (WP, ST and Object commands).

On the plus side: converting old Write documents to Write Pro is only one line 
of code.

Hope this info helps a little bit.

Greetings from Germany,
Bernd Fröhlich
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v18 and 4D Write Classic - does it work ?

2020-02-05 Thread Koen Van Hooreweghe via 4D_Tech
Hi Peter,

4D Write is 32bit only. v18 is 64bit only. v18 cannot load the 4D Write plugin 
and therefore raises the privilege error.

You cannot use 4D Write in v18 at all.

IMHO v17R3 was the last 4D having a 32bit version.

Kind regards,
Koen

> Op 5 feb. 2020, om 15:37 heeft Peter Jakobsson via 4D_Tech 
> <4d_tech@lists.4d.com> het volgende geschreven:
> 
> Will legacy 4D Write work in v18 in the meantime or do we need to migrate to 
> 4D Write Pro to even run it ? (When I try it it invokes license privilege 
> errors everywhere).




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Aalter
Belgium
tel +32 495 511.653

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

Re: v18 and 4D Write Classic - does it work ?

2020-02-05 Thread Paul Lovejoy via 4D_Tech
Hi Peter,

Unless we’re seriously out of touch, v17r4 is the last version that supports 
32bits and thus 4D Write classic. Depending on what you’ve done with it, a 
major rewrite (pun intended) is required. The code doesn’t translate and any 
data you have needs to be converted. 4D hasn’t done much to help the migration 
process. It’s pretty much roll your own. 

V17r4 is nice because you can have Write and Write Pro working side by side. 

We’re in the process of doing this ourselves. 

Good luck. 

Paul 

> On 5 Feb 2020, at 15:37, Peter Jakobsson via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi
> 
> I’m going to be making the leap from v15 to v18. I think the biggest 
> transition will be moving to 4D Write Pro as I have quite a lot of legacy 4D 
> Write code to deal with.
> 
> In the meantime, does anybody have experience of migrating big 4D Write 
> codebases ? What are the major gotchas ?
> 
> Will legacy 4D Write work in v18 in the meantime or do we need to migrate to 
> 4D Write Pro to even run it ? (When I try it it invokes license privilege 
> errors everywhere).
> 
> Many thanks for any tips
> 
> Peter
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**