Re: iNUG Messages — Is it time for it to be more than just 'plain text' ???

2020-05-01 Thread Cannon Smith via 4D_Tech
Hi Chris,

Have you seen the new forums?

https://discuss.4d.com

They should do what you’re after.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On May 1, 2020, at 5:41 PM, Chris Belanger via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Do you think the iNUG would be so much more useful if it would support 
> messaging with font attributes (bold, colour, whatever) and images?

**
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: Backup Settings Not Saving

2020-04-10 Thread Cannon Smith via 4D_Tech
Thanks, Pat. I’ll report it again today.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Apr 9, 2020, at 5:25 PM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I'm sure I reported this as a bug some time ago, and I'm sure I was
> notified that it was fixed :) But I can't find the bug report and it has
> not been fixed in the version I'm using (v17r6).

**
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: Backup Settings Not Saving

2020-04-09 Thread Cannon Smith via 4D_Tech
Hi Tom,

Thanks for confirming. Yeah, it seems the other settings save correctly. Just 
this one.

Interestingly, I found the following bug fix for v17.3:

ACI0098925: "Backup settings do not save “Repeat after X seconds/minutes/hours” 
option: on Windows it is always 60 mn, on macOS it is always 0 mn (wich is 
worse because the 0 seconds will lead the backup log file to be flooded).” 
(https://bugs.4d.fr/fixedbugslist?Version=17.3)

A little different, since I’m seeing 0 seconds after each save attempt on 
Windows as well. And if it was fixed for v17.3, I would have expected it to be 
working in v17.3 HF3, so that’s confusing. Maybe it wasn’t really fixed.

Thanks for checking.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Apr 9, 2020, at 3:51 PM, Tom Benedict  wrote:
> 
> I can confirm the same thing in 4D Server 17.3 Build 17.244600.

**
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: Backup Settings Not Saving

2020-04-09 Thread Cannon Smith via 4D_Tech
Sorry, that should have been 4D v17.3 HF3.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Apr 9, 2020, at 3:32 PM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Anyone else seen this? Mac or Windows, v17 HF3.

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

Backup Settings Not Saving

2020-04-09 Thread Cannon Smith via 4D_Tech
I just noticed that the “If backup fails… Retry after x [units]” backup setting 
is set to 0 Seconds on all my servers. It used to be 5 minutes. So I tried 
changing it back to 5 minutes and save. If I reopen the settings dialog, I see 
that it is still set to 0 seconds. The setting change isn’t being saved!

Anyone else seen this? Mac or Windows, v17 HF3.

Thanks for any help.

--
Cannon Smith
Synergy Farm Solutions Inc.



**
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: Image Export Issues

2020-04-03 Thread Cannon Smith via 4D_Tech
So sorry to hear about your wife, Robert. I can’t imagine how tough that is for 
you. 

--
Cannon Smith

> On Apr 2, 2020, at 10:56 PM, Robert McKeever via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> So, to all, thank you. I needed a success - my wife of almost 39 years passed 
> away from a long battle (10 years or more) with Vascular Dementia. My 
> soulmate.

**
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: Another Signing/Notarization Question

2020-03-07 Thread Cannon Smith via 4D_Tech
Hi Jim,

Thanks for the ideas. I tried to codesign the file as part of the app’s signing 
process, but haven’t had any luck with that working. The alias idea is 
intriguing. I’m going to look into that.

Thanks.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Mar 7, 2020, at 8:17 AM, James Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Will the other apps work if you create an alias in the Contents folder and 
> move the file to the Resources folder? I’m not sure how 4D’s commands work 
> with aliases, or whether aliases need to be signed.
> 
>> So I’m wondering if there is a way to sign this file during the signing 
>> process. I’ve tried several variations of signing the file, but haven’t had 
>> any luck. I’m hoping someone knows of a way to sign a file like this so I 
>> don’t have to go down the difficult road of moving the file to another place.
> 
> My impression based on nothing more than all sample signing code I’ve seen 
> has done it this way, is that all subdirectory items must be signed before 
> the app bundle. So if you have to force sign the file, you likely have to 
> resign the app. But, you probably wouldn’t have to re-sign all other 
> sub-items like plugins and other bundles. So after the app is built, you 
> could run a script that signs that file and the app again.  So maybe 
> something like:

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

Another Signing/Notarization Question

2020-03-06 Thread Cannon Smith via 4D_Tech
Hi All,

Thanks to Miyako and Rob Laveaux updating some plugins I use, and other help, I 
now have all but one of my applications notarizing again since the recent Apple 
changes. The problem with the last application is that some years ago I started 
placing a small blob file (compressed XML, not an executable) just inside the 
Contents folder during a build. Of course, the recent rules don’t like files 
being inside the Contents folder.

I’m loathe to move this file somewhere else. Technically it is possible, but 
several applications rely on it so they would all have to be upgraded at the 
same time. And it affects the auto-update process itself which will cause 
issues for users trying to upgrade to the latest version.

So I’m wondering if there is a way to sign this file during the signing 
process. I’ve tried several variations of signing the file, but haven’t had any 
luck. I’m hoping someone knows of a way to sign a file like this so I don’t 
have to go down the difficult road of moving the file to another place.

Thanks for any ideas!

--
Cannon Smith
Synergy Farm Solutions Inc.



**
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-02-12 Thread Cannon Smith via 4D_Tech
Hi Miyako,

I have all my applications except one notarizing again since Apple’s recent 
changes. I appreciate you updating the  cURL FTP and System Notification 
plugins.

The application that isn’t notarizing has some other plugins that I’m hoping 
can be updated by their authors. I’m not sure what to tell them needs to be 
changed, though. Would you have time to explain what changes are necessary to 
make plugins notarizable now?

Thanks so much.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Feb 11, 2020, at 9:00 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> very curious to know if 3.9.v18 is successfully signed with the official 
> shell script.

**
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-02-12 Thread Cannon Smith via 4D_Tech
Hi Miyako,

I just tried and 3.9.v18 is successfully signed with the official shell script. 
Thank you for the changes!

I now have one application successfully notarizing again. Now I need to check 
my other applications to make sure they will still notarize. :-)

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Feb 11, 2020, at 9:00 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> very curious to know if 3.9.v18 is successfully signed with the official 
> shell script.

**
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-02-12 Thread Cannon Smith via 4D_Tech
Hi Jim,

Thanks. I’m now using the v18 Internet Commands and it is notarization 
correctly.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Feb 11, 2020, at 5:40 PM, James Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I didn’t verify that the v18 4DIC is on a newer SDK, I replaced a copy of the 
> plugin but the one from inside the 4D.app was being copied, so I ended up 
> with the same error because it was the same v17 4DIC. The PostgreSQL plugin 
> from Pluggers.nl is also on an old SDK, since it won’t notarize either I 
> didn’t try again.
> 
> I don’t see any reason the SignApp.sh script would skip the cURL plugin, 
> since it ends with .bundle it should be processed. You might want to add an 
> echo in the SignFile() function to print a list of all files it signs. Does 
> the plugin include a curl binary? Maybe it’s not in a location codesign 
> expects to find binaries and the error is misleading?

**
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-02-11 Thread Cannon Smith via 4D_Tech
Hi Erick and Jim,

Thanks for your thoughts. I’ve taken another approach which has solved most of 
my issues. Instead of navigating the package and calling LEP commands myself on 
each component, I’m now just using 4D’s SignApp.sh shell script. This handles 
all the general cases just fine. I do have some executables that I keep in my 
own resources folder which I sign manually (in code) before firing off 4D’s 
shell script. So the process looks like this:

- Strip extended attributes and remove any code signing that exists anywhere in 
the package
- Code sign the executables I keep in my Resources folder
- Call 4D’s SignApp.sh script (I’m using the one from 4D v18).
- Sent to Apple for notarization.

Doing this I’m now down to two errors:

issues": [
{
  "severity": "error",
  "code": null,
  "path": "FFE5A08083D54FDE8D0FBAB1A1E06060.zip/Herdly 
Team.app/Contents/Plugins/4D InternetCommands.bundle/Contents/MacOS/4D 
InternetCommands",
  "message": "The binary uses an SDK older than the 10.9 SDK.",
  "docUrl": null,
  "architecture": "i386"
},
{
  "severity": "error",
  "code": null,
  "path": "FFE5A08083D54FDE8D0FBAB1A1E06060.zip/Herdly 
Team.app/Contents/Plugins/cURL FTP.bundle/Contents/MacOS/cURL FTP",
  "message": "The signature of the binary is invalid.",
  "docUrl": null,
  "architecture": "x86_64"
}
  ]


I’m not surprised at the Internet Commands one and was hoping I could use the 
one from v18 which should overcome that. Haven’t tested that it works yet, but 
it sounds like Jim already did that if I understood correctly. I’m less sure 
what to do about the cURL FTP plugin. I know Miyako has it ready for 
notarization and I assumed 4D’s shell script would take care of plugins 
correctly, but maybe there is something I have to do manually with it.

Anyway, I’m much closer than I was yesterday. Thanks for everyone’s input.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Feb 11, 2020, at 8:28 AM, ericklui678 via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I was able to a notarize a v17 app yesterday by letting 4D handle the
> signing in the build application window with the "Sign application" option
> checked. This option will handle almost everything except the PHP libraries
> and InternetCommands.bundle (which can be substituted with the ones from
> v18). Try to avoid signing anything manually from terminal and let 4D handle
> the signing. This should cover the CodeEditor native component without
> issue.

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

New Notarization Issues

2020-02-10 Thread Cannon Smith via 4D_Tech
Hi Everyone,

A couple months ago I finally got my applications to notarize correctly. I’m in 
4D v17.3 HF3, but using the PHP libraries from v18. As you probably know, Apple 
made changes last week and my notarization code has stopped working. Here is 
one example of the errors I’m getting back now:

{
  "severity": "error",
  "code": null,
  "path": "B3A9E8C4BFA342E4B27E1E54538DEABA.zip/Herdly 
Team.app/Contents/Native 
Components/CodeEditor.bundle/Contents/MacOS/CodeEditor",
  "message": "The signature of the binary is invalid.",
  "docUrl": null,
  "architecture": "x86_64"
},

I have a log that spits out what is happening during signing. The relevant part 
is this:

> codesign --verbose --timestamp --deep  --sign Developer\ ID\ Application:\ 
> Cannon\ Smith\ \(Y5RAH3A6C3\) /Users/Cannon/Library/Application\ 
> Support/D9BE268668A4451A8FF411ADC94400CF/Standalone\ Build/Final\ 
> Application/Herdly\ Team.app/Contents/Native\ Components/CodeEditor.bundle

StdError: /Users/Cannon/Library/Application 
Support/D9BE268668A4451A8FF411ADC94400CF/Standalone Build/Final 
Application/Herdly Team.app/Contents/Native Components/CodeEditor.bundle: 
signed bundle with Mach-O thin (x86_64) [com.4d.component.CodeEditor]


Further, both "codesign —verify --verbose” and "codesign -vvv —deep —strict” 
indicate that the app is signed correctly, but notarization returns errors like 
above.

Does anyone know what I might be missing? This is very frustrating. :-(

Thanks.

--
Cannon Smith
Synergy Farm Solutions Inc.



**
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: catalina and 4D

2020-01-13 Thread Cannon Smith via 4D_Tech
Hi Chunk,

Make sure you are using at least v17.3 HF1. Anything prior to that is rather 
fruitless on a new machine.

HTH.

--
Cannon Smith
Synergy Farm Solutions Inc.



> On Jan 13, 2020, at 3:03 PM, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have new laptop that I bought without thinking too hard. It only tuns 
> Catalina. I am trying to run v17.3 and have some issues. Is anyone using 
> catalina and if so what might I do to fix the slowness I am seeing. Should I 
> be using an R  release and if so which one

**
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: v17.3 on Mac OS 10.15.2 Plugins "cannot be opened because the developer cannot be verified"

2019-12-12 Thread Cannon Smith via 4D_Tech
Hi Ken,

It is because the plugins aren’t notarized by 4D. If you move to at least v17.3 
HF1, you shouldn’t have a problem.

HTH.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Dec 12, 2019, at 11:20 AM, Ken Eyring via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> So far it's going fairly smoothly, but a few quirks have come up regarding 
> plugins.  When I launch v17.3 on Mac OS 10.15.2, I get the following alerts 
> for these 4D Plugins:
> 
> - "4D InternetCommands.bundle" cannot be opened because the developer cannot 
> be verified
> 
> - "4D ODBC Pro.bundle" cannot be opened because the developer cannot be 
> verified
> 
> - "4D for OCI.bundle" cannot be opened because the developer cannot be 
> verified
> 

**
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: Constants in code.

2019-12-09 Thread Cannon Smith via 4D_Tech
Hi Eric,

There is also a way to create constants in your code if you want. There is a 
tech note about it here:



HTH.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Dec 9, 2019, at 8:09 AM, Eric Naujock via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Can you define your own Constants? I would like to define constants in my 
> database to cover various groups for permissions. But what I am finding in 
> the docs for v17r6 says they are listed in the constants window. But there 
> does not seem to be anything that tells you how to create your own. Obviously 
> there must be a way to do so since there are constants for plugins. 

**
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: Doing a GOTO (widget) in the On Load event - stumped

2019-12-02 Thread Cannon Smith via 4D_Tech
No worries! :-)

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Dec 2, 2019, at 6:01 PM, Peter Jakobsson via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
>> Thanks Canon
> 
> …sorry, I mean “Cannon” of course ;)

**
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: Doing a GOTO (widget) in the On Load event - stumped

2019-12-02 Thread Cannon Smith via 4D_Tech
You’re welcome. Glad it worked.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Dec 2, 2019, at 5:58 PM, Peter Jakobsson  wrote:
> 
> Works a dream.
> 
> Thanks Canon. I had forgotten about SET TIMER. Suddenly these query forms are 
> perfectly user-intuitive. Start off in filter. Execute query with Return, 
> accept form with return also.
> 
> Could not be better…thanks for all the tips on here !
> 

**
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: Doing a GOTO (widget) in the On Load event - stumped

2019-12-02 Thread Cannon Smith via 4D_Tech
Hi Peter,

Depending on how the subform is set up, it may not be loaded by then. But it 
should work if you use SET TIMER(-1) and then call EXECUTE IN 
SUBFORM($subform;”ACTION”) in the timer.

HTH.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Dec 2, 2019, at 5:32 PM, Peter Jakobsson via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> To move the cursor into a widget (in fact a derivative of Miyako’s “search” 
> widget) I usually use a button with CTRL-F shortcut to call “EXECUTE IN 
> SUBFORM($subform;”ACTION”) and then have the “ACTION” call a GOTO OBJECT in 
> the context of the subform.
> 
> This works fine once the form is loaded but never works in the “On Load” 
> event of the widget’s host form. (Nor in the widget’s on load event which I 
> tried by way of completeness).
> 
> Think I’ve run out of leads so if anyone has any hints as to how to get this 
> to work I’d appreciate it !

**
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: Create SQL DB ERD from 4D Export Structure XML File?

2019-11-25 Thread Cannon Smith via 4D_Tech
Hi Tom,

As for Alexander’s code, I noticed the following sometime ago. Maybe something 
this simple is causing the blackness as well?

> Just a heads up on a bit of code that won’t work in countries that use a 
> decimal place instead of a comma. In the method xml_atts2ob, lines 50, 54, 
> 58, and 62 convert the decimal point in the height, left, top, and width of 
> the XML values to a comma. For values that have a decimal place, this can 
> make for some really, really big table widths and heights!

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Nov 25, 2019, at 6:00 AM, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Alexander’s code ended with a number of black tables.

**
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: ORDA/Collections

2019-10-30 Thread Cannon Smith via 4D_Tech
Hi Justin,

Have you taken a look at the extract function on collections? I think it would 
do what you want.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Oct 30, 2019, at 2:45 PM, Justin Will via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> $oRecs:=ds.Complex.query("Domain_ID = :1";_Domain_ID)
> $coll:=$oRecs.toCollection("ID, Name, Facilities.ID, Facilities.Name")
> $vtReturn:=JSON Stringify($coll)
> 

**
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 Github to Manage Distributed Development

2019-10-10 Thread Cannon Smith via 4D_Tech
I can’t think of any reason one would want to go back, either. Splitting the 
structure into files is something we’ve wanted for _so_ long and opens so many 
opportunities.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Oct 10, 2019, at 4:38 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> Yes, you're correct, currently the move from binary to Project format is one 
>> way, whether this will become bi-directional I don't know. It is still 
>> possible to compile back to a single binary though so the step to go from 
>> Project to interpreted structure binary should surely be possible??
> 
> This was asked to JPR at the last 4D World Tour show and his response was 
> “why would you want to do that?” And then he proceeded to explain that to 
> implement a feature like that would require many hours of engineering time, 
> and QA time and then it would have to be maintained into the future. 
> 
> So he said are no plans for a “project folder back to a single .4DB file” 
> feature. Only way to have the happen is to convince 4D it is a needed and 
> necessary feature. 

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

More Errors With RECEIVE BUFFER In v17

2019-10-01 Thread Cannon Smith via 4D_Tech
I’m wondering if anyone else has noticed an uptick in errors when using the 
RECEIVE BUFFER command to read from a serial port? Our application does a lot 
of serial port communication. We also log all errors. There has been a 
_significant_ uptick in errors that occur on the following line of code since 
we moved to v17:

RECEIVE BUFFER($tBuffer)

The error number reported is always -1. But if I look in the extra information 
the error is always one of these:

Error #: 995
Resource: WI32
Message: The I/O operation has been aborted because of either a thread exit or 
an application request.

Error #: 22
Resource: WI32
Message: The device does not recognize the command.

Users simply reconnect to the port and all is fine for awhile

Anyone know what might be going on?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




**
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: Rotate Picture

2019-06-22 Thread Cannon Smith via 4D_Tech
For all I remember you gave it to me! :-)

Glad it works.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Jun 22, 2019, at 6:28 PM, JOHN BAUGHMAN via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Your code looked vaguely familiar to me. I had not thought to look and see if 
> I already had a method to rotate pictures. Sure enough I do. Looks very 
> similar to yours, even uses the same  variable conventions. Perhaps you gave 
> this to me back in 2011?
> 
> In any event thanks. I am going to use your method as it is a bit more 
> compact than mine. Mine is a tad faster, however. I posted mine below for 
> comparison.

**
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: Rotate Picture

2019-06-22 Thread Cannon Smith via 4D_Tech
Hi John,

Here is the code from a method I use called Photo_Rotate:

  //This method rotates a picture. While it will rotate the picture to
  //any angle, this method is really expecting it to rotate 90˚, 180˚,
  //or 270˚.

C_PICTURE($1;$gPicture)
C_REAL($2;$rDegrees)  //Expects 90, 180, or 270
C_PICTURE($0)

$gPicture:=$1
$rDegrees:=$2

C_LONGINT($lWidth;$lHeight)
C_TEXT($svgRef;$imageRef)

PICTURE PROPERTIES($gPicture;$lWidth;$lHeight)
$svgRef:=SVG_New ($lWidth;$lHeight)
$imageRef:=SVG_New_embedded_image ($svgRef;$gPicture;0;0;".jpeg")

If (($rDegrees=90) | ($rDegrees=270))
SVG_SET_TRANSFORM_ROTATE ($imageRef;$rDegrees;($lHeight/2);($lWidth/2))
SVG_SET_TRANSFORM_TRANSLATE 
($imageRef;(($lHeight-$lWidth)/2);(($lWidth-$lHeight)/2))
DOM SET XML 
ATTRIBUTE($svgRef;"height";String($lWidth);"width";String($lHeight))
Else   //180
SVG_SET_TRANSFORM_ROTATE ($imageRef;$rDegrees;($lWidth/2);($lHeight/2))
End if 

$0:=SVG_Export_to_picture ($svgRef)
SVG_CLEAR ($svgRef)

HTH.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Jun 22, 2019, at 3:34 PM, JOHN BAUGHMAN via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> If not 4D commands, what is the quickest and easiest way to rotate a picture 
> in a picture variable? Anyone got code they could share?

**
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-08 Thread Cannon Smith via 4D_Tech
Hi Alexander,

This is great! Thank you for sharing.

Just a heads up on a bit of code that won’t work in countries that use a 
decimal place instead of a comma. In the method xml_atts2ob, lines 50, 54, 58, 
and 62 convert the decimal point in the height, left, top, and width of the XML 
values to a comma. For values that have a decimal place, this can make for some 
really, really big table widths and heights!

Again, thanks. Very useful tool.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On May 8, 2019, at 10:42 AM, Herr Alexander Heintz via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> needed something to print structures in a moderately configurable way.
> May have gone a bit overboard with the config options…
> It takes a XML structure dump and can stare presets and parsed structures.
> Also export to SVG, PNG and JPG
> Its V17Rx and you will find it here:
> 
> http://blog.heintz.net/wow-i-cant-believe-it/ 
> 
> 

**
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: Collections and Entity Selections Cheat Sheets

2019-05-07 Thread Cannon Smith via 4D_Tech
I made a small update to both cheat sheets, adding the syntax for the new "For 
each” command. I seem to get it mixed up a lot. :-) Update is here if anyone 
wants it:



--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada



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

Collections and Entity Selections Cheat Sheets

2019-04-30 Thread Cannon Smith via 4D_Tech
I’ve been using collections and entity selections more lately and notice I 
spend a lot of time in the docs trying to remember what function does what. 
Some of them aren’t named very intuitively (at least to me). And I keep 
forgetting which ones return a deep or shallow copy or use a query string or a 
method. So I made a couple of cheat sheets that organize the functions in a way 
that makes sense to me. Makes it a lot faster to find the function I’m after 
for a certain situation.

Anyway, perhaps they will be helpful to some of you as well. You can find the 
PDFs here:



I’m relatively new to these functions, so if my understanding needs to be 
corrected somewhere, please let me know!

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




**
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: Checking If Methods Are Preemptive Ready

2019-04-12 Thread Cannon Smith via 4D_Tech
Hi Wayne,

Thanks for the idea. So far the symbols files has provided what I need. Not as 
simple to parse as if it had been spit out in JSON, but okay. Mostly I’m trying 
to get an idea of which of my “foundation” modules are not thread safe, but 
could be.

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Apr 11, 2019, at 4:37 PM, Wayne Stewart via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I can't find the db I did this in but what I did was this:
> 
> METHOD GET PATHS(Path project method;$MethodNames_at)
> METHOD GET ATTRIBUTES($MethodNames_at;$Attributes_ao)
> 
> Create a new array with those that area already marked as preemptive
> safe.  Save it somewhere
> Then use METHOD SET ATTRIBUTES to set them all to preemptive safe.
> Compile and enjoy all the errors coming in.
> 
> You should be able to work through the list (slowly).
> If you run out of time reapply the original set of attributes from the
> initial call.
> 
> Then repeat until you've got everything that is safe labelled that way.
> 

**
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: Checking If Methods Are Preemptive Ready

2019-04-11 Thread Cannon Smith via 4D_Tech
Hi Dani,

I believe that preemptive capable in that context just means that you’ve set 
the method properties that way. I don’t think it means that if you tried to 
compile the code would actually work in a preemptive context. I’d be happy to 
be corrected if I’m wrong?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Apr 11, 2019, at 12:08 PM, Dani Beaubien 
>  wrote:
> 
> I am pretty sure that the METHOD GET ATTRIBUTES command will also return that 
> information.

**
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: Checking If Methods Are Preemptive Ready

2019-04-11 Thread Cannon Smith via 4D_Tech
Hi Vincent,

Perfect. Thank you very much!

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Apr 11, 2019, at 11:10 AM, Vincent de Lachaux via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> If you activate the generation of the symbol file in the compilation 
> preferences, compile your database then open the myDtabase_symbols.txt files 
> created near the structure file, All methods are listed at the end of the 
> file with the status "Thread Safe" or "Thread Unsafe".

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

Checking If Methods Are Preemptive Ready

2019-04-11 Thread Cannon Smith via 4D_Tech
Does anyone know if there is a way to get a list of methods that are (or are 
not) preemptive ready?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




**
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: Auto Updating 4D Not Working

2019-04-08 Thread Cannon Smith via 4D_Tech
Hi John,

Thanks for the suggestion. I actually use a temporary folder to place the “new” 
version before calling SET UPDATE FOLDER. But I use the same one for all my 
applications and it works for all the rest, so I doubt security issues on the 
folder is the issue.

Thanks anyway.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Apr 8, 2019, at 9:51 AM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> It is working for me with 17.1. The 4D application is in the Applications 
> folder and the update folder is a mounted disk image in the Downloads folder. 
> If you are using other types of paths, maybe try something like that? Perhaps 
> it could be a security restriction added by a recent macOS version. 

**
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: Auto Updating 4D Not Working

2019-04-05 Thread Cannon Smith via 4D_Tech
Hi Lutz,

Thanks for replying. I’ve been using this mechanism in several applications for 
a few years now. No problems with any of them except this specific instance. I 
can’t see that I’m doing anything different in my code than with the other 
applications. Wondering if you can remember more details about 4D not quitting 
fast enough. Are you saying the new version would launch before your old 
version could get shutdown?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Apr 5, 2019, at 2:01 AM, Epperlein, Lutz (agendo) via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> We use our own update mechanism (introduced before SET UPDATE FOLDER and 
> RESTART 4D).
> But we tested the 4D mechanism some time ago (I think it was with 4D v13 or 
> maybe v12).
> The main problem was, that the application after calling RESTART4D doesn’t 
> quit fast enough. And there was no way to adjust that. We never tested this 
> update way again, so I can't say it is better with more recent 4D versions. 
> Could that related to your problem?

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

Auto Updating 4D Not Working

2019-04-04 Thread Cannon Smith via 4D_Tech
I’m having trouble with one particular app auto updating. When it should be 
quitting, it just hangs forever.

4D v17.1HF1, macOS only. (It works fine on Windows). I’m using essentially the 
same code as in several other applications, also on v17.1HF1, but this is the 
only application that doesn’t work. Also, it was working in previous versions 
of 4D, but doesn’t now. With no code changes.

Here are the symptoms.

- I’ve verified that SET UPDATE FOLDER is setting OK to 1.
- Also verified (using SHOW ON DISK) that the path used with SET UPDATE FOLDER 
is correct and points to a .app bundle.
- Verified that Updater.app is created by 4D (did this by removing it and 
seeing it put back in on the next try).
- Verified that the On Exit method is completing correctly (using the debug 
logging).
- Noticed that Updater.app is not launched, nor is an updater log file created.

I’m guessing it is hanging when it is trying to launch Updater.app, but that’s 
only a guess. Since I can’t see what 4D is trying to do at this point, and 
because the same code is working with other applications and with this 
application on Windows, I can’t figure out what is wrong. Wondering if anyone 
has any ideas I could try?

Thanks.

P.S. It also takes a fair amount of CPU until force quit.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




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

2019-03-16 Thread Cannon Smith via 4D_Tech
Hi Miyako,

I do have the yearly membership and find it important to get our application to 
behave as closely as possible to what users expect. I often don’t have any 
contact with someone who downloads our software and if they see any kind of 
warning that looks fishy they won’t even try it out and I’ll never know the 
difference.

Thanks for the information. Another source of information that I found helpful 
was:


https://blog.zeplin.io/dev-journal-automate-notarizing-macos-apps-94b0b144ba9d

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Mar 15, 2019, at 8:29 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Note: You can code sign your App with the "Mac Developer" profile, which does 
> not require a $99 membership, just a free apple ID promoted to an Apple 
> Developer ID. The app will be flagged to be coming from an "unidentified 
> developer" but the user can still choose to run it. Im my opinion, there is 
> no reason for a 4D developer to not sign their app at least using this 
> option. You can also code sign a 4D for iOS app with this option, if you only 
> need to install and run your app on your own device. The $99 membership 
> enables the "Developer ID Application" and "Developer ID Installer" profile 
> and their iOS counterparts required for distribution via the App Store in 
> addition to ad hoc deployment to registered devices. The enterprise 
> membership enables distribution outside the App Store, so the two programs 
> are actually complementary, not mutually exclusive.

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

2019-03-15 Thread Cannon Smith via 4D_Tech
Hi David,

Thanks! I’m glad to know that it works. I wouldn’t be surprised if we need it 
this fall.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Mar 15, 2019, at 12:39 PM, David Ringsmuth  wrote:
> 
> I helped my client do this.
> 

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

2019-03-15 Thread Cannon Smith via 4D_Tech
Hi Jeff,

That’s a pretty safe statement to make! :-)

I’ll take a look. Thanks much.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Mar 15, 2019, at 12:57 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I think Miyako has something on his github account...

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

Apple Notary Service

2019-03-15 Thread Cannon Smith via 4D_Tech
Has anyone tried to notarize a built 4D application with Apple yet? Is it 
possible with 4D?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




**
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: Delay Worker Process

2019-03-14 Thread Cannon Smith via 4D_Tech
Hi Gabriel,

Part of what gets logged isn’t know at the time I know something needs to be 
logged. The code is easiest if I can say, “Hey, please log this situation” and 
have the actual logging happen a few seconds later. As I said, this is a quick 
a dirty injection of some logging code to track down a bug. Not the normal 
thing.

However, I changed my method of doing this yesterday so I’m not using workers 
anymore. Just a background process and some interprocess arrays. Not the cool 
new way, but it does work.

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Mar 14, 2019, at 1:03 AM, GI -AJAR  wrote:
> 
> Why do you need to run the check after few seconds?  We use this same kind of 
> worker to write logs in files. As you said, the worker assure the file not to 
> be opened. So in this contexte you know your file is accessible. You can 
> still have an error handler to handle the case where there is an unexpected 
> issue. We have a log table for those rare cases. 
> 
> I didn't try but a delay process should work in a worker but I would say it 
> is not optimal as it will make the stack of the messages to wait seconds 
> before to be processed. A worker should be fast so the next messages can be 
> process quickly. But it depend on the number of log request you send to the 
> worker. 
> 

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

Delay Worker Process

2019-03-13 Thread Cannon Smith via 4D_Tech
Hi Everyone,

I’m trying to do some quick and dirty logging to track down an issue at a 
customer’s site. As part of that I need to log some information to a file, 
always on the server. I figured the simplest would be to call a method each 
time I need to log some information and pass the info to it. The method has the 
Execute on Server property set so all logging happens on the server. I don’t 
want anything tied up waiting for the logging to happen, so I have the method 
call a worker process (on the server) and pass in the relevant information to 
it. The worker is responsible to run some checks, ensure the correct file 
exists, write the information to the file, and possibly send a Slack message. 
Using a worker also ensures that a file is not being opened by multiple 
processes at the same time.

So far all this works as hoped for and was simple to code. The problem is that 
the worker process needs to run the checks a few seconds _after_ the initial 
request to log information happened. Since the worker is just in a cooperative 
process I figured I could add DELAY PROCESS. But it seems not to work.

I could re-engineer the whole thing to use a background process in a loop on 
the server and some IP arrays or a table, but was hoping to keep it simpler. 
Does anyone know how to pause a worker process for a few seconds?

This is v17.1HF1.

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




**
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: 4D Server v17.1 and time change

2019-03-11 Thread Cannon Smith via 4D_Tech
Thanks, Jeff. I’ll be sending out 1 v17.1 build next month and hope to see the 
same thing. I still have the issue several times a week in v16r6.

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Mar 11, 2019, at 5:19 PM, Jeffrey Kain  wrote:
> 
> No, not at all since v17.0 initial release.
> 
> 
>> On Mar 11, 2019, at 7:07 PM, Cannon Smith  
>> wrote:
>> 
>> Thanks. Good to know it has been solid otherwise.
>> 
>> P.S. Have you seen the delayed process not waking up issue since moving to 
>> v17.1?
> 

**
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: 4D Server v17.1 and time change

2019-03-11 Thread Cannon Smith via 4D_Tech
Thanks. Good to know it has been solid otherwise.

P.S. Have you seen the delayed process not waking up issue since moving to 
v17.1?

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Mar 11, 2019, at 4:47 PM, Jeffrey Kain  wrote:
> 
> Nobody else has responded... so I guess it was just us. Or maybe not that 
> many are running client/server in v17.1 yet. Aside from this weird glitch 
> v17.1 has been very solid.
> 

**
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: 4D Server v17.1 and time change

2019-03-11 Thread Cannon Smith via 4D_Tech
Hi Jeff,

We had to relaunch all our servers for them to get the time update, but they 
are still on v16r6. I thought the daylight saving bug had been fixed in v17.1 
so I’m curious to know what you find if you get more information.

Good luck.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Mar 10, 2019, at 9:20 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Did anyone else have any weirdness with their 4D Server v17.1 and the change 
> to Daylight Savings Time this morning?

**
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: Denver Area Developers

2019-02-22 Thread Cannon Smith via 4D_Tech
I’m even closer that Steve in Alberta. I had no idea Denver was so big! :-)

--
Cannon.Smith
Synergy Farm Solutions Inc.
Aetna, AB Canada




> On Feb 22, 2019, at 1:49 PM, Stephen J. Orth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> If you count Madison, WI as part of Denver, then yes there are!  

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

2018-12-04 Thread Cannon Smith via 4D_Tech
Hi Jim,

Thank you very much. That gives me some direction on what I’ll need to look for.

Much obliged!

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




> On Dec 4, 2018, at 8:26 AM, Jim Hays via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Good graphics - 32 bit 17HF3:
> https://www.dropbox.com/s/0a9ccw3f4mgkqlp/4D%2017.0.229909%2032bit.png?dl=0
> 
> Still missing some text - 64 bit 17HF3
> https://www.dropbox.com/s/i2ybk23gbjhw7d4/4D%2017.0.229909%2064bit.png?dl=0
> 
> Original v17.0 64 bit release - crazy text:
> https://www.dropbox.com/s/cbblaypylkey4zn/4D%2017.0.225365%2064bit.png?dl=0
> 

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

2018-12-04 Thread Cannon Smith via 4D_Tech
Thanks for the list, Miyako. Very helpful.

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




> On Dec 3, 2018, at 5:16 PM, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> ACI0098799On macOS 10.14.x (Mojave), unexpected white vertical line is 
> displayed in the Administration window.
> ACI0098805Unexpected error "Could not open the specified document because it 
> is already in use" when saving a 4D Write and 4D View file on disk on macOS 
> Mojave 10.14 .
> ACI0098908In the method editor, the frame of the auto-completion suggested 
> window is no more displayed. On macOS 10.14.x only (Mojave).
> ACI0098954Issues with images badly rendered in 4D on macOS 10.14.x (Mojave).

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

2018-12-03 Thread Cannon Smith via 4D_Tech
Hi Jim,

Do you have more specific information about this issue?

Thanks.

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




> On Dec 3, 2018, at 2:54 PM, Jim Hays via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> We had a problem with SVG graphics in v17.0 on Mojave - fixed with v17 HF3.

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

2018-11-30 Thread Cannon Smith via 4D_Tech
Thanks John and Kirk. I appreciate the feedback. If anyone else has more 
information, feel free to chime in.

Thanks.

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




> On Nov 30, 2018, at 9:59 AM, John Baughman via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I had to convert all my pict format graphics, static and in the picture 
> library.  Otherwise 4D would crash when a form containing one or more of them 
> was displayed.
> 
> 16R6.. client is experimenting with a couple of clients running Mojave. So 
> far no complaints since fixing the pics. Not tried server yet. 

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

Mojave

2018-11-30 Thread Cannon Smith via 4D_Tech
I don’t believe 4D has released a version that is fully compatible with Mojave, 
unless I missed an announcement. But I’m getting outside pressure to upgrade 
from Sierra to Mojave and may have to do it anyway. From what I’ve heard, v17 
seems to work good enough for development at least in Mojave, but my main 
concern is v16r6. I’ll still need to do some development and building in that 
version for a couple months. Is anyone using that version in Mojave and could 
comment on how well it is working? (Comments about v17 in Mojave are also 
welcome.)

Thanks!

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




**
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: Current time (*) incorrect today on v17?

2018-11-05 Thread Cannon Smith via 4D_Tech
All of our customers also had to relaunch their servers yesterday. They are all 
on v16r6. Must be a new bug as I don’t remember this happening in the past.

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




> On Nov 4, 2018, at 12:01 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> This completely broke credit card processing until I could track this down. 
> Thanks for confirming that this is a widespread issue.

**
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: Longing IDs or UUIDs as primary key?

2018-10-24 Thread Cannon Smith via 4D_Tech
I've heard lots of comments over the years talking about how hard it is to work 
with UUIDs. I’d like to offer a different perspective. I switched to UUIDs from 
longints for primary keys 7 or 8 years ago. It took some careful programming to 
migrate the datafiles in place, but it was _so_ worth it. In all that time I’ve 
never once had to type in a UUID by hand. Instead, I just added the odd tool 
here and there that lets me copy a UUID to the clipboard. Then paste it for 
searching. As for looking for a UUID in a list, it’s pretty easy to look for a 
UUID by scanning for the first 2-3 characters and then checking that the last 
2-3 characters match. In 4D list boxes, a column can be set up to show an 
ellipsis in the middle of a string (instead of the end) when a column is too 
small. This is perfect for UUID columns. Just make them wide enough to only 
show the first and last 3 characters. Just as easy as a longint, really.

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




> On Oct 24, 2018, at 11:17 AM, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> No it is just painful let’s assume for some reason record in a many table 
> where assigns to wrong main table which would you rather type in to fix 
> 145764 or a 32 character UUID

**
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: Creating Windows Taskbar Icons with 4D Version Numbers

2018-08-16 Thread Cannon Smith via 4D_Tech
Thank, Tim. This is a great tip! In fact, it would make a good Tech Tip.

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




> On Aug 15, 2018, at 8:47 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Shortcuts for all the pinned taskbar items are in this folder. Simply change 
> the name of the shortcut to something meaningful and then restart Windows. 
> You must restart Windows so that it will reload the taskbar shortcut names. 

**
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: SVG IDs in Listbox Cells

2018-08-15 Thread Cannon Smith via 4D_Tech
Hi Arnaud,

No, I’m manipulating the picture directly inside the list box. Not as efficient 
as I like and I haven’t tried Miyako’s latest suggestion which might be more 
efficient, but the whole process only takes 1-2 milliseconds interpreted, so 
fast enough.

Here is more of the code (I’ve left out the code that handles tracking and 
hiding previously shown SVG elements:

GET MOUSE($lMouseX;$lMouseY;$lMouseButton)
LISTBOX GET CELL POSITION(lbRanchMetrics;$lMouseX;$lMouseY;$lCol;$lRow)
If ($lRow>0)
LISTBOX GET CELL 
COORDINATES(lbRanchMetrics;$lCol;$lRow;$lCellLeft;$lCellTop;$lCellRight;$lCellBottom)
$lMouseInSVGX:=$lMouseX-$lCellLeft
$lMouseInSVGY:=$lMouseY-$lCellTop
$SVGtID:=SVG Find element ID by 
coordinates(agRM_Graph{$lRow};$lMouseInSVGX;$lMouseInSVGY)
$tSVG:=SVG_Open_picture (agRM_Graph{$lRow}) 
$tRef:=SVG_Find_ID ($tSVG; SVGtID)
SVG_SET_ATTRIBUTES ($tRef;"visibility";"visible")
agRM_Graph{$lRow}:=SVG_Export_to_picture ($tSVG)
SVG_CLEAR ($tSVG)
End if

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




> On Aug 15, 2018, at 11:39 AM, Arnaud de Montard via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> BTW, it seems finally you use a picture var over the cell? Makes me think 
> that besides getting blind, my english is ununderstandable ;-)

**
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: SVG IDs in Listbox Cells

2018-08-15 Thread Cannon Smith via 4D_Tech
Hi Arnaud,

Thanks for those. I ended up doing it in a pretty simple way. Basically, in the 
list box On Mouse Move event:

GET MOUSE($lMouseX;$lMouseY;$lMouseButton)
LISTBOX GET CELL POSITION(lbRanchMetrics;$lMouseX;$lMouseY;$lCol;$lRow)
If ($lRow>0)
LISTBOX GET CELL 
COORDINATES(lbRanchMetrics;$lCol;$lRow;$lCellLeft;$lCellTop;$lCellRight;$lCellBottom)
$lMouseInSVGX:=$lMouseX-$lCellLeft
$lMouseInSVGY:=$lMouseY-$lCellTop
$SVGtID:=SVG Find element ID by 
coordinates(agRM_Graph{$lRow};$lMouseInSVGX;$lMouseInSVGY)
//Manipulate $tSVGID attributes
End if

Works like a charm!

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




> On Aug 15, 2018, at 7:53 AM, Arnaud de Montard via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 2 methods (c4d format) for that…

**
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: SVG IDs in Listbox Cells

2018-08-15 Thread Cannon Smith via 4D_Tech
Thanks, Jim. I have this working now, basically doing what you described.

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




> On Aug 15, 2018, at 3:36 AM, jim.dorrance--- via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I think there is an example of that on my website,In a demo to do database. 
> There is an SVG area over a list box and when the most moves I get the 
> coordinates, calculate the scrollbar positions and find the cell. I then find 
> the data associated with the hovered cell, clear whatever elements are 
> displayed in the SVG area, then read draw whatever is necessary in the SVG.

**
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: SVG IDs in Listbox Cells

2018-08-15 Thread Cannon Smith via 4D_Tech
Yes, this does work perfectly. Thanks.

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




> On Aug 14, 2018, at 6:15 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> the command
> 
> http://doc.4d.com/4Dv17/4D/17/LISTBOX-GET-CELL-COORDINATES.301-3730216.en.html
> 
> should be useful to place a picture object exactly over a listbox cell.

**
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: SVG IDs in Listbox Cells

2018-08-14 Thread Cannon Smith via 4D_Tech
Hi Keith,

I just tried a little test and, yes, it does seem to work. I’ll play with this 
some more and see if all the parts will come together.

Thanks!

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




> On Aug 14, 2018, at 8:52 AM, Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> $svg:=SVG_Open_picture (agRM_Graph{1})
> $ref:=SVG_Find_ID ($svg;"Value1")
> SVG_SET_ATTRIBUTES ($ref;"fill-opacity";"1";"stroke-opacity";"1")
> agRM_Graph{1}:=SVG_Export_to_picture ($svg)

**
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: SVG IDs in Listbox Cells

2018-08-14 Thread Cannon Smith via 4D_Tech
Thanks for everyone who commented on this.

It is actually _almost_ doable. With some math it is possible to figure out 
where the cursor is over a particular picture cell and "SVG Find element ID by 
coordinates” works in this context. For example:

$tID:=SVG Find element ID by coordinates(agRM_Graph{1};$x;$y)

returns the ID the mouse is over.

The part that does not work is the command SVG SET ATTRIBUTE. For example:

SVG SET 
ATTRIBUTE(agRM_Graph{1};"Value1";"fill-opacity";"1";"stroke-opacity";"1”)

does not work. This kills an idea I was _really_ hoping would work. Sigh.

I find it interesting that SVG Find element ID by coordinates works and SVG SET 
ATTRIBUTE doesn’t work in this context. It seems logical to me that either they 
would both work or neither would work in this context.

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




> On Aug 13, 2018, at 4:14 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> moreover, commands such as SVG GET/SET ATTRIBUTES,
> which are closely associated with ID based SVG manipulation,
> requires an object name or variable,
> but a cell inside a listbox are not accessible that way.

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

SVG IDs in Listbox Cells

2018-08-13 Thread Cannon Smith via 4D_Tech
You know how you can give SVG elements IDs and then use SVG Find element ID by 
coordinates during a click or mouse over event to figure out what element the 
mouse is over in an SVG picture? I’d like to do this, except that the SVG 
picture is in a list box. In fact, the list box has several of these SVG 
pictures in different rows and columns. So I need to detect which cell the 
mouse is over and then which SVG element within the cell the mouse is over.

There are a lot of pieces to this puzzle, some of which might not work in a 
list box context. Mainly I’m wondering if anyone has already tried this and 
proven that it _can’t_ work before I waste time working on it. Or if anyone has 
gotten it to work, I’d love to know that as well!

Thanks for any comments.

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




**
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: height and width of a fixed prtinted object

2018-08-07 Thread Cannon Smith via 4D_Tech
Hi Chuck,

If I’m understanding what you’re after, you just need to use the max width 
parameter with OBJECT GET BEST SIZE.

HTH.

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




> On Aug 7, 2018, at 8:58 AM, Charles Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> *OBJECT GET BEST SIZE*(*;"v_164_056_txt";$BWidth_l;$BHieght_L)

**
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: collection.min() Returns Null

2018-07-27 Thread Cannon Smith via 4D_Tech
Hi Steve,

FWIW, I'm only getting one copy of each message.

--
Cannon Smith

> On Jul 27, 2018, at 5:51 AM, Stephen J. Orth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> For the past few days I'm getting multiples of the same message, over and 
> over.  Today I received like 15 copies of this message.  Yesterday it was a 
> response from Jeff Kain.
> 
> Is this happening to anyone else?

**
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: collection.min() Returns Null

2018-07-26 Thread Cannon Smith via 4D_Tech
Hi Miyako,

Perfect! Thanks, that makes sense and works well.

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




> On Jul 26, 2018, at 3:27 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> in your case, you could do something like
> 
> $cTest:=$cTest..filter("remove_null")
> 
> where the project method remove_null is
> 
> C_OBJECT($1)
> 
> $1.result:=($1.value#Null)
> 

**
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: collection.min() Returns Null

2018-07-26 Thread Cannon Smith via 4D_Tech
Hi Christian,

Thanks. The values are a series that need to be graphed. Some values in a 
series may be null, indicating that the graph line should be skipped at that 
point since we don’t know what the value is. That’s why I decided to use 
C_COLLECTION instead of ARRAY REAL to hold the values. As I build the graph, I 
need to know the min and max values in the series.

Yes, I can loop through the collection, of course. I just figured the 
collection probably had a function that would allow me to reduce the collection 
to non-nulls before applying .min() or .max() without having to loop. Trying to 
learn how to use all the collection functions.

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




> On Jul 26, 2018, at 2:13 PM, Christian Sakowski 
>  wrote:
> 
> Yes, this is expected. You can only do a query() on a Collection with objects.
> Where do you get these values? You should select before to get only non-null 
> values or remove them from the collection with a For/Each-Loop.

**
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: collection.min() Returns Null

2018-07-26 Thread Cannon Smith via 4D_Tech
As a follow up, I thought I would try to remove the null’s from the collection 
use collection.query(), but I don’t know what to use for the query string since 
there are no named object properties in the collection.

$cTest:=New collection(100;200;Null;80)
$lMin:=$cTest.query("#null").min() //<—What should the query string be? 
Or should I be using a different function?

Anyone know what I should be doing here?

Thanks.

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




> On Jul 26, 2018, at 1:59 PM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I was surprised that the following code tries to return null instead of 80:
> 
> $cTest:=New collection(100;200;Null;80)
> $lMin:=$cTest.min()
> 

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

collection.min() Returns Null

2018-07-26 Thread Cannon Smith via 4D_Tech
I was surprised that the following code tries to return null instead of 80:

$cTest:=New collection(100;200;Null;80)
$lMin:=$cTest.min()

I would have expected that a Null value in the collection would be ignored when 
looking for the minimum value.

Is this what others are expecting or is this a bug?

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




**
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: POW Function

2018-07-25 Thread Cannon Smith via 4D_Tech
Hi Andrew,

Thanks for the answer. Also, thanks to Miyako and Jeremy. Spencer actually 
helped me get this figured out offline, but I didn’t realize we’d gone offline. 
So its all taken care of.

Thanks.

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




> On Jul 24, 2018, at 8:17 PM, Andrew Hickey via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> As Spencer mentioned you need to transform the log from a natural log to
> base 10.

**
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: POW Function

2018-07-24 Thread Cannon Smith via 4D_Tech
Hi Spencer,

Yes, it is! So simple. Thank you.

Perhaps some more help from someone? I’m trying to translate some code on the 
web into 4D. Here are the lines of code along with an explanation:

range = max - min;  
exponent = int(log(range)); 
magnitude = pow(10, exponent);
//So, for example, if your range is from 50 - 1200, the exponent is 3 and the 
magnitude is 1000.


In 4D I’m doing this:

$rRange:=1200-50
$rExponent:=Int(Log($rRange))
$rMagnitude:=10^$rExponent

But I’m getting an exponent of 7 instead of 3. Any ideas what I’m doing wrong?

Thanks.

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




> On Jul 24, 2018, at 10:19 AM, Spencer Hinsdale via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> is it caret?
> 
> 7^3
> 

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

POW Function

2018-07-24 Thread Cannon Smith via 4D_Tech
I’m looking for an equivalent function in 4D as the pow function in other 
languages. For example:




Does anyone know how to do this? My math is really rusty.

Thanks.

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




**
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: SVG Shape With No Background

2018-07-20 Thread Cannon Smith via 4D_Tech
> some time ago, we received a similar question from a customer,
> evidently it is intentional that opacity=0 is ignored (it is explicitly coded 
> that way).
> the explanation from the developer was that opacity=0 makes no sense and 
> "none" should be used instead.

I agree, it does make sense. I looked all over in the SVG documentation in the 
Colors and Gradients section and couldn’t find anything about using “none”. Who 
might I ask about adding that to the documentation as I think it would be 
helpful for others in the future?

Thanks.

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



**
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: SVG Shape With No Background

2018-07-20 Thread Cannon Smith via 4D_Tech
I guess I just needed to hit the Send button to figure it out. It turns out 
that I can pass “none” as a color. I don’t see it in the documentation 
anywhere, but the SVG component must just pass it through to the SVG layer. So:

$tRef:=SVG_New_circle ($tSVG;200;200;100;"red”;"none";10) 

gives me a circle with no background.

So, never mind! :-)

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




> On Jul 20, 2018, at 8:59 AM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>   $tRef:=SVG_New_circle ($tSVG;200;200;100;"red";"white:0";10) 
> //“white:0” = transparent

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

SVG Shape With No Background

2018-07-20 Thread Cannon Smith via 4D_Tech
Hi All,

What is the best way to draw a shape (circle, rectangle, etc.) without a 
background using the SVG component? I tried using a “transparent” color:

$tRef:=SVG_New_circle ($tSVG;200;200;100;"red";"white:0";10) 
//“white:0” = transparent

But it seems that if you pass a color like “white:0” where the transparency 
part after the colon is 0, it is ignored and the fill-opacity attribute is not 
set.

I can call SVG_SET_OPACITY after creating the shape and it will set it 
properly, but I wasn’t expecting to have to call another command to remove the 
background of an object. Is this the normal way of doing it? Is there a special 
color I can use that denotes transparent? Is “white:0” not working considered a 
bug?

Or is trying to set the transparency the wrong way to do it? I guess at the end 
of the day what I’m really after is for the XML to end up with this attribute:

fill=“none”

What is the best way of doing this?


Thanks.

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




**
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: Converting pictures on 4D forms (Windows) to get transparency

2018-07-09 Thread Cannon Smith via 4D_Tech
Hi Bob,

I haven’t tried this, but maybe this tip would do what you want?



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




> On Jul 9, 2018, at 9:20 AM, Bob Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> anyone have a recommendation for 
> fast technique that they've used that supports this "alpha channel' so I 
> can convert my non-transparent images so that they are transparent again? 
> It looks so bad having an arrow on a form with a big white background.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Moving Files With cURL FTP

2018-06-28 Thread Cannon Smith via 4D_Tech
Never mind, I have it figured out now. It would just be “/a/c” to get what I 
need.

Thanks again!

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




> On Jun 28, 2018, at 5:33 PM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> $name:="ftp://ftp.example.com/a/c” //A full path here???

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Fastest Feature Request Implementation Ever

2018-06-28 Thread Cannon Smith via 4D_Tech
Hi Kirk,

Thanks for the heads up. I’ll look for it.

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




> On Jun 28, 2018, at 6:37 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> There's a blog post and demo that's worth a look if you haven't already.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Moving Files With cURL FTP

2018-06-28 Thread Cannon Smith via 4D_Tech
Hi Miyako,

Thanks. I’ll go get the new version now and give it a try.

From your example on github, is this how you would move “c” up a level?

OB SET($options;\
"URL";"ftp://ftp.example.com/a/b/c";\
"USERNAME";"user";\
"PASSWORD";"pass")

$name:="ftp://ftp.example.com/a/c” //A full path here???

$error:=cURL_FTP_Rename (JSON Stringify($options);$name)

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




> On Jun 28, 2018, at 2:04 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> the code was based on the libcurl FTP example.
> 
> SFTP terminology is different to FTP (rename instead of RNFR/RNTO, rm instead 
> of DELE, rmdir/mkdir instead of RMD/MKD)
> 
> I've just made some changes to take that into account.
> 
> https://github.com/miyako/4d-plugin-curl-ftp/releases/tag/1.5
> 

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

Moving Files With cURL FTP

2018-06-28 Thread Cannon Smith via 4D_Tech
Does anyone know if Miyako’s cURL FTP plugin can move files? I need to get a 
list of files in a directory and then move them all up into the parent folder 
and I’m not quite sure how to do that with his plugin.

Thanks.

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




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

Fastest Feature Request Implementation Ever

2018-06-28 Thread Cannon Smith via 4D_Tech
Some of you may know that I use a mechanism in my windows where each window and 
widget on the window has its own “model” object. This can be passed into a 
window and then manipulated after the window closes. This logic applies to 
subforms as well and is set up so that when a subform is typed as a C_OBJECT, 
the subform container’s variable is also the subform’s “model” object. This is 
a _really_ handy way to work with subforms while keeping data associated with 
them part of the main window’s model.

Since 4D has implemented the “Form” object, I wanted to switch to using that 
instead of my hacky mechanism. The only problem is that I really wanted it to 
continue working with subforms in the same way as I’ve been doing it in the 
past. So I started to write up a feature request where, if a subform is typed 
as a C_OBJECT, then the subform container variable could be the same reference 
as the Form object from within the context of the subform.

As I was doing that I needed to double-check something about Form in the 
documentation and guess what? I found that 4D had already implemented Form in a 
subform context exactly as I was going to request! Fastest implementation of a 
feature request ever!

Thanks 4D. :-)



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




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

Re: Styled Text and QPDF Plugin

2018-06-18 Thread Cannon Smith via 4D_Tech
Hi Kirk,

Yes, I did talk to Rob. He was the one that directed me to the QPDF Draw Text 
command and the embedded possibilities. I was thinking the same as you—that it 
should be possible, but a lot of code. That’s why I was asking if anyone had 
already tackled it. I’d be willing to trade some code with anyone who had done 
this.

Thanks.

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




> On Jun 18, 2018, at 1:57 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I've been working with QPDF a lot recently. I took a look at that and it
> seemed pretty daunting. Have you asked Rob about it? There may be some
> subsection of DynaPDF (the package it's built on) to do such transforms.
> 
> It certainly seems possible to take the raw text, with the markup, and
> write something to transform the styles into the inline style options QPDF
> supports. Depending on how complex your pages are and how you need to place
> the text on the page it could work. In my case I needed to fit text into
> fairly specific areas which required calculating how much space text
> required prior to placing it. This would be very difficult, I think. But if
> you don't need that sort of fussy control probably more doable.
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Delay process bug

2018-06-18 Thread Cannon Smith via 4D_Tech
I can’t answer this for Justin, but we have both kinds hitting this bug. Some 
are rather complicated methods that potentially do lots of things. But several 
are very simple—just a few lines of code to check whatever it needs to check 
and then go back to sleep.

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




> On Jun 18, 2018, at 9:32 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I bet the bug is actually someplace else and is manifesting in this DELAY
> PROCESS bit. Which doesn't help you find it at the moment, though. Is the
> method running this process one of those big, complicated, gnarly types
> with all sorts of convoluted branchings and calls to numerous plugins and
> dependencies on lots of IP vars?

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Difference between OB Copy and :=

2018-06-14 Thread Cannon Smith via 4D_Tech
Thanks Miyako. I was able to test this this morning and found that it does 
indeed work in v17! That’s great.

Thanks.

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




> On Jun 13, 2018, at 9:21 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> off the top of *my* head I understand the fix is not limited to object 
> notation.
> 
> it was an optimisation made for wakanda server that somehow got lost on its 
> way to 4D object fields.
> 
> so it's a fix at the database level.
> 
>> 2018/06/14 11:54、Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> 
>> I haven’t had time to try this myself today, but do you know off the top of 
>> your head if this is only fixed when using dot notation? Or is it fixed when 
>> for the old style of code as well (when we had to traverse the object tree 
>> to the children, getting a reference to the child and then changing the 
>> child object without changing the parent object)?
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Difference between OB Copy and :=

2018-06-13 Thread Cannon Smith via 4D_Tech
Hi Tim,

I haven’t had time to try this myself today, but do you know off the top of 
your head if this is only fixed when using dot notation? Or is it fixed when 
for the old style of code as well (when we had to traverse the object tree to 
the children, getting a reference to the child and then changing the child 
object without changing the parent object)?

Thanks.

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




> On Jun 13, 2018, at 12:31 PM, Timothy Penner  wrote:
> 
>> However, be aware of a bug in 4D. If you modify a child object in an object 
>> type field and then save the record, the object will not be saved. It is 
>> only saved if you modify a top level key in the object. The workaround, 
>> until 4D fixes this, is to assign the object field to itself before saving.
> 
> This issue only exists in earlier versions of the product (R releases), where 
> the feature was first introduced.
> 
> In v17.0 this will work as expected, without needing to assign the field to 
> itself.
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Difference between OB Copy and :=

2018-06-12 Thread Cannon Smith via 4D_Tech
The neat thing about objects, in my opinion, is that they are reference based. 
I would try to stay away from using OB Copy unless it is warranted. For 
example, in your example you could just use the field directly or a reference 
to the field. Unless you save the record, changes won’t be put back in the 
database anyway.

However, be aware of a bug in 4D. If you modify a child object in an object 
type field and then save the record, the object will not be saved. It is only 
saved if you modify a top level key in the object. The workaround, until 4D 
fixes this, is to assign the object field to itself before saving.

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




> On Jun 12, 2018, at 7:26 PM, johnbdhPop via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>   So maybe I want to use OB Copy when I load the record in an input form. 
> That way I can make changes to the object without changing the object in the 
> field. That way if the user cancels I don’t have to worry about the field.
> 
>   When the user saves the record, should I use OB Copy to save the object 
> back to the field, or does it really matter?
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Difference between OB Copy and :=

2018-06-12 Thread Cannon Smith via 4D_Tech
> [Letter Templates]WP_SeriesPictures:=oPictures  

Both [Letter Templates]WP_SeriesPictures and oPictures point to the same 
C_Object instance in memory. If you change either one, they are “both” changed.


> [Letter Templates]WP_SeriesPictures:=OB Copy(oPictures)

 [Letter Templates]WP_SeriesPictures and oPictures now point to completely 
separate C_Object instances in memory. If you change one, the other is 
unaffected.

A deep copy means that if the object being copied has child objects (and 
grandchildren, etc.), they are all copied as well. It is then safe to modify 
any level of object knowing you won’t modify the original object.

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




> On Jun 12, 2018, at 7:08 PM, johnbdhPop via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What is the difference between the following...
> 
> [Letter Templates]WP_SeriesPictures:=oPictures  
> [Letter Templates]WP_SeriesPictures:=OB Copy(oPictures)
> 
> 
> Both work. The LRM for OB Copy speaks to “a complete (deep) copy of the 
> properties”. What does “deep” mean.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Delay process bug

2018-06-12 Thread Cannon Smith via 4D_Tech
We just released a new version of our software a week and a half ago. In this 
version I added a palette window on the server which runs On Timer. I also 
added code to most every background process which updates some information 
every time it wakes up from a Delay Process call. The palette window checks 
this information and, if it sees a process that has been asleep longer than one 
minute, resumes the process and sends us a Slack message identifying the server 
and process that was asleep. If the process does not get resumed, another Slack 
message is sent so we can handle the issue manually before our customer knows.

Interestingly, this mechanism was triggered on Sunday morning at 1:01 AM for 9 
servers. All 9 reported one or more stalled processes within a 60 second time 
period.

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




> On Jun 12, 2018, at 1:43 PM, Jim Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Our server (macOS 10.11, 4D 16.3 HF3 64-bit) hit this bug again last week 
> after being up for about 22 days. There are 2 separate processes that run 
> periodically, both at the same time stopped waking from DELAY PROCESS. The 
> Server window also was not showing the 4D username in the user list, although 
> IP, machine name, and login date/time were displayed.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Build with code signing

2018-06-11 Thread Cannon Smith via 4D_Tech
Hi Wayne,

The point of that comment was that nothing should change during the build 
process after signing and before distributing to the user. Once macOS has 
checked the code signing before running on the user’s machine, it doesn’t seem 
to care if it changes again.

Of course, it is only a matter of time before that changes. I keep encouraging 
4D to finish the job and ensure that nothing in the application bundle needs to 
change when running. I would encourage everyone that cares about this to ask 4D 
to make this a priority.

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




> On Jun 11, 2018, at 4:22 PM, Wayne Stewart via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> Nothing inside the application package should be changed after this point.
> 
> That's pretty much going to stop 4D then, it writes to the structure
> all the time even in a built application
> 

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

OBJ Module and Date Issue

2018-05-24 Thread Cannon Smith via 4D_Tech
If anyone is using the OBJ module in v16r6 or v17, please be aware there is a 
bug in 4D (reported as ACI0098267) that causes problems with dates. The OBJ 
module stores dates in an object as a string in the format “2018-05-24” and 
handles the conversion back and forth as necessary. If the object gets 
converted to a blob (OBJ_Save_ToBlob  or OBJ_Save_ToGZIP), when it is converted 
back to an object 4D is inexplicably changing the string value from 
“2018-05-24” to “2018-05-25T06:00:00.000T” which really messes up the 
conversion logic inside the OBJ module.

The workaround is to change line 20 of OBJP_ConvertToDate to check for a length 
>= 10 instead of just = 10.

HTH.

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




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

Re: Analyzing .4BL Files

2018-05-17 Thread Cannon Smith via 4D_Tech
Thanks Chip, Randy, and Jeff. Thanks to your suggestions I was able to track 
down something that I should have know but did not. The RESTORE command will 
convert a .4BL to a .journal file. From there I can use the MSC to look at it 
or, even better, the LOG FILE TO JSON command which is nice for 
programmatically looking for certain information.

Thanks much!

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




> On May 17, 2018, at 6:42 AM, Randy Jaynes via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I was just looking at this tech note last week
>   http://kb.4d.com/assetid=77626 

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

Analyzing .4BL Files

2018-05-16 Thread Cannon Smith via 4D_Tech
You know how you can open the MSC, go to Activity Analysis, and the Analyze the 
current log file? And export it to text? I need to go through a similar process 
with some log files that were backed up, but without integrating them. In the 
MSC there is a Browse button, but it won’t let me choose a .4BL file. Is there 
a trick to getting it to realize the .4BL file is a log file? I tried just 
changing the extension to .journal, but that didn’t work. Any ideas?

Thanks.

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




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

Download 4Dv16R5

2018-05-10 Thread Cannon Smith via 4D_Tech
I can’t find a place to download the 32-bit version of 4Dv16R5 for Windows. 
Does anyone know how to find older R-releases?

Thanks.

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




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

Re: Image Madness

2018-05-01 Thread Cannon Smith via 4D_Tech
Hi Douglas,

I’m not sure why that would be the case as it has worked for me. Perhaps a clue 
it that my code only handles the 4 common cases. Could your picture be one of 
the other four cases? Not sure. I can give you the site I found that helped me 
understand this (to the small degree that I understand it!):



Good luck.

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




> On May 1, 2018, at 1:25 AM, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I tried your code on the supplied image and had to swap the values for 6 & 8 
> as, after rotation, the image was upside down.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: 64 vs 32 Bit 4D

2018-04-30 Thread Cannon Smith via 4D_Tech
Thanks Miyako and Randy!

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




> On Apr 30, 2018, at 4:43 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> also in language reference:
> 
> http://doc.4d.com/4Dv16R6/4D/16-R6.1660/Not-for-32-bit-versions_3546700.999-857020.ja.html

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: 64 vs 32 Bit 4D

2018-04-30 Thread Cannon Smith via 4D_Tech
Never mind. I just needed to hit “send” so I could find my own answer!


<http://doc.4d.com/4Dv16R5/4D/16-R5/Specific-features-of-64-bit-applications.300-3509196.en.html>

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236
<can...@synergyfarmsolutions.com>



> On Apr 30, 2018, at 4:34 PM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I’m currently using 4D v16r5, Mac and Windows. I’m using the 64-bit versions 
> across the board. I may need to drop back to 32-bit for clients and 
> standalone for a little while.
> 
> I can’t seem to remember or find if there are any features (besides the 
> network settings) that are 64-bit only. Does anyone know if there are 
> features I may be forgetting about?

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

64 vs 32 Bit 4D

2018-04-30 Thread Cannon Smith via 4D_Tech
I’m currently using 4D v16r5, Mac and Windows. I’m using the 64-bit versions 
across the board. I may need to drop back to 32-bit for clients and standalone 
for a little while.

I can’t seem to remember or find if there are any features (besides the network 
settings) that are 64-bit only. Does anyone know if there are features I may be 
forgetting about?

Thanks.

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




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

Re: Constants - Can I make a Date Constant?

2018-04-30 Thread Cannon Smith via 4D_Tech
Only longs, reals, and strings. Not even booleans are allowed.

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




> On Apr 30, 2018, at 1:33 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> for example : !00/00/00!

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Picture Madness

2018-04-30 Thread Cannon Smith via 4D_Tech
Hi Douglas,

You can do this in code. For example, here is some code I use:

GET PICTURE METADATA($gPicture;TIFF orientation;$lOrientation)
Case of 
   : ($lOrientation=1)  //Normal, no rotation needed

   : ($lOrientation=8)  //Left 90˚, so need to rotate right 90˚
  $gPicture:=Photo_Rotate ($gPicture;90)

   : ($lOrientation=3)  //Upside down, so rotate 180˚
  $gPicture:=Photo_Rotate ($gPicture;180)

   : ($lOrientation=6)  //Right 90˚, so need to rotate 270˚
  $gPicture:=Photo_Rotate ($gPicture;270)

   Else   //The other orientations are not supported. They involved flipping 
the image. Ever occur?

End case 


The Photo_Rotate method is as follows:

  //This method rotates a picture. While it will rotate the picture to
  //any angle, this method is really expecting it to rotate 90˚, 180˚,
  //or 270˚.

C_PICTURE($1;$gPicture)
C_REAL($2;$rDegrees)  //Expects 90, 180, or 270
C_PICTURE($0)

$gPicture:=$1
$rDegrees:=$2

C_LONGINT($lWidth;$lHeight)
C_TEXT($svgRef;$imageRef)

PICTURE PROPERTIES($gPicture;$lWidth;$lHeight)
$svgRef:=SVG_New ($lWidth;$lHeight)
$imageRef:=SVG_New_embedded_image ($svgRef;$gPicture;0;0;".jpeg")

If (($rDegrees=90) | ($rDegrees=270))
SVG_SET_TRANSFORM_ROTATE ($imageRef;$rDegrees;($lHeight/2);($lWidth/2))
SVG_SET_TRANSFORM_TRANSLATE 
($imageRef;(($lHeight-$lWidth)/2);(($lWidth-$lHeight)/2))
DOM SET XML 
ATTRIBUTE($svgRef;"height";String($lWidth);"width";String($lHeight))
Else   //180
SVG_SET_TRANSFORM_ROTATE ($imageRef;$rDegrees;($lWidth/2);($lHeight/2))
End if 

$0:=SVG_Export_to_picture ($svgRef)
SVG_CLEAR ($svgRef)

HTH.

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




> On Apr 30, 2018, at 11:03 AM, Douglas Cryer via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> What I want to do is load the picture based on its file property dimensions 
> and not the EXIF property dimansions.  Is there anyway to do this in 4D code? 
>  I hope I have explained the issue correctly...

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Collection.orderBy()

2018-04-27 Thread Cannon Smith via 4D_Tech
Thanks Jeff and Julio. Funny, I thought I’d double-checked case, but apparently 
not well enough! As soon as I changed it from “orderby” to “orderBy” it started 
working.

BTW, I finally turned on object notation in my database and have started using 
object notation as well as collections directly inside my code. So so nice! 
Easy to read and use and I’m finding I use a lot less local variables as well. 
I can’t wait until they get the AST working so the method editor can do 
checking and better type-ahead as I go!

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




> On Apr 27, 2018, at 3:39 PM, Julio Carneiro via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> If the statement in your code reads exactly as you posted then the error is
> in v16r6 syntax checker :-)
> 
> The collection member function is ‘orderBy’, capital B. That’s why you get
> a runtime error, because ‘orderby’ does not exist.
> 
> At this point 4D does not manage class typing properly, so compiler does
> not know that your object property is a Collection and thus cannot validate
> if ‘orderby’ is a valid member function. Hopefully that will be fixed soon.

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Collection.orderBy()

2018-04-27 Thread Cannon Smith via 4D_Tech
Hi Jeff,

Yeah, the ending quote must have been converted by my mail app. It’s a proper 
quote in code.

I _think_ the asc should be inside the double quotes. But I’m just going by the 
examples found at:


http://doc.4d.com/4Dv16R6/4D/16-R6/collectionorderBy.301-3690504.en.html.

I don’t really know where else to try putting it???

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




> On Apr 27, 2018, at 3:20 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Well, you have a curly quote in that line of code - maybe that's just a mail 
> artifact?
> 
> Should the asc be inside the double quotes?
> 

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

Collection.orderBy()

2018-04-27 Thread Cannon Smith via 4D_Tech
I’m having trouble with the collection.orderBy() command working. Not sure if 
it is me or a bug. I’m using 4D v16r6, 64-bit, on macOS with this line of code:

$cSortedFrames:=$oPage.frames.orderby("position.zIndex asc”)

In the method editor everything colors correctly, including “orderBy” which 
turns green and is italicized. $cSortedFrames has been declared as a collection 
and $oPage.frames is also a collection of objects, each one of which has a 
numeric value at “position.zIndex”. The code also passed a syntax check.

But when I actually run the code, I get an error: -10729 Unknown member 
function. It displays the line of code with the “(“ after orderBy shown in red.

Has anyone else gotten orderBy to work on collections in v16r6? Can you see 
anything obvious I’m doing wrong?

Thanks.

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




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

Re: MSC Warnings

2018-04-24 Thread Cannon Smith via 4D_Tech
Yes, it runs fine. I’d just like to get rid of the warnings.

I’m wondering if there was a time (v15?) when the object properties allowed 
setting a stylesheet on thermometers. Now that’s been fixed, but my structure 
still has a stylesheet attached to the thermometer, so it throws an error. The 
problem is that I can’t get at it to fix it.

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




> On Apr 24, 2018, at 3:10 PM, Charles Miller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Nope
> I have the same problem with different object types. I have hundreds of
> them. I fix some of them when I can, but since I never have problems
> running?
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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   >