Re: XLS plugin - format number with leading zero

2019-01-30 Thread Keisuke Miyako via 4D_Tech
Hello,

I found some information in the documentation (header files, I can not stress 
this enough).

short answer, the library supports it, the plugin doesn't.

---

from format.h

// good resource for format strings: 
http://www.mvps.org/dmcritchie/excel/formula.htm
// Good explanation of custom formats: 
http://www.ozgrid.com/Excel/CustomFormats.htm
// MS examples (need Windows): 
http://download.microsoft.com/download/excel97win/sample/1.0/WIN98Me/EN-US/Nmbrfrmt.exe
// Google this for MS help: "Create or delete a custom number format"

the plugin uses the format_number_t enumeration in XLS_FORMAT_SET_NUMERIC_FORMAT

i.e.

typedef enum
{
FMT_GENERAL = 0,
FMT_NUMBER1,// 0
FMT_NUMBER2,// 0.00
FMT_NUMBER3,// #,##0
FMT_NUMBER4,// #,##0.00
FMT_CURRENCY1,  // "$"#,##0_);("$"#,##0)
FMT_CURRENCY2,  // "$"#,##0_);[Red]("$"#,##0)
FMT_CURRENCY3,  // "$"#,##0.00_);("$"#,##0.00)
FMT_CURRENCY4,  // "$"#,##0.00_);[Red]("$"#,##0.00)
FMT_PERCENT1,   // 0%
FMT_PERCENT2,   // 0.00%
FMT_SCIENTIFIC1,// 0.00E+00
FMT_FRACTION1,  // # ?/?
FMT_FRACTION2,  // # ??/??
FMT_DATE1,  // M/D/YY
FMT_DATE2,  // D-MMM-YY
FMT_DATE3,  // D-MMM
FMT_DATE4,  // MMM-YY
FMT_TIME1,  // h:mm AM/PM
FMT_TIME2,  // h:mm:ss AM/PM
FMT_TIME3,  // h:mm
FMT_TIME4,  // h:mm:ss
FMT_DATETIME,   // M/D/YY h:mm
FMT_ACCOUNTING1,// _(#,##0_);(#,##0)
FMT_ACCOUNTING2,// _(#,##0_);[Red](#,##0)
FMT_ACCOUNTING3,// _(#,##0.00_);(#,##0.00)
FMT_ACCOUNTING4,// _(#,##0.00_);[Red](#,##0.00)
FMT_CURRENCY5,  // _("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)
FMT_CURRENCY6,  // _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)
FMT_CURRENCY7,  // _("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* 
"-"??_);_(@_)
FMT_CURRENCY8,  // _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)
FMT_TIME5,  // mm:ss
FMT_TIME6,  // [h]:mm:ss
FMT_TIME7,  // mm:ss.0
FMT_SCIENTIFIC2,// ##0.0E+0
FMT_TEXT// @
} format_number_t;

but custom format based on string requires format_t

> 2019/01/30 16:42、4dialog via 4D_Tech <4d_tech@lists.4d.com>のメール:
>
> The problem is not i 4D, i get the leading zero but only in a text cell.
> In excel you can format manualy a column as number with fixed numbers
> preformated (selfdefined format). In my case, 11 numbers, "000". If
> you put 10 numbers in a cell it gets leading zero.




**
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: Popup/Dropdown element 0

2019-01-30 Thread Keisuke Miyako via 4D_Tech
This is an old-style process variable declared as text array. The 
popup/dropdown displays the 0 element value properly when the array is empty, 
but does not display it when the array has elements.

that has not been my experience (the array is not empty)
to be precise, I used v17.232641 on Mojave, using default values and a process 
array.

I had looked at the code and didn’t see that, but noticed the objects on the 
form appeared to have a choice list set in the property editor.

perhaps you mean the official HDI example:
https://download.4d.com/Demos/4D_v14/HDI/Use-Popups-with-Variables.zip

my example was here:
https://forums.4d.com/4DBB_Main/x_User/298210/files/28213957.zip

the popup object does have a list (empty) associated,
but that is to expose the list-specific properties in the property list.
I call OBJECT SET LIST BY... during On Load.
I also store a key-value pair of the object and list in Form,
to clear the reference when done.



**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread John DeSoi via 4D_Tech
Hi Neil,


> On Jan 30, 2019, at 3:40 PM, Dennis, Neil  wrote:
> 
>> If a shared method is marked as preemptive capable, any shared method it 
>> uses must also be marked as preemptive capable. Otherwise 4D says the method 
>> further down in the call chain is not thread safe even if it has no thread 
>> unsafe commands.
> 
> Wait, If the parent is marked preemptive the children can be marked 
> indifferent and still run preemptive.
> 
> I have been wrong once today, am I wrong again?

Yes, twice in one day if we are talking about components and shared methods :). 
I have a component that includes a lot of different libraries. I can 
selectively build different versions of the component by choosing which method 
groups to make shared. I built a Postgres client component, tested in 
preemptive mode, and all was good.

Next, I went to save all of the source in my version control system. My method 
to do this makes all project methods shared because I don't want the version 
history to be changed by the component build which only makes specific method 
groups shared. Otherwise, methods would show up as changed just because the 
shared attribute was changed. 

After not changing a single line of code and changing all methods to shared, I 
suddenly had 300+ compiler errors. This took hours to sort out. Any shared 
method called by a preemptive capable method must also be marked as preemptive 
capable. Otherwise 4D compiler generates an error but gives no clue as to why 
it is an error.

John DeSoi, Ph.D.


**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread John DeSoi via 4D_Tech
Hi Christian,

That is really impressive since they seem like complex plugins that need a lot 
of 4D interaction and there are currently very few plugin API calls that are 
thread safe. 

Are you really saying that I can mark a 4D method as preemptive capable and use 
significant functionality of the plugins in a preemptive process?

John DeSoi, Ph.D.


> On Jan 30, 2019, at 4:10 PM, Christian Sakowski 
>  wrote:
> 
>> I'm not aware any commercial 4D plugin that works in preemptive mode.
> 
> hmCal and hmReports are thread safe.

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Christian Sakowski via 4D_Tech
> I'm not aware any commercial 4D plugin that works in preemptive mode.

hmCal and hmReports are thread safe.
--

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




> Am 30.01.2019 um 22:16 schrieb John DeSoi via 4D_Tech <4d_tech@lists.4d.com>:
> 
> Yes, I was not trying to imply that all plugins are thread safe, only that it 
> is possible to create one following the direction outlined in the SDK. It is 
> supported and there are significant speedup benefits if you can make it work.
> 
> I'm not aware any commercial 4D plugin that works in preemptive mode.
> 
> John DeSoi, Ph.D.
> 
> 
>> On Jan 30, 2019, at 3:00 PM, Timothy Penner  wrote:
>> 
>> In either case, it would appear that although the SDK has been updated, the 
>> individual plugin developers would still need to update their plugins and 
>> make those preemptive versions available... and even then, there are still 
>> certain plugin calls that are not thread safe, so it shouldn’t be expected 
>> that plugins will just work in preemptive mode unless they are using the 
>> latest SDK and specifically coded as such.
>> 
>> Just because the SDK is being made preemptive does not mean that all plugins 
>> are inherently preemptive also.
> 
> **
> 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
> **


--
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Keisuke Miyako via 4D_Tech
I hate to interject but will do anyway.

I have a strong suspicion that you are going after the wrong target.

OCI is not the reason your app is running on a single core.
it is the fact that you are running an engined merged application under Citrix.

had it been 4D Remote connecting to 4D Server,
or a non-engined 4D (SQL Desktop) connecting to Oracle,
or multiple copies of the same engined merged application installed on the 
Citrix server,
you probably wouldn't have this problem.

> 2019/01/31 6:45、Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com>のメール:
> Now for me an important question: is 4D for Oci pre-emptive?




**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Keisuke Miyako via 4D_Tech
it is normally a good thing that work is spread across multiple cores.
it prevents the CPU from over heating.

a cooperative thread may use many cores,
just not "at the same time".

anyway,
if you feel you have reason to assign a CPU to an application,
there is CPU affinity (Google the word affinity).

but you now reveal that you are using Citrix.
so your question is really about Citrix.

if you run 4D (64-bit, v17) normally on Windows,
the work will spread across multiple core naturally.

you can also launch multiple instances of 4D,
in which case several cores may be used concurrently.

however, engine merged applications are prevented from starting a second 
instance,
because it has its own private structure and data file.

2019/01/31 5:05、Piotr Chabot Stadhouders via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
is there a way to assign a core to the application?



**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Tim,

Now for me an important question: is 4D for Oci pre-emptive?

In short: We use for 90% UI and 4D for OCI commands. How can I make use of more 
than 1 core?

Nu colleague says Word and Excel also use more cores, so why can't we?

Gr,
Piotr


I see, this is relatively new development - I have sent a request to the Doc 
Team to update the documentation to reflect this.



In either case, it would appear that although the SDK has been updated, the 
individual plugin developers would still need to update their plugins and make 
those preemptive versions available... and even then, there are still certain 
plugin calls that are not thread safe, so it shouldn’t be expected that plugins 
will just work in preemptive mode unless they are using the latest SDK and 
specifically coded as such.



Just because the SDK is being made preemptive does not mean that all plugins 
are inherently preemptive also.



-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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Keisuke Miyako via 4D_Tech
in your case, it is mostly irrelevant whether 4D uses multiple cores or not.
you only have one mouse pointer or one blinking cursor on the screen.

you are not going to click multiple buttons at the same time,
or type text on multiple windows at the same time.
the dialog does not need to use multiple cores to process simultaneous requests.

what is important in your case it that Oracle, the database server,
can use multiple cores to handle multiple concurrent client requests.

> 2019/01/31 3:25、Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com>のメール:
>
> Now for me probably work has to be done, but I am confused what is needed.
>
>  1.  We don't use 4D tables, we use 4D for OCI and variables and arrays
>  2.  We don't use 4D server, we use 4D Volume desktop
>  3.  We start 1 or more processes (new process) in which we show a dialog 
> with data (the variables and arrays)
>  4.  We use a whole lot more in 4D, but nothing to do with 4D datafiles / 4D 
> data query 4D queries etc.
>
> So, does 4D automagically use more cores in 4D 64-bit or what?
> When I follow all pre-emptive advise in the docs or from the iNUG, do I have 
> a multi-core application?




**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Dennis, Neil via 4D_Tech
> If a shared method is marked as preemptive capable, any shared method it uses 
> must also be marked as preemptive capable. Otherwise 4D says the method 
> further down in the call chain is not thread safe even if it has no thread 
> unsafe commands.

Wait, If the parent is marked preemptive the children can be marked indifferent 
and still run preemptive.

I have been wrong once today, am I wrong again?

Neil









Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Chip Scheide via 4D_Tech
Right -
"...that a thread safe method (call chain) in a component..."

:)

On Wed, 30 Jan 2019 15:33:27 -0600, John DeSoi via 4D_Tech wrote:
> Chip,
> 
> This is true, but there is some extra complexity involved with components:
> 
> If a shared method is marked as preemptive capable, any shared method 
> it uses must also be marked as preemptive capable. Otherwise 4D says 
> the method further down in the call chain is not thread safe even if 
> it has no thread unsafe commands. 
> 
> John DeSoi, Ph.D.
> 
> 
>> On Jan 30, 2019, at 3:05 PM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> there was no mention of components.
>> I assume, as components are effectively 4D methods, that a thread safe 
>> method (call chain) in a component, would make a call to the component 
>> method from the host system thread safe as well.
> 
> **
> 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
**

Re: Popup/Dropdown element 0

2019-01-30 Thread Keisuke Miyako via 4D_Tech
the example DB I posted earlier in this thread uses New list and OBJECT SET 
LIST BY REFERENCE.
the list can be totally dynamic, it does not need to exist in the toolbox.

when you use default values, you essentially using text arrays constants.
that is why, for example, if the popup menu is associated to the variable 
"myPopup",
you need code that looks like

If (False)
ARRAY TEXT(myPopup;0)
End if

to tell the compiler that the variable is an array.
(otherwise it may wrongly type it at numeric, based on code such as myPopup:=1)
by the way, I just tested, setting the element to #0 of populated default 
value/text array popup menu works fine.

are you using process variables or form local (anonymous) variables?
are you running interpreted or compiled?
what is the value type of the popup menu object?

> 2019/01/31 3:01、Jim Crate via 4D_Tech <4d_tech@lists.4d.com>のメール:
>
> I see, it uses a list for the choices but can display a value not in the 
> list. That will be useful for those cases where the values come from a list. 
> In this case the popup choices are set dynamically based on other values.  
> This should also work with the “Default Values” property, right? Is there a 
> command to set the default values, and if so is that change local and not 
> persisted?




**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread John DeSoi via 4D_Tech
Chip,

This is true, but there is some extra complexity involved with components:

If a shared method is marked as preemptive capable, any shared method it uses 
must also be marked as preemptive capable. Otherwise 4D says the method further 
down in the call chain is not thread safe even if it has no thread unsafe 
commands. 

John DeSoi, Ph.D.


> On Jan 30, 2019, at 3:05 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> there was no mention of components.
> I assume, as components are effectively 4D methods, that a thread safe 
> method (call chain) in a component, would make a call to the component 
> method from the host system thread safe as well.

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread John DeSoi via 4D_Tech
Yes, I was not trying to imply that all plugins are thread safe, only that it 
is possible to create one following the direction outlined in the SDK. It is 
supported and there are significant speedup benefits if you can make it work.

I'm not aware any commercial 4D plugin that works in preemptive mode.

John DeSoi, Ph.D.


> On Jan 30, 2019, at 3:00 PM, Timothy Penner  wrote:
> 
> In either case, it would appear that although the SDK has been updated, the 
> individual plugin developers would still need to update their plugins and 
> make those preemptive versions available... and even then, there are still 
> certain plugin calls that are not thread safe, so it shouldn’t be expected 
> that plugins will just work in preemptive mode unless they are using the 
> latest SDK and specifically coded as such.
> 
> Just because the SDK is being made preemptive does not mean that all plugins 
> are inherently preemptive also.

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Chip Scheide via 4D_Tech
there was no mention of components.
I assume, as components are effectively 4D methods, that a thread safe 
method (call chain) in a component, would make a call to the component 
method from the host system thread safe as well.

Chip

On Wed, 30 Jan 2019 21:00:27 +, Timothy Penner via 4D_Tech wrote:
> I see, this is relatively new development - I have sent a request to 
> the Doc Team to update the documentation to reflect this.
> 
> In either case, it would appear that although the SDK has been 
> updated, the individual plugin developers would still need to update 
> their plugins and make those preemptive versions available... and 
> even then, there are still certain plugin calls that are not thread 
> safe, so it shouldn’t be expected that plugins will just work in 
> preemptive mode unless they are using the latest SDK and specifically 
> coded as such.
> 
> Just because the SDK is being made preemptive does not mean that all 
> plugins are inherently preemptive also.
> 
> -Tim
> 
> 
> 
> 
> 
> 
> 
> 
> -Original Message-
> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of John DeSoi 
> via 4D_Tech
> Sent: Wednesday, January 30, 2019 12:49 PM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: John DeSoi 
> Subject: Re: Does 4D 64-bit Volume desktop use more than 1 core?
> 
> Hi Tim,
> 
> The header file in the publicly available SDK indicates which plugin 
> API entry points are thread safe (currently a small number).
> 
> https://github.com/4d/4D-Plugin-SDK
> 
> See further discussion here including input from 4D France:
> 
>> Yes the 4d plugin sdk allows to build preemptive ready plugins.
>> see https://github.com/4d/4D-Plugin-SDK/releases/tag/v17.0.1
> 
> 
> https://forums.4d.com/Post/FR/17981754/2/28184397
> 
> Also
> 
> https://github.com/miyako/4d-plugin-migration-to-v17
> 
> John DeSoi, Ph.D.
> 
> 
>> On Jan 30, 2019, at 2:32 PM, Timothy Penner  wrote:
>> 
>> Plugin development is not something 4D Tech Support usually handles, 
>> so I may have missed that - in either case, the docs seem like it is 
>> not possible...
> 
> **
> 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
> **
---
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Timothy Penner via 4D_Tech
I see, this is relatively new development - I have sent a request to the Doc 
Team to update the documentation to reflect this.

In either case, it would appear that although the SDK has been updated, the 
individual plugin developers would still need to update their plugins and make 
those preemptive versions available... and even then, there are still certain 
plugin calls that are not thread safe, so it shouldn’t be expected that plugins 
will just work in preemptive mode unless they are using the latest SDK and 
specifically coded as such.

Just because the SDK is being made preemptive does not mean that all plugins 
are inherently preemptive also.

-Tim








-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of John DeSoi via 4D_Tech
Sent: Wednesday, January 30, 2019 12:49 PM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: John DeSoi 
Subject: Re: Does 4D 64-bit Volume desktop use more than 1 core?

Hi Tim,

The header file in the publicly available SDK indicates which plugin API entry 
points are thread safe (currently a small number).

https://github.com/4d/4D-Plugin-SDK

See further discussion here including input from 4D France:

> Yes the 4d plugin sdk allows to build preemptive ready plugins.
> see https://github.com/4d/4D-Plugin-SDK/releases/tag/v17.0.1


https://forums.4d.com/Post/FR/17981754/2/28184397

Also

https://github.com/miyako/4d-plugin-migration-to-v17

John DeSoi, Ph.D.


> On Jan 30, 2019, at 2:32 PM, Timothy Penner  wrote:
>
> Plugin development is not something 4D Tech Support usually handles, so I may 
> have missed that - in either case, the docs seem like it is not possible...

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread John DeSoi via 4D_Tech
Hi Tim,

The header file in the publicly available SDK indicates which plugin API entry 
points are thread safe (currently a small number).

https://github.com/4d/4D-Plugin-SDK

See further discussion here including input from 4D France:

> Yes the 4d plugin sdk allows to build preemptive ready plugins.
> see https://github.com/4d/4D-Plugin-SDK/releases/tag/v17.0.1


https://forums.4d.com/Post/FR/17981754/2/28184397

Also

https://github.com/miyako/4d-plugin-migration-to-v17

John DeSoi, Ph.D.


> On Jan 30, 2019, at 2:32 PM, Timothy Penner  wrote:
> 
> Plugin development is not something 4D Tech Support usually handles, so I may 
> have missed that - in either case, the docs seem like it is not possible...

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Timothy Penner via 4D_Tech
John,

Plugin development is not something 4D Tech Support usually handles, so I may 
have missed that - in either case, the docs seem like it is not possible...

http://livedoc.4d.com/4D-Language-Reference-17/Processes/Preemptive-4D-processes.300-3730331.en.html#3687097
{
Writing a thread-safe method
To be thread-safe, a method must respect the following rules:

It must have either the "Can be run in preemptive processes" or "Indifferent" 
property
It must not call a 4D command that is thread-unsafe.
It must not call another project method that is thread-unsafe
It must not call a plug-in
It must not use  REPLICATE or SYNCHRONIZE statements(*)
It must not use any interprocess variables(**)
It must not call interface objects(***) (there are exceptions however, see 
below).
}


-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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread John DeSoi via 4D_Tech
In version 17 you can use plug-ins in preemptive mode if the plugin call is 
marked as thread safe. I converted my Postgres component/plugin to work in 
preemptive mode. Tests show 300% to 400% improvement over single core execution.

See this lengthy thread on the forum for issues in converting code to work in 
preemptive mode.

https://forums.4d.com/Post/EN/27444918/2/27983967

John DeSoi, Ph.D.


> On Jan 30, 2019, at 1:04 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> No, not at all. You have to first mark the method that's called first from 
> New Process as preemptive. That method, plus all methods called by that 
> method, and all methods called by those methods, must be written in a 
> preemptive-safe manner (i.e. no UI, no unsafe commands, no plug-ins).

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Timothy Penner via 4D_Tech
Jim,

> Piotr mentioned that they are using 4D OCI, not the 4D database. I haven’t 
> really kept up with the pre-emptive restrictions, but can plugins specify 
> that they can run pre-emptively? Given some of the other limitations I’d have 
> assumed plugins would be required to run in the cooperative main thread.

Jeff Kain already addressed the plugin part:

Quote:
{
must be written in a preemptive-safe manner (i.e. no UI, no unsafe commands, no 
plug-ins).
}

-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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Timothy Penner via 4D_Tech
Hi Neil,

It looks like the docs were updated in v15R5:
http://livedoc.4d.com/4D-Language-Reference-15-R5/Processes/New-process.301-2936977.en.html
{
If the execution context supports preemptive mode and if method is declared 
"thread-safe", the new 4D process will be executed in a preemptive thread when 
the application will run in compiled mode. For more information, please reter 
to the Preemptive 4D processes page.
}

-Tim




-Original Message-
From: Dennis, Neil 
Sent: Wednesday, January 30, 2019 12:27 PM
To: Timothy Penner ; 4D iNug Technical <4d_tech@lists.4d.com>
Subject: RE: Does 4D 64-bit Volume desktop use more than 1 core?

> The NEW PROCESS command is able to spawn a Preemptive or Coopertive process; 
> this depends on the preemptive method property of the method that is called 
> by the NEW PROCESS command.

Thanks Tim,


Is this new with 4D v17?

I see in the v17 docs it is documented that new process can run preemptive... 
this same text is not in the 4D v16 manual.


Neil





Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Jim Crate via 4D_Tech
On Jan 30, 2019, at 12:07 PM, Timothy Penner via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
>> I understand, but I think I am having a problem.
>> Suppose our app depends heavily on UI (and it does)
>> 
> 
> Simple approach:
> 
> Have the UI spin off the work into a new pre-emptive process (or use workers 
> ala the CALL WORKER command).
> Then have the pre-emptive processes/workers callback to the form using the 
> CALL FORM command.
> This approach allows the pre-emptive processes to push updates back to the 
> cooperative User Interface.
> 
> Watch the demo from the 2016 summit on the blog:
> https://blog.4d.com/4d-summit-2016-laurent-esnault-presents-workers-and-ui-in-preemptive-mode/
> 
> -Tim

Piotr mentioned that they are using 4D OCI, not the 4D database. I haven’t 
really kept up with the pre-emptive restrictions, but can plugins specify that 
they can run pre-emptively? Given some of the other limitations I’d have 
assumed plugins would be required to run in the cooperative main thread.

Jim Crate

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Dennis, Neil via 4D_Tech
> The NEW PROCESS command is able to spawn a Preemptive or Coopertive process; 
> this depends on the preemptive method property of the method that is called 
> by the NEW PROCESS command.

Thanks Tim,


Is this new with 4D v17?

I see in the v17 docs it is documented that new process can run preemptive... 
this same text is not in the 4D v16 manual.


Neil





Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Timothy Penner via 4D_Tech
Neil,

The NEW PROCESS command is able to spawn a Preemptive or Coopertive process; 
this depends on the preemptive method property of the method that is called by 
the NEW PROCESS command.

-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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread John DeSoi via 4D_Tech
No, a normal process can be preemptive (started with New process or Executed on 
server) as long as the starting method is preemptive capable.

John DeSoi, Ph.D.


> On Jan 30, 2019, at 2:14 PM, Dennis, Neil via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I thought for a process to work on a separate core it needed to be a WORKER 
> process and preemptive capable. So if you call new process it will not be 
> preemptive. If you call worker it can be preemptive if the code is 
> preemptive. I was also under the assumption is that each worker process does 
> not use multiple cores, but a worker process can use a different core from 
> other worker processes

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Dennis, Neil via 4D_Tech
> If all that happens, that process will be scalable across cores.

Did I miss something?

I thought for a process to work on a separate core it needed to be a WORKER 
process and preemptive capable. So if you call new process it will not be 
preemptive. If you call worker it can be preemptive if the code is preemptive. 
I was also under the assumption is that each worker process does not use 
multiple cores, but a worker process can use a different core from other worker 
processes

Am I wrong?

Neil



Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Timothy Penner via 4D_Tech
> I understand, but I think I am having a problem.
> Suppose our app depends heavily on UI (and it does)
> 

Simple approach:

Have the UI spin off the work into a new pre-emptive process (or use workers 
ala the CALL WORKER command).
Then have the pre-emptive processes/workers callback to the form using the CALL 
FORM command.
This approach allows the pre-emptive processes to push updates back to the 
cooperative User Interface.

Watch the demo from the 2016 summit on the blog:
https://blog.4d.com/4d-summit-2016-laurent-esnault-presents-workers-and-ui-in-preemptive-mode/

-Tim







-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Piotr Chabot 
Stadhouders via 4D_Tech
Sent: Wednesday, January 30, 2019 12:05 PM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Piotr Chabot Stadhouders 
Subject: RE: Does 4D 64-bit Volume desktop use more than 1 core?

Hi Jeff,

Thanks again for your answer.

I understand, but I think I am having a problem.

Suppose our app depends heavily on UI (and it does)
Suppose our app starts 8 processes showing 8 dialogs showing all kind of 
variables and arrays, and that need to be refreshed every X seconds Then no UI 
is out of the question, and pre-emptive methods don’t help me a lot I guess.
Now suppose I have a machine with 4 cores (What I have heard it is getting 
difficult to get a machine without multi-core) How can I use the 4 cores to its 
full extend?
I am hoping you are not going to say I can’t

So, when it is impossible to use 4 cores within the application, is there a way 
to assign a core to the application?
So when starting the application tell the machine to use core 1 When starting a 
second instance of the application tell the machine to use core 2 Etc.

We are in a citrix environment, and all instances of our 4D Volume Desktop 
application now only use 1 core, and even worse it is using THE SAME core Now 
Citrix splits the time assigned to 1 4D instance by the number of 4D instances 
launched, while the other cores are doing totally nothing

Is there a solution for this?
By the way, and maybe for some of you this is obvious, but not for me: why must 
there be no UI involved?
Wy can’t I say in 4D “start a new process showing a dialog and use core 2”, 
“start another process showing a dialog and use core 4”?

Gr,
Piotr


No, not at all. You have to first mark the method that's called first from New 
Process as preemptive. That method, plus all methods called by that method, and 
all methods called by those methods, must be written in a preemptive-safe 
manner (i.e. no UI, no unsafe commands, no plug-ins).

If all that happens, that process will be scalable across cores.

> On Jan 30, 2019, at 1:25 PM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_t...@xxx.xxx> wrote:
>
> So, does 4D automagically use more cores in 4D 64-bit or what?
> When I follow all pre-emptive advise in the docs or from the iNUG, do I have 
> a multi-core application?
**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Jeff,

Thanks again for your answer.

I understand, but I think I am having a problem.

Suppose our app depends heavily on UI (and it does)
Suppose our app starts 8 processes showing 8 dialogs showing all kind of 
variables and arrays, and that need to be refreshed every X seconds
Then no UI is out of the question, and pre-emptive methods don’t help me a lot 
I guess.
Now suppose I have a machine with 4 cores (What I have heard it is getting 
difficult to get a machine without multi-core)
How can I use the 4 cores to its full extend?
I am hoping you are not going to say I can’t

So, when it is impossible to use 4 cores within the application, is there a way 
to assign a core to the application?
So when starting the application tell the machine to use core 1
When starting a second instance of the application tell the machine to use core 
2
Etc.

We are in a citrix environment, and all instances of our 4D Volume Desktop 
application now only use 1 core, and even worse it is using THE SAME core
Now Citrix splits the time assigned to 1 4D instance by the number of 4D 
instances launched, while the other cores are doing totally nothing

Is there a solution for this?
By the way, and maybe for some of you this is obvious, but not for me: why must 
there be no UI involved?
Wy can’t I say in 4D “start a new process showing a dialog and use core 2”, 
“start another process showing a dialog and use core 4”?

Gr,
Piotr


No, not at all. You have to first mark the method that's called first from New 
Process as preemptive. That method, plus all methods called by that method, and 
all methods called by those methods, must be written in a preemptive-safe 
manner (i.e. no UI, no unsafe commands, no plug-ins).

If all that happens, that process will be scalable across cores.

> On Jan 30, 2019, at 1:25 PM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_t...@xxx.xxx> wrote:
>
> So, does 4D automagically use more cores in 4D 64-bit or what?
> When I follow all pre-emptive advise in the docs or from the iNUG, do I have 
> a multi-core application?
**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Jeffrey Kain via 4D_Tech
No, not at all. You have to first mark the method that's called first from New 
Process as preemptive. That method, plus all methods called by that method, and 
all methods called by those methods, must be written in a preemptive-safe 
manner (i.e. no UI, no unsafe commands, no plug-ins).

If all that happens, that process will be scalable across cores.

> On Jan 30, 2019, at 1:25 PM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> So, does 4D automagically use more cores in 4D 64-bit or what?
> When I follow all pre-emptive advise in the docs or from the iNUG, do I have 
> a multi-core application?

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Lutz, Jeffrey,

Thanks for your answers.

So it is about using 64-bit, and writing preemptive-safe methods
I see a lot of 4D commands turning into preemptive-safe commands, so that's good

Now for me probably work has to be done, but I am confused what is needed.

  1.  We don't use 4D tables, we use 4D for OCI and variables and arrays
  2.  We don't use 4D server, we use 4D Volume desktop
  3.  We start 1 or more processes (new process) in which we show a dialog with 
data (the variables and arrays)
  4.  We use a whole lot more in 4D, but nothing to do with 4D datafiles / 4D 
data query 4D queries etc.

So, does 4D automagically use more cores in 4D 64-bit or what?
When I follow all pre-emptive advise in the docs or from the iNUG, do I have a 
multi-core application?

Gr,
Piotr


Compiled 64-bit Volume Desktop can use more than one core, depending upon how 
you write your code. 64-bit 4D is required, as is being compiled, in the 
current implementation.

You need to write preemptive-safe methods and your methods need to be marked as 
preemptive in the method properties.

> On Jan 30, 2019, at 4:48 AM, Pat Bensky via 4D_Tech 
> <4d_t...@xxx.xxx> wrote:
>
> Piotr
> I believe the "bitness" has more to do with how it uses RAM than cores.
> Pat
>
> On Wed, 30 Jan 2019 at 09:13, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_t...@xxx.xxx> wrote:
>
>> Hi all,
>>
>> First of all, I must say I am no hardware expert, so maybe this is a
>> stupid question.
>>
>> It seems that 4D 32-bit Volume desktop only uses 1 core.
>> But does 4D 64-bit Volume desktop use all available cores?
>>
>> Gr,
>> Piotr
**
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: Popup/Dropdown element 0

2019-01-30 Thread Jim Crate via 4D_Tech
I see, it uses a list for the choices but can display a value not in the list. 
That will be useful for those cases where the values come from a list. In this 
case the popup choices are set dynamically based on other values.  This should 
also work with the “Default Values” property, right? Is there a command to set 
the default values, and if so is that change local and not persisted?

Jim Crate

> On Jan 29, 2019, at 3:08 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> it's a v14 feature
> 
> https://download.4d.com/Demos/4D_v14/HDI/Use-Popups-with-Variables.zip
> 
>> 2019/01/30 7:13、Jim Crate via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> The v15 and v16 documentation doesn’t mention using a text variable for a 
>> popup/dropdown. Do you have some info on how that would work?
> 
> 
> 
> 
> **
> 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: call subform

2019-01-30 Thread Kirk Brooks via 4D_Tech
Chuck,
If AddButton is on the subform you don't need CALL SUBFORM CONTAINER at
all. Just handle it there in your subform code:

OBJECT SET VISIBLE(*;"AddButton";Not(Read only state([table])))


I would put that in the form method code (i'm talking about the actual form
you use as the subform) so it ran for every form event.

It is possible to set individual objects and fields in a subform from the
parent form. In this case I don't see an advantage but you can do it.

1) get a pointer to the subform object: $ptr:=Object get pointer(Object
named;"AddButton";"subformName")

2) use EXECUTE METHOD IN SUBFORM to execute some code in the subform that
handles the button visibility.


On Wed, Jan 30, 2019 at 5:02 AM Chuck Miller via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> The AddButton is on subform. So I am not sure what goes on. Should I be
> setting call subform container in the print form or the subform. Docs look
> like it should be in subform form method. Is this not the case and yes
> trace seems to not show anything anywhere
>
> --
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: XLS plugin - format number with leading zero

2019-01-30 Thread John DeSoi via 4D_Tech
I don't know anything about the plugin you were attempting to use, but one way 
to create formatted documents for Excel is to use XML. You specify the type for 
each cell. I'm sure you could figure out the format option you want by saving a 
document with Excel and looking at the XML.

John DeSoi, Ph.D.


> On Jan 30, 2019, at 1:42 AM, 4dialog via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> The problem is not i 4D, i get the leading zero but only in a text cell.
> In excel you can format manualy a column as number with fixed numbers
> preformated (selfdefined format). In my case, 11 numbers, "000". If
> you put 10 numbers in a cell it gets leading zero.
> 
> But is there a way to do this formating from 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-unsubscr...@lists.4d.com
**

Re: call subform

2019-01-30 Thread Chuck Miller via 4D_Tech
The AddButton is on subform. So I am not sure what goes on. Should I be setting 
call subform container in the print form or the subform. Docs look like it 
should be in subform form method. Is this not the case and yes trace seems to 
not show anything anywhere

Regards

Chuck

 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 Jan 29, 2019, at 8:47 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Have you traced the subform object to verify the code isn't running? I've
> never really seen CALL SUBFORM CONTAINER not ping the parent object.
> Also, the way you have described this "Addbutton" is on the parent form -
> since the code will run in the context of the subform object on the parent
> form.
> 
> I guessing but it looks like you may want "Addbutton" to be on the subform
> and only visible when it's possible to add a record to 'table' which is
> displayed in the subform. I would handle that in the subform itself - where
> you code would work fine. But is Addbutton is on the subform it won't do
> anything called from the subform object.

**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Jeffrey Kain via 4D_Tech
Compiled 64-bit Volume Desktop can use more than one core, depending upon how 
you write your code. 64-bit 4D is required, as is being compiled, in the 
current implementation.  

You need to write preemptive-safe methods and your methods need to be marked as 
preemptive in the method properties. 

> On Jan 30, 2019, at 4:48 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Piotr
> I believe the "bitness" has more to do with how it uses RAM than cores.
> Pat
> 
> On Wed, 30 Jan 2019 at 09:13, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Hi all,
>> 
>> First of all, I must say I am no hardware expert, so maybe this is a
>> stupid question.
>> 
>> It seems that 4D 32-bit Volume desktop only uses 1 core.
>> But does 4D 64-bit Volume desktop use all available cores?
>> 
>> Gr,
>> Piotr
>> 
>> **
>> 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
> **
**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Epperlein, Lutz (agendo) via 4D_Tech
> So then the real questions are :
>
>   *   Is it correct that 4D Volume desktop uses only 1 core?

No.

>   *   How can I enable 4D Volume desktop to use all cores?

No. There isn't such a switch.

It is a bit more complicated, a short query for "core" on the knowledgebase 
kb.4d.com reveals:

1. [4D Summit 2018] Preemptive Programming [EN]
Product: 4D | Version: 17 | Published on: May 16, 2018 | 
https://kb.4d.com/assetid=78035
2. Quick Comparison of Deployment Hardware for Mac vs Windows
Product: 4D | Version: 16 | Published on: April 19, 2017 | 
https://kb.4d.com/assetid=77769
3. [4D Summit 2016] Secure Your Business by Mirroring Your 4D Server 
[ENProduct: 4D Server | Version: 15.2 | Published on: June 17, 2016 | 
https://kb.4d.com/assetid=77560
4. [4D Summit 2014] Troubleshooting at the Engine's Core (EN
Product: 4D | Version: 14 R3 | Published on: July 29, 2015 | 
https://kb.4d.com/assetid=77336
5. How does 4D v13 optimize static requests?
Product: 4D | Version: 13.3 | Published on: April 12, 2013 | 
https://kb.4d.com/assetid=76806
6. Allocation Table Size in 4D v11 SQL and 4D v12
Product: 4D | Version: 12 | Published on: November 23, 2011 | 
https://kb.4d.com/assetid=76413

Have a look to the blog.4d.com too. You will find much more information about 
multi-threading, preemptive multi-tasking, workers etc.

Regards
Lutz


**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Pat,

Thanks for your answer.

So then the real questions are :

  *   Is it correct that 4D Volume desktop uses only 1 core?
  *   How can I enable 4D Volume desktop to use all cores?

Gr,
Piotr


Piotr
I believe the "bitness" has more to do with how it uses RAM than cores.
Pat

On Wed, 30 Jan 2019 at 09:13, Piotr Chabot Stadhouders via 4D_Tech <
4d_t...@xxx.xxx> wrote:

> Hi all,
>
> First of all, I must say I am no hardware expert, so maybe this is a
> stupid question.
>
> It seems that 4D 32-bit Volume desktop only uses 1 core.
> But does 4D 64-bit Volume desktop use all available cores?
>
> Gr,
> Piotr
**
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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Pat Bensky via 4D_Tech
Piotr
I believe the "bitness" has more to do with how it uses RAM than cores.
Pat

On Wed, 30 Jan 2019 at 09:13, Piotr Chabot Stadhouders via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi all,
>
> First of all, I must say I am no hardware expert, so maybe this is a
> stupid question.
>
> It seems that 4D 32-bit Volume desktop only uses 1 core.
> But does 4D 64-bit Volume desktop use all available cores?
>
> Gr,
> Piotr
>
> **
> 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
**

AW: XLS plugin - format number with leading zero

2019-01-30 Thread Olivier Flury via 4D_Tech
Hi,

Some time ago I needed to export data as fixed length strings, including 
numbers (reals).

So I wrote this method:

   // 
Uty_FixLengthNum(rToConvert;lLength;lLengthDec;tFillChar;tDecSign;bAlwaysReturnDec)
 -> tFixLengthNum
  // 
  // User name (OS): Olivier
  // Date and time: 16.03.15, 16:00:49
  // 
  // Method: Uty_FixLengthNum
  // Description
  // Converts a number (real) to a fixed length string
  //
  // Parameters:
  // $1, real, number to convert to a fixed lenght string
  // $2, longint, total lenght to fix
  // $3, longint, lenght of decimals to fix
  // $4, text, fill character, e.g. "0" (zero)
  // $5, text, decimal separator sign, e.g. "."
  // $6, boolean, if true, always return string with decimals, even if decimals 
are zero
  // if false, return numbers with zero decimal without decimals;
  // e.g. 100 is returned as 100 when $2 is 7, even if $3 is greater 
than zero
  // $0, text, number converted to a fixed length string
  // 
ASSERT(Count parameters=6;"Not allowed number of parameter: "+String(Count 
parameters))
C_REAL($1;$rFixThis;$rInteger;$rDecimal)
C_LONGINT($2;$3;$lFixMaxLenght;$lFixDecLenght;$lLenghtInt;$lLenghtDec;$lDifference;$lWhere)
C_TEXT($4;$5;$0;$tFillChar;$tDecimalSeparator;$tResult;$tSystemDecimalSeparator;$tInt;$tDec)
C_BOOLEAN($6;$bReturnZeroDecimals)
$rFixThis:=$1
$lFixMaxLenght:=$2
$lFixDecLenght:=$3
$tFillChar:=$4
$tDecimalSeparator:=$5
$bReturnZeroDecimals:=$6
ASSERT((Length($tFillChar)=1);"Lenght of fill char is not exactly 1: 
"+$tFillChar)
$tResult:=String($rFixThis)
GET SYSTEM FORMAT(Decimal separator;$tSystemDecimalSeparator)
$lWhere:=Position($tSystemDecimalSeparator;$tResult;*)
If ($lWhere>0)
$lDifference:=Length($tResult)-$lWhere
$tInt:=Substring($tResult;1;$lWhere-1)
$tDec:=Substring($tResult;$lWhere+1;$lDifference)
$rInteger:=Num($tInt)
$rDecimal:=Num($tDec)
Else 
$tInt:=$tResult
$tDec:=""
$rInteger:=Num($tInt)
$rDecimal:=Num($tDec)
End if 
$lLenghtInt:=Length($tInt)
$lLenghtDec:=Length($tDec)
Case of 
: ($lFixMaxLenght<=0)
$tResult:=""
: (($rDecimal=0) & ($bReturnZeroDecimals=False) & ($lLenghtInt=$lFixMaxLenght))
$tResult:=$tInt
: (($rDecimal=0) & ($bReturnZeroDecimals=False) & ($lLenghtInt<$lFixMaxLenght))
$lDifference:=($lFixMaxLenght-$lLenghtInt)
If ($rInteger>=0)
$tResult:=($tFillChar*$lDifference)+$tInt
Else
$tResult:="-"+($lDifference*$tFillChar)+String(Abs($rInteger))
End if
: (($rDecimal=0) & ($bReturnZeroDecimals=False) & ($lLenghtInt>$lFixMaxLenght))
$tResult:="ERROR"
Else
Case of
: ($lFixDecLenght<=0) & ($lLenghtInt=$lFixMaxLenght)
$tResult:=$tInt
: ($lFixDecLenght<=0) & ($lLenghtInt<$lFixMaxLenght)
$lDifference:=$lFixMaxLenght-$lLenghtInt
If ($rInteger>=0)
$tResult:=($lDifference*$tFillChar)+$tInt
Else
$tResult:="-"+($lDifference*$tFillChar)+String(Abs($rInteger))
End if
: ($lFixDecLenght<=0) & ($lLenghtInt>$lFixMaxLenght)
$tResult:="ERROR"
Else
Case of 
: ($lLenghtDec>$lFixDecLenght)
$tDec:=Substring($tDec;1;$lFixDecLenght)
: ($lLenghtDec<$lFixDecLenght)
$lDifference:=($lFixDecLenght-$lLenghtDec)
$tDec:=$tDec+($lDifference*$tFillChar)
End case 
$tResult:=$tInt+$tDecimalSeparator+$tDec
Case of 
: (Length($tResult)<$lFixMaxLenght)
$lDifference:=$lFixMaxLenght-(Length($tResult))
If ($rInteger>=0)
$tResult:=($lDifference*$tFillChar)+$tResult
Else 
$tResult:="-"+($lDifference*$tFillChar)+String(Abs($rInteger))+$tDecimalSeparator+$tDec
End if 
: (Length($tResult)>$lFixMaxLenght)
$tResult:="ERROR"
End case 
End case 
End case 
$0:=$tResult
  // end of method

This method is part of my utility methods component:

https://flury-software.ch/a-swiss-army-knife-for-4d/

Best,

Olivier

-Ursprüngliche Nachricht-
Von: 4D_Tech <4d_tech-boun...@lists.4d.com> Im Auftrag von 4dialog via 4D_Tech
Gesendet: Mittwoch, 30. Januar 2019 08:42
An: 4d_tech@lists.4d.com
Cc: 4dialog 
Betreff: Re: XLS plugin - format number with leading zero

Thanks for all answers.

The problem is not i 4D, i get the leading zero but only in a text cell.
In excel you can format manualy a column as number with fixed numbers 
preformated (selfdefined format). In my case, 11 numbers, "000". If you 
put 10 numbers in a cell it gets leading zero.

But is there a way to do this formating from 4d?



-
Hilsen
--
Helge Antonsen
www.4dialog.no
--
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
**

**
4D Internet Users Group (4D iNUG)
Archive:  

Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi all,

First of all, I must say I am no hardware expert, so maybe this is a stupid 
question.

It seems that 4D 32-bit Volume desktop only uses 1 core.
But does 4D 64-bit Volume desktop use all available cores?

Gr,
Piotr

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