RE: WritePro expression undefined

2018-12-21 Thread Tim Nevels via 4D_Tech
On Dec 21, 2018, at 2:00 PM, David Ringsmuth wrote:

> Add,
> 
> 4D Write expressions did not require a value to be returned, so it was 
> acceptable to have embedded Query, Create Set, Intersection, Union, Use Set, 
> Selection to Array, etc…, commands in the 4D Write document.
> 
> Converted to WritePro, the same expressions return “Undefined”.
> 
> It is a change in behavior that requires editing 1000’s of documents.
> 
> And WritePro does not provide an easy way to replace those expressions with a 
> method call that will not return “Undefined”.

Hi David,

I also include methods in 4D Write documents that do queries and other 
operations that do not return a value. I’ve never put raw 4D commands in a 4D 
Write expression, but many places are methods without $0 defined. 

I wonder if 4D Write Pro will do the same thing with methods that do not return 
a value? Have you tested this?

And I agree with you that 4D Write Pro should not make this change in how it 
works compared to the 4D Write Plugin. It makes no sense. It should changed to 
work as it did before. 

A bug report/feature request needs to be submitted so that they can change this 
behavior immediately and you can then get a hotfix or nightly build that has 
this change.

I’m guessing this was just an oversight in the 4D Write Pro implementation that 
the team never considered. It should be fixed. 

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.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: How to process all WritePro area expressions for replacement / update?

2018-12-21 Thread John DeSoi via 4D_Tech
This may help you get started:


ARRAY LONGINT($aPos;0)
ARRAY LONGINT($aLen;0)
$start:=1

While (Match regex("\\s*)";$text;$start;$aPos;$aLen))
  $expr:=Substring($text;$aPos{2};$aLen{2})
  $expr:=Substring($expr;10)  //Strip off leading -d4-ref:'
  $expr:=URL_Decode ($expr)


End while

John DeSoi, Ph.D.


> On Dec 21, 2018, at 12:28 PM, David Ringsmuth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Editing a WritePro area using the WP Get text returns stylized text, and all 
> expressions have a “-d4-ref:’expression_here’”, but these are html and 4D 
> command number added expressions.

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

[resolved] v13 - Interpreted - Out of Stack space - Wierd

2018-12-21 Thread Chip Scheide via 4D_Tech

I did manage to track down the problem -

The problem was related screen resolution and orientation. -- 
Apparently 4D does not like mixed monitor orientations.
In this particular case 1 monitor is in 'normal' orientation (wider 
then high), the second monitor was in vertical orientation (taller then 
wide).  

My system will auto create a window setting for a specific user & form 
if they adjust the window, and the next time the user opens that form, 
the window is opened to the last size specified. Similar to 4D's design 
environment.

The user had open/moved a list form to the normal orientated screen and 
adjusted its width. The next time they opened the same list form, the 
vertical monitor was the default monitor, and the width of the form 
window was larger then the vertical screen's width.  In the process of 
this form opening - 4D choked and crashed to the desktop.

Once I tracked this down, and changed the default form width - the 
crashing problem stopped

Chip


On Tue, 11 Dec 2018 18:36:00 +, Timothy Penner wrote:
> Tech Tip: Generic troubleshooting steps for isolating and narrowing 
> down an issue
> http://kb.4d.com/assetid=78115
> 
> -Tim
> 
> 
> Timothy Penner
> Senior Technical Services Engineer
> 
> 4D Inc
> 95 S. Market Street, Suite #240
> CA 95113 San Jose
> United States
> 
> Téléphone : +1-408-557-4600
> Standard :  +1-408-557-4600
> Fax :   +1-408-271-5080
> Email : tpen...@4d.com
> Web :   www.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
**

RE: WritePro expression undefined

2018-12-21 Thread David Ringsmuth via 4D_Tech
Add,

4D Write expressions did not require a value to be returned, so it was 
acceptable to have embedded Query, Create Set, Intersection, Union, Use Set, 
Selection to Array, etc…, commands in the 4D Write document.

Converted to WritePro, the same expressions return “Undefined”.

It is a change in behavior that requires editing 1000’s of documents.

And WritePro does not provide an easy way to replace those expressions with a 
method call that will not return “Undefined”.

David Ringsmuth

From: Add Komoncharoensiri via 4D_Tech
Sent: Friday, December 21, 2018 11:56 AM
To: 4D iNug Technical
Cc: Add Komoncharoensiri
Subject: Re: WritePro expression undefined

Hi David,

If you are insert an expression into a 4D Write Pro document, the expression 
should return a value.

For example:
100+90
Current date
projectMethodThatReturnAValue

For QUERY command, the execution will produce a selection of record in memory. 
It does not return a value that can be inserted to the document.

Regards,
Add




On 12/20/18, 2:05 PM, "4D_Tech on behalf of David Ringsmuth via 4D_Tech" 
<4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote:

John,

We can manually limit the entry of commands and methods, since we control 
the UI that inserts expressions. It would be easier is the command SET ALLOWED 
METHODS did this for us automatically.

Thanks for your help John!

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

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

How to process all WritePro area expressions for replacement / update?

2018-12-21 Thread David Ringsmuth via 4D_Tech
I need some code that will process a 4D WritePro area, updating existing 
embedded expressions, replacing them with a different expression.

The command to get an expression, ST Get expression, works on only some 
expressions - data structure only like: [Table]Field.

Editing a WritePro area using the WP Get text returns stylized text, and all 
expressions have a “-d4-ref:’expression_here’”, but these are html and 4D 
command number added expressions.





Even if I replaced the expressions using the WP Get text and updated with WP 
Set Text, we loose embedded pictures. So this wont work for me.

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: Storing Dates and Times From Different Time Zones

2018-12-21 Thread Kirk Brooks via 4D_Tech
https://www.youtube.com/watch?v=jgF_ycCmF18
It just had to be said.

On Thu, Dec 20, 2018 at 6:04 PM Keisuke Miyako via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> is this a competition?
>
-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
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: WritePro expression undefined

2018-12-21 Thread Add Komoncharoensiri via 4D_Tech
Hi David,

If you are insert an expression into a 4D Write Pro document, the expression 
should return a value.

For example:
100+90
Current date
projectMethodThatReturnAValue

For QUERY command, the execution will produce a selection of record in memory. 
It does not return a value that can be inserted to the document.

Regards,
Add




On 12/20/18, 2:05 PM, "4D_Tech on behalf of David Ringsmuth via 4D_Tech" 
<4d_tech-boun...@lists.4d.com on behalf of 4d_tech@lists.4d.com> wrote:

John,

We can manually limit the entry of commands and methods, since we control 
the UI that inserts expressions. It would be easier is the command SET ALLOWED 
METHODS did this for us automatically.

Thanks for your help John!

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

**
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: Storing Dates and Times From Different Time Zones

2018-12-21 Thread Arnaud de Montard via 4D_Tech

> Le 20 déc. 2018 à 18:54, Nate Rheaume via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> We have clients that are accessing the same server database from different 
> time zones. We would like to store date/time using GMT and then display it in 
> the users local time zone.


As I understand, these timestamps are stored as strings. You may find 
interesting to use long integer fields instead, as in the examples here:

I use that since a very long time and never regretted. It's numbers, I can add 
or subtract easily. BTW date and time in a spreadsheet are of the same family: 
a number where integer portion = day and fractional portion = hour. 

-- 
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: Understanding Unicode Characters

2018-12-21 Thread Robert ListMail via 4D_Tech
Hi Arnaud, thanks for the clarification. 

Robert

Sent from my iPhone

> On Dec 21, 2018, at 6:54 AM, Arnaud de Montard via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> In the good old ascii, decimal 165 (hex 0xA5) was represented by a bullet, as 
> you cas see in the range 128..255:
> 
> But in this range, the resulting char could vary, depending on the OS 
> "flavour" (see bottom of list, many codes were represented on mac with no 
> equivalent on windows). 
> In unicode, one code = one char and, definitely, 165 is "¥" and 0x2022 is "•".

**
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: Understanding Unicode Characters

2018-12-21 Thread Arnaud de Montard via 4D_Tech

> Le 20 déc. 2018 à 00:07, Robert ListMail via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> [...] why is the unicode value written as “U+2022”, do you ever have to type 
> “U+”?


Hi Robert, 
you can use an hex value in 4d code by replacing "U+" with "0x":
  ASSERT(8226=0x2022)
  $bullet:=Character(0x2022)
  $bullet:=Character(8226)

In the good old ascii, decimal 165 (hex 0xA5) was represented by a bullet, as 
you cas see in the range 128..255:

But in this range, the resulting char could vary, depending on the OS "flavour" 
(see bottom of list, many codes were represented on mac with no equivalent on 
windows). 
In unicode, one code = one char and, definitely, 165 is "¥" and 0x2022 is "•". 

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