Re: table/field token

2018-09-07 Thread Keisuke Miyako via 4D_Tech
sure, and the formula we type in the property list evaluates the string “on 
data change”, so if you type a method name that does not exist, it is assumed 
to be a process variable, and creating or renaming said method does not link 
the two. you need to retype the formula expression.



**
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: table/field token

2018-09-07 Thread Arnaud de Montard via 4D_Tech

> Le 7 sept. 2018 à 00:28, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> I tested with a recent nightly build (17.226877)
> 
> I have [Table_1] but as I type [xx:1] and hit enter, it tokenises as [Table_1]
> same with [:1]


Hi Miyako, 
many thanks for testing  :-)
I didn't mention I tested also:
v16r2 -> OK
v17.0 -> ko
so from your test I suppose it began between v16r2 and v16r6, and was corrected 
after v17.0. 


> so even though the main place I'd expect tokens to work
> is in the context of 4D tags and formula of form objects,
> it seems to work in the code editor too.


In fact I've seen that in selection listbox formulas columns after converting 
in v16r6, 1st line was displaying "wrong expression" (or something like that) 
and the following an empty string. So I typed these tokens in editor and saw 
they were not recognised. I may be wrong but I suppose formulas and editor rely 
on common stuff… 

-- 
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: table/field token

2018-09-06 Thread Keisuke Miyako via 4D_Tech
I tested with a recent nightly build (17.226877)

I have [Table_1] but as I type [xx:1] and hit enter, it tokenises as [Table_1]
same with [:1]

so even though the main place I'd expect tokens to work
is in the context of 4D tags and formula of form objects,
it seems to work in the code editor too.

2018/09/06 18:28、Arnaud de Montard via 4D_Tech 
<4d_tech@lists.4d.com>のメール:

why line 6 is not recognised?
I thought I could put anything before the token, but it sounds like I have to 
use the hardcoded table name or the wildcard, and nothing else.



**
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: table/field token

2018-09-06 Thread Arnaud de Montard via 4D_Tech

> Le 6 sept. 2018 à 17:38, Richard Wright via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> I thought you were saying that these characters were not allowed as of v16 R4 
> even without enabling the new feature. I’m just hoping that 4D will never 
> require us to enable the new feature or, if they do, that they give us plenty 
> of advance notice. It’s not trivial to make changes like this to a 30 year 
> old application with hundreds of tables and a million lines of code. 


Hi Richard, 
in the table+field token I'm talking about, brackets are *around*, while in my 
understanding those chars are forbidden *inside* names themselves. And keeping 
"bad names" will forbid the use of ORDA, quite sad…   

BTW, changing names in a many 4DB since v11 did not took a long time to me 
(while I must admit I had not a lot of "external code", like SQL or html…). I 
used the code under to establish the bad names list
<http://forums.4d.com/Post/FR/14532263/1/14536260#14536260 
<http://forums.4d.com/Post/FR/14532263/1/14536260#14536260>>
then I began to rename… 
(note: such a "mass" renaming could be easier in explorer than in structure)

-- 
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: table/field token

2018-09-06 Thread Richard Wright via 4D_Tech
I thought you were saying that these characters were not allowed as of v16 R4 
even without enabling the new feature. I’m just hoping that 4D will never 
require us to enable the new feature or, if they do, that they give us plenty 
of advance notice. It’s not trivial to make changes like this to a 30 year old 
application with hundreds of tables and a million lines of code. 


> Date: Wed, 5 Sep 2018 22:49:05 +
> From: Timothy Penner 
> 
> 
> Hi Richard,
> 
>>> * Starting with 4D v16 R4, "." and "[]" characters are no longer allowed in 
>>> names of tokenized objects.
>> I take that to mean they are no loner allowed in “new” names of tokenized 
>> objects.
> 
> I take it to mean they are no longer allowed in tokenized objects, **existing 
> or new**.  To be pedantic, I am interpreting the 'no longer' part of the 
> sentence to apply to *existing* tokenized objects and then the overall 
> sentence I am interpreting would also apply to *new* tokenized objects as 
> well. I don't think it would make sense for this to apply to one and not the 
> other.
> 
> I am not sure what would have been found by the MSC in your specific 
> situation, but I am very curious...
> 
> Quote:
> {
> A specific MSC feature helps you detect names which are incompatible with 
> object notation. Using this feature is highly recommended before enabling the 
> option (see the Verify page section of the "MSC" chapter). As usual, it is 
> recommended to work on a copy of the structure file.
> }
> 
> Did you try running it through the MSC prior to enabling the feature?
> 
> -Tim

**
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: table/field token

2018-09-06 Thread Arnaud de Montard via 4D_Tech

> Le 6 sept. 2018 à 08:20, Arnaud de Montard via 4D_Tech <4d_tech@lists.4d.com> 
> a écrit :
> 
> Hi Tim, 
> I did not get your first response from the list. No matter as I can read it 
> cited under Richard's response, but I wonder about that gap?? 

oops I'm wrong. Sorry. 

-- 
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: table/field token

2018-09-06 Thread Arnaud de Montard via 4D_Tech

> Le 6 sept. 2018 à 01:31, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> [...]
> 
> e.g. [contacts:2] but maybe [contacts] is NOT table #2

Hi Miyako, 
to be clearer, this is screen capture of method editor (supposing it's a 
similar mechanism to the interpreter):
>
why line 6 is not recognised?
I thought I could put anything before the token, but it sounds like I have to 
use the hardcoded table name or the wildcard, and nothing else. 

-- 
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: table/field token

2018-09-06 Thread Arnaud de Montard via 4D_Tech
Hi Tim, 
I did not get your first response from the list. No matter as I can read it 
cited under Richard's response, but I wonder about that gap?? 

-- 
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: table/field token

2018-09-05 Thread Keisuke Miyako via 4D_Tech
it could be that the token syntax for tables and fields has been missed by 
engineering when the interpreter was rewritten for object notation.

in fairness, though, I don't think it was ever documented that the table or 
field name could be omitted in token syntax.
I know it worked, and sometimes it is better to not have any labels than have a 
misleading one,

e.g. [contacts:2] but maybe [contacts] is NOT table #2

but unlike :k, :C or :P

http://doc.4d.com/4Dv16/4D/16.3/Using-tokens-in-formulas.300-3651182.en.html

I think tables and field tokens can be confusing without labels because of the 
ambiguity of the [] brackets.

2018/09/06 3:20、Arnaud de Montard via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
Surely something to do with dot notation, but I wonder if it's a bug or 
something I miss?



**
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: table/field token

2018-09-05 Thread Timothy Penner via 4D_Tech
Hi Richard,

> > * Starting with 4D v16 R4, "." and "[]" characters are no longer allowed in 
> > names of tokenized objects.
> I take that to mean they are no loner allowed in “new” names of tokenized 
> objects.

I take it to mean they are no longer allowed in tokenized objects, **existing 
or new**.  To be pedantic, I am interpreting the 'no longer' part of the 
sentence to apply to *existing* tokenized objects and then the overall sentence 
I am interpreting would also apply to *new* tokenized objects as well. I don't 
think it would make sense for this to apply to one and not the other.

I am not sure what would have been found by the MSC in your specific situation, 
but I am very curious...

Quote:
{
A specific MSC feature helps you detect names which are incompatible with 
object notation. Using this feature is highly recommended before enabling the 
option (see the Verify page section of the "MSC" chapter). As usual, it is 
recommended to work on a copy of the structure file.
}

Did you try running it through the MSC prior to enabling the feature?

-Tim



**
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: table/field token

2018-09-05 Thread Richard Wright via 4D_Tech
> * Starting with 4D v16 R4, "." and "[]" characters are no longer allowed in 
> names of tokenized objects.

I take that to mean they are no loner allowed in “new” names of tokenized 
objects.


> Date: Wed, 5 Sep 2018 18:50:28 +
> From: Timothy Penner 
> 
>> Surely something to do with dot notation, but I wonder if it's a bug or 
>> something I miss?
> 
> There is a section of the docs that talks about this:
> http://doc.4d.com/4Dv16R4/4D/16-R4/Using-object-notation-preview.300-3303773.en.html#3304590
> 
> {
> Activating the object notation
> Over any versions, 4D has always accepted dots (.) and square brackets ([ and 
> ]) in tokenized database object names (tables, fields, variables, and 
> methods).
> 
> However, these characters are used to identify language tokens in standard 
> object notation. Thus, databases using names containing dots or square 
> brackets are not compatible with the standard object notation since 
> misinterpretations could break existing code. For example, if the following 
> code is written:
> 
> a.b
> a.b:=c[1]
> 
> ...4D could not know if a.b and c[1] represent standard variable names or if 
> b is a property of the a object and c the second element of a c collection.
> 
> Consequently:
> 
> * In converted databases, you have to select a specific option stating that 
> you want to use the object notation. By selecting this option, you declare 
> that your code is "object notation ready", that is, it does not use any names 
> containing "." or "[]" characters.
> * A specific MSC feature helps you detect names which are incompatible with 
> object notation. Using this feature is highly recommended before enabling the 
> option (see the Verify page section of the "MSC" chapter). As usual, it is 
> recommended to work on a copy of the structure file.
> * Enabling the object notation is a no-return option since it requires a 
> retokenization of the code. Once enabled, it cannot be removed and the 
> database cannot be reopened with a previous version.
> * Starting with 4D v16 R4, "." and "[]" characters are no longer allowed in 
> names of tokenized objects.
> }

**
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: table/field token

2018-09-05 Thread Timothy Penner via 4D_Tech
> Surely something to do with dot notation, but I wonder if it's a bug or 
> something I miss?

There is a section of the docs that talks about this:
http://doc.4d.com/4Dv16R4/4D/16-R4/Using-object-notation-preview.300-3303773.en.html#3304590

{
Activating the object notation
Over any versions, 4D has always accepted dots (.) and square brackets ([ and 
]) in tokenized database object names (tables, fields, variables, and methods).

However, these characters are used to identify language tokens in standard 
object notation. Thus, databases using names containing dots or square brackets 
are not compatible with the standard object notation since misinterpretations 
could break existing code. For example, if the following code is written:

a.b
a.b:=c[1]

...4D could not know if a.b and c[1] represent standard variable names or if b 
is a property of the a object and c the second element of a c collection.

Consequently:

* In converted databases, you have to select a specific option stating that you 
want to use the object notation. By selecting this option, you declare that 
your code is "object notation ready", that is, it does not use any names 
containing "." or "[]" characters.
* A specific MSC feature helps you detect names which are incompatible with 
object notation. Using this feature is highly recommended before enabling the 
option (see the Verify page section of the "MSC" chapter). As usual, it is 
recommended to work on a copy of the structure file.
* Enabling the object notation is a no-return option since it requires a 
retokenization of the code. Once enabled, it cannot be removed and the database 
cannot be reopened with a previous version.
* Starting with 4D v16 R4, "." and "[]" characters are no longer allowed in 
names of tokenized objects.
}

Hope that helps,

-Tim



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

table/field token

2018-09-05 Thread Arnaud de Montard via 4D_Tech
Migrating from v14r5 to v16r6, dot notation on. 

In fomulas referencing fields, I have things like this:
  TimeStampToText([:2]:3)

In v16r6, such token is no longer recognised ; I've found 2 turnarounds :
1/ add the table/field names before the token:
  TimeStampToText ([aTable:2]aField:3)
2/ use wildcard:
  TimeStampToText ([@:2]@:3)

Surely something to do with dot notation, but I wonder if it's a bug or 
something I miss? 

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