Re: Notes on converting pictures to v17

2018-10-09 Thread Chuck Miller via 4D_Tech
Yup after your 

CONVERT PICTURE($vPict;$codec)  

You need the next line of code

TRANSFORM PICTURE($vPict;Transparency;0x00FF)

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
 mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  

This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

> On Oct 8, 2018, at 11:19 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have done this, although in v13.  I found that all my images now have 
> white backgrounds 
> any way to fix this without manually editing every single one??

**
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: 4D Write Pro (WP) Area and ST INSERT EXPRESSION

2018-10-09 Thread Pat Bensky via 4D_Tech
Something like ...

*ST INSERT EXPRESSION*(WriteProArea;"String(Current date;System date long)")


for example.

On Tue, 9 Oct 2018 at 17:50, David Ringsmuth via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Insert expression and Get expression seem to not be pre-implemented in the
> 4D v17 Write Pro area.
>
> The documentation indicates this should be managed by the developer, along
> with “Allowed Methods”.
>
> I think the UI for this provide access to allowed tables, fields, methods
> and commands.
>
> If you have already implemented this for a 4D WP area, would you be
> willing to share how you did it?
>
> Thanks!
>
> David Ringsmuth
>
> **
> 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
> **



-- 
*
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-unsubscr...@lists.4d.com
**

Re: Write Pro: Creating headers/footers

2018-10-09 Thread Pat Bensky via 4D_Tech
Thanks Rudy - but I need to create new headers and footers in code!
Pat

On Tue, 9 Oct 2018 at 20:21, Two Way Communications via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi Pat,
>
> I discovered this by accident: you need to double click in the header or
> footer area, when in ‘Page’ mode…. practically, this means, as high or as
> low as you can on the 4D Write Pro page.
>
> Rudy Mortier
> Two Way Communications bvba
>
>
>
> > On 6 Oct 2018, at 00:59, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> >
> > If I create a new WP document from scratch, is there any way to add a
> > header or footer to the document? Or do I have to start with a template
> > that has a header/footer and modify it?
> >
> > Pat
> > --
> > *
> > 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-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
> **



-- 
*
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-unsubscr...@lists.4d.com
**

Re: 4D Write Pro (WP) Area and ST INSERT EXPRESSION

2018-10-09 Thread John DeSoi via 4D_Tech
You can use the 4D formula editor with the EDIT FORMULA command.

I don't use 4D Write, but I implemented the formula editor for styled text 
fields (used to implement a markdown editor). 

Editing (by double click) or inserting a formula is something like this:

GET HIGHLIGHT(*;$edName;$start;$end)
Case of 
  : ($start=$end)
  : (ST Get content type(*;$edName)=ST Expression type)  //Formula is selected.
$formula:=ST Get expression(*;$edName)
End case 

If ($formula#"")
  $formula:=UI_Formula_editor ($formula)
  If ($formula#"")
ST INSERT EXPRESSION(*;$edName;$formula;$start;$end)
HIGHLIGHT TEXT(*;$edName;$start;$start+1)
  End if 
End if 

John DeSoi, Ph.D.


> On Oct 9, 2018, at 11:50 AM, David Ringsmuth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Insert expression and Get expression seem to not be pre-implemented in the 4D 
> v17 Write Pro area.
> 
> The documentation indicates this should be managed by the developer, along 
> with “Allowed Methods”.
> 
> I think the UI for this provide access to allowed tables, fields, methods and 
> commands.
> 
> If you have already implemented this for a 4D WP area, would you be willing 
> to share how you did it?

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

Multi-style behaving strangely

2018-10-09 Thread Carl Aage Wangel via 4D_Tech
Windows7, 4D v16.4

I have a form with a subform included. The form is used for printing
invoices. The subform has 3 fields side by side. The first field is a date
field, the second field is a text field and the third field is a number
field. Sometime the text field has "copy and paste" text. For that kind of
text it is not unusual to see HTML span tags included in the text. To hide
tags I switch on "multi-style", but now the date field and the number field
are no longer visible on the printout. Even though the text in the text
field have the same width, the text field appears to fil out the whole width
of the subform and there by cowering the 2 other fields. Anyone have a
solution? (Output forms in user environment behave strange as well, when a
text field have multi-style selected). Besides, importing text to a text
field with "copy and paste" seem to confuse the context menu (need a "remove
formatting" option when importing text).

Regards

Carl Aage Wangel

**
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: Write Pro: Creating headers/footers

2018-10-09 Thread Two Way Communications via 4D_Tech
Hi Pat,

I discovered this by accident: you need to double click in the header or footer 
area, when in ‘Page’ mode…. practically, this means, as high or as low as you 
can on the 4D Write Pro page.

Rudy Mortier
Two Way Communications bvba 



> On 6 Oct 2018, at 00:59, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> If I create a new WP document from scratch, is there any way to add a
> header or footer to the document? Or do I have to start with a template
> that has a header/footer and modify it?
> 
> Pat
> -- 
> *
> 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-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
**

what to do when I don't want back button funtionality in a browser of pages from 4d

2018-10-09 Thread setar accnt via 4D_Tech
Hi All,
I am a fledgling developer trying to become more proficient in using 4D and the 
web for in-house applications.

Sinds many years 4D is capable to send, to the Web browser, the HTML page of 
the Web file stored in the document whose pathname is supplied.

Every page I send to the browser is cached (back), so if I send first :
page 1, where user enters an account# or other unique identifier
   this info is send back to 4d, a query is made (if found)
page 2, is shown with info to, possibly, change
   say the data is updated, the page info is send back to 4D, acknowledged
page 3, is send stating successful acceptance of the data.   All 3 pages 
designed with simple HTML and inline css. 

If I have 15 such case one morning, I might have 15x 3 pages possibly in the 
cache at that one station / smart device.
Pressing the back-button I can go back and update the data once more and again 
send the page to the 4d database, 
which is an absolute no-no. 

Is there a technique or standard that is used with 4D environment that use a 
different approach, besides elaborate javascripts that bent 
and force website behavior to behave, e.g. no back button which does work for 
one browser and not another. 

Any tips on this would be very welcome. 

In my ignorance I am thinking like, put up 1 screen for input identifier
same screen (with other html) put up the requested data
at acknowledgement, redraw again screen 1 for input of identifier. 

thus no back-button action possible (?), what’s wrong with this picture ? 

ernie hilgers(aruba)
**
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: Where is best place to save data outside data file

2018-10-09 Thread Jody Bevan via 4D_Tech
Chip:

Ya, I saw my phone number there as I clicked send…

I will try the 4D Folder and see how that works out.

Thanks

Jody


> On Oct 9, 2018, at 10:29 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I believe that Get 4D Folder works for this sort of thing
> 
> I would think either: 
> 4D folder, 
>   or
> Log folder
> 
> Chip

**
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 Write Pro (WP) Area and ST INSERT EXPRESSION

2018-10-09 Thread David Ringsmuth via 4D_Tech
Insert expression and Get expression seem to not be pre-implemented in the 4D 
v17 Write Pro area.

The documentation indicates this should be managed by the developer, along with 
“Allowed Methods”.

I think the UI for this provide access to allowed tables, fields, methods and 
commands.

If you have already implemented this for a 4D WP area, would you be willing to 
share how you did it?

Thanks!

David Ringsmuth

**
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: Where is best place to save data outside data file

2018-10-09 Thread Chip Scheide via 4D_Tech
I believe that Get 4D Folder works for this sort of thing

I would think either: 
4D folder, 
   or
Log folder

Chip
On Tue, 9 Oct 2018 09:50:48 -0600, Jody Bevan via 4D_Tech wrote:
> In my previous 26+ years of 4D coding I did not have to concern 
> myself with the same computer being used by different computer users 
> (By this, I mean the user signed into the computer). Part of that was 
> that long ago, people just didn’t sign out of the computer, and then 
> the next person sign in as themselves. For most of our users our 
> application looked after the security, and our application was the 
> only thing running on the workstations. So even when tracking, 
> logging of who changed what, and security of who could access what, 
> was all handled within our application. Therefore the ‘computer user
> ’ was never changed. 
> 
> Now having left that world, I am now confronted with having to deal 
> with the very likely situation where the people on the computer will 
> be signing out from the computer when they walk away, and when a 
> different person uses the computer they will be signing in as 
> themselves.
> 
> I love writing logs to the local computer while it is running. These 
> log files are for the programmers to know what is occurring on the 
> computer. Typically these logs are turned off when there are no 
> problems in the application. They are used extensively when an 
> application is first handed to the users in Alpha or beta form. This 
> way we know much better where the problems are, often being able to 
> fix the issue before they even report it to us. These files do not 
> contain sensitive data.
> 
> Last week I decided I should actually test this out with switching 
> computer users. 
> 
> On the MacOS we have been writing this information we write to the 
> Shared folder. The pathname would be:
> 
> ~/Users/Shared/ApplicationName/Logs/LogFileName.txt
> 
> On Windows it would be:
> 
> ~/Users/Public/ApplicationName/LogFileName.txt
> 
> This has been working great when I am signed in as myself, or if the 
> computer user does not changed. 
> A quick check in Terminal shows me the directories and files are 
> created, and I can write to them as needed.
>  -rw-r―r―
> Or in Octal format 644
> 
> This is fine for the currently signed in user, but not for other users.
> 
> Not a problem I am thinking, I will just call terminal from within 4D 
> at startup and use the chmod command to change the permissions of the 
> folders and files if they are not read write for all users.
> 
> I suspect I am doing something stupid because it is not working.
> 
> Questions:
> 
> 1. Is this the right location I should be saving this kind of information?
> 2. Is my logic and steps correct and I am obviously not writing my 
> terminal commands right?
> 3. Or, rather is it - Dah, no don’t do it that way do it this way?
> 
> Thanks
> 
> Jody
> 
> 
> Jody Bevan
> Developer
> 
> +1 587-487-6120
> 
> 
> 
> **
> 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
> **
---
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
**

Where is best place to save data outside data file

2018-10-09 Thread Jody Bevan via 4D_Tech
In my previous 26+ years of 4D coding I did not have to concern myself with the 
same computer being used by different computer users (By this, I mean the user 
signed into the computer). Part of that was that long ago, people just didn’t 
sign out of the computer, and then the next person sign in as themselves. For 
most of our users our application looked after the security, and our 
application was the only thing running on the workstations. So even when 
tracking, logging of who changed what, and security of who could access what, 
was all handled within our application. Therefore the ‘computer user’ was never 
changed. 

Now having left that world, I am now confronted with having to deal with the 
very likely situation where the people on the computer will be signing out from 
the computer when they walk away, and when a different person uses the computer 
they will be signing in as themselves.

I love writing logs to the local computer while it is running. These log files 
are for the programmers to know what is occurring on the computer. Typically 
these logs are turned off when there are no problems in the application. They 
are used extensively when an application is first handed to the users in Alpha 
or beta form. This way we know much better where the problems are, often being 
able to fix the issue before they even report it to us. These files do not 
contain sensitive data.

Last week I decided I should actually test this out with switching computer 
users. 

On the MacOS we have been writing this information we write to the Shared 
folder. The pathname would be:

~/Users/Shared/ApplicationName/Logs/LogFileName.txt

On Windows it would be:

~/Users/Public/ApplicationName/LogFileName.txt

This has been working great when I am signed in as myself, or if the computer 
user does not changed. 
A quick check in Terminal shows me the directories and files are created, and I 
can write to them as needed.
 -rw-r—r—
Or in Octal format 644

This is fine for the currently signed in user, but not for other users.

Not a problem I am thinking, I will just call terminal from within 4D at 
startup and use the chmod command to change the permissions of the folders and 
files if they are not read write for all users.

I suspect I am doing something stupid because it is not working.

Questions:

1. Is this the right location I should be saving this kind of information?
2. Is my logic and steps correct and I am obviously not writing my terminal 
commands right?
3. Or, rather is it - Dah, no don’t do it that way do it this way?

Thanks

Jody


Jody Bevan
Developer

+1 587-487-6120



**
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: Selection to JSON Date Conversion

2018-10-09 Thread Patrick Emanuel via 4D_Tech
is that helpfull ?

4D-Forum disucssion
  



-
Patrick EMANUEL

Administrator
www.association-qualisoft.eu 
(Soft1002, Simply Asso & QS_Toolbox)
--
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: Selection to JSON Date Conversion

2018-10-09 Thread Keisuke Miyako via 4D_Tech
they way 4D - JSON date conversion works is that you get back what to put in,
so you need not care what the internal storage looks like.

18/05/2018! (implied midnight local time) may be stored as the day before in 
stringify'd UTC,
but when you read the date back in 4D language (OB Get) you get the original 
date.

that said, in your case,
it seems like you need to configure the "Dates inside objects" database 
parameter
to suit your needs.

http://doc.4d.com/4Dv17/4D/17/SET-DATABASE-PARAMETER.301-3730407.en.html

> 2018/10/09 21:13、Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com>のメール:
> I am sure that 4D is trying to be very clever but I just don't get it and I 
> am hoping that someone can tell me what I am missing and how to fix this 
> other than rolling my own version of Selection to JSON...




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

Selection to JSON Date Conversion

2018-10-09 Thread Douglas Cryer via 4D_Tech
Help,

I have just hit a problem with Selection to JSON that has me floored and I am 
hoping somebody can point me to missing setting or to my ignorance.

When including date fields in a template and using it with Selection to JSON 
dates that fall inside of BST the dates are being corrupted by taking off an 
hour making them the day before.

So a date like !18/05/2018! Is output as "2018-05-17T23:00:00" (date is in BST)

Whereas a date like !17/03/2018! Is output as "2018-03-17T00:00:00" (date is in 
GMT)

I am sure that 4D is trying to be very clever but I just don't get it and I am 
hoping that someone can tell me what I am missing and how to fix this other 
than rolling my own version of Selection to JSON...

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.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: Defining and documenting Objects

2018-10-09 Thread Paul Dennis via 4D_Tech
Kirk,

Good point, well made.
Paul



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