Re: Calculate values of arrays...

2021-11-01 Thread Jeremy Roussak via 4D_Tech
In the docs? Min, Max and Average can all take numeric arrays as arguments.


Jeremy Roussak
Photography: jbr.is


> On 1 Nov 2021, at 12:04, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> G’ day,
> 
> I’m sure I have seen it before but can’t remember where. :-(
> 
> I’m looking for "Get/Calculate Minimum, Maximum, Average etc.” on (numeric) 
> Arrays.
> 
> Is there anybody willing to help?
> 
> Thanks
> 
> Cheers
> Jörg
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> 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)
New Forum: https://discuss.4D.com
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: PING of life...

2021-01-15 Thread Jeremy Roussak via 4D_Tech
I have all non-English conversations muted as well, but I’m still given the 
opportunity to test my rusty schoolboy French every now and again. It’s quite 
fun.


Jeremy Roussak
Photography: jbr.is


> On 14 Jan 2021, at 21:50, Neil Dennis via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> Under Notifications/Categories on the left, select which categories you want 
>> to watch and which ones to mute.
> 
> I just implemented the muted options, thank you for pointing these out :)
> 
> Neil
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: Object notation replacement for use of Self in a script

2020-05-05 Thread Jeremy Roussak via 4D_Tech
Doesn’t the option until/while syntax fit the bill for early exit? I agree an 
automatically-maintained index would be nice, though.

Jeremy

> On 5 May 2020, at 19:13, James Crate via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> In 4D, when enumerating collections or entity selections, about half the time 
> I want an index for progress calculation, and other times I have to use the 
> indexed for loop because I want to early exit. 
> 
> For other languages, providing the index on enumeration varies by language 
> and enumeration construct, but most have an enumeration construct that 
> provides an index. Almost all support break.
> 
> So 4D’s implementation could be considered more redundant, less 
> feature-complete. If an index were provided instead of start/end, and you 
> could set that index to .length to exit the loop, we’d pretty much never have 
> to use an indexed loop for a collection or entity selection.
> 
> 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: signal problem

2020-05-02 Thread Jeremy Roussak via 4D_Tech
Never mind. Cretin (me) at work

Jeremy
On 1 May 2020, 20:20 +0100, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com>, 
wrote:
> 4D v18.1, Mac Mojave
>
> I think I’m following the documentation of signals to the letter, but it’s 
> not happening.
>
> Main process:
>
> C_OBJECT($signal)
> C_BOOLEAN($done)
>
> $signal:=New signal(“fred”)
>
> CALL WORKER(“Show”;”Show”;$signal)
>
> $done:=$signal.wait(5)
>
> -
>
> Method “Show”
>
> C_OBJECT($1;$signal)
> $signal:=$1
>
> OPEN FORM WINDOW(…)
> $signal.trigger()
>
> DIALOG(…)
>
> ——
>
> The calling process always times out, with $done false. I’m obviously missing 
> something very basic, but I can’t see it. Help!
>
> Jeremy
>
> **
> 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
**

signal problem

2020-05-01 Thread Jeremy Roussak via 4D_Tech
4D v18.1, Mac Mojave

I think I’m following the documentation of signals to the letter, but it’s not 
happening.

Main process:

C_OBJECT($signal)
C_BOOLEAN($done)

$signal:=New signal(“fred”)

CALL WORKER(“Show”;”Show”;$signal)

$done:=$signal.wait(5)

-

Method “Show”

C_OBJECT($1;$signal)
$signal:=$1

OPEN FORM WINDOW(…)
$signal.trigger()

DIALOG(…)

——

The calling process always times out, with $done false. I’m obviously missing 
something very basic, but I can’t see it. Help!

Jeremy

**
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: New Notarization Issues

2020-04-28 Thread Jeremy Roussak via 4D_Tech
Randy and Spencer,

Thanks. That’s exactly what I did and my application is now successfully 
notarized.

I wish I understood what notarization actually involves. One day…

Jeremy

> On 28 Apr 2020, at 14:04, Randy Jaynes  <mailto:ra...@printpoint.com>> wrote:
> 
> For that one I was able to replace it with the php-fcgi-4d from the recent 
> release of 4D v18.
> 
> Randy
> 
> --
> Randy Jaynes
> Senior Programmer and Customer Support
> 
> http://printpoint.com <http://printpoint.com/> • 845.687.3741 • PrintPoint, 
> Inc • 57 Ludlow Lane • Palisades, NY 10964 
> Please send all email contacts to supp...@printpoint.com 
> <mailto:supp...@printpoint.com>
> 
> 
>> On Apr 28, 2020, at 7:33 AM, Jeremy Roussak > <mailto:j...@mac.com>> wrote:
>> 
>> Randy, thanks for that pointer and Miyako, thanks very much indeed, as ever, 
>> for that marvellous application.
>> 
>> The huge slew of notarization errors has now been reduced to just one:
>> 
>>   "issues": [
>> {
>>   "severity": "error",
>>   "code": null,
>>   "path": "PI_Calculator.app-1.84.app.zip/PI 
>> calculator.app/Contents/Resources/php/Mac/php-fcgi-4d",
>>   "message": "The binary uses an SDK older than the 10.9 SDK.",
>>   "docUrl": null,
>>   "architecture": "x86_64"
>> }
>>   ]
>> It seems I need a new version of the PHP binary. I seem vaguely to remember 
>> that this was discussed before, but I can’t recall what the solution was. Is 
>> there one somewhere?
>> 
>> Jeremy
>> 
>>> On 27 Apr 2020, at 21:28, Randy Jaynes >> <mailto:ra...@printpoint.com>> wrote:
>>> 
>>> Jeremy,
>>> 
>>> I would RUN to Miyako’s buildApp 
>>> (https://github.com/miyako/4d-utility-build-application 
>>> <https://github.com/miyako/4d-utility-build-application>)
>>> 
>>> I found on the Catalina build machine that I’m using, I have to constantly 
>>> sign the entire plugins folder.
>>> 
>>> This database has been nothing short of a miracle for this process.
>>> 
>>> There was a test method in there that is already pretty much set up to go 
>>> down through the whole chain of all the folders, frameworks, plugins, … you 
>>> name it. 
>>> 
>>> Randy
>>> 
>>> --
>>> Randy Jaynes
>>> Senior Programmer and Customer Support
>>> 
>>> http://printpoint.com <http://printpoint.com/> • 845.687.3741 • PrintPoint, 
>>> Inc • 57 Ludlow Lane • Palisades, NY 10964 
>>> Please send all email contacts to supp...@printpoint.com 
>>> <mailto:supp...@printpoint.com>
>>> 
>>> 
>>>> On Apr 27, 2020, at 3:14 PM, Jeremy Roussak via 4D_Tech 
>>>> <4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
>>>> 
>>>> 4Dv17R5, Mac Mojave
>>>> 
>>>> An application which I have previously codesigned and successfully 
>>>> submitted for notarization is now failing to be notarized. The log file 
>>>> contains a stream of errors, complaining about 4D InternetCommands, 
>>>> InstallTool, Updater.app and others, the errors being invalid signature, 
>>>> signature algorithm is too weak, executable does not have hardened runtime 
>>>> enabled, and so on.
>>>> 
>>>> I’ve changed nothing since January, when it was notarized just fine. 
>>>> codesign —verify says it’s OK.
>>>> 
>>>> Help!
>>>> 
>>>> Jeremy
>>>> 
>>>> The log file is at
>>>> 
>>>> https://osxapps-ssl.itunes.apple.com/itunes-assets/Enigma113/v4/03/70/62/03706243-2acd-5546-7a56-0fc4bda885a1/developer_log.json?accessKey=1588208394_8709044140572407954_aq%2Fu1eNX3LZEeLteCNikuUhL0w2W6BTpOHDmSGWv6lff9IL9W2H%2BGZI1WIfIm6R1rcc0fM1dEsPP43G5FhGjzCQUrvPwYL41E2YoNZSUzqtk1p1xkzmU%2BbjTpJ7s9RmairuCloWnEEFJsKbehxOX6EEY7i3Y5E%2FdrELaMZv1d2c%3D
>>>>  
>>>> <https://osxapps-ssl.itunes.apple.com/itunes-assets/Enigma113/v4/03/70/62/03706243-2acd-5546-7a56-0fc4bda885a1/developer_log.json?accessKey=1588208394_8709044140572407954_aq%2Fu1eNX3LZEeLteCNikuUhL0w2W6BTpOHDmSGWv6lff9IL9W2H%2BGZI1WIfIm6R1rcc0fM1dEsPP43G5FhGjzCQUrvPwYL41E2YoNZSUzqtk1p1xkzmU%2BbjTpJ7s9RmairuCloWnEEFJsKbehxOX6EEY

Re: New Notarization Issues

2020-04-28 Thread Jeremy Roussak via 4D_Tech
Randy, thanks for that pointer and Miyako, thanks very much indeed, as ever, 
for that marvellous application.

The huge slew of notarization errors has now been reduced to just one:

  "issues": [
{
  "severity": "error",
  "code": null,
  "path": "PI_Calculator.app-1.84.app.zip/PI 
calculator.app/Contents/Resources/php/Mac/php-fcgi-4d",
  "message": "The binary uses an SDK older than the 10.9 SDK.",
  "docUrl": null,
  "architecture": "x86_64"
}
  ]
It seems I need a new version of the PHP binary. I seem vaguely to remember 
that this was discussed before, but I can’t recall what the solution was. Is 
there one somewhere?

Jeremy

> On 27 Apr 2020, at 21:28, Randy Jaynes  wrote:
> 
> Jeremy,
> 
> I would RUN to Miyako’s buildApp 
> (https://github.com/miyako/4d-utility-build-application 
> <https://github.com/miyako/4d-utility-build-application>)
> 
> I found on the Catalina build machine that I’m using, I have to constantly 
> sign the entire plugins folder.
> 
> This database has been nothing short of a miracle for this process.
> 
> There was a test method in there that is already pretty much set up to go 
> down through the whole chain of all the folders, frameworks, plugins, … you 
> name it. 
> 
> Randy
> 
> --
> Randy Jaynes
> Senior Programmer and Customer Support
> 
> http://printpoint.com <http://printpoint.com/> • 845.687.3741 • PrintPoint, 
> Inc • 57 Ludlow Lane • Palisades, NY 10964 
> Please send all email contacts to supp...@printpoint.com 
> <mailto:supp...@printpoint.com>
> 
> 
>> On Apr 27, 2020, at 3:14 PM, Jeremy Roussak via 4D_Tech 
>> <4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
>> 
>> 4Dv17R5, Mac Mojave
>> 
>> An application which I have previously codesigned and successfully submitted 
>> for notarization is now failing to be notarized. The log file contains a 
>> stream of errors, complaining about 4D InternetCommands, InstallTool, 
>> Updater.app and others, the errors being invalid signature, signature 
>> algorithm is too weak, executable does not have hardened runtime enabled, 
>> and so on.
>> 
>> I’ve changed nothing since January, when it was notarized just fine. 
>> codesign —verify says it’s OK.
>> 
>> Help!
>> 
>> Jeremy
>> 
>> The log file is at
>> 
>> https://osxapps-ssl.itunes.apple.com/itunes-assets/Enigma113/v4/03/70/62/03706243-2acd-5546-7a56-0fc4bda885a1/developer_log.json?accessKey=1588208394_8709044140572407954_aq%2Fu1eNX3LZEeLteCNikuUhL0w2W6BTpOHDmSGWv6lff9IL9W2H%2BGZI1WIfIm6R1rcc0fM1dEsPP43G5FhGjzCQUrvPwYL41E2YoNZSUzqtk1p1xkzmU%2BbjTpJ7s9RmairuCloWnEEFJsKbehxOX6EEY7i3Y5E%2FdrELaMZv1d2c%3D
>>  
>> <https://osxapps-ssl.itunes.apple.com/itunes-assets/Enigma113/v4/03/70/62/03706243-2acd-5546-7a56-0fc4bda885a1/developer_log.json?accessKey=1588208394_8709044140572407954_aq%2Fu1eNX3LZEeLteCNikuUhL0w2W6BTpOHDmSGWv6lff9IL9W2H%2BGZI1WIfIm6R1rcc0fM1dEsPP43G5FhGjzCQUrvPwYL41E2YoNZSUzqtk1p1xkzmU%2BbjTpJ7s9RmairuCloWnEEFJsKbehxOX6EEY7i3Y5E%2FdrELaMZv1d2c%3D>
>>  
>> <https://osxapps-ssl.itunes.apple.com/itunes-assets/Enigma113/v4/03/70/62/03706243-2acd-5546-7a56-0fc4bda885a1/developer_log.json?accessKey=1588208394_8709044140572407954_aq/u1eNX3LZEeLteCNikuUhL0w2W6BTpOHDmSGWv6lff9IL9W2H+GZI1WIfIm6R1rcc0fM1dEsPP43G5FhGjzCQUrvPwYL41E2YoNZSUzqtk1p1xkzmU+bjTpJ7s9RmairuCloWnEEFJsKbehxOX6EEY7i3Y5E/drELaMZv1d2c=
>>  
>> <https://osxapps-ssl.itunes.apple.com/itunes-assets/Enigma113/v4/03/70/62/03706243-2acd-5546-7a56-0fc4bda885a1/developer_log.json?accessKey=1588208394_8709044140572407954_aq/u1eNX3LZEeLteCNikuUhL0w2W6BTpOHDmSGWv6lff9IL9W2H+GZI1WIfIm6R1rcc0fM1dEsPP43G5FhGjzCQUrvPwYL41E2YoNZSUzqtk1p1xkzmU+bjTpJ7s9RmairuCloWnEEFJsKbehxOX6EEY7i3Y5E/drELaMZv1d2c=>>
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html 
>> <http://lists.4d.com/archives.html>
>> Options: https://lists.4d.com/mailman/options/4d_tech 
>> <https://lists.4d.com/mailman/options/4d_tech>
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com 
>> <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: New Notarization Issues

2020-04-27 Thread Jeremy Roussak via 4D_Tech
4Dv17R5, Mac Mojave

An application which I have previously codesigned and successfully submitted 
for notarization is now failing to be notarized. The log file contains a stream 
of errors, complaining about 4D InternetCommands, InstallTool, Updater.app and 
others, the errors being invalid signature, signature algorithm is too weak, 
executable does not have hardened runtime enabled, and so on.

I’ve changed nothing since January, when it was notarized just fine. codesign 
—verify says it’s OK.

Help!

Jeremy

The log file is at

https://osxapps-ssl.itunes.apple.com/itunes-assets/Enigma113/v4/03/70/62/03706243-2acd-5546-7a56-0fc4bda885a1/developer_log.json?accessKey=1588208394_8709044140572407954_aq%2Fu1eNX3LZEeLteCNikuUhL0w2W6BTpOHDmSGWv6lff9IL9W2H%2BGZI1WIfIm6R1rcc0fM1dEsPP43G5FhGjzCQUrvPwYL41E2YoNZSUzqtk1p1xkzmU%2BbjTpJ7s9RmairuCloWnEEFJsKbehxOX6EEY7i3Y5E%2FdrELaMZv1d2c%3D
 



**
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: Worker and UI

2020-03-30 Thread Jeremy Roussak via 4D_Tech
Tim,

That would seem a very sensible explanation. I’ve just tried setting my worker 
method to “can be run in preemptive processes” and, as you would have expected, 
it will no longer compile.

So workers intended to do number-crunching and run headless may be marked “can 
be pre-emptive” and those which may want to display their own windows can’t. 
Seems perfectly fair.

My concern about future versions arose because I was bitten by it a while ago. 
I wanted to get costings for anything which had a price of zero. New to 4D, I 
wrote

QUERY([Items];[Items]price=0)
APPLY TO SELECTION([Items];GetPriceFromUser)

or some such, where GetPriceFromUser opened a window and demanded an answer. It 
worked like a charm until a later version, which suddenly started throwing a 
bizarre error. It took me a while, and input from the ever-helpful Miyako, to 
track it down to a ban on user interaction within APPLY TO SELECTION. 

Of course, I’d do it very differently now anyway; and as to pistols, I’ll take 
your word for it!

Jeremy

> On 28 Mar 2020, at 22:19, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> On Mar 28, 2020, at 2:00 PM, Jeremy Roussak wrote:
> 
>> When Jenner was dithering about vaccination, he was told “Don’t think; try 
>> the experiment”.
>> 
>> I may yet run foul of some hidden gremlin which bares its fangs when 4D19 
>> appears, but I tried the experiment and thus far it works like a dream.
>> 
>> Step 1: at startup, call the worker to get things set up (mostly just 
>> opening a window, miles offscreen, containing a VP area and use DIALOG (…;*) 
>> to show it and let it initialise itself).
>> 
>> Step 2: when required, call the worker to load data into the pre-initialised 
>> VP area, work on it, open a window and display it in a form which allows for 
>> user interaction. When the form is closed, the worker hangs around waiting 
>> for the next usage and the window containing the VP area is still open.
> 
> Good point Jeremy. Rather than talk about things you “think” you know about, 
> but really don’t know about, go do a test and learn about it. Then talk about 
> it. So that’s what I did to make sure my understand was correct. 
> 
> My understanding was that the “no UI for workers” rule only applied to 
> workers running in a preemptive thread. And the only way you can do that is 
> when running compiled and you have specified that the method you are using in 
> CALL WORKER has its “Execution mode” set to “Can be run in preemptive 
> processes”. In this case you can’t have any UI. And 4D enforces this by not 
> even allowing you to compile the database. 
> 
> ...
> It is sort of like the grip safety on the popular 1911 .45 ACP pistols. 

**
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: Worker and UI

2020-03-28 Thread Jeremy Roussak via 4D_Tech
When Jenner was dithering about vaccination, he was told “Don’t think; try the 
experiment”.

I may yet run foul of some hidden gremlin which bares its fangs when 4D19 
appears, but I tried the experiment and thus far it works like a dream.

Step 1: at startup, call the worker to get things set up (mostly just opening a 
window, miles offscreen, containing a VP area and use DIALOG (…;*) to show it 
and let it initialise itself).

Step 2: when required, call the worker to load data into the pre-initialised VP 
area, work on it, open a window and display it in a form which allows for user 
interaction. When the form is closed, the worker hangs around waiting for the 
next usage and the window containing the VP area is still open.

Thanks for all the input.

Jeremy
**
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: Display entity selection time fields in a list box?

2020-03-27 Thread Jeremy Roussak via 4D_Tech
John, I had the same issue recently. I couldn’t think of any other way.

Jeremy
On 27 Mar 2020, 16:52 +, John DeSoi via 4D_Tech <4d_tech@lists.4d.com>, 
wrote:
> I'm replacing some record based list boxes with entity selection list boxes. 
> I want to see HH MM SS format which was easy and the default with selection 
> list boxes. But since ORDA treats time as a number, the only way I see to do 
> that is to wrap the field property path with the Time function, e.g. 
> Time(This.time_field). Without that, any time format set with OBJECT SET 
> FORMAT just displays the number of seconds.
>
> Is this really the only way to display time fields or have I missed 
> something? Seems like a step backwards. I'm using 18.1 Mac.
>
> 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
> **
**
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
**

Worker and UI

2020-03-27 Thread Jeremy Roussak via 4D_Tech
v18.1, Mac

What can a worker process do by way of UI? Are there any restrictions?

Situation: I have a task which takes a while to set up but which, once set up, 
runs swiftly, perhaps quite often. At present, I just wait for the setup to 
complete, but while it’s only a few seconds, it’s boring. Initialisation 
involves opening a window offscreen, containing a View Pro area for use in 
importing Excel spreadsheets. Getting data involves importing the spreadsheet 
and extracting and analysing the data, and is very fast.

So, I thought this might do. At startup, CALL WORKER to get the window opened 
(using DIALOG(…; *).

When data import is wanted, CALL WORKER with the path to the spreadsheet. The 
worker then does the “getting data” bit of the task.

It then has to pass the data back to the waiting caller, which may then show it 
in a dialog. If before calling the worker, the caller has opened a window, 
there’s no problem: the worker can use CALL FORM. But sometimes, there will be 
no data to display and it will look ugly if the window opens and then closes.

One solution would be for the caller process to be hidden until it has data to 
show in the window, and then to call SHOW PROCESS on itself.

But it might be easier if the worker process simply did the display itself, if 
it opened the window and interacted with the user, avoiding the need to pass 
anything back to the caller. The caller could simply issue the CALL WORKER 
message and exit.

Is there any objection to that method of doing things? The documentation 
doesn’t suggest that workers can’t have a UI. Maybe I’m stretching the use of a 
worker process past that which was intended.

Any thoughts, or indeed comments on the idiocy of my thinking and my 
foolishness in having missed an obviously easy solution, gratefully received.

Jeremy

PS: why does it take 4D nearly 3 seconds between showing a form after a call to 
DIALOG, a form which has no form method and contains only a View Pro area, and 
the On VP Ready event?
**
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: Active Listbox/Form while listbox dynamically built

2020-03-09 Thread Jeremy Roussak via 4D_Tech
John,

I think you have it: it is indeed magic!

The method called, via CALL FORM, by the worker has full access to all the 
form’s variables (in that way, it’s just like a form method). Your worker 
process can pass it, for example in an object, the values to be added to the 
listbox’s arrays. It adds them and the box will just update. It’s very easy to 
overthink it: give it a go and I suspect you’ll be amazed at how 
straightforward it proves to be.

Jeremy

> On 9 Mar 2020, at 17:28, John J Foster via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Peter,
> 
> That makes sense and I beginning to get a sense/visualize it.
> 
> This stuff is like magic in comparison to the older approach.
> 
> Thank you Peter!!!
> 
> John...
> 
>> On Mar 9, 2020, at 10:25 AM, Peter Bozek  wrote:
>> 
>> 
>> 
>> On Mon, Mar 9, 2020 at 5:52 PM John J Foster via 4D_Tech 
>> <4d_tech@lists.4d.com > wrote:
>> Hi Peter,
>> 
>> I haven’t used CALL WORKED/CALL FORM yet. I’ve seen some tutorials by John 
>> Baughman which made sense when I watched them. But a different context I 
>> think.
>> 
>> 
>> Idea is as follows: you cannot share memory (variables...) between worker 
>> and another process. But you can pass parameters to method running in 
>> another process.
>> 
>> So you need one method, that calculated content of displayed array, and 
>> packs the calculated values into object with, say, OB Set array, and this 
>> method runs in the worker, and another method that receives the object as a 
>> parameter, extracts the values from objects and inserts them into arrays 
>> displayed by LB.
>> 
>> CALL WORKER is called with first method as second parameter and runs inside 
>> worker, second method is passed as a second parameter to  CALL FORM and runs 
>> in the process of the form.
>> 
>> I guess that’s why my brain is not seeing this clearly yet.
>> 
>> My search form has a bunch of variables including a date range, a source and 
>> target arrays that it needs to loop through and a mother array list. The 
>> search will go something like:
>> 
>> Loop through Source array
>> for this Source{index}...
>>   Loop through Target array
>>   for this Target{index}...
>>  Loop through Aspect array
>>  for this Aspect{index}…
>> Call this search method for tis date range…
>> As rows are found build the listbox   <--
>> 
>> instead of this line, you would, after, say, each N lines, pack the data 
>> into object and call CALL FORM 
>> 
>> Another method (2nd parameter of CALL FORM will unpack data and build 
>> listbox.
>> 
>> Pseudocode would be:
>> 
>> Method_Worker:
>> receives window reference in $1
>> loop through data
>>  each 50 records
>>calculate values
>>  end each
>>  pack last 50 lines into object
>>  CALL FORM(window reference;"Method_Form";object)
>> end loop
>> 
>> Method_Form
>> receives object in $1
>> extract object into arrays
>> loop through values in arrays
>>  insert values from passed arrays into listbox
>> end loop
>> 
>> then form in On load, calls
>> CALL WORKER("worker name;"Method_Worker";window reference of itself)
>> 
>> Form method does not call Method_Form or do anything.
>> 
>> HTH,
>> 
>> Peter Bozek
> 
> **
> 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: Active Listbox/Form while listbox dynamically built

2020-03-08 Thread Jeremy Roussak via 4D_Tech
John,

Have a look at CALL WORKER and CALL FORM.

Start the data build in a new process using CALL WORKER.
Have the worker process prod the form into updating the listbox from time time 
using CALL FORM.

I’ve implemented something much more trivial and it works nicely.

Jeremy


> On 8 Mar 2020, at 18:38, John J Foster via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> 4D v17 R5 (Mac and Windows single user standalone)
> 
> I have a list box that needs to be built and available before the calculation 
> is complete. In this case I have some searches looking for particular 
> conditions and when found add them to the listbox. They could easily take a 
> few seconds to I’m guessing a  minute or more. The searching could span 50-60 
> sub searches within a 100 years of daily data (Think daily stock market data 
> but it’s not for the stock market).
> 
> So I would like a strategy:
> 
> - so that list box remains available as it’s being built.
> 
> - the screen is not frozen as it’s being built.
> 
> - The list box fills as each row is found/added and can be seen rebuilding. 
> 
> I’ve seen this kind of thing in a windows app (not 4D) and I’d like to 
> emulate the behavior.
> 
> I need a strategy I’m guessing that involves another process which knows how 
> to communicate back to this form/listbox. Is this where workers could be 
> helpful?
> 
> Does anyone have some snippets of code I could see to visualize the process?
> 
> Appreciate,
> John…
> 
> 
> **
> 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: APPLY TO ENTITY SELECTION?

2020-02-29 Thread Jeremy Roussak via 4D_Tech
I’m not sure how that fits with what I’d like to do, Jeremy. Getting an entity 
selection, transforming it into a collection, fiddling with the collection and 
putting it back does seem rather involved.

Old:
ALL RECORDS([numbers])
APPLY TO SELECTION([numbers]phone:=“+44”+[numbers]phone)

ORDA:
For each ($number;ds.numbers.all())
$number.phone:=“44”+$number.phone
$number.save()
End for each

What I was looking for was something like

ds.numbers.all().applyToEach(“number = :1”; ”44”+number)

But if it’s not there, the hassle isn’t great.

Jeremy

> On 29 Feb 2020, at 16:54, Jeremy French  wrote:
> 
> Have you looked at the data class method “fromCollection”?
> 
> https://doc.4d.com/4Dv18/4D/18/dataClassfromCollection.305-4505892.en.html
> 
> Sent from my iPad
>> On Feb 29, 2020, at 11:25 AM, Jeremy Roussak via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> equivalent of APPLY TO SELECTION for an entity selection?

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

APPLY TO ENTITY SELECTION?

2020-02-29 Thread Jeremy Roussak via 4D_Tech
Is there an equivalent of APPLY TO SELECTION for an entity selection? Or do we 
just use a for each … end for each loop?

Jeremy
**
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: Subform & outside information

2020-02-27 Thread Jeremy Roussak via 4D_Tech
Keith,

OBJECT GET SUBFORM CONTAINER SIZE

https://doc.4d.com/4Dv18/4D/18/OBJECT-GET-SUBFORM-CONTAINER-SIZE.301-4505436.en.html
 


Jeremy

> On 26 Feb 2020, at 20:51, kculotta via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> In the context of a form, we can know the width and height of a subform 
> within it.  Has a way been introduced for an object inside the subform to 
> know those dimensions using only its own methods, without outside help?
> 
> Thanks,
> 
> Keith - CDI
**
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
**

v18: bug in METHOD SET CODE?

2020-02-13 Thread Jeremy Roussak via 4D_Tech
I’m using METHOD SET CODE from a component to inject a callback method into the 
host. It’s worked well until now but in v18 it going wrong. The code 
(simplified) is

C_TEXT($hostName;$componentName;$code)
$componentName:="_injectedMethod"
$hostName:="injectedMethod"

METHOD GET CODE($componentName;$code)
METHOD SET CODE($hostName;$code;*)

The method _injectedMethod in the component contains a few lines of comments, 
for testing.

This code creates a method in the host, called injectedMethod, as it should; 
but the method is empty.

If I execute the METHOD SET CODE call a second time, it injects the code of 
_injectedMethod as it should,

Can anyone enlighten me, before I post a bug report?

Jeremy
**
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: determine table name from entity selection

2020-02-08 Thread Jeremy Roussak via 4D_Tech
Thanks, Miyako. You even managed not to use lmgtfy!

Jeremy

> On 9 Feb 2020, at 00:19, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> it's not cheating to ask Google
**
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
**

determine table name from entity selection

2020-02-08 Thread Jeremy Roussak via 4D_Tech
I’m writing a generic component. I have an entity selection but I don’t know 
which table it’s from. In the debugger, I can see “entity (125) from xx”, where 
xx is the name of the table. Is there a way in code to get the name of the 
table?

As ever, I may be missing something obvious.

Jeremy

**
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: Using ORDA - getting ONE entity from MANY Table

2020-01-28 Thread Jeremy Roussak via 4D_Tech
Steve,

I’m new to ORDA as well, but I think the syntax you want is something like this

$text:=emp.relationToOneTable.oneTableFieldName

Jeremy

> On 28 Jan 2020, at 09:25, UKVetDerm via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi ORDA users
> 
> I am starting to explore ORDA and with many false steps I have reduced some 
> code to just a few lines which is great. However, I am struggling to extract 
> a field from a related one table when working principally in the many table.
> 
> 
> In the following selection – I cannot find the code to extract the field 
> value from a related one table (Events is the many table) – I am building a 
> calendar view with hmCal.
> 
> I have named my relation and looked at the various examples and cheat sheets 
> and just can’t get to grips with this.
> 
> 
> 
> 4D there would be a good place for a 4D ORDA manual like when SQL was 
> introduced for those of us that are not full time at this!
> 
> 
> 
> I am sure I am missing something very obvious so any suggestions would be 
> gratefully received!
> 
> 
> 
> Thanks
> 
> 
> 
> Steve
> 
> UKVD
> 
> 
> 
> --
> 
> 
> 
> C_OBJECT(emp)
> 
> 
> 
> For each (emp;ds.Events.query("StartDate > :1 & StartDate < :2 & Calendar = 
> :3";vMondaydate;vMondayDate2;True)
> 
> $text:= a related one value!
> 
> $err:=hmCal_Add Appointment 
> (calarea;emp.AppointmentNumber;$text;emp.MainContact 
> emp.AllDay;emp.StartDate;emp.StartTime;emp.FinishDate;emp.FinishTime;0)
> 
>Blah blah …
> 
> End for each
> 
> 
> 
> 
> 
> **
> 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: v18 bug?

2020-01-25 Thread Jeremy Roussak via 4D_Tech
Miyako, it’s really intentional? That’s bizarre: what’s the reasoning behind 
it? It’s behaviour that is unique to 4D, at least among Mac applications.

If it started with 17R, it must have been R6.A single double-click was enough 
in 17R5.

Jeremy

> On 25 Jan 2020, at 00:14, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> not just double-clicking (which I never do) but also drag and drop of 4DB or 
> 4DProject to 4D that is already running.
> first drop, activate, second drop, switch databases. I think it started with 
> 17 R.
> 
> 
>> On Jan 25, 2020, at 8:21, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> In v18 (Mac), it takes two double-clicks for this to happen. The first 
>> merely switches into 4D.
>> Can this be intentional? It’s rather tedious.
**
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
**

v18 bug?

2020-01-24 Thread Jeremy Roussak via 4D_Tech
In v17 (Mac), double-clicking on a 4D database n Finder when 4D was running 
resulted in 4D closing the database it had open and opening the double-clicked 
database.

In v18 (Mac), it takes two double-clicks for this to happen. The first merely 
switches into 4D.

Can this be intentional? It’s rather tedious.

Jeremy

**
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: v18 documentation

2020-01-24 Thread Jeremy Roussak via 4D_Tech
Eric, you’re right; but unlike earlier versions, there’s nothing downloadable. 
I do a fair bit of my development with no Net access, so downloaded 
documentation is very handy.

Jeremy

> On 24 Jan 2020, at 15:11, Eric Naujock  wrote:
> 
> I live on the docs.4d.com <http://docs.4d.com/> website. The v18 tab has been 
> there for a while. I was missing the v17r5 tab that went away shortly after 
> the v18 tab appeared.
> 
> https://docs.4d.com/4Dv18/index.en.html 
> <https://docs.4d.com/4Dv18/index.en.html>
> 
>> On Jan 23, 2020, at 6:25 AM, Jeremy Roussak via 4D_Tech 
>> <4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
>> 
>> Is this available for download anywhere (it’s not obviously at doc.4d.com 
>> <http://doc.4d.com/> <http://doc.4d.com/ <http://doc.4d.com/>>)? HTML 
>> preferably, but PDF would be better than nothing.
>> 
>> Jeremy
**
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
**

v18 documentation

2020-01-23 Thread Jeremy Roussak via 4D_Tech
Is this available for download anywhere (it’s not obviously at doc.4d.com 
)? HTML preferably, but PDF would be better than nothing.

Jeremy

**
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: Select row in entity selection listbox

2020-01-21 Thread Jeremy Roussak via 4D_Tech
Miyako,

Thanks, but that’s not the issue. Listbox 1 is an entity selection of messages. 
One row has been clicked, and I know (from current item) what the selection is. 
One of the attributes of the selection is the number of the contact who sent or 
received the message.

Listbox 2 contains an entity selection of contacts (names and numbers). When a 
message is selected in LB1, I want to highlight in LB2 the contact related to 
the message. How do I find out which row to specify in LISTBOX SELECT 
ROW(*;”LB2”;…)?

They’re both single-select boxes.

Jeremy


> On 21 Jan 2020, at 11:53, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> if the listbox is single-select, you can use LISTBOX GET CELL POSITION to get 
> the row number,
> then check that the "current item" is not Null to verify whether the current 
> row was selected or unselected.
> (remember, you can unselect a row by shift-click or command click)
> 
> although collection-type listboxes offer 3 automated properties (current 
> item, position, selection)
> I find that it is often easier to use only the "current item" object and 
> leave the other two blank.
> using the current position or selection property often defeats selection by 
> code,
> commands such as LISTBOX SELECT ROW.
> 
> you'd need a different setup for a multi-select listbox.
> 
>> 2020/01/21 17:29、Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> Yet again, if this is obvious, please excuse me: this is my first project 
>> using only ORDA. 4Dv18.
> 
> 
> 
> 
> **
> 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
**

Select row in entity selection listbox

2020-01-21 Thread Jeremy Roussak via 4D_Tech
I have a form with two entity selection listboxes. One shows all messages ever 
sent from or to an account; the other, a list of that account’s contacts. When 
a message is selected, I want to highlight the appropriate contact. I can find 
the contact, of course; how do I find the row number so I can call LISTBOX 
SELECT ROW in the contacts listbox?

Yet again, if this is obvious, please excuse me: this is my first project using 
only ORDA. 4Dv18.

Thanks.

Jeremy
**
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: Object from row in selection listbox

2020-01-02 Thread Jeremy Roussak via 4D_Tech
It works very nicely, John, so thanks again.

One further question: if I know a record’s record number, how do I use ORDA to 
create an entity containing that record (more or less the equivalent of GOTO 
RECORD)?

I’m finding ORDA quite exciting, but it’s tricky (for me, anyway) to do some 
things which have become second-nature under the “old” approach.

Jeremy


> On 28 Dec 2019, at 19:43, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> By "selection based listbox" I assume you mean traditional record selection 
> listbox and not an entity selection/collection listbox. I have not tested 
> this, but I think it will work without changing the highlighted records or 
> scroll position.
> 
> COPY SET("UserSet";"MySet")
> CUT NAMED SELECTION([Table];"CurrentSelection")
> USE SET("MySet")
> $entitySelection:=Create entity selection([Table])
> USE NAMED SELECTION("CurrentSelection")
> COPY SET("MySet";"UserSet")
> 
> Since it is not possible to pass an entity selection from one process to 
> another, it would be really nice if 4D provided direct commands to convert 
> sets and named selections into entity selections.
> 
> John DeSoi, Ph.D.
> 
> 
>> On Dec 28, 2019, at 7:35 AM, Jeremy Roussak via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I have a selection-based listbox. I’d like to make an entity selection from 
>> the highlighted rows in the box. Is there an easy way? I’m new to ORDA, so 
>> I'probably missing something obvious.
**
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: Object from row in selection listbox

2019-12-29 Thread Jeremy Roussak via 4D_Tech
Thanks for that, John. Your assumption is correct, and it does indeed look as 
if it will work. I’ll give it a try.

Jeremy

> On 28 Dec 2019, at 19:43, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> By "selection based listbox" I assume you mean traditional record selection 
> listbox and not an entity selection/collection listbox. I have not tested 
> this, but I think it will work without changing the highlighted records or 
> scroll position.
> 
> COPY SET("UserSet";"MySet")
> CUT NAMED SELECTION([Table];"CurrentSelection")
> USE SET("MySet")
> $entitySelection:=Create entity selection([Table])
> USE NAMED SELECTION("CurrentSelection")
> COPY SET("MySet";"UserSet")
> 
> Since it is not possible to pass an entity selection from one process to 
> another, it would be really nice if 4D provided direct commands to convert 
> sets and named selections into entity selections.
> 
> John DeSoi, Ph.D.
> 
> 
>> On Dec 28, 2019, at 7:35 AM, Jeremy Roussak via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I have a selection-based listbox. I’d like to make an entity selection from 
>> the highlighted rows in the box. Is there an easy way? I’m new to ORDA, so 
>> I'probably missing something obvious.
**
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
**

Object from row in selection listbox

2019-12-28 Thread Jeremy Roussak via 4D_Tech
I have a selection-based listbox. I’d like to make an entity selection from the 
highlighted rows in the box. Is there an easy way? I’m new to ORDA, so 
I'probably missing something obvious.

Jeremy
**
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: All folders hidden in Apppackage/AppFolder...

2019-12-18 Thread Jeremy Roussak via 4D_Tech
Jörg,

I can’t say anything useful about Windows. On a Mac, though, I have to echo 
Chip’s “why”? The folders you mention are already “hidden”, in the sense that 
they’re inside a package; although it’s a folder, it appears to be a single 
file and non-technical users won’t realise that it isn’t. Users sufficiently au 
fait with MacOS to know how to show the package contents (and what “package 
contents” means) are likely to be sufficiently tech-savvy to defeat your 
attempts to make the folders invisible.

What problem are you trying to solve?

Jeremy

> On 18 Dec 2019, at 03:46, Jörg Knebel  > wrote:
> 
> Jeremy,
> 
>> On 18 Dec 2019, at 04:55 AEDT, Jeremy Roussak > > wrote:
>> 
>> Mac or Windows?
> 
> Both platforms.
> 
> Cheers
> Jörg

**
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: All folders hidden in Apppackage/AppFolder...

2019-12-17 Thread Jeremy Roussak via 4D_Tech
Jörg,

Mac or Windows?

Jeremy

> On 17 Dec 2019, at 12:18, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> G’day All,
> 
> Out of curiosity, what effect would it have if I decide to hide all folders 
> in the application package/folder and even the data-file programmatically 
> from within 4D.
> 
> I mean hiding the PlugIn-, ComponentS-, etc. folders.
> 
> I know everything can still be accessed from the 4D-structure but I’ve no 
> idea of any ripple effect(s) it might has.
> 
> Any ideas, experiences, voodoo ... are appreciated.
> 
> Thanks
> 
> Cheers
> Jörg
**
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: Trapping the 'return' key in list forms

2019-12-04 Thread Jeremy Roussak via 4D_Tech
On 4 Dec 2019, at 08:26, Arnaud de Montard via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> Hi Peter, 
> I'm not sure it always works on mac, because focusable property is managed by 
> system and "stronger" than 4d's one. You may check if I'm wrong using Apple 
> menu/Keyboard/Shortcuts/Full control access/All controls = ON. Quite 
> everything becomes focusable then, except 4d invisible buttons. 


Arnaud, I’ve just tried changing that setting and it doesn’t seem to make any 
difference (Mojave, v15R5). In order to get focus using the tab key, at any 
rate, the buttons have to have the “tabbable” property set. I suspect 4D’s 
buttons might not be “controls” in the Mac sense.

Jeremy
**
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: Trapping the 'return' key in list forms

2019-12-04 Thread Jeremy Roussak via 4D_Tech


> On 3 Dec 2019, at 22:40, Peter Jakobsson via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 
>> On 3 Dec 2019, at 21:47, Peter Bozek  wrote:
> 
>> But doing it again, I would go for something simpler.
> 
> …and that “something simpler” turns out to be Jeremy Roussak’s tip of 
> removing the “Focusable” property from the default button on the form.
> 
> This is the key to everything...

Glad to have helped! FWIW, I don’t use invisible buttons; there’s no need. If 
your form is sized relative to a bounding rectangle of some kind, you can place 
the buttons outside that rectangle area and set their “Resizing options" to 
"move". Makes them much easier to edit. Something like this: 
https://www.dropbox.com/s/1d1s81fhelcpe1w/Screenshot%202019-12-04%2009.39.20.jpg?dl=0
 


Jeremy
**
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: Trapping the 'return' key in list forms

2019-11-30 Thread Jeremy Roussak via 4D_Tech
Peter,

If your button, with shortcut Return, does not have the “focusable” property 
checked, calling OBJECT Get pointer(Object with focus) in its script will 
return the object the cursor was in when the return key was pressed.

Jeremy

> On 30 Nov 2019, at 21:58, Peter Jakobsson via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Thanks for that input Chip.
> 
> However I don’t see how this can work. How can the invisible button script 
> know which field the cursor was in last ? (Or which object last had the focus 
> prior to its own script being executed ?)
> 
> Regards
> 
> Peter
**
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: Status of a bug report

2019-11-14 Thread Jeremy Roussak via 4D_Tech
Thanks, Tim. Good news. I’ll have to wait, of course: will there be a v17R7?

Jeremy

> On 14 Nov 2019, at 17:03, Timothy Penner  wrote:
> 
> Hi Jeremy,
> 
> I just checked the bug report, ACI0100153, this should already be fixed in 
> the current beta of v18 which is available to silver/gold+ partners through 
> the forums.
> 
> -Tim
> 
> 
> 
> 
> 
> Timothy Penner
> Senior Technical Services Engineer
> 
> 4D Inc
> 95 S. Market Street, Suite #240
> San Jose,CA 95113
> United States
> 
> Telephone: +1-408-557-4600
> Fax:   +1-408-271-5080
> Email: tpen...@4d.com
> Web:   www.4d.com
> 
> -----Original Message-
> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Jeremy Roussak via 
> 4D_Tech
> Sent: Friday, November 08, 2019 8:43 AM
> To: 4D iNug Technical <4d_tech@lists.4D.com>
> Cc: Jeremy Roussak 
> Subject: Status of a bug report
> 
> The last time I submitted a bug report (a while ago), it was through 
> bugs.4d.fr, and I was able to track the progress of the response. Now (as I’m 
> not a partner) I have to do it through the forum. There doesn’t seem to be a 
> way to see how it’s getting on, though.
> 
> I’ve had an acknowledgment: it’s been given the reference ACI0100153. Can it 
> be tracked?
> 
> Jeremy
> 
> **
> 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: Event handler method in component

2019-11-11 Thread Jeremy Roussak via 4D_Tech
Chip, you’re right. For my purposes, that isn’t an issue, but your approach is 
perhaps neater.

Jeremy

> On 11 Nov 2019, at 16:43, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> Jeremy,
> Just to be clear
> 
> your code will *only* work if both the component and host are 
> interpreted.
> for me, one of the advantages of using a component is being able to 
> compile it.
> 
> For that circumstance you will need to have some other means to inject 
> code.
> as I said I use text files in the resources folder, this is an 
> abbreviated bit of code that runs ON EXIT of the component (when 
> closing development).
> 
> then you can import/inject the code from the component even if the 
> component is compiled. :)
> 
> ARRAY TEXT($Methods;0)
> 
> If (Application type=4D Local mode)
>  //methods to be injected into host system
>  //done this way to allow easy updating of the list
> APPEND TO ARRAY($Methods;)
>  // repeated for each method to export
> 
>  //insure that the most up to date versions of
>  // the methods to be injected are saved to disk
> shtdwn_Write_Code_to_Disk (->$Methods)
> 
> 
> On Mon, 11 Nov 2019 16:16:46 +, Jeremy Roussak wrote:
>> Exactly. FWIW, this is my code. 
> We have done so much, with so little, for so long;
> We are now qualified to anything with nothing 
>  - unknown

**
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: Event handler method in component

2019-11-11 Thread Jeremy Roussak via 4D_Tech
Exactly. FWIW, this is my code. The METHOD SET ATTRIBUTES call allows the 
injected method to be used as a callback. Methods to be injected begin with an 
underscore in the component, which is removed when creating the method in the 
host.

Jeremy

METHOD GET NAMES($omNames;"_OM@")
METHOD GET NAMES($hostNames;"OM@";*)

For ($i;1;Size of array($omNames))

$hostName:=Substring($omNames{$i};2)
If (Find in array($hostNames;$hostName)#-1)  // already exists, 
so see if needs to be updated

METHOD GET MODIFICATION 
DATE($omNames{$i};$omDate;$omTime)
METHOD GET MODIFICATION 
DATE($hostName;$hostDate;$hostTime;*)

If (($omDate>$hostDate) | (($omDate=$hostDate) & 
($omTime>$hostTime)))
METHOD GET CODE($hostName;$code;*)
$hostNameOld:=$hostName+"Old"
METHOD SET CODE($hostNameOld;$code;*)
METHOD GET CODE($omNames{$i};$code)
METHOD SET CODE($hostName;$code;*)
METHOD SET ATTRIBUTE($hostName;Attribute 
shared;True;*)
End if 

Else 

METHOD GET CODE($omNames{$i};$code)
METHOD SET CODE($hostName;$code;*)
METHOD SET ATTRIBUTE($hostName;Attribute shared;True;*)

End if   // if method exists

End for 



> On 11 Nov 2019, at 15:45, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> as a bonus you can update the code in the method(s) you are injecting 
> as needs change (or bugs are found and fixed), by simply allowing the 
> injection method to overwrite the existing code.
> 
> Chip
> 
> On Mon, 11 Nov 2019 15:09:34 +, Jeremy Roussak wrote:
>> Chip, you read my mind - that is almost exactly what I implemented 
>> yesterday afternoon. It was really easy to do and it works a treat.
>> 
>> Jeremy
>> 
>>> On 11 Nov 2019, at 15:06, Chip Scheide <4d_o...@pghrepository.org> wrote:
>>> 
>>> another option - depending on your view of doing this... is Code 
>>> injection.
>>> 
>>> At startup of the host (will have to be started at least once 
>>> interpretedly)
>>> you copy the code for the event call method into a method in the host.
>>> 
>>> it looks something like this (interpreted host and component):
>>> METHOD GET CODE() 
>>> METHOD SET CODE(;)
>>> 
>>> Alternatively (compiled component and interpreted host):
>>> - At component shut down, write the method(s) to be injected to disk as 
>>> text (I use the resources folder)
>>> - at host or component startup read the text files
>>> METHOD SET CODE(;)
>>> 
>>> Chip
>>> 
>>> On Sun, 10 Nov 2019 18:07:01 +, Jeremy Roussak via 4D_Tech wrote:
>>>> I’d like to have a method set by ON EVENT CALL to live in a 
>>>> component. It works, in that the method is called on each event, but 
>>>> the system variables Modifiers and KeyCode are undefined so testing 
>>>> for the event itself is tricky.
>>>> 
>>>> I can get round the absence of Modifiers by using Macintosh control 
>>>> down, but I’m not sure how I get the keystroke that triggered the 
>>>> event.
>>>> 
>>>> Is it possible?
>>>> 
>>>> Jeremy
>> 
> We have done so much, with so little, for so long;
> We are now qualified to anything with nothing 
>  - unknown

**
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: Event handler method in component

2019-11-11 Thread Jeremy Roussak via 4D_Tech
Chip, you read my mind - that is almost exactly what I implemented yesterday 
afternoon. It was really easy to do and it works a treat.

Jeremy

> On 11 Nov 2019, at 15:06, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> another option - depending on your view of doing this... is Code 
> injection.
> 
> At startup of the host (will have to be started at least once 
> interpretedly)
> you copy the code for the event call method into a method in the host.
> 
> it looks something like this (interpreted host and component):
> METHOD GET CODE() 
> METHOD SET CODE(;)
> 
> Alternatively (compiled component and interpreted host):
> - At component shut down, write the method(s) to be injected to disk as 
> text (I use the resources folder)
> - at host or component startup read the text files
>  METHOD SET CODE(;)
> 
> Chip
> 
> On Sun, 10 Nov 2019 18:07:01 +, Jeremy Roussak via 4D_Tech wrote:
>> I’d like to have a method set by ON EVENT CALL to live in a 
>> component. It works, in that the method is called on each event, but 
>> the system variables Modifiers and KeyCode are undefined so testing 
>> for the event itself is tricky.
>> 
>> I can get round the absence of Modifiers by using Macintosh control 
>> down, but I’m not sure how I get the keystroke that triggered the 
>> event.
>> 
>> Is it possible?
>> 
>> Jeremy
**
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: Event handler method in component

2019-11-10 Thread Jeremy Roussak via 4D_Tech
Thanks, Tim. I thought that was probably the case. 

Jeremy

> On 10 Nov 2019, at 20:22, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> On Nov 10, 2019, at 2:00 PM, Jeremy Roussak wrote:
> 
>> I’d like to have a method set by ON EVENT CALL to live in a component. It 
>> works, in that the method is called on each event, but the system variables 
>> Modifiers and KeyCode are undefined so testing for the event itself is 
>> tricky.
>> 
>> I can get round the absence of Modifiers by using Macintosh control down, 
>> but I’m not sure how I get the keystroke that triggered the event.
>> 
>> Is it possible?
> 
> No. The variable space for components is separate from the host database. So 
> the process variables “Modifiers” and “KeyCode” only live in the host and are 
> not eve defined in the component environment. Only thing you could do is pass 
> in the values of these variables into a shared method from the component. 
> 
> You still have to call ON EVENT CALL from the host, but from that method on 
> the host it can call a shared component method. Something like this:
> 
> From somewhere in the host you do ON EVENT CALL(“OnEventCallMethod”)
> 
> Host method “OnEventCallMethod”
> 
>  ComponentSharedMethod(Modifiers;KeyCode)
> 
> 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
**

Event handler method in component

2019-11-10 Thread Jeremy Roussak via 4D_Tech
I’d like to have a method set by ON EVENT CALL to live in a component. It 
works, in that the method is called on each event, but the system variables 
Modifiers and KeyCode are undefined so testing for the event itself is tricky.

I can get round the absence of Modifiers by using Macintosh control down, but 
I’m not sure how I get the keystroke that triggered the event.

Is it possible?

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

Status of a bug report

2019-11-08 Thread Jeremy Roussak via 4D_Tech
The last time I submitted a bug report (a while ago), it was through 
bugs.4d.fr, and I was able to track the progress of the response. Now (as I’m 
not a partner) I have to do it through the forum. There doesn’t seem to be a 
way to see how it’s getting on, though.

I’ve had an acknowledgment: it’s been given the reference ACI0100153. Can it be 
tracked?

Jeremy

**
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: Concatenating collections in v17R5

2019-11-04 Thread Jeremy Roussak via 4D_Tech
I knew I was missing something obvious! Thanks, Keith. Apologies for the waste 
of bandwidth.

Jeremy

> On 4 Nov 2019, at 23:33, kculotta via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> collection.combine( ) does that.
> https://doc.4d.com/4Dv17/4D/17.3/collectioncombine.305-4621805.en.html
> 
> Keith - CDI
> 
>> On Nov 4, 2019, at 5:26 PM, Jeremy Roussak via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I’m probably missing something obvious here, but if I have two collections 
>> and I want to add all the elements of one to the end of the other, is there 
>> a simple way?
>> 
>> So if c1 is [1,2,3] and c2 is [4,5,6], the result is [1,2,3,4,5,6].
>> 
>> Jeremy
**
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
**

Concatenating collections in v17R5

2019-11-04 Thread Jeremy Roussak via 4D_Tech
I’m probably missing something obvious here, but if I have two collections and 
I want to add all the elements of one to the end of the other, is there a 
simple way?

So if c1 is [1,2,3] and c2 is [4,5,6], the result is [1,2,3,4,5,6].

Jeremy

**
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: VP IMPORT DOCUMENT in v17R6

2019-10-31 Thread Jeremy Roussak via 4D_Tech
I’m slightly surprised to have had no response to this, but maybe nobody is 
using VP IMPORT DOCUMENT, at least on Macs.

I have submitted a bug report: the command is broken in R16.

Jeremy

> On 30 Oct 2019, at 13:49, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Here’s a minuscule database and a version of the xlsx file, with useful data 
> removed.
> 
>   https://www.dropbox.com/s/ls7e695n046y63f/vp%20test.zip?dl=1 
> <https://www.dropbox.com/s/ls7e695n046y63f/vp%20test.zip?dl=1>
> 
> Open “Form1” and run it. Choose “test.xlsx”.
> 
> Under R5, it loads. Under R6, it doesn’t. 
> 
> Am I missing something? How do I report a bug?
> 
> Jeremy
> 
>> On 30 Oct 2019, at 11:34, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Forgot to mention: the document is a simple xlsx Excel document, with four 
>> sheets, 23k in size.
>> 
>> Jeremy
>> 
>>> On 30 Oct 2019, at 11:30, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>>> wrote:
>>> 
>>> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form event. 
>>> Form.path contains a path in Mac system format, colon-delimited.
>>> 
>>> In v17R5, it works fine. In R6, on the same document, I get an empty 
>>> spreadsheet. No error; just an empty sheet.
>>> 
>>> Mac, Mojave.
>>> 
>>> Any suggestions gratefully received.
>>> 
>>> Jeremy
**
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: VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Jeremy Roussak via 4D_Tech
Chip,

Thanks, but using a POSIX path produces an error.

Jeremy

> On 30 Oct 2019, at 14:44, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> Try using Posix - I know you should not have to
> follows a posix converter - 4D's (at least as of v15 is 
> incomplete/incorrect)
> 
> 
>  //fileutl_Path_Convert_to_Posix
>  // $1 - Text - Path to convert
>  //$2 - Pointer (Optional) - to Error Return Text
> 
>  //Original from JorgeChB via iNug
> 
>  //Converts a Mac file path to a Posix form
> 
>  //RETURNS - Text - converted path, or empty string if path is empty
>  // • Created 3/24/15 by Chip - 
>  //• Updated 05-17-18 by Chip - added test for empty path
> C_TEXT($Path;$Path;$0;$msg)
> C_POINTER($2;$Error_ptr)
> 
> errutl_Start 
> 
> If (Count parameters>=1)
> $Path:=$1
> 
> If (Count parameters>=2)
> $Error_ptr:=$2
> End if 
> 
> Case of 
> : ($Path="")
> $msg:="Source Path is empty"
> errutl_Add ($msg)
> 
> : (Position(Colon_Char;$Path)>0)
> 
> If ($Path#"")
> $Path:=Replace string($Path;Slash_Char;"__-sLaSh-__")  //'a/b' -> 
> 'a__-sLaSh-__b'
> $Path:=Replace string($Path;Colon_Char;Slash_Char)  //'a:b' -> 'a/b'
> $Path:=Replace string($Path;"__-sLaSh-__";Colon_Char)  
> //'a__-sLaSh-__b' -> 'a:b'
> $Path:=Replace 
> string($Path;BackSlash_Char;BackSlash_Char+BackSlash_Char)  //'a\\b' -> 
> 'a\\b'"
> $Path:=Replace string($Path;Space_Char;BackSlash_Char+Space_Char)  //'a 
> b' -> 'a\ b'
> $Path:=Replace string($Path;"*";BackSlash_Char+"*")  //'a*b' -> 'a\*b'
> $Path:=Replace string($Path;"'";BackSlash_Char+"'")  //'a'b' -> 'a\'b'
> $Path:=Replace string($Path;"&";BackSlash_Char+"&")  //'a' -> 'a\'
> $Path:=Replace string($Path;Quote_Char;BackSlash_Char+Quote_Char)  
> //'a"b' -> 'a\"b'
> $Path:=Replace string($Path;"(";BackSlash_Char+"(")  //'a(b' -> 'a\(b'
> $Path:=Replace string($Path;")";BackSlash_Char+")")  //'a)b' -> 'a\)b'
> $Path:=Replace string($Path;"|";BackSlash_Char+"|")  //'a|b' -> 'a\|b'
> 
>  //make sure we do not prepend 'Volumes' if it already there
> If (Position("/Volumes/";$Path)=0)
> $0:="/Volumes/"+$Path
> Else 
> $0:=$Path
> End if 
> Else 
> errutl_Add ("Source is empty.")
> End if 
> Else 
> $msg:="Posix conversion is only applicable "
> $msg:=$msg+"to paths formatted for use on a Macintosh."
> errutl_Add ($msg)
> End case 
> Else 
> $msg:="Required parameters (1) not passed."+Cr_Char
> $msg:=$msg+"Parameters passed "+String(Count parameters)
> errutl_Add ($msg)
> End if 
> 
> errutl_End (Current method name;$Error_ptr;Nil($Error_ptr))
>  //End fileutl_Path_Convert_to_Posix
> 
> 
> 
> NOTE: 
> - errutl_start initializes an error reporting system
> - calls to errutl_add builds a text message to return an error to 
> calling method
> - BOTH of the above can be removed or ignore or replaced with your own 
> error reporter
> 
> Chip
> 
> On Wed, 30 Oct 2019 11:30:29 +, Jeremy Roussak via 4D_Tech wrote:
>> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form 
>> event. Form.path contains a path in Mac system format, 
>> colon-delimited.
>> 
>> In v17R5, it works fine. In R6, on the same document, I get an empty 
>> spreadsheet. No error; just an empty sheet.
>> 
>> Mac, Mojave.
>> 
>> Any suggestions gratefully received.
>> 
>> Jeremy
>> **
>> 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
>> **
> We have done so much, with so little, for so long;
> We are now qualified to anything with nothing 
>  - unknown

**
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: VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Jeremy Roussak via 4D_Tech
Here’s a minuscule database and a version of the xlsx file, with useful data 
removed.

https://www.dropbox.com/s/ls7e695n046y63f/vp%20test.zip?dl=1 
<https://www.dropbox.com/s/ls7e695n046y63f/vp%20test.zip?dl=1>

Open “Form1” and run it. Choose “test.xlsx”.

Under R5, it loads. Under R6, it doesn’t. 

Am I missing something? How do I report a bug?

Jeremy

> On 30 Oct 2019, at 11:34, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Forgot to mention: the document is a simple xlsx Excel document, with four 
> sheets, 23k in size.
> 
> Jeremy
> 
>> On 30 Oct 2019, at 11:30, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form event. 
>> Form.path contains a path in Mac system format, colon-delimited.
>> 
>> In v17R5, it works fine. In R6, on the same document, I get an empty 
>> spreadsheet. No error; just an empty sheet.
>> 
>> Mac, Mojave.
>> 
>> Any suggestions gratefully received.
>> 
>> Jeremy
**
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: VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Jeremy Roussak via 4D_Tech
Forgot to mention: the document is a simple xlsx Excel document, with four 
sheets, 23k in size.

Jeremy

> On 30 Oct 2019, at 11:30, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form event. 
> Form.path contains a path in Mac system format, colon-delimited.
> 
> In v17R5, it works fine. In R6, on the same document, I get an empty 
> spreadsheet. No error; just an empty sheet.
> 
> Mac, Mojave.
> 
> Any suggestions gratefully received.
> 
> Jeremy
> **
> 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
**

VP IMPORT DOCUMENT in v17R6

2019-10-30 Thread Jeremy Roussak via 4D_Tech
I call VP IMPORT DOCUMENT(“vp”;Form.path) in the On VP Ready form event. 
Form.path contains a path in Mac system format, colon-delimited.

In v17R5, it works fine. In R6, on the same document, I get an empty 
spreadsheet. No error; just an empty sheet.

Mac, Mojave.

Any suggestions gratefully received.

Jeremy
**
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: OPEN DATA FILE gets endless loop

2019-10-27 Thread Jeremy Roussak via 4D_Tech
Carl,

I hesitate to suggest something quite so obvious, but it seems to me that each 
time you enter the On Startup method, you

1. Set $dataPath to a path
2. Test $dataPath is “”, which of course it isn’t
3. Open a data file
4. Set $dataPath to “” (effectively pointless)
5. Re-enter On startup when the new data file opens
6. Go to step 1; hence your loop

From the OPEN DATA FILE documentation:

If the access path sets a valid data file, 4D quits the database in progress 
and re-opens it with the specified data file. In single-user mode, the 
Semaphore  and the On 
Startup database method 
 are 
successively called.
Warning: Since this command causes the application to quit before re-opening 
with the specified data file, it must be used with precaution in the On Startup 
database method 
 or in a 
method called by this database method, so as to avoid generating an infinite 
loop. 

Jeremy


> On 27 Oct 2019, at 17:31, wangel--- via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> I am trying to use  in "On Startup" but I get an endless
> loop. The code is:
> 
> C_TEXT($dataPath)
> 
> $dataPath:="C:\\MyFolder\\MyData.4dd"
> 
> If ($dataPath#"")
> 
> OPEN DATA FILE($dataPath)  //open it
> 
> $dataPath:=""
> 
> End if
> 
> What am I doing wrong?
> 
> Regards
> 
> Carl Aage Wangel

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

Re: Error signing built app for Catalina

2019-10-26 Thread Jeremy Roussak via 4D_Tech
Jim,

I translated your shell commands into a series of LEPs in my build method and 
it worked beautifully.

Thanks again.

Jeremy

> On 25 Oct 2019, at 15:04, Jim Crate via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> On Oct 24, 2019, at 3:14 PM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
>> 
>> App built with v17R6. Trying to sign a built application gives this:
>> 
>> 20:07:01.341: Error 105553143319120 signing '/Users/jbr/Desktop/Final 
>> Application/PI calculator - Working/PI 
>> calculator.app/Contents/Resources/Internal User Components/4D 
>> Report.4dbase/Resources/Images/tbSave.png': Error Domain=NSPOSIXErrorDomain 
>> Code=9 "Bad file descriptor"
>> 
>> Is there some documentation on the topic?
> 
> I’ve used a script for signing for years, and have now added notarization to 
> it. I’ve never tried to use 4D’s signing when building functionality. 
> 
> This link from Apple describes the notarization workflow and also includes a 
> link to describe how to generate an app-specific password to use for 
> command-line notarization.
> 
> If you copy/paste this, the email app probably converted to curly quotes so 
> you’ll want to fix all the double-quotes. The script goes in the same folder 
> as the built app you want to sign. If you name it with a .command extension, 
> you can double-click to run it, and if you use a method to configure a 
> buildapp.xml project file and run BUILD APPLICATION, you can use LAUNCH 
> EXTERNAL PROCESS to automatically launch the script.
> 
> Jim Crate
> 
> 
> #!/bin/bash
> 
> cd "${BASH_SOURCE%/*}" || exit
> echo "current directory: `pwd`"
> 
> devID="Developer ID Application: James Crate (developerID)"
> appPath="./MyBuiltApp.app"
> 
> filename=$(basename -- "$appPath")
> appName="${filename%.*}"
> 
> if [[ -d $appPath ]]
> then
>  echo "signing $appPath"
>  # clean up by removing file system extended attributes
>  xattr -cr "$appPath"
> 
>  # sign application with developer signature
>  codesign --force --deep --verbose --sign "$devID" "$appPath"
> 
>  # check code-signing
>  echo "checking signing"
>  spctl -av "$appPath"
>  codesign --verify -v "$appPath"
> 
>  # zip with versioned name
>  version=$(/usr/libexec/PlistBuddy "${appPath}/Contents/Info.plist" -c 'Print 
> CFBundleShortVersionString')
>  zipName="./${appName}-${version}.app.zip"
>  echo "zipping to ${zipName}"
>  rm "${zipName}"
>  ditto -c -k --sequesterRsrc --keepParent "${appPath}" "${zipName}"
> 
>  echo "uploading for notarization"
>  xcrun altool --notarize-app --primary-bundle-id "com.vantine.MyBuiltApp.zip" 
> \
>--username "m...@example.com" --password 
> "@keychain:AC_PASSWORD_NotarizationScript" \
>--file "${zipName}"
>  echo "finished uploading, watch for result email"
> fi
> 
> # after notarization completes, run:
> # xcrun stapler staple MyBuiltApp.app
> 
> # This command stores a password in the keychain. The keychain item can also 
> be created manually.
> # xcrun altool --store-password-in-keychain-item 
> "AC_PASSWORD_NotarizationScript" -u "m...@example.com" -p 
> "generated_app_password"
> 
> 
> **
> 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: Error signing built app for Catalina

2019-10-25 Thread Jeremy Roussak via 4D_Tech
Jim,

Thanks very much. I shall give it a go.

Jeremy

> On 25 Oct 2019, at 15:04, Jim Crate via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> On Oct 24, 2019, at 3:14 PM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
>> 
>> App built with v17R6. Trying to sign a built application gives this:
>> 
>> 20:07:01.341: Error 105553143319120 signing '/Users/jbr/Desktop/Final 
>> Application/PI calculator - Working/PI 
>> calculator.app/Contents/Resources/Internal User Components/4D 
>> Report.4dbase/Resources/Images/tbSave.png': Error Domain=NSPOSIXErrorDomain 
>> Code=9 "Bad file descriptor"
>> 
>> Is there some documentation on the topic?
> 
> I’ve used a script for signing for years, and have now added notarization to 
> it. I’ve never tried to use 4D’s signing when building functionality. 
> 
> This link from Apple describes the notarization workflow and also includes a 
> link to describe how to generate an app-specific password to use for 
> command-line notarization.
> 
> If you copy/paste this, the email app probably converted to curly quotes so 
> you’ll want to fix all the double-quotes. The script goes in the same folder 
> as the built app you want to sign. If you name it with a .command extension, 
> you can double-click to run it, and if you use a method to configure a 
> buildapp.xml project file and run BUILD APPLICATION, you can use LAUNCH 
> EXTERNAL PROCESS to automatically launch the script.
> 
> Jim Crate
> 
> 
> #!/bin/bash
> 
> cd "${BASH_SOURCE%/*}" || exit
> echo "current directory: `pwd`"
> 
> devID="Developer ID Application: James Crate (developerID)"
> appPath="./MyBuiltApp.app"
> 
> filename=$(basename -- "$appPath")
> appName="${filename%.*}"
> 
> if [[ -d $appPath ]]
> then
>  echo "signing $appPath"
>  # clean up by removing file system extended attributes
>  xattr -cr "$appPath"
> 
>  # sign application with developer signature
>  codesign --force --deep --verbose --sign "$devID" "$appPath"
> 
>  # check code-signing
>  echo "checking signing"
>  spctl -av "$appPath"
>  codesign --verify -v "$appPath"
> 
>  # zip with versioned name
>  version=$(/usr/libexec/PlistBuddy "${appPath}/Contents/Info.plist" -c 'Print 
> CFBundleShortVersionString')
>  zipName="./${appName}-${version}.app.zip"
>  echo "zipping to ${zipName}"
>  rm "${zipName}"
>  ditto -c -k --sequesterRsrc --keepParent "${appPath}" "${zipName}"
> 
>  echo "uploading for notarization"
>  xcrun altool --notarize-app --primary-bundle-id "com.vantine.MyBuiltApp.zip" 
> \
>--username "m...@example.com" --password 
> "@keychain:AC_PASSWORD_NotarizationScript" \
>--file "${zipName}"
>  echo "finished uploading, watch for result email"
> fi
> 
> # after notarization completes, run:
> # xcrun stapler staple MyBuiltApp.app
> 
> # This command stores a password in the keychain. The keychain item can also 
> be created manually.
> # xcrun altool --store-password-in-keychain-item 
> "AC_PASSWORD_NotarizationScript" -u "m...@example.com" -p 
> "generated_app_password"
> 
> 
> **
> 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: Error signing built app for Catalina

2019-10-25 Thread Jeremy Roussak via 4D_Tech
Thanks, Lutz. If only I had a copy of v18!

Jeremy

> On 25 Oct 2019, at 08:14, Epperlein, Lutz (agendo) via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Maybe this:
> 
> https://blog.4d.com/?s=notarization
> 
> Regards
> Lutz Epperlein
> 
> -Ursprüngliche Nachricht-
> Von: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] Im Auftrag von Jeremy 
> Roussak via 4D_Tech
> Gesendet: Donnerstag, 24. Oktober 2019 21:14
> An: 4D iNug Technical <4d_tech@lists.4D.com>
> Cc: Jeremy Roussak 
> Betreff: Error signing built app for Catalina
> 
> App built with v17R6. Trying to sign a built application gives this:
> 
> 20:07:01.341: Error 105553143319120 signing '/Users/jbr/Desktop/Final 
> Application/PI calculator - Working/PI 
> calculator.app/Contents/Resources/Internal User Components/4D 
> Report.4dbase/Resources/Images/tbSave.png': Error Domain=NSPOSIXErrorDomain 
> Code=9 "Bad file descriptor"
> 
> Is there some documentation on the topic?
> 
> Jeremy
**
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
**

Error signing built app for Catalina

2019-10-24 Thread Jeremy Roussak via 4D_Tech
App built with v17R6. Trying to sign a built application gives this:

20:07:01.341: Error 105553143319120 signing '/Users/jbr/Desktop/Final 
Application/PI calculator - Working/PI 
calculator.app/Contents/Resources/Internal User Components/4D 
Report.4dbase/Resources/Images/tbSave.png': Error Domain=NSPOSIXErrorDomain 
Code=9 "Bad file descriptor"

Is there some documentation on the topic?

Jeremy
**
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: Can a component access Filters/Formats of the Host?

2019-10-16 Thread Jeremy Roussak via 4D_Tech
Chip,

I’ve been using Pluggers API pack plugin and this method, which works fine for 
formats. It may be that OBJECT Get filter and OBJECT Get format would do what 
you want (from v15R5, according to the dox).

Jeremy



  // resolve a format name into its string

  // $1: name

C_TEXT($0;$1;$resolveName)
$resolveName:=$1
If (Substring($resolveName;1;1)="|")
$resolveName:=Substring($resolveName;2)
End if 

C_LONGINT($i;$err)
C_TEXT($root;$filterRoot;$name;$value)
C_BLOB($res)

  //%w-533.4 no "missing parameter to plugin" message from next line
$err:=API Get Indexed Resource ("ST4D";1;$res)

If ($err=0)
$res:=API Bag To XML ($res)
$root:=DOM Parse XML variable($res)
If (OK=1)
ARRAY TEXT($names;0)
$filterRoot:=DOM Find XML element($root;"bag/filters";$names)

For ($i;1;Size of array($names))
DOM GET XML ATTRIBUTE BY NAME($names{$i};"name";$name)
If ($name=$resolveName)
DOM GET XML ATTRIBUTE BY 
NAME($names{$i};"value";$value)
$i:=MAXINT
End if 
End for 

DOM CLOSE XML($root)
End if 

$0:=$value
End if 


> On 16 Oct 2019, at 19:44, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> title says it all
> 
> Thanks
> Chip
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Making a package of a built Mac volume desktop

2019-10-16 Thread Jeremy Roussak via 4D_Tech
On 15 Oct 2019, at 22:25, Paul Ringsmuth via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> One other thing. I notice that there is a _CodeSignature file in the app. I 
> think the app gets signed in the build interface. Does adding a data folder 
> to the app affect the code signing? 

I think so, yes. My understanding (which is superficial, I confess) is that 
codesigning must be the last thing done to a package before distribution. It 
does make sense.

Jeremy
**
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: Option click close box

2019-10-10 Thread Jeremy Roussak via 4D_Tech
Chip,

I don’t know what an “option close” would look like: there’s no such event, and 
anyway it doesn’t matter to a particular window if it’s being told to close 
because every window is closing or because it alone is closing.

They’re all in different processes; I’m still in “one process, one window” 
mode. I expect I’ll grow up one day, but not yet.

I’ll do some more digging and put together a simple DB which demonstrates 
exactly what happens. 



Miyako,

Yes, I think Keith was writing about ordinary clicks.

When I’ve written my pared-down database, I’ll try to open a case. Or do I have 
to be a partner?

Jeremy


> On 10 Oct 2019, at 22:59, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> Jeremy,
> does 4D post an option close to each window?
> 
> you could place an inis button on the form to catch it -
> you should not have to, but... it might stop the problem.
> 
> Are all the windows in the same process? or different processes?
> 
> Chip


> On 10 Oct 2019, at 23:01, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am a bit confused; so what Keith posted was just about regular (non-option) 
> clicks..?
> 
> as I posted earlier, I can not say if this is a bug or not.
> we can not find a 4D documentation that says explicitly that option-click 
> shall not invoke the event,
> your argument makes sense; maybe time to open a case with local tech support?
**
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: Option click close box

2019-10-10 Thread Jeremy Roussak via 4D_Tech
Miyako,

I am using your plugin, which is jolly useful! It provides handy visual 
feedback but other than that makes no difference.

I do have the “ask” checkbox in System Preferences checked (I confess I was 
completely unaware of it until now, so thanks for that).

In the 4D developer environment, of course, closing a “dirty” window just saves 
the changes without asking, so it doesn’t matter how it’s closed.

It seems to me that not sending an On close box event to a window which is 
about to be closed is at best unfortunate.

Jeremy


> On 10 Oct 2019, at 14:49, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hello,
> 
> I am out of my depth on this subject,
> 
> but would system preferences / general / ask whether to save changes before 
> closing document (unchecked by default)
> 
> make any difference?
> 
> for what it's worth, you can control the dirty bit and disable the close box 
> with this:
> 
> https://miyako.github.io/2019/10/01/4d-plugin-window-control-v2.html
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Option click close box

2019-10-10 Thread Jeremy Roussak via 4D_Tech
Miyako,

In pretty much every Mac application which can have multiple windows open, 
option-click on the close box of a window closes all the app’s windows, and as 
far as I can recall always has. It’s essentially synonymous with cmd-opt-W. Try 
Preview, for example.

In an app whose windows can be “dirty” (ie have unsaved changes), you should 
see a “save changes?” dialog for each dirty window. Again, try Preview and 
you’ll see what I mean. 

In 4D developer mode, option-click close has exactly the same effect as 
cmd-opt-W; all windows close.

In application mode, cmd-opt-w does whatever I program it to do; I don’t think 
there’s a default supported by 4D. That’s fine. Option-click on the close box 
closes all windows, including the splash, and puts me into developer mode. It 
may well be that that’s what it’s supposed to do, but I’d have expected open 
application windows to be sent On close box events. Otherwise, “dirty” windows 
can’t ask whether changes should be saved: they’re just summarily closed.

Jeremy

> On 10 Oct 2019, at 09:23, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> not the close box, but "Option-Command-W" is standard Apple shortcut.
> 
> https://support.apple.com/en-us/HT201236
> 
> no mention of option+close here:
> 
> https://support.apple.com/guide/mac-help/work-with-app-windows-mchlp2469/mac
> 
> I can not comment if the form event not firing or the splash window closing 
> is a bug or not.
> 
> do you get the same result with option+command+W?
> 
> 
> 
> **
> 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: Option click close box

2019-10-09 Thread Jeremy Roussak via 4D_Tech
Jodie,

I did look at the documentation for v17R5 but I found nothing describing events 
which would be sent on option-click close button. Do you recall where it was 
previously documented?

Jeremy

> On 8 Oct 2019, at 23:19, Jody Bevan via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Jeremy:
> 
> I have not looked in the last few versions of of the manual. It was 
> documented when the feature came out many years ago. I typically do not read 
> all the manuals over, just read the update notes. Sometimes I do have to go 
> back and read the documentation over again, but not that often.
> 
> I have not used it in a long time so the behavior you describe could be 
> happening.
> 
> Jody Bevan
> Argus Productions Inc.
> 
> 
>> On Oct 5, 2019, at 5:56 AM, Jeremy Roussak via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Is 4D’s response to option-click in a window’s close box documented? All 
>> windows close, which is as I’d expect, but they don’t seem to get sent an On 
>> close box event. Also, the default splash screen window closes and I drop 
>> out of application mode.
>> 
>> v17R5, Mac, running interpreted.
>> 
>> Jeremy
**
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: Option click close box

2019-10-08 Thread Jeremy Roussak via 4D_Tech
Nobody?

> On 5 Oct 2019, at 12:56, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Is 4D’s response to option-click in a window’s close box documented? All 
> windows close, which is as I’d expect, but they don’t seem to get sent an On 
> close box event. Also, the default splash screen window closes and I drop out 
> of application mode.
> 
> v17R5, Mac, running interpreted.
> 
> Jeremy


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

Option click close box

2019-10-05 Thread Jeremy Roussak via 4D_Tech
Is 4D’s response to option-click in a window’s close box documented? All 
windows close, which is as I’d expect, but they don’t seem to get sent an On 
close box event. Also, the default splash screen window closes and I drop out 
of application mode.

v17R5, Mac, running interpreted.

Jeremy
**
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: v15 - Array Object and Append array

2019-10-03 Thread Jeremy Roussak via 4D_Tech
Chip,

At a guess, because after INSERT IN ARRAY, $Columns{$i} is Null rather than {}. 
Try

$Columns{$i}:=New object

before the OB SET; or replace it with

$Columns{$i}:= New object ()

Jeremy


> On 3 Oct 2019, at 21:55, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> ok..
> why does this not work???
> 
> in a loop
> For ($i;1;$Column_Count)
>  INSERT IN ARRAY($Columns;1)
>  OB SET($Columns{$i};)
> end for
> 
> the first iteration is fine, and the $Columns{1} is assigned the 
> correct properties and values.
> However, the second loop results in $Columns{2} containing the 
> properties set in that loop, and $Column{1} as undefined; and each 
> subsequent loop iteration results in 1 - (N-1) array elements as being 
> undefined, and element N being defined with that loop's properties and 
> values.
> 
> Chip
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Silly question

2019-09-26 Thread Jeremy Roussak via 4D_Tech
I’m sure I must be having an episode of brain failure, missing an obvious call. 
I have a subform method, which is reacting to an On Bound Variable Change event.

I can get a pointer to the subform’s variable using OBJECT Get pointer(Object 
subform container). How do I get the name of the object (on the parent form) 
which holds the subform?

Jeremy

**
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: Folder path issues

2019-09-26 Thread Jeremy Roussak via 4D_Tech
You’ll like it, Chip. It (well, v17R5 anyway) has some really useful ways of 
dealing with files and folders.

> On 26 Sep 2019, at 12:58, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 
> Thanks for the info.
> 
> working towards v17...
> 
>> Hi Chip,
>> 
>> Just checked v17 and the returned path is correct. But in v15 the / 
>> character is missing.
>> I guess the 4D v15 path conversion method is faulty. Because macOS 
>> internally stores / character in file or folder names as :
>> 
>> Besides of having to live with it, two options:
>> - change your folder name
>> - upgrade to v17
>> 
>> Kind regards,
>> Koen
>> 
>>> Op 25 sep. 2019, om 22:47 heeft Chip Scheide via 4D_Tech 
>>> <4d_tech@lists.4d.com> het volgende geschreven:
>>> 
>>> I am testing some code. (Mac, 10.11.6 and 4D v15, NON posix file/folder 
>>> paths)
>>> as part of the test I select a folder (Select Folder), and then do some 
>>> actions with/on the resulting path.
>>> In this specific instance the path I retrieve is:
>>> Macintosh HD:Users:chip:Desktop:   tblutl_test_results:NEW folder for 
>>> testing*"\\:
>>> 
>>> However the actual folder path is:
>>> Macintosh HD:Users:chip:Desktop:   tblutl_test_results:NEW folder for 
>>> testing*"\/:
>>> 
>>> Note: 
>>> - the actual last character of the folder name is a '/'.
>>> - the OS was/is happy to allow the folder name.
>>> 
>>> As you should be able to see the path provided by Select Folder (first 
>>> path) is incorrect, and as such any attempt to manipulate the folder, 
>>> its contents etc is met with '... the file or folder path is invalid...'
>>> 
>>> Any Idea as to why the Select Folder command is returning an invalid 
>>> path?
>>> Is this a bug in v15 I'll have to live with?
>>> 
>> 
>> **
>> 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
>> **
> 
> Hell is other people 
> Jean-Paul Sartre
> **
> 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 FORM

2019-09-11 Thread Jeremy Roussak via 4D_Tech
Kirk,

As neither an attender nor a partner, I can’t see that presentation (yet; I 
assume it will become more generally available one day). I need to look more 
closely at DIALOG(*), but it does seem to me that CALL FORM can be pretty 
useful as a means of interprocess communication as well as inter-window.

However, the window ordering problem was caused, as so often, by my own idiocy 
and now that I can’t blame 4D for it, I’ve been forced to fix my 
self-introduced bug on my own.

Jeremy

> On 11 Sep 2019, at 20:58, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Jeremy,
> On Wed, Sep 11, 2019 at 1:13 PM Jeremy Roussak via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> ... CALL FORM as a method of interprocess communication. ...
> 
> 
> You might want to take a look at John Baughman's preso from the last
> Summit:
> https://kb.4d.com/assetid=78028
> 
> Long story short, CALL FORM is intended for comms between forms (or windows
> really). It's particularly great with windows in the same process. Multiple
> open forms in a single process is a new capability of DIALOG(*). This
> scheme works well with the ORDA tools. If you are doing classic 4D it's
> probably going to be a lot more fussy.
> 
> --
> Kirk Brooks
> San Francisco, CA
> ===
> 
> What can be said, can be said clearly,
> and what you can’t say, you should shut up about
> 
> *Wittgenstein and the Computer *
> **
> 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
**

CALL FORM

2019-09-11 Thread Jeremy Roussak via 4D_Tech
I’m dipping my toe in the water of CALL FORM as a method of interprocess 
communication. I have a form which displays some records (read-only) in a 
listbox and another form in which those records might be edited. After an edit, 
the second form sends a “redraw your list” to the first, which at this point 
may be anywhere among several open windows.

It seems to be working, in that the listbox is updated, but I’m finding that 
the first window (in whose context the method invoked by CALL FORM is run) 
jumps to the front. I don’t see anything in the documentation that suggests it 
will do that. It’s probably easy enough to work around, but I wonder: am I 
missing something?

Jeremy

**
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: v13 - Lists

2019-08-28 Thread Jeremy Roussak via 4D_Tech
Chip,

Perhaps if the naming isn’t case-sensitive, 4D isn’t picking up the change and 
is thinking that you haven’t made it. 

Try renaming to “fred”, switching to a different tab and back, and then 
re-renaming to the new capitalised version.

Just a thought.

Jeremy

> On 28 Aug 2019, at 17:01, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have a bunch of lists I use as contents for popup menus.
> I initially was not consistent with my naming convention, in some 
> instances using a leading capital and in other not.
> 
> I want to make them all the same (I know it doesn't have to be this 
> way...).
> I select the list I want to rename.
> right click
> select 'Rename'
> adjust the capitalization.
> 
> All looks good.
> I switch to a different 'tab' in the tool dialog, and back.
> The original capitalization has returned !?!?!?!
> 
> any ideas as to what is going on or why?
> 
> Thanks
> Chip
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Regex expert needed??

2019-08-23 Thread Jeremy Roussak via 4D_Tech
That’s rather what I thought, in which case it won’t work for Chip’s original 
query.

> On 22 Aug 2019, at 21:12, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Given 2 strings, 
> I want to find, and return, the longest substring which is the same in 
> both, regardless where in either string the longest substring starts.
> 
> ex: 
> 1- This is my dog
> 2- My dog does not have fleas
> longest common string is 'my dog’

1 - This is my  dog// note double space after “my” 
2 - My dog does not have fleas

longest common string is “ dog “ (and in Chip’s example, it’s actually “my dog 
“).

Jeremy

> On 23 Aug 2019, at 13:46, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> GET TEXT KEYWORDS breaks strings the same way as when you double-click a word 
> in a text editor.
> 
> spaces, tabs, etc. are boundaries,
> commas periods and apostrophes depend on the context.
> 
> e.g. (one word)
> 1,000,000 (one word)
> Macy's (one word)
> 
> http://userguide.icu-project.org/boundaryanalysis
> 
> 2019/08/23 21:39、Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>>のメール:
> What about double spaces?
**
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: Regex expert needed??

2019-08-23 Thread Jeremy Roussak via 4D_Tech
What about double spaces?

Jeremy

> On 23 Aug 2019, at 13:28, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Arnaud,
> Good point. If collections aren't available GET TEXT KEYWORDS would be the
> easy solution.
> 
> On Fri, Aug 23, 2019 at 3:20 AM Arnaud de Montard via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> 
>>> Le 23 août 2019 à 06:52, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>
>> a écrit :
>>> 
>>> And as I think about it you need to deal with the multiple match issue
>>> better:
>> 
>> Hi Kirk,
>> still not well awake and too lazy understand if your algorithm was based
>> on chars or words. If it's the former, I'd suggest the use of GET TEXT
>> KEYWORDS to produce 2 arrays of words to compare. In the resulting array
>> words keep ordered as in the text, it may help if the wanted match is the
>> sequence of words.

**
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: My 4D Experience Blog

2019-08-20 Thread Jeremy Roussak via 4D_Tech
Thanks as ever, Miyako. I’d missed that!

Jeremy

> On 20 Aug 2019, at 09:58, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> you know there is a popup to switch languages?
> 
> https://imgur.com/dFnn6H3
> 
>> 2019/08/20 17:49、Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> 
>> The dark background colour scheme is great, but poses difficulties for SQL 
>> code, which is subject to the “black on black” problem and rather tricky to 
>> read.. Is there a way of changing the colour of SQL code? I can’t see 
>> anything obvious in the preferences. V17R5.
> 
> 
> 
> 
> **
> 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: My 4D Experience Blog

2019-08-20 Thread Jeremy Roussak via 4D_Tech
The dark background colour scheme is great, but poses difficulties for SQL 
code, which is subject to the “black on black” problem and rather tricky to 
read.. Is there a way of changing the colour of SQL code? I can’t see anything 
obvious in the preferences. V17R5.

Jeremy

> On 8 Aug 2019, at 14:32, GI - AJAR via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi Everyone,
> 
> I would like to share with you my blog about my experience with this great 
> development tool (for those who didn’t see it yet).
> 
> I write my ideas, and experiences I can have within my company AJAR SA as a 
> consultant, first level support and 4D developer.
> 
> I wish to write more posts but it can be time consuming and time is always 
> missing. I have a growing list of stuff I would like to write on it, mainly 
> based on trying to explain how 4D work in deep. Let me know if you have any 
> ideas on how to improve my blog.
> 
> As a small gift for the readers, I have put a small spoil of what coming next 
> in the AJ Suite components. I’m sure it will be well appreciated in the 4D 
> community.
> 
> Here is the link : https://www.my4dexperience.com 
> 
> 
> Thanks for your attention.
> 
> Best Regards,
> 
> Gabriel Inzirillo
**
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: Amazon API

2019-08-18 Thread Jeremy Roussak via 4D_Tech
Dougie,

Thanks, but as I think you deduce, that’s not what I’m trying to do. I have an 
ordinary Amazon account; I use it quite a lot. I want to be able to get from 
Amazon a list of all the stuff I’ve ordered, using a formal API. There aren’t 
any data protection issues, as it’s my data (and, obviously, I’d expect to have 
to use my Amazon userID and password to get at any of it).

Currently, I use an AppleScript to obtain the “we have received your order” 
emails from Mail, then parse them using regular expressions. It sort of works, 
but it’s flakey as hell, in part because they keep changing the details.

Hey ho.

Jeremy

> On 16 Aug 2019, at 08:52, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Jeremy,
> 
> Re: Does anyone know if Amazon has any form of API which would allow 
> retrieval of all orders placed by a user with them between particular dates?
> 
> The answer to your very specific question is no.  But I would say if you are 
> willing to put in the work the answer is "kinda"...
> 
> http://docs.developer.amazonservices.com/en_UK/orders-2013-09-01/Orders_ListOrders.html
> 
> The date part is easy (if anything about MWS can be called easy) the specific 
> user would require you pulling the data apart.
> 
> Of course this is only in relation to a user placing orders against the 
> account/s you have API access to.  If you are asking generally for data on a 
> user placing orders anywhere in Amazon during a date period the answer is a 
> very firm no.  Not only is there no such API but if there were Amazon would 
> be contravening many international laws relating to data privacy.
> 
> Regards,  Dougie
**
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
**

Amazon API

2019-08-15 Thread Jeremy Roussak via 4D_Tech
Does anyone know if Amazon has any form of API which would allow retrieval of 
all orders placed by a user with them between particular dates?

Jeremy

**
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: v13 - array listbox column Compiler definition

2019-08-11 Thread Jeremy Roussak via 4D_Tech
Understood. I don’t think you can do what you want directly.

How about this?

- declare several arrays inside the component, of various types (text, longint, 
real…);
- get the type of array being passed, using Type;
- in a Case of block, set a pointer to whichever internal array matches the 
host’s array;
- use the pointer for the LISTBOX INSERT and the COPY:

LISTBOX INSRT 
COLUMN(lb_Listbox;1;"obj_Listbox_Column1”;$myArrayPtr->;"obj_Col_Header";Col_Header)
COPY ARRAY($Host_Data->;$myArrayPtr->)

Jeremy

> On 9 Aug 2019, at 15:44, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> Hi Jeremy,
> I do not want to manipulate the original array(s) as this is in a 
> component. I am handling the data blindly, additionally, even if I 
> use(d) the source array(s) directly - I still have the same problem.
> 
> How do I (compiler) declare the column variable? (in the example below 
> Listbox_Column1).
> 
> Conceptually...
> The incoming data can be any type of data displayable in a listbox. 
> 
> Practically...
> Due to the context, the most likely data types are Text, or numeric 
> (Long or real), and the 2 data types are still not compatible from a 
> compiler view point.
> 
> What I have done as a workaround - until/if - I find a different way of 
> handling this, is to declare the column variable as a Text array, and 
> then convert - if necessary - from whatever data type the source is.
> Not the most efficient, but it is functional.
> 
> Chip
> 
> On Fri, 9 Aug 2019 11:06:00 +0200, Jeremy Roussak via 4D_Tech wrote:
>> Chip,
>> 
>> Why do you need to use a copy of the data in the component? Why not 
>> just use $HostData-> in the call to LISTBOX INSERT COLUMN? 
>> 
>> Jeremy
>> 
>>> On 8 Aug 2019, at 20:59, Chip Scheide via 4D_Tech 
>>> <4d_tech@lists.4d.com> wrote:
>>> 
>>> I have a component.
>>> In the component, I have a published (shared) method which opens an 
>>> array listbox in its own window.
>>> 
>>> The data to be shown is passed from the host.
>>> I place the data from the host into the listbox using the following 
>>> commands
>>> LISTBOX INSERT 
>>> 
> COLUMN(lb_Listbox;1;"obj_Listbox_Column1";Listbox_Column1;"obj_Col_Header";Col_Header)
>>> copy array($Host_Data->;listbox_Column1)
>>> 
>>> How do I declare the array listbox_column1 so that:
>>> - the component will compile
>>> - the component will not complain once built and used with a host
>>> 
>>> Thanks for any insight
>>> Chip
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> ---
> 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: v13 - array listbox column Compiler definition

2019-08-09 Thread Jeremy Roussak via 4D_Tech
Chip,

Why do you need to use a copy of the data in the component? Why not just use 
$HostData-> in the call to LISTBOX INSERT COLUMN? 

Jeremy

> On 8 Aug 2019, at 20:59, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have a component.
> In the component, I have a published (shared) method which opens an 
> array listbox in its own window.
> 
> The data to be shown is passed from the host.
> I place the data from the host into the listbox using the following 
> commands
> LISTBOX INSERT 
> COLUMN(lb_Listbox;1;"obj_Listbox_Column1";Listbox_Column1;"obj_Col_Header";Col_Header)
> copy array($Host_Data->;listbox_Column1)
> 
> How do I declare the array listbox_column1 so that:
> - the component will compile
> - the component will not complain once built and used with a host
> 
> Thanks for any insight
> Chip
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v15R5 bug?

2019-07-31 Thread Jeremy Roussak via 4D_Tech
Kirk,

Thanks for your reply, which is interesting. This is what I’m doing. I wrote 
most of the code quite a while ago, before objects and before dynamic variables.

I have a component to handle listboxes. Its methods can be used in three ways.

1. The box is fully set up in the Form editor. The component’s routines are 
used mainly to record, without any more code, changes in sort order, column 
width and column order.

2. The box is designed in the component’s designer but lives in one of the 
host’s forms. A single call sets up all the columns and deals also with 
everything in option 1.

3. The box is designed as in (2), but lives in a subform containing a form in 
the component. At the host level, all that’s necessary to set up the box is to 
assign the box’s name (set in the designer) to the subform’s variable.

In the component, there’s a global array of objects in the form I described: 
{pointer to listbox; info object}. The info object holds column order, column 
widths, table/field IDs, column expressions and so on.

When the host calls the component’s methods (which include querying, sorting, 
handling clicks and double-clicks and so on), it identifies the relevant box by 
passing a pointer as a parameter. The component can then locate the info object 
for that box by searching on the pointer. Using Find in array with matched 
arrays (one of pointers and one of info objects), it works very nicely, but of 
course the arrays need to be kept in sync. The advantage to the host programmer 
is that listbox pointers can be used to call the component’s methods in the 
same way as 4D’s listbox methods.

Using the listbox variable name doesn’t work well when the box is on a host 
form because the component can’t see objects in the form; and it doesn’t work 
well when the box is in a subform, because they all have the same name. The 
advantage of pointers is that they are truly universal, usable in exactly the 
same way in host and component.

I bore you with the details only because I feel your detailed post merited a 
detailed response. 

Jeremy
**
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: v17R5 bug?

2019-07-29 Thread Jeremy Roussak via 4D_Tech
Miyako,

I’ll reply to Kirk’s long (and helpful) post with some more detail. There’s 
more than one way to skin a cat, I agree: but 4D shouldn’t crash if I ask it to 
search for a pointer, surely.

Jeremy

> On 29 Jul 2019, at 01:43, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> why not use a key value pair instead of a flat collection of pointers?
> 
>> 2019/07/29 2:16、John DeSoi via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> Disappointing because you can search for pointers in a pointer array, but 
>> not in a collection. And the above gives -1 implying that the search was 
>> completed rather than an error to indicate it is not supported.
**
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: v15R5 bug?

2019-07-28 Thread Jeremy Roussak via 4D_Tech
Typo: the .push line should push “info”; $info, of course.

And I’ve no idea where the > came from - 
it’s not in the message I sent.

Jeremy

> On 28 Jul 2019, at 17:20, Jeremy Roussak  wrote:
> 
> I hope this is a more sensible query than my last one!
> 
> I have a collection objects, each of which has a pointer to a variable and an 
> associated object:
> 
>   <>boxes.push(new object(“lb”; ->list; “box”; $info))
> 
> I want to find the item in the collection from the pointer, which is in $ptr
> 
>   $boxes:=<>boxes.query(“lb = :1”;$ptr)
> 
> When I run this, 4d crashes instantly on the query line. If I put a trace 
> just before that line, I can see that <>boxes contains only one item, which 
> is an object whose lb is the same as $ptr (it’s given in the debugger as 
> “->form_9_1C”). 
> 
> If I code it as
> 
>   for each ($box; <>boxes)
>   if ($box.lb = $ptr)
>   $result:=$box.info 
>   end if
>   end for each
> 
> It works fine.
> 
> Is searching for pointers not allowed?
> 
> Jeremy

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

v15R5 bug?

2019-07-28 Thread Jeremy Roussak via 4D_Tech
I hope this is a more sensible query than my last one!

I have a collection objects, each of which has a pointer to a variable and an 
associated object:

<>boxes.push(new object(“lb”; ->list; “box”; $info))

I want to find the item in the collection from the pointer, which is in $ptr

$boxes:=<>boxes.query(“lb = :1”;$ptr)

When I run this, 4d crashes instantly on the query line. If I put a trace just 
before that line, I can see that <>boxes contains only one item, which is an 
object whose lb is the same as $ptr (it’s given in the debugger as 
“->form_9_1C”). 

If I code it as

for each ($box; <>boxes)
if ($box.lb = $ptr)
$result:=$box.info 
end if
end for each

It works fine.

Is searching for pointers not allowed?

Jeremy
**
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: V17R5 Folder

2019-07-28 Thread Jeremy Roussak via 4D_Tech
Thanks, Arnaud. I must learn to read the documentation a little more carefully!

Jeremy

> On 28 Jul 2019, at 12:04, Arnaud init5 imap via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 
> 
>> Le 28 juil. 2019 à 12:07, Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com> 
>> a écrit :
>> 
>> In a component, can Folder(fk resources folder) be used to make a reference 
>> to the host's resources folder, not the component's resources folder? 
> 
> It seems the unavoidable * is here as usual: 
> <https://doc.4d.com/4Dv17R5/4D/17-R5/Folder.301-4280288.en.html>
> "If the command is called from a component, pass the optional * parameter to 
> get the path of the host database. Otherwise, if you omit the * parameter, an 
> empty string is always returned."
> 
> -- 
> Arnaud de Montard 
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

V17R5 Folder

2019-07-28 Thread Jeremy Roussak via 4D_Tech
In a component, can Folder(fk resources folder) be used to make a reference to 
the host's resources folder, not the component's resources folder? 

The analogy is with Get 4d folder(Current resources folder;*).

There’s an obvious workaround using Folder(Get 4d folder…), but it seems a 
shame to have to mix the two.

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

Dynamic listbox variables

2019-07-17 Thread Jeremy Roussak via 4D_Tech
The documentation for LISTBOX INSERT COLUMN indicates that if a nil pointer is 
supplied for the header variable, the variable will be created dynamically, but 
that this works only for array type listboxes.

The documentation for LISTBOX INSERT COLUMN FORMULA doesn’t indicate any such 
restriction.

In fact, supplying a nil pointer to LISTBOX INSERT COLUMN when adding a column 
to a selection box works perfectly well: a longint variable is generated.

Am I treading on dangerous ground in using a nil pointer in the non-formula 
version? Or is the documentation a little out of date?

Jeremy
**
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: Stuffing a shared object

2019-07-16 Thread Jeremy Roussak via 4D_Tech
Thanks, Keith. I had wondered about writing a method to copy each element of 
the non-shared object into the shared object, but couldn’t believe that there 
wasn’t a simpler way of doing it - hence my question. Clearly, I was wrong.

Jeremy

> On 16 Jul 2019, at 09:14, Keith White via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi
> 
> I know you've sorted out an elegant solution using CALL WORKER, but just in 
> case you do need to copy to a shared object or collection in the future, 
> please see https://kb.4d.com/assetid=78197
> 
> Best regards
> 
> Keith White
**
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: Stuffing a shared object

2019-07-15 Thread Jeremy Roussak via 4D_Tech
Kirk, you are so right. Thank you: after ten minutes’ work I have a solution 
which both works and is enormously more elegant.

Jeremy

> On 15 Jul 2019, at 17:05, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Jeremy,
> It's easy to keep trying to do everything the same way we have for years.
> That's why a list like this is so useful.
> 
> On Mon, Jul 15, 2019 at 9:01 AM Jeremy Roussak via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Kirk,
>> 
>> Now why didn’t I think of that? It’s exactly what CALL WORKER is for,
>> isn’t it?
>> 
>> Jeremy
>> 
>>> On 15 Jul 2019, at 16:44, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>
>> wrote:
>>> 
>>> Jeremy,
>>> I don't think this would be a good situation for using Shared objects.
>>> Every object in a shared object must itself be shared. There's a lot of
>>> overhead involved in maintaining the various lockers and such.
>>> 
>>> I would look at using CALL WORKER. Bundle up everything into an object
>> and
>>> pack it off to a worker. When the worker is done the results come back
>> via
>>> CALL FORM. This will be faster and easier.
>>> 
>>> 
>>> On Mon, Jul 15, 2019 at 8:27 AM Jeremy Roussak via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
>>>> I have a form which accepts some information and, when a button is
>>>> clicked, does some fairly time-consuming calculations which return a
>> set of
>>>> figures. At present, it uses objects with the Form object for input and
>>>> output data.
>>>> 
>>>> I’d like to hand off the calculations to a separate process. As I
>>>> understand it, I can’t pass the Form object to the new process but have
>> to
>>>> create a shared object.
>>>> 
>>>> How do I get the information from the Form object into the new shared
>>>> object? I’ve tried
>>>> 
>>>>   $shared.formObj := OB Copy(Form)
>>>> 
>>>> but it gives a error: “Not supported value in a shared object”.
>>>> 
>>>> Am I, as so often, missing something obvious?
>>>> 
>>>> Jeremy
>>>> **
>>>> 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
>>>> **
>>> 
>>> 
>>> 
>>> --
>>> Kirk Brooks
>>> San Francisco, CA
>>> ===
>>> 
>>> What can be said, can be said clearly,
>>> and what you can’t say, you should shut up about
>>> 
>>> *Wittgenstein and the Computer *
>>> **
>>> 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
>> **
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> What can be said, can be said clearly,
> and what you can’t say, you should shut up about
> 
> *Wittgenstein and the Computer *
> **
> 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: Stuffing a shared object

2019-07-15 Thread Jeremy Roussak via 4D_Tech
Kirk,

Now why didn’t I think of that? It’s exactly what CALL WORKER is for, isn’t it? 

Jeremy

> On 15 Jul 2019, at 16:44, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Jeremy,
> I don't think this would be a good situation for using Shared objects.
> Every object in a shared object must itself be shared. There's a lot of
> overhead involved in maintaining the various lockers and such.
> 
> I would look at using CALL WORKER. Bundle up everything into an object and
> pack it off to a worker. When the worker is done the results come back via
> CALL FORM. This will be faster and easier.
> 
> 
> On Mon, Jul 15, 2019 at 8:27 AM Jeremy Roussak via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> I have a form which accepts some information and, when a button is
>> clicked, does some fairly time-consuming calculations which return a set of
>> figures. At present, it uses objects with the Form object for input and
>> output data.
>> 
>> I’d like to hand off the calculations to a separate process. As I
>> understand it, I can’t pass the Form object to the new process but have to
>> create a shared object.
>> 
>> How do I get the information from the Form object into the new shared
>> object? I’ve tried
>> 
>>$shared.formObj := OB Copy(Form)
>> 
>> but it gives a error: “Not supported value in a shared object”.
>> 
>> Am I, as so often, missing something obvious?
>> 
>> Jeremy
>> **
>> 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
>> **
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> What can be said, can be said clearly,
> and what you can’t say, you should shut up about
> 
> *Wittgenstein and the Computer *
> **
> 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
**

Stuffing a shared object

2019-07-15 Thread Jeremy Roussak via 4D_Tech
I have a form which accepts some information and, when a button is clicked, 
does some fairly time-consuming calculations which return a set of figures. At 
present, it uses objects with the Form object for input and output data.

I’d like to hand off the calculations to a separate process. As I understand 
it, I can’t pass the Form object to the new process but have to create a shared 
object.

How do I get the information from the Form object into the new shared object? 
I’ve tried

$shared.formObj := OB Copy(Form)
 
but it gives a error: “Not supported value in a shared object”.

Am I, as so often, missing something obvious?

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

Silly question?

2019-07-12 Thread Jeremy Roussak via 4D_Tech
This may seem a silly question, but…


I have a listbox (selection type). It’s in a subform.
I get the names of the headers using LISTBOX GET ARRAYS into <>headerNames, a 
text array (it’s a global for debugging only).
I call OBJECT SET VISIBLE(*;<>headerNames{1};False).
In the debugger, I can see that OBJECT GET VISIBLE(*;<>headerNames{1}) changes 
from True to False.

Yet the listbox is drawn with the headers visible. 

I drop back into the debugger. OBJECT GET VISIBLE(*;<>headerNames{1}) is still 
False, yet there the headers are, plainly visible.

This is generic code; other instances of the subform behave as expected, with 
the headers visible or not visible as specified. Only this one instance doesn’t 
behave.

I’m bewildered! Is there a rational explanation?

Jeremy

**
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: Entity selection / collection listbox

2019-07-08 Thread Jeremy Roussak via 4D_Tech
Miyako,

Thanks. So if I’m writing entirely generic code to set up listboxes of any 
type, I need separate starting-point templates for entity selection boxes and 
collection boxes, just as I have separate templates for selection boxes and 
array-based boxes?

Jeremy

> On 8 Jul 2019, at 10:17, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> my understanding is that when you assign an entity selection (which is an 
> object, not collection)
> as the data source of a listbox,
> a kind of proxy collection is created to bind the entity selection to the UI.
> 
> basic features are common ("This" is an object and This.property is a value),
> but there are major differences between an entity and a regular object 
> (member methods, etc)
> so not all code can be agnostic, especially if you do more than display data.
> 
>> 2019/07/08 18:01、Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> 
>> Apologies if this is a silly question; I’m still trying to get to grips with 
>> ORDA.
>> 
>> As I understand it, an entity selection is an object. If I define a listbox 
>> whose source is “collection or entity selection”, must it be one or the 
>> other? In other words, can I change it at runtime from displaying a 
>> collection to displaying an entity selection?
> 
> 
> 
> 
> **
> 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
**

Entity selection / collection listbox

2019-07-08 Thread Jeremy Roussak via 4D_Tech
Apologies if this is a silly question; I’m still trying to get to grips with 
ORDA.

As I understand it, an entity selection is an object. If I define a listbox 
whose source is “collection or entity selection”, must it be one or the other? 
In other words, can I change it at runtime from displaying a collection to 
displaying an entity selection?

Jeremy
**
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: Apple Notarizing (Where is 4D documentation on how to notarize a 4D merged app?)

2019-06-16 Thread Jeremy Roussak via 4D_Tech
Over on the AppleScript users mailing list, Shane Stanley recently made the 
following announcement. I haven’t tried it but it’s probably worth a close 
look; he’s a good egg.

Jeremy

> On 9 May 2019, at 00:52, Shane Stanley  wrote:
> 
> SD Notary is a utility for notarizing apps, including script applets. You can 
> read more and download it here:
> 
> 
> 
> -- 
> Shane Stanley 
> , 
> 

> On Sun, 16 Jun 2019 at 16:09, Jeremy French via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Is there a Tech Note or Tip detailing the steps to submit signed 4D merged
>> app for notarization?
>> 
>> (Searching the knowledge base didn't find anything for "notarize" or
>> "notarizing")
**
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: Arrays in objects

2019-06-11 Thread Jeremy Roussak via 4D_Tech
Kirk and Lahav,

Thanks, both. I know rather more now than I did yesterday. 

One of the things I now know, sadly, is that it’s not possible to do what I 
want to do, which is to use arrays within an object as parameters to HTTP Get. 
There are plenty of other ways to skin that cat, though: I was merely trying to 
make some of my code look a little cleaner.

Jeremy

**
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: Arrays in objects

2019-06-10 Thread Jeremy Roussak via 4D_Tech
Kirk,

Thanks - very helpful. What I was hoping to do was to build a couple of text 
arrays in a method; return them in an object; and then use them directly in 
calls to HTTP methods, something like this:

C_OBJECT($headers)
$headers:=BuildHeaders // returns object containing matched arrays
$status:=HTTP Get($url; $response; $headers.names; $headers.values)

Is that possible, or must I extract the names and values arrays from the 
returned object before use? I’m using v17R4.

Jeremy

> On 10 Jun 2019, at 19:47, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Jeremy,
> Depends on which version you are using. If you are in v17 then 'arrays in
> objects' are essentially gone. They are collections now and you can use dot
> notation with collections.
> Otherwise, yes 'arrays' are still arrays within the object.
> 
> It's possible to mix the nomenclatures in v17. You _can_ define an object
> as use OB SET ARRAY but there is no advantage to doing so. It's much better
> to use collections.
> 
> C_OBJECT($o)
> $o:=New object
> $o.array:=New collection
> 
> $o.array.push(1) // $o: {array: [1]}
> 
> 
> $x:=$o.array[0]  //  $x = 1
> 
> If you have some array of longints you want to append you can call OB SET
> ARRAY($o;”array”;$arrayOfLongs) without an error and it will be a
> collection.
> You could also call ARRAY TO COLLECTION($o.array;$arrayOfLongs)
> 
> 
> On Mon, Jun 10, 2019 at 11:37 AM Jeremy Roussak via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Are arrays within objects rather second-class properties? I know that I
>> can put an array into an object using OB SET ARRAY, and I can retrieve it
>> (all of it) using OB GET ARRAY, but is that all?
>> 
>> Can I use dot notation to refer to the arrays themselves, or to individual
>> elements of the array?
>> 
>> C_OBJECT($o)
>> 
>> $o:=New object
>> OB SET ARRAY($o;”array”;$arrayOfLongs)
>> 
>> $o.array{1} - error
>> $o.array - error
>> $o[“array”] - error
>> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> What can be said, can be said clearly,
> and what you can’t say, you should shut up about
> 
> *Wittgenstein and the Computer *
> **
> 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
**

Arrays in objects

2019-06-10 Thread Jeremy Roussak via 4D_Tech
Forgive me if this is a silly question: I’m still very much feeling my way when 
working with objects (although growing to appreciate them more and more).

Are arrays within objects rather second-class properties? I know that I can put 
an array into an object using OB SET ARRAY, and I can retrieve it (all of it) 
using OB GET ARRAY, but is that all? 

Can I use dot notation to refer to the arrays themselves, or to individual 
elements of the array?

C_OBJECT($o)

$o:=New object
OB SET ARRAY($o;”array”;$arrayOfLongs)

$o.array{1} - error
$o.array - error
$o[“array”] - error

Am I missing something?

Jeremy
**
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: Zip Code API sites - Follow up

2019-06-04 Thread Jeremy Roussak via 4D_Tech
John, thanks very much; I shall investigate. One point: unless I’m missing 
something (not unusual) it’s not zipcodeapi.com <http://zipcodeapi.com/> (your 
first link) which has UK codes, but zippopotam.us <http://zippopotam.us/> (your 
second).

Jeremy

> On 3 Jun 2019, at 20:23, JOHN BAUGHMAN via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Jermy,
> 
>   Zipcodeapi.com has an API for Great Britain. Look at the list of 
> countries near the bottom of the page. Example URLs are shown in th list. 
> Here is a sample 4D call…
> 
>   $url:="http://api.zippopotam.us/GB/“+vZip. //AB1 for 
> example
>   HTTP Request(HTTP GET method;$url;$content;$oResponse)
> 
> John
> 
>> On Jun 3, 2019, at 8:59 AM, Jeremy Roussak via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Out of curiosity, does anyone know of an equivalent service for postcodes in 
>> the UK?
>> 
>> Jeremy
**
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: Zip Code API sites - Follow up

2019-06-03 Thread Jeremy Roussak via 4D_Tech
Out of curiosity, does anyone know of an equivalent service for postcodes in 
the UK?

Jeremy
**
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: Konstants - trying to determine where it is defined

2019-05-31 Thread Jeremy Roussak via 4D_Tech
Chip,

Constants defined in xliff files within installed components are also visible. 
That can be really useful.

Jeremy

PS: thanks for the [KC]onstants explanation. I’ve been wondering too.


> On 30 May 2019, at 22:13, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Thanks!
> 
> I didn't look in that folder
> 
> Chip
> 
> On Thu, 30 May 2019 20:44:34 +, Tai Bui wrote:
>> 4D's constants?
>> I believe its in the xliff located at
>> {4D vXX}\{4D, 4D Server, or 4D VD...}\Resources\en.lproj\4D_ConstantsEN.xlf
>> 
>> I only have INTL installed so the en might be different based on local.
>> 
>> Tai Bui
>> Technical Services Engineer
**
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: v17R4 infelicities

2019-05-15 Thread Jeremy Roussak via 4D_Tech
Miyako,

Yes, the expression is correctly evaluated and displayed; if it wasn’t, I would 
have used a rather stronger word than “infelicity”! Thanks for the explanation 
of what’s happening (wrapping). 

> On 14 May 2019, at 20:43, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> the expression is properly evaluated and functional without the parentheses.
> 
> it is a display issue in the WYSIWYG editor,
> where the formula is too long to fit in the field and wrapped after the minus 
> sign.
> 
> i.e.
> 
> -Form..a.aa
> 
> becomes
> 
> -
> Form..a.aa
> 
> you can confirm by extending the height.
> parentheses won't solve it.
> 
> by contrast, this does't wrap:
> 
> Form..a.aa*-1
> 
> 2 - try: -(Form.lastQ.outputVAT) or (-1 * Form.lastQ.outputVAT)


Chip, I agree that exit design means close it - it’s because all the design 
environment windows disappear that the option is so useful. In all previous 
versions of 4D, however, all the design window states were preserved and 
re-opened when dropping back into design, as you would expect. It’s a new issue 
in v17R4, I think. Try it with whichever version you’re using and you’ll see 
what I mean.

Jeremy

> On 14 May 2019, at 20:33, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> Not using v17(anything) ... but
> 
> 1 - exit design when going into application environment
> to me means close it up. I would try turning this off
**
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
**

v17R4 infelicities

2019-05-14 Thread Jeremy Roussak via 4D_Tech
I’m noticing two irritations with R4.

1. If I drop into Design mode from Application, open some method windows, then 
go back into Application with “exit design when going into application 
environment” checked, the newly-opened windows are lost when I next drop into 
Design mode, which is rather tedious. If I “restart interpreted” before going 
into Application mode, those windows are “locked” and remain open.

2. I have some variables whose expressions are properties of Form: 
Form.lastQ.outputVAT, for example. I want to display some as their negatives; 
when I set the expression to “-Form.lastQ.outputVAT”, only the - shows up in 
the form editor. 

Screenshot here: 
https://www.dropbox.com/s/w4mwp6ogqdh08j0/Screenshot%202019-05-14%2020.25.01.jpg?dl=0

Are these just me, or should I report them?

Jeremy
**
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: Printing structures

2019-05-10 Thread Jeremy Roussak via 4D_Tech
True. Canada is really very small: https://xkcd.com/2082/ 


Jeremy

> On 9 May 2019, at 22:35, Tom Dillon via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> John J Foster via 4D_Tech wrote:
> 
>> So that's why I have some tables that the size of Canada! 
> 
> It's in Mercator projection mode.
**
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
**

  1   2   3   >