Re: Migrating OS X server to Windows Server

2017-05-18 Thread Paul Lovejoy via 4D_Tech
Thanks to everyone for your help and advice.

The Power Sleep option was a killer. When we turned it off the 4D Server 
performance problems went away instantly. What a relief. Why on earth would 
Apple even have that option available and set to default on a server OS?

In any case, the immediate problem of running v12 on OS X 10.10.5 is resolved. 
Next step: install our upgraded databases on v15.


Paul



> Le 18 mai 2017 à 16:24, Myriad List via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Paul;
> 
> We have several instances of this specific problem.  I have several points 
> that may help your decision.
> 
> On April 4th of this year Apple announced that a new modular successor model 
> to the Mac Pro was being designed and would be available potentially 2018 
> because they were just starting work on it.  Now as we know Apple is super 
> tight lipped on product so we believe something shocked Apple into taking 
> this action including announcing what they were building.  I confirmed this 
> with an Apple Business rep and the news was published in several places.  The 
> successor will be modular and not based on the current cylinder.  It should 
> be a more worthy successor to the Pro Towers which while not rack mounted 
> were quite solid.
> 
> https://www.macrumors.com/2017/04/04/apple-updates-mac-pro-and-more/ 
> 
> 
> Secondly you can get decent refurbs of the Mac Pro Aluminums towers
> 
> Our 4D Server Mac clients really didn’t want to introduce Windows Server 
> unless it was absolutely necessary so with this news some are waiting it out 
> and some have purchased a “bridge” box in the meantime.  You can find very 
> capable Aluminum MacPro towers refurbished from macsales.com 
> .  The price is very reasonable and some can handle up 
> to 128 gigs ram.  2011 and 2012 units which can handle OSX 10.6.8 through 
> 10.11 are readily available.  Plenty of spare parts exist for redundancy, 
> including processors, video and power supplies.  You can get decent Xeon 
> 4,6,8 or 12 core boxes 3.46 Ghz.
> 
> John Bernhoft
> Myriad Systems llc
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

RE: Disable close button on Splash screen windows v12

2017-05-18 Thread Timothy Penner via 4D_Tech
Hi John,

I just ran some quick tests and I think the most likely scenario here is that 
you still need to assign a password to Designer (which is required to enable 
the 4D password system).

Enabling the 4D Password System is a requirement for many features in 4D that 
pertain to the users and groups, this includes managing plugin access, 
preventing users from cancelling the backup while it is running, and also the 
"Default User".

The "Default User" setting will be ignored if the 4D Password System is not 
enabled; meaning that anyone who opens the application will be automatically 
logged in as Designer.

-Tim



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

RE: V15.4 & Shy Server Syndrome?

2017-05-18 Thread Timothy Penner via 4D_Tech
Hi Doug,

You mention it happens with the source code too, so with regular 4D Server.exe 
- but what about a new blank structure file (this is to determine if the issue 
is specific to the structure or the application)?

If it does not happen with a new structure file then try commenting out the On 
Server Startup code in your structure file then test again. If it goes away 
then re-enable half of it and repeat until the offending code is found.

If it does happen with a new database then try clearing your preferences, maybe 
it is something in the Window Bounds folder?
http://kb.4d.com/assetid=77026

hope that helps narrowing it down - give us a call or open a case on 
taow.4d.com if you need additional help.

Tim



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

Re: Exploring CALL WORKER vs New process

2017-05-18 Thread David Adams via 4D_Tech
On Fri, May 19, 2017 at 4:41 AM, Timothy Penner via 4D_Tech <
4d_tech@lists.4d.com> wrote:

+1 Tim nailed it and offered a really clear explanation, I think.

I use workers in a headless mode without windows and use forms when I do
need a window.

In both cases, the 'messages' are *not* interrupts. They do *not* get
injected into a running routine. Instead, they are appended to the end of
the context's thread of control and are executed only when the rest of the
process is done. Or, more briefly, "What Tim said" ;-)

To keep in mind about workers:
* Workers are like New process in most ways, you're right about that.

* Workers don't die when their work is done, they wait. Wait for a block of
code to execute that is sent via CALL WORKER.

* CALL WORKER is, in practice, EXECUTE METHOD IN WORKER.

* There's a bunch of stuff in the manuals about preemptive mode which you
can ignore if you don't care about preemptive mode.

To keep in mind about forms:
* I don't know how it works internally, but there are functionally two
loops: Form event cycle and 'wait for code sent via CALL FORM' loops.

* Both of these internal loops are invisible to us and managed by 4D.

* They're not the same. There is no form event for CALL FORM.

* CALL FORM would be easier to understand as EXECUTE METHOD IN WINDOW.

* The call isn't picked up by the form, it's a method that executes in the
context of the process in the window that you've specified. The method has
access to all of the process values (variables, etc.) and the "form
variables" of the specific form in the specified window.

* CALL PROCESS+On Outside Call suck and always did. Now we have a better
alternative for messaging and it's easy to use. Yeah!

A couple of other points:
* Only workers and windows can receive calls, but anything can send calls.

* You can bridge communications to other places using a worker. Imagine
that you have a Web page or a log file that you want to update
automatically based on events on various forms or processes. Send all of
the info to a single worker and have that worker update the Web page. So,
the information is flowing from froms, processes, workers to your Web page.
The target worker takes care of the "bridge".

By the way Keith, it's great to see questions on this subject and to see
you thinking through a novel way of using the tools. (I hadn't thought of
what you proposed or ever tried it.) There are a lot of creative ways to
use these tools and a bit of a learning curve to absorbing what they do and
how. So thanks for sharing another spin on them.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Can't delete methods

2017-05-18 Thread Doug Hall via 4D_Tech
No, but when I went to the home tab, I couldn't find the methods -- not
even in the subfolders at the bottom of the list. Then, on a whim I looked
in the trash and there they were. Just to make sure I wasn't crazy, I went
*back* to the methods list, and there they were also. So, I double-checked
my list and then emptied the trash. Then, I think I tried to go back to the
methods list, but almost immediate received an error dialog saying, "The
method could not be loaded." I think I clicked the "Continue" button fifty
times, before deciding to throw in the towel and force-quit it. After
re-opening, the methods were gone, and I haven't had any related alert
dialogs, so far.

Maybe this account will help someone else, in the future. Just make a
backup (I have one) ahead of emptying your 4D trash, to be safe.

Thanks for the help!
Doug

On Wed, May 17, 2017 at 7:00 PM, Keisuke Miyako via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> have tried deleting those 4 methods on the home tab of Explorer, as
> opposed to the methods tab?
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: V15.4 & Shy Server Syndrome?

2017-05-18 Thread Jeffrey Kain via 4D_Tech
Is your server running with admin (or sufficiently high) privileges?

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


> On May 18, 2017, at 6:23 PM, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I *can* go through the rigamarole of fixing the window (it only happens at
> startup) but I'm wondering if there's something else I can do to fix this,
> apparently, visual-only issue.

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

V15.4 & Shy Server Syndrome?

2017-05-18 Thread Douglas von Roeder via 4D_Tech
Just rolled out an application in version 15.4 (Windows) and I'm seeing
what I'll refer to as the "shy server syndrome".

V15.3 was installed but I installed 15.4 to get past an issue resolved in
15.3. When I launch the source code, the compiled application, or the built
server application, the Admin window closes immediately after launch. This
did not happen in 15.3.

To reopen the Admin window to a usable state I have to resort to "minimize
window", which causes the Admin window to be minimized, then close the
window by clicking on the close box, then select the Administration window.

If I skip these steps and force the admin window to open, the window
displays a vertical rectangle on the left 90% of the window with the
monitor icon and the word "Monitor" below it and, in the right 90% of the
window are alternating medium gray and dark gray bands, with the Users icon
centered and the word "Users (0)" under the icon.

I *can* go through the rigamarole of fixing the window (it only happens at
startup) but I'm wondering if there's something else I can do to fix this,
apparently, visual-only issue.

--
Douglas von Roeder
949-336-2902 <(949)%20336-2902>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Disable close button on Splash screen windows v12

2017-05-18 Thread Timothy Penner via 4D_Tech
Hi John,

> Thanks but I am aware of these … trying to make sure I understand before I 
> spend time on it.
> I do have a group named “Admin” and that group has been assigned in database 
> settings.

Did you set a password for Designer?
^ This must be done in order to activate the 4D Password system.

Did you set a Default User in the security tab?
^ This allows the default users to bypass the login screen that would usually 
be seen after adding a password to Designer.

> In this case their wouldn’t be a 4D password dialog as there is a custom 
> login.
> So I need to assigning users to a 4D group programmatically after the custom 
> login.

Why do you need to assign users to a group after the custom login?

-Tim



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

Re: Query selection by example.

2017-05-18 Thread bob.miller--- via 4D_Tech
RE> Is there a way of doing a query by example, on an aleady queried 
selection
of records? I want to create a selection of records, based on some 
internal criterea,
and then present that selection, in the form of Query by Example, to the
user.

Sure, I use this method with great results (the argument is a pointer to 
the table you want to query, where there is already a current selection)

CREATE SET(vDefaultFile->;"TempSet")
QUERY BY EXAMPLE(vDefaultFile->;*)

If (OK=1)

If (Records in set("TempSet")>0)  //new 11/19/2014 - don't prompt 
to search in selection if there were no records in the selection

CREATE SET(vDefaultFile->;"ResultSet")
INTERSECTION("TempSet";"ResultSet";"ResultSet")
USE SET("ResultSet")
CLEAR SET("ResultSet")
Else 
  //do nothing
End if   //`records in set("TempSet")>0
End if //`OK=1 on Query by Example
CLEAR SET("TempSet")



Bob Miller
Chomerics, a division of Parker Hannifin Corporation




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

Re: Exploring CALL WORKER vs New process

2017-05-18 Thread Keith Culotta via 4D_Tech
OK - I have to take that back.  I recall that calling 
Dialog(TableOrProjectForm;plain window;*) always closed the window immediately 
after it was opened, unless it was called from a "main" window.  I just tried 
it anyway, and it stayed open.  

Will rethink...
Keith - CDI

> On May 18, 2017, at 3:36 PM, Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> In just about all UI processes Dialog(TableOrProjectForm;plain window) is the 
> only way a window gets opened.  I suppose this has simulated calling 
> DIALOG(*) from a [I forget what kind of] window.  These can call their own 
> DIALOG(*) windows too.  Wanting to use CALL WORKER would change that 
> approach.  It looks like it will be best to find a window number and use CALL 
> FORM after all.

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

Re: Exploring CALL WORKER vs New process

2017-05-18 Thread Keith Culotta via 4D_Tech
In just about all UI processes Dialog(TableOrProjectForm;plain window) is the 
only way a window gets opened.  I suppose this has simulated calling DIALOG(*) 
from a [I forget what kind of] window.  These can call their own DIALOG(*) 
windows too.  Wanting to use CALL WORKER would change that approach.  It looks 
like it will be best to find a window number and use CALL FORM after all.

Keith - CDI

> On May 18, 2017, at 2:26 PM, Timothy Penner  wrote:
> 
>>> Sure enough, Dialog puts the brakes on it.
>> Maybe using the * parameter to DIALOG will allow your design to function?
> 
> Actually, you would also need to remove the call to KILL WORKER because that 
> command will effectively close the open Window.

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

RE: Exploring CALL WORKER vs New process

2017-05-18 Thread Timothy Penner via 4D_Tech
> Sure enough, Dialog puts the brakes on it.

Maybe using the * parameter to DIALOG will allow your design to function?

-Tim




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

Re: Exploring CALL WORKER vs New process

2017-05-18 Thread Keith Culotta via 4D_Tech
Tim,

Sure enough, Dialog puts the brakes on it.

Keith - CDI

> On May 18, 2017, at 1:41 PM, Timothy Penner via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> For example, if the Worker is running DIALOG then the method will not 
> complete until after the window is closed. Like in your example:

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

RE: Disable close button on Splash screen windows v12

2017-05-18 Thread Timothy Penner via 4D_Tech
Hi John,

Maybe these will help?
http://kb.4d.com/assetid=76953
http://kb.4d.com/assetid=76767

-Tim




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

RE: Exploring CALL WORKER vs New process

2017-05-18 Thread Timothy Penner via 4D_Tech
Hi Keith,

> Communication to a process seems easier if the process is started using CALL 
> WORKER.  Not only can any of its windows be called with CALL FORM, but the 
> process can also be called with CALL WORKER, without knowing which window, if 
> any, is open.

I have not tried what you describe but the way I understand it is...

CALL WORKER doesn't actually communicate something to the running worker, 
instead it puts a message in the workers message box (Queue). The worker must 
finish its current task/method before checking the message box (Queue).
When the Worker is done with its current work (i.e. the method has completed) 
then the Worker checks the Queue for the next item to work on and then starts 
executing the next method.

So if you were trying to send a message to worker to have it unload a locked 
record, and the worker is currently executing a method, then the message would 
only be read AFTER the current worker method finishes executing...

For example, if the Worker is running DIALOG then the method will not complete 
until after the window is closed. Like in your example:

//--wOpen - displays the record on the screen
PROCESS PROPERTIES ( Current Process ; $key ; $p1 ; $p2 )// $key gets the 
Process Name
Query([Table];[Table]PriKey=$key)
$w:=Open Form Window("ShowRecord")
Dialog("ShowRecord")
KILL WORKER

The project method would be waiting for the DIALOG to be closed before 
continuing its execution (I assume this can be worked around by using DIALOG 
with a * parameter).

So, based on the above, I think it would be better to use CALL FORM to execute 
a method in the context of the open window, instead of placing a message in the 
Workers message box.

Just my 2 cents.

-Tim



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

Re: Exploring CALL WORKER vs New process

2017-05-18 Thread Keith Culotta via 4D_Tech
Kirk,

wOpen lets a user modify a record in a window in a new process.  This DB would 
have only a few records that could be picked from a floating list.

When the floating list process wants to change the record:
If the record is locked by a wOpen type process, the floating list could use 
CALL WORKER to send the change request to the process that has possession of 
the record.  If the record is not in use, the change could be made from the 
floating list (R/W, load record, change, unload, R/O).

To reduce chaos, a record will only be used by a single process.  
The process name would be the record's Primary Key.
No heavy processing, single user application.

Communication to a process seems easier if the process is started using CALL 
WORKER.  Not only can any of its windows be called with CALL FORM, but the 
process can also be called with CALL WORKER, without knowing which window, if 
any, is open.  

It got me to wondering if, in general, "CALL WORKER" has all the advantages 
over "New process" to manage processes.

Thanks,
Keith - CDI

--some corrections in the sample code below--

> On May 18, 2017, at 11:41 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Keith,
> 
> First off I'm not clear what the intent of wOpen is - are we modifying the
> record or simply displaying it?
> 
> If it's only being displayed you don't need CALL WORKER to change it - any
> process that can load it can change it. The issue becomes notifying the
> display process to refresh itself - which would probably be an On timer
> event (if you're running on 4D server it would have to be) or On outside
> call (or CALL FORM...) if it's standalone.
> 
> If wOpen is allowing the user to edit the record I'd say that's a bad idea
> to have outside processes modify a record the user has open - at least
> without the user having control and knowledge of what's going on. As I
> think about it if this is a case where you're handing off some processor
> intensive operation from the form you want to run by CALL WORKER and then
> get the results back that's plausible. Personally I'd rather have the input
> form receive the data and handle updating the record at the form level than
> allow another process to load, modify and unload the record.
> 
> It still seems like a lot of extra coding for not much benefit - but I may
> not fully get your intention. I do a lot of this sort of thing already
> using Execute on server to move the heavy processing off the client and
> avoid moving lots of data over the network.
> 
> On Thu, May 18, 2017 at 8:22 AM, Keith Culotta via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Are there good reasons to keep using "New process" in a situation like the
>> following, or can it be replaced by "CALL WORKER"?
>> 
>> //--Base process that shows a list of records from [Table].  Pick a record
>> and
>> $p:=New process("wOpen";0;[Table]PriKey;*)
>> 
>> //--wOpen - displays the record on the screen
>> PROCESS PROPERTIES ( Current Process ; $key ; $p1 ; $p2 )
>> Query([Table];[Table]PriKey=$key)
>> $w:=Open Form Window("ShowRecord")
>> Dialog("ShowRecord")
>> 
>> Now, "Base process" would like to tell the new process to change a value
>> in the record.
>> After "Base process" gets the value of $w, it could use "CALL FORM" to
>> accomplish that.
>> However, if I had used: CALL WORKER ( [Table]PriKey ; wOpen) instead of
>> "New process" to create the process, I could, with minor changes in wOpen,
>> use "CALL WORKER" to get the process to change the record's values.
>> 
>> //--process that shows a list of records from [Table].  Pick a record and
>> CALL WORKER ( [Table]PriKey ; wOpen)
>> 
>> //--wOpen - displays the record on the screen
>> PROCESS PROPERTIES ( Current Process ; $key ; $p1 ; $p2 )// $key Process Name
>> Query([Table];[Table]PriKey=$key)
>> $w:=Open Form Window("ShowRecord")
>> Dialog("ShowRecord")
>> KILL WORKER
>> 
>> Thanks,
>> Keith - CDI
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
> 
> *- Edmund Burke*

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

Re: How to trap a form save keystroke in an object method ?

2017-05-18 Thread Kirk Brooks via 4D_Tech
Peter,
How about adding a hidden button to trap for Enter key strokes?

I run all my active objects into a single project method (the 'form
controller' I like to talk about). So I'd have that button call the form
controller and handle the save code the same way the normal save event
would process. This also makes it easy to add a button to trap for the
return key.

On Wed, May 17, 2017 at 6:51 PM, Peter Jakobsson via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi
>
> I rarely come across this problem.
>
> Lets say you have a field with an “On Data Change” object method which
> does field level validation that rejects an entry.
>
> Lets says the form has a default button and the user clicked the “Big
> Enter” key (on the numeric keypad) which invokes a ‘save’ action.
>
> Here’s the problem:
>
>  • the field level validation rejects the entry and restores the ‘in
> range’ value that was already there
>  • but after executing the script 4D still ploughs on and tried to save
> the record
>  • the form level validations don’t trap the error condition because it
> was ‘put right’ at the field level, so 4D saves the form
>
> How can the ‘save form’ keystroke be arrested if the field level
> validation fails ? It appears that FILTER KEYSTROKE(“”) only works if you
> place it in the “On Before keystroke” event. It doesn’t work
> retrospectively after the “On Data Change” script has validated at field
> level.
>
> Peter
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

Re: Exploring CALL WORKER vs New process

2017-05-18 Thread Kirk Brooks via 4D_Tech
Keith,

First off I'm not clear what the intent of wOpen is - are we modifying the
record or simply displaying it?

If it's only being displayed you don't need CALL WORKER to change it - any
process that can load it can change it. The issue becomes notifying the
display process to refresh itself - which would probably be an On timer
event (if you're running on 4D server it would have to be) or On outside
call (or CALL FORM...) if it's standalone.

If wOpen is allowing the user to edit the record I'd say that's a bad idea
to have outside processes modify a record the user has open - at least
without the user having control and knowledge of what's going on. As I
think about it if this is a case where you're handing off some processor
intensive operation from the form you want to run by CALL WORKER and then
get the results back that's plausible. Personally I'd rather have the input
form receive the data and handle updating the record at the form level than
allow another process to load, modify and unload the record.

It still seems like a lot of extra coding for not much benefit - but I may
not fully get your intention. I do a lot of this sort of thing already
using Execute on server to move the heavy processing off the client and
avoid moving lots of data over the network.

On Thu, May 18, 2017 at 8:22 AM, Keith Culotta via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Are there good reasons to keep using "New process" in a situation like the
> following, or can it be replaced by "CALL WORKER"?
>
> //--Base process that shows a list of records from [Table].  Pick a record
> and
> $p:=New process("wOpen";0;[Table]PriKey;*)
>
> //--wOpen - displays the record on the screen
> $key:=$1
> Query([Table];[Table]PriKey=$key)
> $w:=Open Form Window("ShowRecord")
> Dialog("ShowRecord")
>
> Now, "Base process" would like to tell the new process to change a value
> in the record.
> After "Base process" gets the value of $w, it could use "CALL FORM" to
> accomplish that.
> However, if I had used: CALL WORKER ( [Table]PriKey ; wOpen) instead of
> "New process" to create the process, I could, with minor changes in wOpen,
> use "CALL WORKER" to get the process to change the record's values.
>
> //--process that shows a list of records from [Table].  Pick a record and
> CALL WORKER ( [Table]PriKey ; wOpen)
>
> //--wOpen - displays the record on the screen
> PROCESS PROPERTIES ( Current Process ; $key ; $p1 ; $p2 )// $key gets the
> Process Name
> Query([Table];[Table]PriKey=$key)
> $w:=Open Form Window("ShowRecord")
> Dialog("ShowRecord")
> KILL WORKER
>
> Thanks,
> Keith - CDI
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

Re: How to trap a form save keystroke in an object method ?

2017-05-18 Thread Keith White via 4D_Tech
Does FILTER EVENT work in this context?


Or REJECT(field) as someone has already suggested.

Best regards

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

RE: v15.4 to v15r5 gotcha - WP Area

2017-05-18 Thread Dennis, Neil via 4D_Tech
> $span:=" 800; font-size: 8px "+Char(Double Quote) +">"+$text+""

What you have is perfect, however there is a cool way to code the above line 
with less string math

 $span:=""+$text+""

I find this just as readable and easier to type, but the other way is just a 
personal preference over what you have :)

Neil










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

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

v15.4 to v15r5 gotcha - WP Area

2017-05-18 Thread Randy Engle via 4D_Tech
Just a small item, but it took a fair bit of time to sleuth it.

Here is the code I had in v15.4  (Windows)
Worked just fine

$span:=""+$text+""

Moved to v15r5
Did not recognize, font-weight or font-size

Had to change the "single-quotes" in the code above to Double Quotes in order 
for all to be recognized.

$span:=""+$text+""

Maybe this can help somebody save some time and headeache.

Randy Engle
XC2 Software LLC



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

Exploring CALL WORKER vs New process

2017-05-18 Thread Keith Culotta via 4D_Tech
Are there good reasons to keep using "New process" in a situation like the 
following, or can it be replaced by "CALL WORKER"?  

//--Base process that shows a list of records from [Table].  Pick a record and
$p:=New process("wOpen";0;[Table]PriKey;*)

//--wOpen - displays the record on the screen
$key:=$1
Query([Table];[Table]PriKey=$key)
$w:=Open Form Window("ShowRecord")
Dialog("ShowRecord")

Now, "Base process" would like to tell the new process to change a value in the 
record.
After "Base process" gets the value of $w, it could use "CALL FORM" to 
accomplish that.
However, if I had used: CALL WORKER ( [Table]PriKey ; wOpen) instead of "New 
process" to create the process, I could, with minor changes in wOpen, use "CALL 
WORKER" to get the process to change the record's values.

//--process that shows a list of records from [Table].  Pick a record and
CALL WORKER ( [Table]PriKey ; wOpen)

//--wOpen - displays the record on the screen
PROCESS PROPERTIES ( Current Process ; $key ; $p1 ; $p2 )// $key gets the 
Process Name
Query([Table];[Table]PriKey=$key)
$w:=Open Form Window("ShowRecord")
Dialog("ShowRecord")
KILL WORKER

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

RE: Migrating OS X server to Windows Server

2017-05-18 Thread Myriad List via 4D_Tech
Paul;

We have several instances of this specific problem.  I have several points that 
may help your decision.

On April 4th of this year Apple announced that a new modular successor model to 
the Mac Pro was being designed and would be available potentially 2018 because 
they were just starting work on it.  Now as we know Apple is super tight lipped 
on product so we believe something shocked Apple into taking this action 
including announcing what they were building.  I confirmed this with an Apple 
Business rep and the news was published in several places.  The successor will 
be modular and not based on the current cylinder.  It should be a more worthy 
successor to the Pro Towers which while not rack mounted were quite solid.

https://www.macrumors.com/2017/04/04/apple-updates-mac-pro-and-more/ 


Secondly you can get decent refurbs of the Mac Pro Aluminums towers

Our 4D Server Mac clients really didn’t want to introduce Windows Server unless 
it was absolutely necessary so with this news some are waiting it out and some 
have purchased a “bridge” box in the meantime.  You can find very capable 
Aluminum MacPro towers refurbished from macsales.com .  
The price is very reasonable and some can handle up to 128 gigs ram.  2011 and 
2012 units which can handle OSX 10.6.8 through 10.11 are readily available.  
Plenty of spare parts exist for redundancy, including processors, video and 
power supplies.  You can get decent Xeon 4,6,8 or 12 core boxes 3.46 Ghz.

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

Re: How to trap a form save keystroke in an object method ?

2017-05-18 Thread Koen Van Hooreweghe via 4D_Tech
Hi Peter,

Are you using the REJECT([table]field) command? Using the field parameter?
This should prevent any other object method/form method/automatic action to run.

HTH
Koen

Op 18-mei-2017, om 15:56 heeft Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
het volgende geschreven:

>> I think I probably need some kind of flag to let the form level 
>> validation know that it has to cancel the save action because it was 
>> invalidated at the field object level.




Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

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

Re: How to trap a form save keystroke in an object method ?

2017-05-18 Thread Chip Scheide via 4D_Tech
don't revert the 'Bad" value.

Enter : 9
hit 

On data change : - Alert("The value you entered '9' is invalid.")
Goto object(whateveritis called)

On Save : 
Test for bad value(s) - find bad value (from above) 
Reject
reset to good value, or clear


On Thu, 18 May 2017 11:29:34 +0200, Peter Jakobsson via 4D_Tech wrote:
> On 18 May 2017, at 05:50, Jody Bevan via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
>> Get rid of the auto save action. Then you can handle what ever 
>> situations you need to. We have not used auto action buttons for 25 
>> years.
> 
> Hi Jody
> 
> I have actually done that. It isn’t the problem here though - the ‘
> save’ is being done under program control, it’s just that by the 
> time the OK button script is executed the field-level script has 
> reverted the modification so the form level validation returns true.
> 
> EXAMPLE:
> 
>  • Lets say the acceptable input range for a field is 4-8.
>  • It currently holds the value = 5
>  • User enters 9 and hits Return to save the form
>  • 4D now does 2 events: 1=the field object “On Data Change” script 
> sees that 9 is out of range, shows an alert and reverts the value 
> back to 5
>  • 4D isn’t finished yet with its events. Having run the field level 
> script it now has to run the default form accept button script 
> (invoked by the user pressing return). It isn’t aware that the user’
> s entry was rejected at the field level, sees everything in range 
> (because the field script reverted it) and does an ACCEPT
> 
> I think I probably need some kind of flag to let the form level 
> validation know that it has to cancel the save action because it was 
> invalidated at the field object level.
> 
> Peter
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to trap a form save keystroke in an object method ?

2017-05-18 Thread Chip Scheide via 4D_Tech

On Thu, 18 May 2017 03:51:46 +0200, Peter Jakobsson via 4D_Tech wrote:
> Hi
> 
> I rarely come across this problem.
> 
> Lets say you have a field with an “On Data Change” object method 
> which does field level validation that rejects an entry.
> 
> Lets says the form has a default button and the user clicked the “
> Big Enter” key (on the numeric keypad) which invokes a ‘save’ 
> action.
> 
> Here’s the problem:
> 
>  • the field level validation rejects the entry and restores the ‘in 
> range’ value that was already there
>  • but after executing the script 4D still ploughs on and tried to 
> save the record
>  • the form level validations don’t trap the error condition because 
> it was ‘put right’ at the field level, so 4D saves the form
> 
> How can the ‘save form’ keystroke be arrested if the field level 
> validation fails ? It appears that FILTER KEYSTROKE(“”) only works 
> if you place it in the “On Before keystroke” event. It doesn’t 
> work retrospectively after the “On Data Change” script has 
> validated at field level.
> 
> Peter
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Accessing user groups in component

2017-05-18 Thread Chip Scheide via 4D_Tech
Thanks!

On Wed, 17 May 2017 19:44:55 -0400, Jeremy French wrote:
> 
> According to the documentation, you are seeing the host’s users and 
> groups from within the component.
> 
> From the documentation: "the 'Users and Groups' theme can be used 
> from a component but will read the users and groups of the host 
> database (a component does not have its own users and groups).”
> 
> See "Scope of language commands “ at bottom of page at:
> 
http://doc.4d.com/4Dv16/4D/16.1/Interaction-between-components-and-host-databases.300-3373444.en.html
 
> 

> 
> 
>> On May 17, 2017, at 4:11 PM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> in a component, what am I seeing? the component's user groups or the 
>> host database?
> 
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Query selection by example.

2017-05-18 Thread Peter Mew via 4D_Tech
Hi
Is there a way of doing a query by example, on an aleady queried selection
of records?
I want to create a selection of records, based on some internal criterea,
and then present that selection, in the form of Query by Example, to the
user.
thanks
-pm
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to trap a form save keystroke in an object method ?

2017-05-18 Thread Peter Jakobsson via 4D_Tech
On 18 May 2017, at 05:50, Jody Bevan via 4D_Tech <4d_tech@lists.4d.com> wrote:

> Get rid of the auto save action. Then you can handle what ever situations you 
> need to. We have not used auto action buttons for 25 years.

Hi Jody

I have actually done that. It isn’t the problem here though - the ‘save’ is 
being done under program control, it’s just that by the time the OK button 
script is executed the field-level script has reverted the modification so the 
form level validation returns true.

EXAMPLE:

 • Lets say the acceptable input range for a field is 4-8.
 • It currently holds the value = 5
 • User enters 9 and hits Return to save the form
 • 4D now does 2 events: 1=the field object “On Data Change” script sees that 9 
is out of range, shows an alert and reverts the value back to 5
 • 4D isn’t finished yet with its events. Having run the field level script it 
now has to run the default form accept button script (invoked by the user 
pressing return). It isn’t aware that the user’s entry was rejected at the 
field level, sees everything in range (because the field script reverted it) 
and does an ACCEPT

I think I probably need some kind of flag to let the form level validation know 
that it has to cancel the save action because it was invalidated at the field 
object level.

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