Re: v13 on OS X 12.6

2017-08-30 Thread Bernd Fröhlich via 4D_Tech
Chip Scheide:

> I am getting error -10002 (connection disrupted) during the initial 
> connection.

-10002 is usually a network problem.
Is there some switch/firewall active that may block the connestion?

Could you test with an older system running on the same machine (start from a 
cloned external drive)?
Then you could be sure if the OS is the problem or if there is something wrong 
with the network.

Greetings from Germany,
Bernd Fröhlich
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Image Export to Excel

2017-08-30 Thread Douglas Cryer via 4D_Tech
Miyako,

Thank you for your reply a while back...
> On 19 Jul 2017, at 20:00, 4d_tech-requ...@lists.4d.com wrote:
> 
> the component was meant to be a simple demonstration of how one can call 
> AppleScript and VBA from 4D.
> it was never meant to be an "out of the box" kind of production tool.
> 
> if possible, you should consider writing your own script rather than using 
> the component "as is".
> calling those segmented commands is going to be extremely slow and 
> inefficient.
> 
> Google "AppleScript excel insert image" or "VBA excel insert image"
> you should find lots of examples.

I was a little surprised at the response but understand it.  I believed that 
you had written the component to fill a woeful gap in 4D’s capability to 
communicate to the most widely used spreadsheet and reporting tool in the 
western world.  I also think you did rather a good job at it.

So when you say it was a simple demonstration I was surprised.  I did google 
inserting images but on the VB side I could not really figure out which 
articles were useful and which were dead ends.  I did not get as far as the 
AppleScript side.

I previously spent days doing VB/Apple script for communicating to Outlook 
(just getting account data and sending emails) and that really challenged me as 
I do not work with these languages on a daily basis.

I will ask again before I go and spend days on this, has anyone else extended 
Miyako's library to insert an image from 4D into Excel?

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

Re: Tip: Finding scheduling conflicts

2017-08-30 Thread David Adams via 4D_Tech
For those of you following along at home or checking the archives in days
to come, I came across a really good lecture on interval trees:

https://www.youtube.com/watch?v=q0QOYtSsTg4

It's presented by Robert Sedgewick. Yes, *that* Robert Sedgewick, the
algorithms guy. Well, the algorithms guy for people like me that just don't
have the background for Knuth. The lecture isn't enough to just run and
implement interval trees, but it does explain really well the basic concept
and illustrates exactly why it's such a powerful and tidy way to handle
interval searches.

Fair warning: If you don't understand binary search trees and how to build
and maintain them by hand, it probably won't make sense. If you do know
that already, the interval tree is a BST with some augmentation. When you
insert, you walk back up and attach some extra information to the node to
indicate the max value along the subtree path. (Likewise, you would have to
reset this value if you deleted the max element.) This small amount of
hinting costs a bit during insert/delete, but then saves you having to scan
parts of branches or even whole branches when searching. It's kind of
genius.

So, for anyone with an interest in this subject, check it out. The ultimate
benefit of this simple+powerful data structure is that insert/search/delete
are guaranteed to run in log N instead of N time. That's huge. That's what
you get from binary trees normally. Sedgewick says that the runtime for
finding all interval intersections is R log N, which is a huge advantage
over the alternative of N. It's just a massive, massive optimization.

This is a fairly specific problem, granted, but if your'e doing schedule
fitting, schedule/capacity analysis...or anything having to do with
intervals, this algorithm is the real deal. I'm talking about datetime
intervals, but intervals are any start-endpoint pair on a numberline, there
are lots of things like that other than date times.

P.S. For any Postgres fans, check out tsrange with a GIST index and the
OVERLAP operator. Subsecond results for scheduling range conflict
management with lots of rows.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 on OS X 12.6 [solved]

2017-08-30 Thread Chip Scheide via 4D_Tech
I have no idea what/why but after a restart - for other reasons - v13.6 
seems to be working (at least it connects, and accepts passwords  :)

On Wed, 30 Aug 2017 09:24:16 +0200, Bernd Fröhlich via 4D_Tech wrote:
> Chip Scheide:
> 
>> I am getting error -10002 (connection disrupted) during the initial 
>> connection.
> 
> -10002 is usually a network problem.
> Is there some switch/firewall active that may block the connestion?
> 
> Could you test with an older system running on the same machine 
> (start from a cloned external drive)?
> Then you could be sure if the OS is the problem or if there is 
> something wrong with the network.
> 
> Greetings from Germany,
> Bernd Fröhlich
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Image Export to Excel

2017-08-30 Thread Douglas von Roeder via 4D_Tech
Dougie:

One of the best kept secrets of the 4D plugin world — the XL Plugin from
Pluggers.

Here's the text from a page from the manual"

"xlBookAddPicture Syntax
   xlBookAddPicture( book ; picture ) → pictureID
 Parameters
Name
book → picture → pictureID ←
Description
Type
longint picture longint
 Adds a picture to the workbook and returns its ID. This ID can then be
used to place the picture repeatedly on a worksheet (see
xlSheetSetPicture). The ID is a value from 1 to n, where n is the number of
pictures in the workbook.
The picture must be one of the following types: • PNG
• JPEG
• TIFF
• EMF
• WMF
• DIB"


Per the Pluggers site, it works with OS X 10.9 and higher, Windows XP and
higher, and 4D V11 through 16 both 32 bit and 64 bit. At 600€ it's over my
"impulse buy" limit but all of the functions that I've used have worked
well. The docs and the demo are spartan but enough to get you started. When
I ran into something that I could not figure out, Rob replied quickly and
was very helpful.


--
Douglas von Roeder
949-336-2902

On Wed, Aug 30, 2017 at 4:52 AM, Douglas Cryer via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Miyako,
>
> Thank you for your reply a while back...
> > On 19 Jul 2017, at 20:00, 4d_tech-requ...@lists.4d.com wrote:
> >
> > the component was meant to be a simple demonstration of how one can call
> AppleScript and VBA from 4D.
> > it was never meant to be an "out of the box" kind of production tool.
> >
> > if possible, you should consider writing your own script rather than
> using the component "as is".
> > calling those segmented commands is going to be extremely slow and
> inefficient.
> >
> > Google "AppleScript excel insert image" or "VBA excel insert image"
> > you should find lots of examples.
>
> I was a little surprised at the response but understand it.  I believed
> that you had written the component to fill a woeful gap in 4D’s capability
> to communicate to the most widely used spreadsheet and reporting tool in
> the western world.  I also think you did rather a good job at it.
>
> So when you say it was a simple demonstration I was surprised.  I did
> google inserting images but on the VB side I could not really figure out
> which articles were useful and which were dead ends.  I did not get as far
> as the AppleScript side.
>
> I previously spent days doing VB/Apple script for communicating to Outlook
> (just getting account data and sending emails) and that really challenged
> me as I do not work with these languages on a daily basis.
>
> I will ask again before I go and spend days on this, has anyone else
> extended Miyako's library to insert an image from 4D into Excel?
>
> Regards,  Dougie
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Image Export to Excel

2017-08-30 Thread Douglas Cryer via 4D_Tech
Douglas,

Re:
> 
> One of the best kept secrets of the 4D plugin world — the XL Plugin from 
> Pluggers.
> 

Many thanks.  I do not know how I have missed that for so many years given my 
usage and love of Robs work.

Looks like I have a lot of work to do converting existing reports but I think 
it will be worth the work as I can see it will be neater, faster and give me 
greater flexibility.


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

RE: Image Export to Excel

2017-08-30 Thread Randy Engle via 4D_Tech
Dougie

I agree.
XL from pluggers is not free, but it "is" the industrial grade plugin for EXCEL.
Take control, get the job done.

Randy Engle, Director
XC2 Software LLC – XC2LIVE!


-Original Message-
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Douglas von 
Roeder via 4D_Tech
Sent: Wednesday, August 30, 2017 9:03 AM
To: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Douglas von Roeder ; Douglas Cryer 

Subject: Re: Image Export to Excel

Dougie:

One of the best kept secrets of the 4D plugin world — the XL Plugin from 
Pluggers.

Here's the text from a page from the manual"

"xlBookAddPicture Syntax
   xlBookAddPicture( book ; picture ) → pictureID  Parameters Name book → 
picture → pictureID ← Description Type longint picture longint  Adds a picture 
to the workbook and returns its ID. This ID can then be used to place the 
picture repeatedly on a worksheet (see xlSheetSetPicture). The ID is a value 
from 1 to n, where n is the number of pictures in the workbook.
The picture must be one of the following types: • PNG • JPEG • TIFF • EMF • WMF 
• DIB"


Per the Pluggers site, it works with OS X 10.9 and higher, Windows XP and 
higher, and 4D V11 through 16 both 32 bit and 64 bit. At 600€ it's over my 
"impulse buy" limit but all of the functions that I've used have worked well. 
The docs and the demo are spartan but enough to get you started. When I ran 
into something that I could not figure out, Rob replied quickly and was very 
helpful.


--
Douglas von Roeder
949-336-2902

On Wed, Aug 30, 2017 at 4:52 AM, Douglas Cryer via 4D_Tech < 
4d_tech@lists.4d.com> wrote:

> Miyako,
>
> Thank you for your reply a while back...
> > On 19 Jul 2017, at 20:00, 4d_tech-requ...@lists.4d.com wrote:
> >
> > the component was meant to be a simple demonstration of how one can 
> > call
> AppleScript and VBA from 4D.
> > it was never meant to be an "out of the box" kind of production tool.
> >
> > if possible, you should consider writing your own script rather than
> using the component "as is".
> > calling those segmented commands is going to be extremely slow and
> inefficient.
> >
> > Google "AppleScript excel insert image" or "VBA excel insert image"
> > you should find lots of examples.
>
> I was a little surprised at the response but understand it.  I 
> believed that you had written the component to fill a woeful gap in 
> 4D’s capability to communicate to the most widely used spreadsheet and 
> reporting tool in the western world.  I also think you did rather a good job 
> at it.
>
> So when you say it was a simple demonstration I was surprised.  I did 
> google inserting images but on the VB side I could not really figure 
> out which articles were useful and which were dead ends.  I did not 
> get as far as the AppleScript side.
>
> I previously spent days doing VB/Apple script for communicating to 
> Outlook (just getting account data and sending emails) and that really 
> challenged me as I do not work with these languages on a daily basis.
>
> I will ask again before I go and spend days on this, has anyone else 
> extended Miyako's library to insert an image from 4D into Excel?
>
> Regards,  Dougie
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

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

Re: Drag & Drop challenge - developer wanted

2017-08-30 Thread Lee Hinde via 4D_Tech
Daniel.

How did you solve this problem?

On Tue, Jan 6, 2015 at 8:47 AM, Daniel N. Solenthaler <
dan...@solenthaler.com> wrote:

> Hi all,
>
> I am looking for a developer who is able to provide a solution for one or
> all of the following requirements:
>
> a) Direct Drag & Drop (not via Desktop) of an eMail from Apple Mail to a
> 4D listbox
> b) Direct Drag & Drop (not via Desktop) of an email from Outlook Windows
> to a 4D listbox
> c) Direct Drag & Drop (not via Desktop) of an email from Outlook Mac to a
> 4D listbox
>
> Please contact me in private.
>
> If anyone is interested in the same feature and cost sharing, please reply
> to this post.
>
> Thanks!
>
> Daniel
>
> dan...@solenthaler.com
>
>
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Drag & Drop challenge - developer wanted

2017-08-30 Thread Chip Scheide via 4D_Tech
THAT is a good challenge.
I am working with a form with Drag n drop enabled.
I put this code in the from method:
If (Form event=On Drag Over)
TRACE
End if 

it does not fire when dragging mail from either my email client, don't 
worry you don't use it :), nor from Apple Mail.app
The Green + does appear though...

On Wed, 30 Aug 2017 12:42:29 -0700, Lee Hinde via 4D_Tech wrote:
> Daniel.
> 
> How did you solve this problem?
> 
> On Tue, Jan 6, 2015 at 8:47 AM, Daniel N. Solenthaler <
> dan...@solenthaler.com> wrote:
> 
>> Hi all,
>> 
>> I am looking for a developer who is able to provide a solution for one or
>> all of the following requirements:
>> 
>> a) Direct Drag & Drop (not via Desktop) of an eMail from Apple Mail to a
>> 4D listbox
>> b) Direct Drag & Drop (not via Desktop) of an email from Outlook Windows
>> to a 4D listbox
>> c) Direct Drag & Drop (not via Desktop) of an email from Outlook Mac to a
>> 4D listbox
>> 
>> Please contact me in private.
>> 
>> If anyone is interested in the same feature and cost sharing, please reply
>> to this post.
>> 
>> Thanks!
>> 
>> Daniel
>> 
>> dan...@solenthaler.com
>> 
>> 
>> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Drag & Drop challenge - developer wanted

2017-08-30 Thread Lee Hinde via 4D_Tech
I can get the database 'on drop' method to fire. You get the path to the email 
file.

I can’t get a form to respond in any case. My target is a subform, which 
doesn’t have an on drop event, so I tried with a button and the form itself and 
neither give me the green +.

The customer’s request is to be able to drag an email to a specific client 
record (input form) and have the email added to a related Contacts table.



> On Aug 30, 2017, at 1:09 PM, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> THAT is a good challenge.
> I am working with a form with Drag n drop enabled.
> I put this code in the from method:
> If (Form event=On Drag Over)
> TRACE
> End if 
> 
> it does not fire when dragging mail from either my email client, don't 
> worry you don't use it :), nor from Apple Mail.app
> The Green + does appear though...
> 
> On Wed, 30 Aug 2017 12:42:29 -0700, Lee Hinde via 4D_Tech wrote:
>> Daniel.
>> 
>> How did you solve this problem?
>> 
>> On Tue, Jan 6, 2015 at 8:47 AM, Daniel N. Solenthaler <
>> dan...@solenthaler.com> wrote:
>> 
>>> Hi all,
>>> 
>>> I am looking for a developer who is able to provide a solution for one or
>>> all of the following requirements:
>>> 
>>> a) Direct Drag & Drop (not via Desktop) of an eMail from Apple Mail to a
>>> 4D listbox
>>> b) Direct Drag & Drop (not via Desktop) of an email from Outlook Windows
>>> to a 4D listbox
>>> c) Direct Drag & Drop (not via Desktop) of an email from Outlook Mac to a
>>> 4D listbox
>>> 
>>> Please contact me in private.
>>> 
>>> If anyone is interested in the same feature and cost sharing, please reply
>>> to this post.
>>> 
>>> Thanks!
>>> 
>>> Daniel
>>> 
>>> dan...@solenthaler.com
>>> 
>>> 
>>> 

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

Re: Drag & Drop challenge - developer wanted

2017-08-30 Thread Chip Scheide via 4D_Tech
Talk to Bob Miller...
I think he has something.

On Wed, 30 Aug 2017 13:17:57 -0700, Lee Hinde via 4D_Tech wrote:
> I can get the database 'on drop' method to fire. You get the path to 
> the email file.
> 
> I can’t get a form to respond in any case. My target is a subform, 
> which doesn’t have an on drop event, so I tried with a button and the 
> form itself and neither give me the green +.
> 
> The customer’s request is to be able to drag an email to a specific 
> client record (input form) and have the email added to a related 
> Contacts table.
> 
> 
> 
>> On Aug 30, 2017, at 1:09 PM, Chip Scheide 
>> <4d_o...@pghrepository.org> wrote:
>> 
>> THAT is a good challenge.
>> I am working with a form with Drag n drop enabled.
>> I put this code in the from method:
>> If (Form event=On Drag Over)
>> TRACE
>> End if 
>> 
>> it does not fire when dragging mail from either my email client, don't 
>> worry you don't use it :), nor from Apple Mail.app
>> The Green + does appear though...
>> 
>> On Wed, 30 Aug 2017 12:42:29 -0700, Lee Hinde via 4D_Tech wrote:
>>> Daniel.
>>> 
>>> How did you solve this problem?
>>> 
>>> On Tue, Jan 6, 2015 at 8:47 AM, Daniel N. Solenthaler <
>>> dan...@solenthaler.com> wrote:
>>> 
 Hi all,
 
 I am looking for a developer who is able to provide a solution for one or
 all of the following requirements:
 
 a) Direct Drag & Drop (not via Desktop) of an eMail from Apple Mail to a
 4D listbox
 b) Direct Drag & Drop (not via Desktop) of an email from Outlook Windows
 to a 4D listbox
 c) Direct Drag & Drop (not via Desktop) of an email from Outlook Mac to a
 4D listbox
 
 Please contact me in private.
 
 If anyone is interested in the same feature and cost sharing, 
 please reply
 to this post.
 
 Thanks!
 
 Daniel
 
 dan...@solenthaler.com
 
 
 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Tip: Finding scheduling conflicts

2017-08-30 Thread David Adams via 4D_Tech
I'm back to tell you about a wonderful thing called "the Internet" ;-) I
turns out that Sedgewick has a series of free courses at Coursera:

https://www.coursera.org/courses?languages=en&query=sedgewick

What I linked to yesterday comes from Algorithms 1. I checked the syllabus
and it looks like a really thorough introductions to algorithms and data
structures course.

It's pretty mind-blowing that you can get all of this for free from Robert
Sedgewick. Decades back, everyone had Knuth's "The Art of Computer
Programming." I just didn't (don't) have the math or the C to follow it.
Sedgewick had an excellent smaller book called Algorithms with examples in
Pascal, which is very easy to read if you're used to 4D. Sedgewick is
admirable in his ability to make complex subjects comprehensible.

I just noticed on Wikipedia that Knuth supervised Sedgewick's doctorate,
and that Sedgewick co-invented Red/Black Trees (a BST variant with some
optimizations for some applications.)

So, an amazing free resource out there...
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

TEXT TO DOCUMENT With Special Characters

2017-08-30 Thread Cannon Smith via 4D_Tech
I’m having trouble with saving Unicode characters to a file. For example, the 
following code saves a file to disk:

C_TEXT($tText;$tFilepath)

$tText:=“©” //Copyright symbol
$tFilepath:=System folder(Desktop)+"test.txt"
TEXT TO DOCUMENT($tFilepath;$tText;UTF8 text without length)

When I open the file again, it only contains a “?” character.

If I use:

TEXT TO DOCUMENT($tFilepath;$tText)

it saves correctly, but then the file has a BOM character at the beginning 
which is wreaking havoc with other systems that aren’t expecting it.

Does anyone know what I should be doing here? 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: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: TEXT TO DOCUMENT With Special Characters

2017-08-30 Thread Justin Carr via 4D_Tech
On 31 Aug 2017, at 8:53 am, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> I’m having trouble with saving Unicode characters to a file. For example, the 
> following code saves a file to disk:
> 
> C_TEXT($tText;$tFilepath)
> 
> $tText:=“©” //Copyright symbol
> $tFilepath:=System folder(Desktop)+"test.txt"
> TEXT TO DOCUMENT($tFilepath;$tText;UTF8 text without length)
> 
> When I open the file again, it only contains a “?” character.
> 
> If I use:
> 
> TEXT TO DOCUMENT($tFilepath;$tText)
> 
> it saves correctly, but then the file has a BOM character at the beginning 
> which is wreaking havoc with other systems that aren’t expecting it.
> 
> Does anyone know what I should be doing here? Thanks.

Hi Cannon

The first thing I notice is that you are using the old BLOB to text and TEXT TO 
BLOB constant (UTF8 text without length) with the TEXT TO DOCUMENT command. 
This command uses either strings such as "UTF-8" or the corresponding MIBEnum 
ID (the documentation for CONVERT FROM TEXT lists these out). The UTF8 text 
without length constant has a value of 6 which corresponds to ISO-8859-3 using 
MIBEnum IDs.

Also I'm pretty sure if you use TEXT TO DOCUMENT to produce UTF-8 (or any other 
charset that has a BOM specified for it), 4D will insert the BOM in the 
document. So you could use CONVERT FROM TEXT with the "UTF-8" charset to create 
a BLOB (which won't have the BOM) and then BLOB TO DOCUMENT to write the BLOB 
to disk

Regards
Justin

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

Re: TEXT TO DOCUMENT With Special Characters

2017-08-30 Thread John DeSoi via 4D_Tech

> On Aug 30, 2017, at 6:31 PM, Justin Carr via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Also I'm pretty sure if you use TEXT TO DOCUMENT to produce UTF-8 (or any 
> other charset that has a BOM specified for it), 4D will insert the BOM in the 
> document. 

Yes, and this makes TEXT TO DOCUMENT less useful than it should be for UTF-8. 
There is no option to leave it out and most other systems don't expect it to be 
there.

As Justin said, the only option is to use BLOB TO DOCUMENT instead.


https://en.wikipedia.org/wiki/Byte_order_mark

> The Unicode Standard permits the BOM in UTF-8,[3] but does not require or 
> recommend its use.[4] Byte order has no meaning in UTF-8,[5] so its only use 
> in UTF-8 is to signal at the start that the text stream is encoded in UTF-8, 
> or that it was converted from another stream that contained an optional BOM. 


John DeSoi, Ph.D.

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

4dmethod.com - Publish/Subscribe Component for 4D, David Adams

2017-08-30 Thread truegold via 4D_Tech
Hi All,

If you were not able to see it the 4dMethod.com presentation today - you really 
go to!!!

David Adams did a wonderful job explaining how he implemented 
Publish/Subscribe. Just what the doctor ode red in my case as I was about to 
implement something similar in a database I am working on. Although now I will 
approach it differently then I did way back in StructurePulse days.

Anyway, David explains Call Form/Call Worker in a way that it finally clicked 
for me. And did I say he posted the source code with an easy to understand demo.

I could parrot what he said but then I’d spoil the fun you’ll have of watching 
the video posted.

So David well done!!!

And Brent thanks again for spearheading these meetings. I’m sure all who have 
attended (past and present) feel the same way. We salute you!!!

https://4dmethod.com/2017/08/17/august-30th-meeting-publishsubscribe-component-for-4d-david-adams/#more-740

Hey David I would love to get a copy of those various diagram slides you 
showed. It really made things so clear.

Full of appreciation,
John…


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

Re: 4dmethod.com - Publish/Subscribe Component for 4D, David Adams

2017-08-30 Thread David Adams via 4D_Tech
John,

Thanks for the nice note! I'm glad if it came across comprehensibly.

I think that CALL FORM and CALL WORKER are fantastic commands and really
like them. So I used them to build a Publish/Subscribe system in 4D. It
really makes it easy to reuse form widgets, add new windows into your UI,
log events...very nice stuff.

While the CALL FORM/CALL WORKER calls are hidden away in the component (the
source is there for you), there are some discussions on the commands in the
presentation. I approach them from a different history and perspective than
4D does. That's why I don't think their 'about workers' page is at all
useful. Although the basic command reference pages are top-notch. You'll
hear about that in the presentation.

Thanks to Brent for hosting the meeting, it's a great resource.

And thanks again to Thomas Maul for his presentation a year ago to the
group on CALL FORM/CALL WORKER:

4DMethod #18 | Messaging with 4D v16, Thomas Maul
https://www.youtube.com/watch?v=eEjrHR2BelE

I think Thomas starts around 45 minutes in? There are a few AV glitches
first and then Thomas. Perhaps Brent or someone can post the minute marker?
Anyway, I *strongly* recommend that anyone digging into CALL FORM and CALL
WORKER should do this:

-- Watch Thomas' presentation.
-- Spend +- and hour in a scratch database playing with the commands and
getting what and how they work.
-- Watch Thomas' presentation again.

It's excellent and technically fully on the mark.

Once you've bashed around a bit and tried the commands, if you've run into
trouble...there's a next step. 4D's docs talk about a "queue", describe the
commands as "asynchronous" and put a lot of emphasis on pre-emptive
(thread-safe) processes. Well, do everything you can to ignore *all* of
that. That stuff all makes sense if you're 4D and if you're talking about
the stories that lead to these features. They're nearly irrelevant from out
point of view. What you really need to understand completely to grasp these
commands is that they're variants on EXECUTE. You need to really know

 Where is the code executing?
 When is the code executing?

If you can always answer those questions, you've mastered these commands.
At that point, you can work out in your head design that take advantage of
them and are easy to use. Always keep in mind that a 4D process
(cooperative or not) is a *single* thread of control. Therefore, anything
that blocks or occupies the thread blocks pending lines of code. The
"messages" in the "queue" are EXECUTE statements that are run in that
thread of control (process) only when everything else is done. There are no
asynchronous interrupts here, it's not like that. There's no discrete queue
that we can poll or inspect here, it's not like that. And, again, this has
nothing at all to do with pre-emptive mode. You *can* use these commands in
a thread-safe context, but they're not required. In fact, you can launch a
thread-safe process using New process and leave workers out of it complete.
Note that we didn't have time to talk about pre-emptive mode tonight, but
Brent or someone may do a presentation on it later, who knows?

Regarding the diagrams from the presentation, I'll glue something together
and send them to Brent for posting.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4dmethod.com - Publish/Subscribe Component for 4D, David Adams

2017-08-30 Thread David Adams via 4D_Tech
I've sent a ton of graphs and such to Brent in case he can post them this
week. Everything I showed should be there and some other stuff as well. I
dropped in some pre-emptive stuff in the back. I'm sceptical that slides
are worth much without a presentation but, well, here you go!

Oh, and the most important point about Publish/Subscribe can't be said too
often:

   The think knows about itself.

That's the idea. Your widgets and what have you know about themselves and
little or nothing about the outside world. It's very liberating and cuts
away huge categories of errors from global data and various forms of
dependency/coupling/entanglement.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

OSX absolute and relative path

2017-08-30 Thread David Ringsmuth via 4D_Tech
OS X  10.12.6
4D is  15.4
Compiled Built app

On one OSX when creating a file an attempting to launch it the path does not 
contain the Macintosh HD, it begins with file:///userName/...

On another OSX the exact same command to create the file with path begins with 
the hard drive name: file://Macintosh%20HD/userName/...

Could it be how the users are logged onto the computer?

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

Re: OSX absolute and relative path

2017-08-30 Thread Keisuke Miyako via 4D_Tech
I think it depends on the number of /Volumes/
but you might be right,
it could be a user credentials thing.

> 2017/08/31 13:07、David Ringsmuth via 4D_Tech <4d_tech@lists.4d.com> のメール:
> Could it be how the users are logged onto the computer?




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

Re: Image Export to Excel

2017-08-30 Thread Keisuke Miyako via 4D_Tech
I totally agree, XL is the best.

you might also want to take a look at HMFREE ADDON

https://www.hmplugins.com
https://www.hmplugins.com/en/hmFree/Features-134.html

quote:

• Create native Excel (*.xls) files
* Based on the ExcelFormat library (same as Keisuke Miyako's XLS II-Plugin), 
but with enhanced features and fixed issues.
* Setting row height, row and cell alignments, page format feature (headers, 
footers, zoom, orientation).



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

Re: Drag & Drop challenge - developer wanted

2017-08-30 Thread Daniel N. Solenthaler via 4D_Tech
Hi Lee,

Credits to Ortwin Zillgen (http://.mettre.de/wp/ 
), who did some fancy Apple Script and VB 
programming for us.

He is currently working on an update of the Apple Script for Sierra, since 
Apple changed something in the way attachments are loaded.

Cheers,
Daniel

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