Re: Help->v11 to v17 Upgrade or New?

2018-10-18 Thread Spencer Hinsdale via 4D_Tech

It was Dani!  Yeah, 4D is awesome at this stuff.  We get upgrades old, old 
versions all the time and our current structure just opens these old data 
files, and 4d does its magic to uid them, unicode them, de'subtable them.  no 
problem.


> On Oct 18, 2018, at 2:19 PM, Robert ListMail via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Okay, I can’t find it now but someone said, "hey pop it into v17 and see if 
> it works…" or something like that. Well, I did just that and without any 
> changes it compiled (after toggling unicode on) and I created a built server 
> and client and ran a few tests. Yes, as I recall, I did fix all of the syntax 
> errors years ago. It seems to work for the most part (PICT icons and images 
> do not show and a couple of fields cannot be used for data entry, I’m sure 
> that’s an easy fix). I’m surprised this works at all! So, there are more than 
> 700 lines of code with the deprecated “_o_” prefix. Perhaps I could make a 
> lot of that go away via Search/Replace (a feature that I normally don’t use).
> 
> Thanks to all of you that have contributed. It looks like I can get this 
> running as it did before via v17 so that it can run on their new hardware 
> running the latest Windows server and Win10 clients…. Of course they want 
> this yesterday, so I could deliver the converted one and then upgrade 
> incrementally. Yes, it does look ugly as f*ck but sadly no one is complaining 
> about that.
> 
> Thanks,
> 
> Robert
> 
>> On Oct 17, 2018, at 3:11 PM, Spencer Hinsdale via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> 4D automatically converts Subtables. This should not be a problem.
> 
> **
> 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: Help->v11 to v17 Upgrade or New?

2018-10-18 Thread Robert ListMail via 4D_Tech
Okay, I can’t find it now but someone said, "hey pop it into v17 and see if it 
works…" or something like that. Well, I did just that and without any changes 
it compiled (after toggling unicode on) and I created a built server and client 
and ran a few tests. Yes, as I recall, I did fix all of the syntax errors years 
ago. It seems to work for the most part (PICT icons and images do not show and 
a couple of fields cannot be used for data entry, I’m sure that’s an easy fix). 
I’m surprised this works at all! So, there are more than 700 lines of code with 
the deprecated “_o_” prefix. Perhaps I could make a lot of that go away via 
Search/Replace (a feature that I normally don’t use).

Thanks to all of you that have contributed. It looks like I can get this 
running as it did before via v17 so that it can run on their new hardware 
running the latest Windows server and Win10 clients…. Of course they want this 
yesterday, so I could deliver the converted one and then upgrade incrementally. 
Yes, it does look ugly as f*ck but sadly no one is complaining about that.

Thanks,

Robert

> On Oct 17, 2018, at 3:11 PM, Spencer Hinsdale via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 4D automatically converts Subtables. This should not be a problem.

**
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: Elementary question

2018-10-18 Thread Andrew Hickey via 4D_Tech
I think the command you are looking for is the MKLINK command, it does
require special permissions for some uses, but for components and plugins
you can use the /J switch to symbolically link the folders.


4D Tech mailing list wrote
> In house. Does it matter?
> 
> Jeremy
> 
> On 13 Oct 2018, 17:00 +0100, Pat Bensky via 4D_Tech <

> 4d_tech@.4d

>>, wrote:
>> Is it an in-house solution or deployed?
>> PB
>>
>> On Sat, 13 Oct 2018 at 12:01, Jeremy Roussak via 4D_Tech <
>> 

> 4d_tech@.4d

>> wrote:
>>
>> > I usually work on a Mac. I have to develop one application in 4D on a
>> > Windows machine. It’s already up and working on the Mac.
>> >
>> > On my Mac, I can put aliases to a few of my components, which I use
>> > frequently, in the Components folder of the 4D application. They’re
>> then
>> > available to any 4D project I’m working on.
>> >
>> > Is there an equivalent under Windows? I’ve tried creating shortcuts and
>> > putting them in the Components folder next to the 4D application, but
>> 4D
>> > doesn’t see them or the methods they contain.
>> >
>> > 4Dv17, Windows 8.1 (under VirtualBox on the Mac, in case it makes any
>> > difference).
>> >
>> > Thanks in advance
>> >
>> > Jeremy
>> > **
>> > 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-Unsubscribe@.4D

>> > **
>>
>>
>>
>> --
>> *
>> CatBase - Top Dog in Data Publishing
>> tel: +44 (0) 207 118 7889
>> w: http://www.catbase.com
>> skype: pat.bensky
>> *
>> **
>> 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-Unsubscribe@.4D

>> **
> **
> 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-Unsubscribe@.4D

> **





--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
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: Scope of entity selection

2018-10-18 Thread Peter Bozek via 4D_Tech
On Thu, Oct 18, 2018 at 2:30 PM Christian Sakowski <
christian.sakow...@heubach-media.de> wrote:
>
> > I did not find a way how to do a shared collection from selection,
>
> You don’t need this. Just pass the object into the process. The object
will be copied.
> If you have performance problems, please let me know your benchmarks.


My testing data have now 15 record, so it will take a while.
>
>
> > creates unordered selection, so order is lost. ds.Table.fromCollection
may do that, but at a cost of significant overhead.
>
> Yes indeed.
>
> I create an ordered selection from a collection by doing this:
>
> ARRAY LONGINT($ids;0)
> COLLECTION TO ARRAY($collection;$ids)
>
> QUERY WITH ARRAY([table]ID;$ids)
> ORDER BY FORMULA([table];Find in array($ids;[table]ID))
>

Following code seems to work:

$selection:=ds.Table.newSelection(dk keep ordered)
For each ($id;$collection)
  $selection.add(ds.Table.get($id))
End for each

--

Peter Bozek
**
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: Scope of entity selection

2018-10-18 Thread Chip Scheide via 4D_Tech
Christian,
I *think* that the intent was to pass an ordered collection from 
process to process.
i.e. 
- process 1 order the data in whatever manner is desired.
- pass the collection from process 1 to process 2
- process 2 receive the ordered collection and do stuff with it, in the 
order in which it was passed -- without -- having to know the specifics 
of the ordering.

All of that said... and me with NO use of collections or objects (I'm 
still in v13)
could you:
- create your collection
- add a property to the collection which defines the desired ordering
- pass collection to secondary process
- use the collection's 'order' property to order the collection as 
desired.

it does not 'pass an ordered collection', but it comes close; and would 
allow a generic routine on the receiving end to execute the ordering.

Chip

On Thu, 18 Oct 2018 14:30:43 +0200, Christian Sakowski via 4D_Tech 
wrote:
> 
> I create an ordered selection from a collection by doing this:
> 
> ARRAY LONGINT($ids;0)
> COLLECTION TO ARRAY($collection;$ids)
> 
> QUERY WITH ARRAY([table]ID;$ids)
> ORDER BY FORMULA([table];Find in array($ids;[table]ID))
> 
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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: Scope of entity selection

2018-10-18 Thread Christian Sakowski via 4D_Tech
> I did not find a way how to do a shared collection from selection, 

You don’t need this. Just pass the object into the process. The object will be 
copied.
If you have performance problems, please let me know your benchmarks.

> creates unordered selection, so order is lost. ds.Table.fromCollection may do 
> that, but at a cost of significant overhead.

Yes indeed.

I create an ordered selection from a collection by doing this:

ARRAY LONGINT($ids;0)
COLLECTION TO ARRAY($collection;$ids)

QUERY WITH ARRAY([table]ID;$ids)
ORDER BY FORMULA([table];Find in array($ids;[table]ID))


--

Grüße/Regards,
[heubach-media] | Christian Sakowski
christian.sakow...@heubach-media.de
Tel: +49/(0)40/52 10 59-23




> Am 18.10.2018 um 14:14 schrieb Peter Bozek :
> 
> 
> 
> On Sat, Oct 13, 2018 at 10:29 PM Christian Sakowski via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
>  
> >
> >
> > like:
> > $object.myIDs:=$entitySelection.toCollection("ID“).extract(„ID“)
> > new process(…;$object)
> >
> > and in the new process just create the new entity selection:
> >
> > ds.Table.query(„ID IN :1“;$object.myIDs)
> 
> 
> I tried simpler (but I believe identical) solution:
> 
> $collection:=$selection.ID
> $err:=New process("aaExecuteProcess";0;"test";$collection)
> ... in the process
> 
> $selection:=ds.Table.query("ID IN :1";$collection) 
> 
> There are several problems with it: first, I did not find a way how to do a 
> shared collection from selection, there is no "New shared collection form 
> selection". So passing collection to another process probably copies the 
> collection (I could not find in in documentation.) But more serious problem 
> for me is there is no way how to pass ordered selection - line 
> 
> $selection:=ds.Table.query("ID IN :1";$collection) 
> 
> creates unordered selection, so order is lost. ds.Table.fromCollection may do 
> that, but at a cost of significant overhead.
> 
> So, it seems ORDA is nice, but for more advanced functionality, named 
> selections are way to go.
> 
> >
> > >> I am trying to do something like global named selection. Examples that,
> > >> say, pass selections to workers pass a condition to build a selection. 
> > >> This
> > >> seems to restricting.
> > >>
> > >> Am I overlooking something obvious?
> 
> 
> --
> 
> Peter Bozek


--
heubach media
Osterfeldstr. 12-14 | Haus 1 | Eingang Nord
22529 Hamburg
tel: 040 / 52 10 59 - 10 | fax: -99
mail: i...@heubach-media.de
home: www.heubach-media.de
Geschäftsführer|CEO: Matthias Heubach

Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei:
http://www.milo-rental.com

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht 
gestattet.
 
This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.
**
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: Scope of entity selection

2018-10-18 Thread Peter Bozek via 4D_Tech
On Sat, Oct 13, 2018 at 10:29 PM Christian Sakowski via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
>
> like:
> $object.myIDs:=$entitySelection.toCollection("ID“).extract(„ID“)
> new process(…;$object)
>
> and in the new process just create the new entity selection:
>
> ds.Table.query(„ID IN :1“;$object.myIDs)


I tried simpler (but I believe identical) solution:

$collection:=$selection.ID
$err:=New process("aaExecuteProcess";0;"test";$collection)
... in the process

$selection:=ds.Table.query("ID IN :1";$collection)

There are several problems with it: first, I did not find a way how to do a
shared collection from selection, there is no "New shared collection form
selection". So passing collection to another process probably copies the
collection (I could not find in in documentation.) But more serious problem
for me is there is no way how to pass ordered selection - line

$selection:=ds.Table.query("ID IN :1";$collection)

creates unordered selection, so order is lost. ds.Table.fromCollection may
do that, but at a cost of significant overhead.

So, it seems ORDA is nice, but for more advanced functionality, named
selections are way to go.

>
> >> I am trying to do something like global named selection. Examples that,
> >> say, pass selections to workers pass a condition to build a selection.
This
> >> seems to restricting.
> >>
> >> Am I overlooking something obvious?


--

Peter Bozek
**
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
**

Write Pro Toolbar

2018-10-18 Thread Bernard Escaich via 4D_Tech
Hi all,

Write Pro seems OK for migration, so I try to convert my Write documents to WP.
Conversion is OK* with :
$MyBlobWrite_x:=WR Area to blob(MyAreaWrite;1)
[MyTable]MyWPObject:=WP New($MyBlobWrite_x)

I have put WP object with new toolbar in my form, from object library ; every 
seems OK but, when I click on any icon of the toolbar, wheel of death appears 
for at least one minute.

Do you use the new toolbar ?
Has somebody the same issue ?

Best regards

Bernard Escaich


* small issue : footer is missing

**
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: Help->v11 to v17 Upgrade or New?

2018-10-18 Thread Kirk Brooks via 4D_Tech
Robert,
I am just taking on a project for a similar situation: v11 to v17. I
haven't had a chance to really dive into the code yet so I'm not really
sure what's there but at this point the client's intention is to
essentially keep the database on 'palliative care' for the next 1 to 2
years when they migrate to another platform. Given their needs at the
moment a re-write isn't in the cards.

In another project, one I started in v6 and maintained for the past 15
years, I have performed two 'greenfield' re-writes. The first was going
from v6 -> v2004, the second v2004 -> v13. In both cases the re-write was
necessary to correct structural design issues. This project grew in scope
quite a bit and changing the basic data structure made it easier to
continue to grow as well as leverage 4D's new capabilities. Looking back
they were the right decisions at the time but especially the second
migration was a lot of work. And in both cases the data had to be dumped
from the old structure and imported into the new one with different levels
of transformation required. This is not a bad thing. Especially in bespoke
projects the data can become munged up with structure, interface elements
and this is never a good thing. It's always a result of some momentary
expediency and over time becomes increasingly detrimental.

You know the question we are talking about here is what's called 'technical
debt' and there are a ton of things written about it. I've been reading a
few of them lately as well as talking with other developers about it. 4D is
particularly ripe for these discussions because of the backward
compatibility it has so rigorously embraced. The fact there are still so
many critical systems running geriatric versions of 4D proves this point.
The final straw that's moving the client I mentioned to act is the system
has been running on a single computer for years, the person who wrote it
has retired and the computer, the hardware, is showing signs of failing and
no one in the organization knows how to deal with 4D.

This isn't an unusual story in 4D land.

So now we come to the business question - can you just keep it working for
another year or two? For better or worse the answer is yes. I don't know
what I'm going to tell them it will cost to do that yet but it's certainly
a fraction of what I'd quote for a rewrite. Is that a good thing overall?
Schmaybe. As a business principle would 4D loose some clients if there were
limits on the perpetual backward compatibility. On the other hand we
wouldn't be seeing v17 databases running code so old you just need a black
background and a gold colored, pixelated font to believe you're working on
an old VT100. It's hard to convincingly talk about how modern 4D is when
you're looking at that on the screen.

Bottom line - a re-write is a hard sell. It's a hard sell in any case but
especially for 4D precisely because we've been around so long the
perception (Perception) is the technology is old. It's not but the IT guys
sitting in the room who only know about it as this PITA system they don't
understand and can't get rid of are not going to embrace it.

What we, developers, can do is be more like 4D. Like v17 4D. ORDA is
essentially a new programming language within the 4D shell. (I know there
are some strong voices saying this isn't true. Flame on.) I didn't think
such a thing was possible or that I would ever see it. I was wrong about
that and I'm delighted. The old bones of 4D are still there and available
but there are new options as well.

I suggest this is the model we can extend to modernizing old projects.
Namely, instead of staking out large swaths of green fields and building
from scratch (think Albuquerque) move the existing tables over to the right
and build on top of what you've got (think Rome). I tend to start with the
overall approach to displaying data. The existing project probably uses a
lot of MODIFY SELECTION and MODIFY RECORD. This was fabulous in the day but
you can do better now. So do it. Structural issues can be identified,
solutions developed, tables added and the relevant data migrated within the
current structure. There are some real benefits to this approach not the
least of which being if something goes sideways you can roll back to the
old data by rolling back the structure. There is plenty of time to purge
the datafile once you have certainty the new approach works.

It is important to clear the old data AND the obsolete code. This second
point is really important because if you don't periodically identify and
remove obsolete code then this "build on top" approach spirals into
unmanageability. Or at least a structure where you may have a few thousand
methods but only a few hundred actually are used.

The point is we can modernize and migrate a mature app on top of the old
structure. This allows us to make incremental changes, particularly in the
user interface, that can revive a project.


On Wed, Oct 17, 2018 at 12:45 PM Robert ListMail via 4D_Tech 

Re: Help->v11 to v17 Upgrade or New?

2018-10-18 Thread Arnaud de Montard via 4D_Tech

> Le 17 oct. 2018 à 21:45, Robert ListMail via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> [...]
> 
> Also, the client originally said the new database would not have to migrate 
> data forward from the old system and now they are wanting to have the data 
> too.

Most of the I write the new application in the old one when existing data must 
be recovered. I can for example keep correctly designed tables, create a table 
to replace a subtable and pour records from subtable in it, avoid the 
export/import nightmare from different structures, etc. 
The old stuff (tables, forms, etc.) will be deleted after the new app is 
released. 

-- 
Arnaud de Montard 



**
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: Help->v11 to v17 Upgrade or New?

2018-10-18 Thread Epperlein, Lutz (agendo) via 4D_Tech
If in doubt I would vote for a rewrite, even more if the old application is 
poor 
designed. We struggle from time to time with problems caused by using legacy 
4D code. E.g. sometimes there were assumptions made in the past regarding 
performance they are nowadays simply wrong and are causing now performance 
problems even more.
And new code written by yourself you are able to understand. You can use your 
conventions and rules of developing. In my experience old code is usually poor 
or wrong commented and often because of its complexity there is some effort to 
understand and fix it.
But if you are quite sure you have to move the whole thing to a new version 
only and you don't have to touch it anymore in the future, so you can migrate 
it only. But these assumptions are wrong in the most cases, this is at least my 
experience.

So IMHO it's better to bite the bullet and build a new one from scratch.

Only my 2 cents ...

Regards

--  
Lutz Epperlein  
--
Agendo Gesellschaft für politische Planung mbH
Köpenicker Str. 9
10997 Berlin
http://www.agendo.de/
--



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