Re: Procedurally adding attributes to ST SET ATTRIBUTES

2017-09-21 Thread Pat Bensky via 4D_Tech
Yeah ... I was thinking along similar lines but I need a more efficient way
to do it, as we're building large documents and each paragraph of text will
have a style applied to it.

I'm thinking of doing something with key-pair two-dimensional arrays. I'll
experiment with that idea.
Pat

On 21 September 2017 at 18:36, John DeSoi via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> The easiest way would be to put your style attributes and values in an
> object (or arrays) and then loop over them calling ST SET ATTRIBUTES. For
> example, here is what I use to clear all font styles:
>
>
> ARRAY LONGINT($aStyle;0)
> ARRAY_Append_integer (->$aStyle;Attribute bold style;Attribute italic
> style;Attribute strikethrough style;Attribute underline style)
> For ($iStyle;1;Size of array($aStyle))
>   ST SET ATTRIBUTES(*;$objectName;ST Start highlight;ST End
> highlight;$aStyle{$iStyle};0)
> End for
>
> Note one issue that I ran into was that I had to use object name form in
> order to use the selection constants.
>
> John DeSoi, Ph.D.
>
>
> > On Sep 21, 2017, at 10:05 AM, Pat Bensky via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > *ST SET ATTRIBUTES*(oWPdoc;$offset;iwpOffset;atStyles{1})
> >
> > How would the styles be built? I've tried things like
> >
> > $style:="5;"+Char(34)+"Arial"+Char(34)+";6;14"
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://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)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: METHOD OPEN PATH Equivalent For Forms

2017-09-21 Thread Cannon Smith via 4D_Tech
Ah yes, essentially what I’m trying to do.

Thanks anyway.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On Sep 21, 2017, at 1:52 PM, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Not that I've been able to figure out.
> 
> I use MOP in my "workspace palette" which allows me to create groups of
> methods that pertain to each issue that I work on. By clicking on a
> workspace name, all of the methods windows open or I can open them
> individually.
> 
> I'd love to be able to extend it to work with forms but haven't found a way
> to do so.
> 

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

Re: METHOD OPEN PATH Equivalent For Forms

2017-09-21 Thread Douglas von Roeder via 4D_Tech
Cannon:

Not that I've been able to figure out.

I use MOP in my "workspace palette" which allows me to create groups of
methods that pertain to each issue that I work on. By clicking on a
workspace name, all of the methods windows open or I can open them
individually.

I'd love to be able to extend it to work with forms but haven't found a way
to do so.



--
Douglas von Roeder
949-336-2902

On Thu, Sep 21, 2017 at 12:08 PM, Cannon Smith via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> It can be helpful to programmatically open a method editor window for a
> method using METHOD OPEN PATH. I’d like to do the same thing with forms. Is
> there a way to programmatically open a form in a form editing window?
>
> Thanks.
>
> --
> Cannon.Smith
> Synergy Farm Solutions Inc.
> Hill Spring, AB Canada
> 403-626-3236
> 
> 
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

METHOD OPEN PATH Equivalent For Forms

2017-09-21 Thread Cannon Smith via 4D_Tech
It can be helpful to programmatically open a method editor window for a method 
using METHOD OPEN PATH. I’d like to do the same thing with forms. Is there a 
way to programmatically open a form in a form editing window?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




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

Re: Procedurally adding attributes to ST SET ATTRIBUTES

2017-09-21 Thread John DeSoi via 4D_Tech
The easiest way would be to put your style attributes and values in an object 
(or arrays) and then loop over them calling ST SET ATTRIBUTES. For example, 
here is what I use to clear all font styles:


ARRAY LONGINT($aStyle;0)
ARRAY_Append_integer (->$aStyle;Attribute bold style;Attribute italic 
style;Attribute strikethrough style;Attribute underline style)
For ($iStyle;1;Size of array($aStyle))
  ST SET ATTRIBUTES(*;$objectName;ST Start highlight;ST End 
highlight;$aStyle{$iStyle};0)
End for 

Note one issue that I ran into was that I had to use object name form in order 
to use the selection constants.

John DeSoi, Ph.D.


> On Sep 21, 2017, at 10:05 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> *ST SET ATTRIBUTES*(oWPdoc;$offset;iwpOffset;atStyles{1})
> 
> How would the styles be built? I've tried things like
> 
> $style:="5;"+Char(34)+"Arial"+Char(34)+";6;14"

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

Re: PostgreSQL SELECT... RETURNING ID

2017-09-21 Thread Jeffrey Kain via 4D_Tech
Ahh, thanks for the clarification (and to Dave Adams). That makes sense. We'll 
stick with the 'returning' clause.

--
Jeffrey Kain
jeffrey.k...@gmail.com

> On Sep 21, 2017, at 1:23 PM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> PgSQL Get Last Insert Row ID is not the same thing - it returns the OID 
> (object identifier) for the row. OIDs are depreciated and not created by 
> default for a table unless you include WITH OIDS in your CREATE TABLE 
> statement (or change the parameter default). Assuming what you are after is 
> the "id" column value of your table, the returning clause is what you want. 
> If you use PgSQL Get Last Insert Row ID, you would have to execute another 
> query to lookup the row by OID and then get the value.
> 
> John DeSoi, Ph.D.
> 
> 
> 
>> On Sep 21, 2017, at 11:57 AM, Jeffrey Kain  wrote:
>> 
>> Lee, you were right, there's a PgSQL Get Last Insert Row ID function that's 
>> also available in the plug-in. They seem to do the same thing.

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

Re: Command numbers and names and using Execute

2017-09-21 Thread Pat Bensky via 4D_Tech
FYI - in V15 and later you don't need to bother with the command numbers
any more:

"
Compatibility note: Since a command name may vary from one 4D version to
the next (commands renamed), this command was used in previous versions

of the program to designate a command directly by means of its number,
especially in non-tokenized portions of code. This need has diminished over
time as

4D continues to evolve because, for non-tokenized statements (formulas), 4D
now provides a token syntax. This syntax allows you to avoid potential
problems

due to variations in command names as well as other elements such as
tables, while still being able to type these names in a legible manner (for
more

information about this point, refer to the Using tokens in formulas section).
Furthermore, by default, the English language version is used starting with
4D

v15; however, the "Use regional system settings" option on the Methods Page of
the Preferences allows you to continue using the French language in a

French version of 4D."

HTH!
Pat

On 21 September 2017 at 17:39, Arnaud de Montard via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> > Le 21 sept. 2017 à 17:51, Nigel Greenlee via 4D_Tech <
> 4d_tech@lists.4d.com> a écrit :
> >
> > For ($i;1;1)  //well i know there are less than 1 commands for
> the next few years at least:)
>
> you can exit the loop when ok = 0, see here:
> 
>
> --
> Arnaud
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://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)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: PostgreSQL SELECT... RETURNING ID

2017-09-21 Thread John DeSoi via 4D_Tech
PgSQL Get Last Insert Row ID is not the same thing - it returns the OID (object 
identifier) for the row. OIDs are depreciated and not created by default for a 
table unless you include WITH OIDS in your CREATE TABLE statement (or change 
the parameter default). Assuming what you are after is the "id" column value of 
your table, the returning clause is what you want. If you use PgSQL Get Last 
Insert Row ID, you would have to execute another query to lookup the row by OID 
and then get the value.

John DeSoi, Ph.D.



> On Sep 21, 2017, at 11:57 AM, Jeffrey Kain  wrote:
> 
> Lee, you were right, there's a PgSQL Get Last Insert Row ID function that's 
> also available in the plug-in. They seem to do the same thing.

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

Re: PostgreSQL SELECT... RETURNING ID

2017-09-21 Thread Jeffrey Kain via 4D_Tech
Sorry- typo...

> On Sep 21, 2017, at 1:01 PM, Alfonso Zafon via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> The line
> $rowset:=PgSQL Select ($lConnection;"";$lStatement)
> 
> 
> is wrong

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

Re: PostgreSQL SELECT... RETURNING ID

2017-09-21 Thread Alfonso Zafon via 4D_Tech


Idemsoft-Alfonso Zafón

The line
$rowset:=PgSQL Select ($lConnection;"";$lStatement)


is wrong

must be:


$rowset:=PgSQL Select ($lConnection;$lStatement)


Saludos.
idem
Alfonso Zafón

Tel:+34 963 455 103
Email:  alfo...@idemsoft.com 
Web:www.idemsoft.com 



Idemsoft, S.L.
Pza. Tetuán, 11
46003Valencia- España

Gestión - Hoteles -Inmobiliarias - Abogados
WEB - Tienda Online - Enlace Web



El 21/09/2017 a las 18:46, Alfonso Zafon via 4D_Tech escribió:


Idemsoft-Alfonso Zafón

Hi,


 $tStatement:="INSERT INTO invoices (name, amount) VALUES 
($tName,string($rAmount))

returning id"

    $rowset:=PgSQL Select ($lConnection;"";$lStatement)

    $lInvoiceID:=PgSQL Get Longint Column ($rowset;"id")

  This work form me.

Saludos.
idem
Alfonso Zafón

Tel: +34 963 455 103
Email: alfo...@idemsoft.com 
Web: www.idemsoft.com 



Idemsoft, S.L.
Pza. Tetuán, 11
46003Valencia- España

Gestión - Hoteles -Inmobiliarias - Abogados
WEB - Tienda Online - Enlace Web



El 21/09/2017 a las 18:28, Lee Hinde via 4D_Tech escribió:
I haven't used the Postgres plug-in, but the MySQL plugin has: *MySQL 
Get

Last Insert Row ID* just for that purpose. Is there an equivalent?

On Thu, Sep 21, 2017 at 7:37 AM, Jeffrey Kain via 4D_Tech <
4d_tech@lists.4d.com> wrote:

We're using the Pluggers PostgreSQL plug-in, and trying to capture 
the ID
of newly inserted rows. It seems like the best way to do this is to 
put the

insert into a Select. The following seems to work, but we've just never
done this before and it seems weird... :) Anything to worry about here?

 $tStatement:="INSERT INTO invoices (name, amount) VALUES (?,?)
returning id"

 $lStatement:=PgSQL New SQL Statement ($lConnection;$tStatement)
 PgSQL Set String In SQL ($lStatement;1;$tName)
 PgSQL Set Real In SQL ($lStatement;2;$rAmount)

 $rowset:=PgSQL Select ($lConnection;"";$lStatement)

 $lInvoiceID:=PgSQL Get Longint Column ($rowset;"id")

 PgSQL Delete Row Set ($rowset)
 PgSQL Delete SQL Statement ($lStatement)
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

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


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


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

Re: PostgreSQL SELECT... RETURNING ID

2017-09-21 Thread Jeffrey Kain via 4D_Tech
Thanks everyone - 

Lee, you were right, there's a PgSQL Get Last Insert Row ID function that's 
also available in the plug-in. They seem to do the same thing.


Jeff

--
Jeffrey Kain
jeffrey.k...@gmail.com

> On Sep 21, 2017, at 12:54 PM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> That should work without problems. PgSQL Select and PgSQL Execute mostly do 
> the same things except Execute does not return rows. The "returning" clause 
> makes it a set returning SQL command so PgSQL Select is the right plugin 
> command.
> 
> John DeSoi, Ph.D.
> 
> 
>> On Sep 21, 2017, at 9:37 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> We're using the Pluggers PostgreSQL plug-in, and trying to capture the ID of 
>> newly inserted rows. It seems like the best way to do this is to put the 
>> insert into a Select. The following seems to work, but we've just never done 
>> this before and it seems weird... :) Anything to worry about here?

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

Re: PostgreSQL SELECT... RETURNING ID

2017-09-21 Thread John DeSoi via 4D_Tech
That should work without problems. PgSQL Select and PgSQL Execute mostly do the 
same things except Execute does not return rows. The "returning" clause makes 
it a set returning SQL command so PgSQL Select is the right plugin command.

John DeSoi, Ph.D.


> On Sep 21, 2017, at 9:37 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> We're using the Pluggers PostgreSQL plug-in, and trying to capture the ID of 
> newly inserted rows. It seems like the best way to do this is to put the 
> insert into a Select. The following seems to work, but we've just never done 
> this before and it seems weird... :) Anything to worry about here?

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

Re: PostgreSQL SELECT... RETURNING ID

2017-09-21 Thread Alfonso Zafon via 4D_Tech


Idemsoft-Alfonso Zafón

Hi,


 $tStatement:="INSERT INTO invoices (name, amount) VALUES 
($tName,string($rAmount))
returning id"

$rowset:=PgSQL Select ($lConnection;"";$lStatement)

$lInvoiceID:=PgSQL Get Longint Column ($rowset;"id")

  
This work form me.


Saludos.
idem
Alfonso Zafón

Tel:+34 963 455 103
Email:  alfo...@idemsoft.com 
Web:www.idemsoft.com 



Idemsoft, S.L.
Pza. Tetuán, 11
46003Valencia- España

Gestión - Hoteles -Inmobiliarias - Abogados
WEB - Tienda Online - Enlace Web



El 21/09/2017 a las 18:28, Lee Hinde via 4D_Tech escribió:

I haven't used the Postgres plug-in, but the MySQL plugin has: *MySQL Get
Last Insert Row ID* just for that purpose. Is there an equivalent?

On Thu, Sep 21, 2017 at 7:37 AM, Jeffrey Kain via 4D_Tech <
4d_tech@lists.4d.com> wrote:


We're using the Pluggers PostgreSQL plug-in, and trying to capture the ID
of newly inserted rows. It seems like the best way to do this is to put the
insert into a Select. The following seems to work, but we've just never
done this before and it seems weird... :) Anything to worry about here?

 $tStatement:="INSERT INTO invoices (name, amount) VALUES (?,?)
returning id"

 $lStatement:=PgSQL New SQL Statement ($lConnection;$tStatement)
 PgSQL Set String In SQL ($lStatement;1;$tName)
 PgSQL Set Real In SQL ($lStatement;2;$rAmount)

 $rowset:=PgSQL Select ($lConnection;"";$lStatement)

 $lInvoiceID:=PgSQL Get Longint Column ($rowset;"id")

 PgSQL Delete Row Set ($rowset)
 PgSQL Delete SQL Statement ($lStatement)
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

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


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

Re: Command numbers and names and using Execute

2017-09-21 Thread Arnaud de Montard via 4D_Tech

> Le 21 sept. 2017 à 17:51, Nigel Greenlee via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> For ($i;1;1)  //well i know there are less than 1 commands for the 
> next few years at least:)

you can exit the loop when ok = 0, see here:


-- 
Arnaud 


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

Re: PostgreSQL SELECT... RETURNING ID

2017-09-21 Thread Lee Hinde via 4D_Tech
I haven't used the Postgres plug-in, but the MySQL plugin has: *MySQL Get
Last Insert Row ID* just for that purpose. Is there an equivalent?

On Thu, Sep 21, 2017 at 7:37 AM, Jeffrey Kain via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> We're using the Pluggers PostgreSQL plug-in, and trying to capture the ID
> of newly inserted rows. It seems like the best way to do this is to put the
> insert into a Select. The following seems to work, but we've just never
> done this before and it seems weird... :) Anything to worry about here?
>
> $tStatement:="INSERT INTO invoices (name, amount) VALUES (?,?)
> returning id"
>
> $lStatement:=PgSQL New SQL Statement ($lConnection;$tStatement)
> PgSQL Set String In SQL ($lStatement;1;$tName)
> PgSQL Set Real In SQL ($lStatement;2;$rAmount)
>
> $rowset:=PgSQL Select ($lConnection;"";$lStatement)
>
> $lInvoiceID:=PgSQL Get Longint Column ($rowset;"id")
>
> PgSQL Delete Row Set ($rowset)
> PgSQL Delete SQL Statement ($lStatement)
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Command numbers and names and using Execute

2017-09-21 Thread Paul Lovejoy via 4D_Tech
Thanks!


> Le 21 sept. 2017 à 18:05, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> ARRAY TEXT is command #222 so you could do
> 
> EXECUTE FORMULA(":C222(...)")
> 
> C must be uppercase.
> 
> c.f.
> 
> http://doc.4d.com/4Dv16/4D/16.2/Using-tokens-in-formulas.300-3432926.en.html
> 
>> 2017/09/22 0:34、Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> 
>> I want to use the Execute command in a multi-lingual environment use it to 
>> execute 4D commands such as ARRAY TEXT(). Of course, this would fail as is 
>> on a French version of 4D. I believe there’s a way to use Execute() with the 
>> internal command numbers but I can’t find anything in the docs or the 
>> knowledge base.
>> Does anyone know how to do this?
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Command numbers and names and using Execute

2017-09-21 Thread Paul Lovejoy via 4D_Tech
Thanks Nigel!


> Le 21 sept. 2017 à 17:51, Nigel Greenlee via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Paul.
> 
> When i was writing my rather excellent(even though i say so myself) auto 
> variable declaring code I wanted the command and command numbers. I just 
> looked up what i did
> 
> I ran this bit of code :- 
> ARRAY TEXT(SC_at_CommandNames;0)
> For ($i;1;1)//well i know there are less than 1 commands for the next 
> few years at least:)
> 
>  $_t_CommandName:=Command name($i)
>If ($_t_CommandName#"")
>   APPEND TO ARRAY(SC_at_CommandNames;$_t_CommandName)
>End if 
> End for 
> 
> Now of course you could store the command id ($i) in an array write the 
> ‘English’ command  name and number to an xml. and when in a French version 
> load the ‘French names’ and IDS compare them to the ones in your text and 
> replace the english command with the french command or execute the command by 
> ID
> storing your text in the following format:
> 
> 
> $_t_CommandName:=Get_CommandName($EnglishCommand)<-in which you lookup the ID 
> of the command in your xml document(veryfast) and return the ID of that 
> command and then get the localised command name
> 
> or you could store a version of your text in which the name is replaced with:
> $_t_CommandName:=Command name(numberofcommand) when you save the text of your 
> execute-in this case you could just hold the local command ids in an array.
> Execute($_t_CommandName)
> 
> Either way you have to convert from the language you wrote the statement in 
> to an ID and then get the localised name of the command from the ID
> 
> 
> Hope thats enough for you
> 
> Nigel Greenlee
> 
>> On 21 Sep 2017, at 16:34, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Hi everyone,
>> 
>> I want to use the Execute command in a multi-lingual environment use it to 
>> execute 4D commands such as ARRAY TEXT(). Of course, this would fail as is 
>> on a French version of 4D. I believe there’s a way to use Execute() with the 
>> internal command numbers but I can’t find anything in the docs or the 
>> knowledge base.
>> 
>> Does anyone know how to do this?
>> 
>> Thanks in advance,
>> 
>> 
>> Paul
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Command numbers and names and using Execute

2017-09-21 Thread Keisuke Miyako via 4D_Tech
ARRAY TEXT is command #222 so you could do

EXECUTE FORMULA(":C222(...)")

C must be uppercase.

c.f.

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

> 2017/09/22 0:34、Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> I want to use the Execute command in a multi-lingual environment use it to 
> execute 4D commands such as ARRAY TEXT(). Of course, this would fail as is on 
> a French version of 4D. I believe there’s a way to use Execute() with the 
> internal command numbers but I can’t find anything in the docs or the 
> knowledge base.
> Does anyone know how to do this?



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

Command numbers and names and using Execute

2017-09-21 Thread Paul Lovejoy via 4D_Tech
Hi everyone,

I want to use the Execute command in a multi-lingual environment use it to 
execute 4D commands such as ARRAY TEXT(). Of course, this would fail as is on a 
French version of 4D. I believe there’s a way to use Execute() with the 
internal command numbers but I can’t find anything in the docs or the knowledge 
base.

Does anyone know how to do this?

Thanks in advance,


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

Procedurally adding attributes to ST SET ATTRIBUTES

2017-09-21 Thread Pat Bensky via 4D_Tech
I can't get my head around this :)

I need to be able to procedurally build up an *ST SET ATTRIBUTES *statement.

I have a number of styles - let's call them Style A, Style B, Style C.
Style A might be built like this:

Attribute font name;"Arial";Attribute text size;20;Attribute underline
style;1;Attribute bold style;1;Attribute text color;"Blue"

Style B might be

Attribute font name;"Arial";Attribute text size;12;Attribute text
colour;"Red"

So I'll save these in a text array.

Now I want to add any one of these styles to a, ST SET ATTRIBUTES command.
But I can't work out how to get it to work.

I need to be able to do something like this:

*ST SET ATTRIBUTES*(oWPdoc;$offset;iwpOffset;atStyles{1})

How would the styles be built? I've tried things like

$style:="5;"+Char(34)+"Arial"+Char(34)+";6;14"


and


$style:="Attribute font name;"+Char(34)+"Arial"+Char(34)+";Attribute text
size;14"


and some other permutations and although they don\t generate an error, they
also do not work.


How to achieve this?


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)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Configure SSL Web Server on 4Dv15

2017-09-21 Thread Andrea Angeli via 4D_Tech
Hi,

Problem Solved. I hat to update openssl on OS X from 0.9.8 to 1.2 and now it 
works.
I’m not sure if that information is clear in the documentation. Probably not 
for my english.
Thanks in advance

Andrea Angeli

> Il giorno 21 set 2017, alle ore 09:34, Paul Dennis via 4D_Tech 
> <4d_tech@lists.4d.com> ha scritto:
> 
> Andrea, you would be better off running nginx on same windows proxy and proxy
> nginx https to 4D http. Faster and certs are easy with lets encrypt. 
> 
> 
> 
> --
> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Configure SSL Web Server on 4Dv15

2017-09-21 Thread Paul Dennis via 4D_Tech
Andrea, you would be better off running nginx on same windows proxy and proxy
nginx https to 4D http. Faster and certs are easy with lets encrypt. 



--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Configure SSL Web Server on 4Dv15

2017-09-21 Thread Epperlein, Lutz (agendo) via 4D_Tech
Hi Andrea

Look here: http://forums.4d.com/Post/DE/17153654/1/17153655#17153779 (in 
German, but you can translate it in a good quality with 
https://www.deepl.com/translator). Here is it done for you:

---
The certificates must be in "pem" format, see:
http://doc.4d.com/4Dv16/4D/16.2/Using-TLS-Protocol.300-3434024.en.html

key. pem (document with the private encryption key) and cert. pem (document 
with the certificate):
in 4D in local mode or 4D Server, these files must be located next to the 
application's structure file,
in 4D in remote mode, these files must be located in the 4D application's Local 
Resources folder on the remote computer. For more information, see the 4D 
Client Database Folder section. Note that you must manually copy these files to 
the remote computer.

You must either request the certificate as a pem from the IT department - or 
convert it yourself.
Google search for "crt to pem".
This is usually done via OpenSSL. With chain certificates this is even more 
complicated, they have to be connected.
---

For chaining look here: 
https://www.digicert.com/ssl-support/pem-ssl-creation.htm
The order is significant!

HTH
Lutz Epperlein


--  
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)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**