RE: Controlling Laptop Camera from 4D

2018-11-12 Thread Timothy Penner via 4D_Tech
Hi Randy,

Have you tried these?

Tech Note: Camera Interface - Revised
http://kb.4d.com/assetid=77204

Tech Note: Camera Security Surveillance System in 4D
http://kb.4d.com/assetid=77659

-Tim







-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Randy Engle via 
4D_Tech
Sent: Monday, November 12, 2018 11:14 AM
To: '4D iNug Technical' <4d_tech@lists.4d.com>
Cc: Randy Engle <4d.l...@xc2.us>
Subject: Controlling Laptop Camera from 4D

I'm trying to run the camera on my laptop (Dell 7720) - yes - it's Windows

I thought that Win32API might be able to do this, but all I can see using 
TWAIN_GetSources are some scanners on my network.
So, apparently, my laptop camera is not a Twain or Wia device.

Thought Qpix might do this, but same, all I see are the scanners.

Camera on laptop is running, operatational, etc.

Anyone know if it is possible to control the on-board camera from within 4D 
using anything?

Thanks

Randy Engle


**
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: Mac Mojave and v17?

2018-11-12 Thread Dave Nasralla via 4D_Tech
Thanks for the feedback Randy and Jeff.

I sounds like there are some interface issues to be resolved. This
will be the server, and most all the clients will still be on 10.13. I
was surprise 4D was not certified for 10.14. It must take some time.

Dave
On Fri, Nov 9, 2018 at 3:32 PM Randy Jaynes via 4D_Tech
<4d_tech@lists.4d.com> wrote:
>
> 4D (v17 and all the way back to v13.5) is having some issues with an internal 
> MacOS drawing routine that is causing funkiness in:
> 1) ALP plugin drawing vertical text, the separator lines get a little 
> “squiggle” to them
> 2) ALP drawing checkboxes in a boolean column
> 3) SOME, not all, pictures displayed in the Toolbox Resources/Images 
> viewer don’t get drawn properly in the toolbox or on forms
>
> I’ve already submitted a bug with 4D tech support related to this.
>
> The 2 ALP issues are something tied to an internal plugin call, so it’s out 
> of their hands…they have to wait for 4D to fix it.
>
> This drawing issue appeared in the later versions of Mojave beta, about 2 
> weeks before the official release.
>
> It’s definitely something changed in MacOS that 4D has been using internally 
> for many years.
>
> Randy
>
> --
> Randy Jaynes
> Senior Programmer and Customer Support
>
> http://printpoint.com  • 845.687.3741 • PrintPoint, 
> Inc • 57 Ludlow Lane • Palisades, NY 10964
> Please send all email contacts to supp...@printpoint.com 
> 
>
>
>
>
>
> > On Nov 9, 2018, at 3:24 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com 
> > > wrote:
> >
> > Nothing too serious in my experience. There's some odd flickering when you 
> > resize windows, but I haven't had any functionality issues.
> >
> >> On Nov 9, 2018, at 3:18 PM, Dave Nasralla via 4D_Tech 
> >> <4d_tech@lists.4d.com > wrote:
> >>
> >> Anyone have any experience with this? I just picked up one of the new
> >> 6 core Mac Minis with 32GB of RAM. Just wondering if anyone is aware
> >> of any gotcha's or issues. I'll be running 64bit v17 apps and one v17
> >> 32bit app.
>
> **
> 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
> **



-- 
David Nasralla
Clean Air Engineering
**
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
**

Controlling Laptop Camera from 4D

2018-11-12 Thread Randy Engle via 4D_Tech
I'm trying to run the camera on my laptop (Dell 7720) - yes - it's Windows

I thought that Win32API might be able to do this, but all I can see using 
TWAIN_GetSources are some scanners on my network.
So, apparently, my laptop camera is not a Twain or Wia device.

Thought Qpix might do this, but same, all I see are the scanners.

Camera on laptop is running, operatational, etc.

Anyone know if it is possible to control the on-board camera from within 4D 
using anything?

Thanks

Randy Engle


**
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: Semaphores and Server-Side Data Updates in Multi-User Environment

2018-11-12 Thread Kirk Brooks via 4D_Tech
Hi Ben,
I do a lot of processing like this. I like to use the Execute on server
property for the method doing the processing. The structure is pretty
straightforward:

//  EOSmethod ( parameters ) -> text

// first off, check the semaphore

If (Not(Semaphore("specialMethod")))

READ ONLY(*)   //  put the tables you need in read write

//  --  do the work

CLEAR SEMAPHORE("specialMethod")

Else

$errMsg:="Sorry, another user is running this method."

End if

$0:=$errMsg

It's really a good idea to use an object at the parameter. You can return
results in that object too. To do so you want to pass a pointer to the
object. (That's not necessary when you pass an object on the client
machine.)

To accomplish the part about returning control to the user while this runs
you want to hand it off to a separate process on the client. This could be
done with a method like this:

// run_EOSmethod (parameters{;longint})

Case of
   :(Count parameters=1)  // called to start the process

//  only allow one instance of this per client

$pid:=Process number("run_EOSmethod")

If($pid=0)  // not running on this client

$pid:=New process("run_EOSmethod";0;"run_EOSmethod";$1;Current process)

else

  ALERT("The method is already running!")

end if


  :(Count parameters=2)  // this is running in a separate process

//  now we have a new process on the client

$errMsg:=EOSmethod($1)

--  do something with the $errMsg is necessary --

End case


I like this scheme because it's easy to setup and debug. The
"run_EOSmethod" is basically the launching method. You can see how passing
parameters in an object would give you a lot of flexibility.

It sounds like you've read up about EOS but a couple of things work keeping
in mind:

the method runs on the server in the 'twin' of the calling process

the twin has it's own current record, current selection and variables which
aren't shared with the client (includes IP vars)

be sure to unload any records accessed in the EOS method


This last point can be hard to figure out because Locked attributes tells
you who has the record locked but not whether it's locked on the client or
server in an EOS twin of a process.

On Fri, Nov 9, 2018 at 9:40 AM Ben Sokal via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Hello,
>
> Hoping someone can point me in the right direction as I've never done
> something like this before.
>
> We have a multi-user environment running v16r5. Through various means, a
> user can call a method that updates company-specific financial data. The
> problem is that it can take 30+ seconds and the user is left waiting until
> this finishes. What we want to do is this:
>
> - Return control to the user while the task runs in the background. We
> want the task to run on the server instead of on the client machine like
> it's currently doing.
> - If this user or a different user runs the task again for the same
> company, we need to queue it up somehow and do this after the previous
> processing finishes. If this user or a different user runs the task for a
> different company, we could either do the server processing at the same
> time since there's no data conflict, or queue it up if there is a risk of
> trying to do too many things at once.
>
> I've read the language manual and understand the syntax of semaphores,
> which is what I'm thinking I need to use (but am not completely sure).
> Beyond the syntax of commands, I don't know how to implement this. For
> example if I'm doing an "execute on server", is the semaphore going to be
> set on the client side before we call the server to run its method, or is
> it the server method that does the semaphore? Is this going to be a local
> semaphore or global? There are transactions involved in the actual
> processing...does this impact at all how I need to go about doing this?
>
> Thanks for any tips!
> Ben
> **
> 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
===

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

RE: Semaphores and Server-Side Data Updates in Multi-User Environment

2018-11-12 Thread Ben Sokal via 4D_Tech
Thanks Chip, this will be helpful! Unfortunately a different project just came 
up, so I can't actually start work on the semaphore project until I finish.

- Ben

> my outline for this would be as follows. I am not up to v16 yet, so 
> this will be a 'classic' solution, use of call worker might simplify 
> this.
>
> write a deamon (a process which spends most of it's life asleep), is 
> started at server startup.
>  Deamon :
>repeat loop
> examine IP array, or Object for data to process
>   if there is stuff to do
> do it
> remove processed item from Array/object
> if on a timed execution : Delay process(Delay time;Current process)
> if only as an on needed basis : Pause process(current process)
>until (Quit 4D)
>
>
> Add item to Array/object:
> (on client, adding)
>   Execute on server : method with needed values
> Set semaphore to protect array/object
>   add as needed
> clear semaphore
> wake deamon 
>   if (already running : wake (call process deamon process #))
>   else start deamon
>
> Remove Item from array/object (only runs on server, called from deamon):
>   Set semaphore to protect array/object
>  remove as needed
>   clear semaphore
>
> 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: 4Dv17 + Windows 10 + VirtualBox

2018-11-12 Thread Jeremy French via 4D_Tech
Hi Pat,

This reminds me of the the expression "The pump must be primed".

With respect to building merged client/server apps where clients wil run on 
both platforms, "the pump must be primed".

This means the initial client/server merge is performed on **each** platform. 
(This is the pump priming part.)

So build client/server **WITHOUT** checking "Automatic update". This means the 
initial merge must be done on **both** platforms.
1. Mac (producing mac server and mac client); and
2. Windows (producing windows server and windows client).

The initial installation will be:
1) Server on platform for which it was merged.
2) Mac clients which were merged on Mac OS.
3) Windows clients which were merged on Windows OS.

So the above is the first installation at the client site.

Thereafter, you can perform the server/client merged with automatic updating.

You need to perform subsequent server/client merges on **ONLY ONE** platform. 
(The pump is now primed.)

If you choose to work on the Mac platform:
1) Place a copy of the windows "4D Volume Desktop" on the mac next to the Mac 
"4D Volume Desktop".
2) In the "Build Application" window, check-mark "Allow automatic updates" for 
each client.
3) Click the elipsis button to specify the location of each "4D Volume Desktop" 
(mac and windows).

You will have a merged server app that can automatically update existing 
clients (on mac and also windows.)

If you choose to work on the Windows platform:
1) Place a copy of the Mac "4D Volume Desktop" on Windows next to the Windows 
"4D Volume Desktop".
2) In the "Build Application" window, check-mark "Allow automatic updates" for 
each client.
3) Click the elipsis button to specify the location of each "4D Volume Desktop" 
(windows and mac).

You will have a merged server app that can automatically update existing 
clients (on windows and also mac.)

Does this help?

Best regards,
Jeremy French



> On Nov 12, 2018, at 9:18 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Anybody else using this configuration?
> 
> I find that it works OK - although rather slowly - with one exception:
> When I compile a multi-user app, if I include the automatic client updating
> options for Windows and Mac, it does not compile the Client app. I get an
> error message "Cannot install the updater tool's manifest" and the Client
> folder is named "4D Volume Desktop" instead of what it should be name.
> 
> If I don't include the Client updating options, it compiles the Client and
> Server apps OK.
> I suspect it has something to do with the Mac Volume Desktop. I've tried
> copying it over to the Windows partitiion and selecting it there, and
> selecting it directly on the Mac partition - same problem occurs both ways.
> 
> Anybody else doing this, and have you done it successfully?

**
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: Placing a picture or graphic object

2018-11-12 Thread Chip Scheide via 4D_Tech
Peter,
here is code I use for moving things. it simplifies the whole process 
for me. I no longer have to remember exact syntax etc. 
Note you can use a pointer to a n active object (button, variable etc), 
or pass Nil as $1 and the object name in $4 for static objects (text, 
etc)

  //Project Method:  utl_Move_Object
  //$1 - Pointer - to object to move - if Nil, use object name passed 
in $4
  //$2 - Longint - absolute left location to place object
  //$3 - Longint - absolute top location to place object
  //$4 - Text (optional) - Object Name, only used if Nil pointer passed 
in $1

  //move an object to it's absolute left and top (supplied) position
  // ∙ Created 10/17/12 by Chip - 
C_POINTER($1;$Object_ptr)
C_LONGINT($2;$3;$New_Top;$New_Left;$Top;$Bottom;$Left;$Right)
C_TEXT($4;$Object_Name)

$Object_ptr:=$1

If (Nil($Object_Ptr))
$Object_Name:=$4
$Object_ptr:=OBJECT Get pointer(Object named;$Object_Name)
End if 
$New_Left:=$2
$New_Top:=$3

If (Not(Nil($Object_ptr)))
OBJECT GET COORDINATES($Object_ptr->;$Left;$Top;$Right;$Bottom)

$Right:=$Right+($New_Left-$Left)
$Bottom:=$Bottom+($New_Top-$Top)
OBJECT MOVE($Object_ptr->;$New_Left;$New_Top;$Right;$Bottom;*)
Else   //object to be moved is a text or other object which can't be 
referenced via pointer
OBJECT GET COORDINATES(*;$Object_Name;$Left;$Top;$Right;$Bottom)

$Right:=$Right+($New_Left-$Left)
$Bottom:=$Bottom+($New_Top-$Top)
OBJECT MOVE(*;$Object_Name;$New_Left;$New_Top;$Right;$Bottom;*)
End if 
  //End utl_Move_Object




On Sun, 11 Nov 2018 19:56:41 +, Peter Mew via 4D_Tech wrote:
> Hi
> I am creating a graphic  object, could be a line or rectangle or a picture.
> Having created it, how do I place it on the form where I Want it.
> Bear in mind Im on v13 and dont have access to object set coordinates, only
> move picture, transform picture, and object get coordinates.
> Object Move, using absolute coordinates, doesnt seem to work
> For Example I want to place a Grapic called "Cursor" at absolute
> coordinates ^0 pixels from the top of the form, and 55 pixels from the left
> edge of the form, no resizing.
> so I call
> $CursorPosPix:=55
> OBJECT MOVE(*;"<>Cursor2";$CursorPosPix;60;0;0;*)
> <>Cursor2 is a Vertical Line 1 pixel in width and 60 pixels high
> The result is a diagonal line starting at 0 pixels on the form and
> finishing at 60 pixels from the top and about 600 pixels from the left edge.
> Thanks
> -pm
> Mac Yosemite
> 4D v13.6
> **
> 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
**

4Dv17 + Windows 10 + VirtualBox

2018-11-12 Thread Pat Bensky via 4D_Tech
Anybody else using this configuration?

I find that it works OK - although rather slowly - with one exception:
When I compile a multi-user app, if I include the automatic client updating
options for Windows and Mac, it does not compile the Client app. I get an
error message "Cannot install the updater tool's manifest" and the Client
folder is named "4D Volume Desktop" instead of what it should be name.

If I don't include the Client updating options, it compiles the Client and
Server apps OK.
I suspect it has something to do with the Mac Volume Desktop. I've tried
copying it over to the Windows partitiion and selecting it there, and
selecting it directly on the Mac partition - same problem occurs both ways.

Anybody else doing this, and have you done it successfully?

Pat

-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
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: Placing a picture or graphic object

2018-11-12 Thread Peter Mew via 4D_Tech
Thanks
I hadnt appreciated the different syntax between the absolute and relative
modes
cheers
-pm

On Sun, Nov 11, 2018 at 8:56 PM Jeremy French  wrote:

> Hi Peter,
>
> Ok, so the line is 1px wide and 60px high. You want to keep the line's
> dimensions but relocate the line to top = 0, left =55.
>
> Use absolute coordinates (which occur when the asterisk parameter is
> present.)
>
> Specify the top left coordinates as (x=55, y=0)
> Specify the bottom right coordinates (x=55, y=60)
>
> So you end up with this call:
>
> MOVE OBJECT(*;”<>Cursor2”;55;0;55;60;*)
>
> Regards,
> Jeremy French
>
> On Nov 11, 2018, at 2:56 PM, Peter Mew via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
>
> I want to place a Grapic called "Cursor" at absolute
> coordinates ^0 pixels from the top of the form, and 55 pixels from the left
> edge of the form, no resizing.
> so I call
> $CursorPosPix:=55
> OBJECT MOVE(*;"<>Cursor2";$CursorPosPix;60;0;0;*)
> <>Cursor2 is a Vertical Line 1 pixel in width and 60 pixels high
>
>
>
**
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
**