Re: I'm puzzled...

2021-10-28 Thread Bernd Fröhlich via 4D_Tech
Jörg Knebel:

> To me it looks like that Xcode, MS-Visual-Studio and some additional Editors 
> are mandatory now to create a working application with/in 4D

Hi Jörg.

XCode is only necessary if you want to compile for Apples new M1 processor.
4D has no choice in that matter, blame Apple.

As for project mode: I needed a while to transfer our over 30 year old app to 
project mode, but it now works as well as before.
I could have left it in binary and it would still work, but only with rosetta 
on M1 (which is still a lot faster than on native intel).
There is no need to rush the transition, I think you can stay in binary as long 
as Aplle supports Rosetta, but I love the new features, so I wanted to update.
Yes, it needs some time to get used to all the new stuff (I still need a lot to 
learn), but for me it was worth the effort.

Just my 2 cent.

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

Re: Syntax Error in a Compiled Database

2021-09-10 Thread Bernd Fröhlich via 4D_Tech
Eric Asadoorian:
 
> Application can run for anywhere from 6 days to several weeks and no issues.  
> Then a runtime error will pop up citing Error 48 (I believe that it says 
> Syntax Error when looking at detail in Application Process, but not sure, I 
> will need to take a screenshot next time).

Are you sure it is error 48 and not -48?

-48 could be a macOS error "duplicate filename".
So if you write files to disc, maybe that´s a point to look for.

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

Communication (Was: Re: Base64 Image)

2021-06-05 Thread Bernd Fröhlich via 4D_Tech
Douglas von Roeder:

> I'm glad that there are
> multiple places where people discuss 4D.

Yup, me too.
And it hurts when people here tell others that this list is dead. It is not.
Whoever prefers the forum: fine - use it.
Others prefer this list, so please don´t tell people not to post here anymore.

Greetings from Germany,
Bernd
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Copy and Paste

2021-03-24 Thread Bernd Fröhlich via 4D_Tech
Chuck Miller:

> Sorry I don’t know answer, but you should switch to the discuss.4d.com group. 
> Almost every one is there these day
> 
> I am getting ready to unsubscribe from these lists as I bet others have 
> already done


Please just unsubscribe if you don´t use this list anymore, but don´t tell 
others that they should leave.
This list is not dead (yet :-)

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

Public IP-Address

2021-03-06 Thread Bernd Fröhlich via 4D_Tech
Jörg Knebel:

> If you guys ever need to get the public IP-Address here are some suggestions:
> 
> Mac & Windows (result will be returned into $StdOut)
> 
> $cmd:="curl ifconfig.me”
>   OR
> $cmd:="curl icanhazip.com”


Good one. I do that with my own webserver and parse the result.
You only need a website with the following two lines:


 

Even better would be not to have to ping an external site at all, but I guess 
there is no way to get the external address directly from your computer.
If there is a way I would be very interested.

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

Re: PING of life...

2021-01-17 Thread Bernd Fröhlich via 4D_Tech
SPC:

> That is one of the reasons I like this forum.


I really like this mailing list but the one thing I hate about it is, that some 
people just don´t know how to qoute and often leave the whole digest in their 
answer. So the next digest just contains that one mail plus the quoted previous 
digest. *sigh*
.

Happy monday to all...

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

Re: Remember "Layout Procedure" in 4D v2?

2021-01-14 Thread Bernd Fröhlich via 4D_Tech
Jörg Knebel:

> Back than we had only 3 “Situations”:
> 
> Before
> 
> ?
> 
> After
> 
> 
> Can someone fill in the question marks - just curious…


? = During


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

Re: PING of life...

2021-01-13 Thread Bernd Fröhlich via 4D_Tech
> count me in :)

Yup, me too.

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

Re: Running AppleScripts from 4D under Catalina

2020-12-05 Thread Bernd Fröhlich via 4D_Tech
Peter Adam:

> This has been working fin from v17R6 under Mojave but returns a message that 
> it can’t find Mail on Catalina.

You have to go to System Preferences->Security->Privacy
then choose "Automation" and click the checkbox next to 4D to allow it.
Maybe "Full disc access" has to be granted too.

Works fine here under Catalina and Big Sur.

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

Forum (Was: Re: V18 Closing Method windows and Form windows when switching modes...)

2020-09-19 Thread Bernd Fröhlich via 4D_Tech
Lloyd SIgler:

> I guess I’m turning into a Luddite. But I like the 'background' aspect of the 
> way it works, it just transparently goes to its own folder in my email and I 
> can call it up any time to search in it or ask a question, I don’t need to do 
> anything or log in anywhere, it's all just there waiting if I need it.

Count me in.
I much prefer the one-stop-shop of mailinglists over logging in to a dozen 
forums.

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

Re: Can't Disable Catalina Prompt "Do you want the Applicaiton "ApplicationName" to accept incoming network connections?

2020-08-24 Thread Bernd Fröhlich via 4D_Tech
Ken Eyring:

> No, I put the built application into another folder.  Should that make a 
> difference?

When you drag an application into the applications folder, gatekeeper asks you 
for your admin credentials and removes any quarantine bits from the app.
After that is done you should be able to put the app whereever you like.

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

Re: Can't Disable Catalina Prompt "Do you want the Applicaiton "ApplicationName" to accept incoming network connections?

2020-08-18 Thread Bernd Fröhlich via 4D_Tech
Ken Eyring:

> I've compiled and built a standalone version of my 4D database (with 
> v17.3HF2), and every time that I run it on Mac OS X 10.15.5 (Catalina), 
> I get a prompt "Do you want the Application 'ApplicationName' to accept 
> incoming network connections?"
> 
> I click "Yes" and the application opens.  I have also added the name of 
> my standalone application into the Security & Privacy control panel as 
> an exception to "allow incoming connections"... but I still get the 
> prompt every time I open the application.
> 
> Any suggestions on what I need to do to get the prompt to stop popping 
> up is greatly appreciated.


Did you move the app into the applications-folder?
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: CHANGE LIST VALUES FOR EVERY LISTBOX ROW

2020-08-17 Thread Bernd Fröhlich via 4D_Tech
Keisuke Miyako:

> you can not change the content of a list that is already attached to a 
> listbox column.
> 
> you need to call
> 
> OBJECT SET LIST BY REFERENCE
>  or
> OBJECT SET LIST BY NAME

Or use the command "Pop up menu" when the user clicks an entry.
You can fill the contents for that menu in the "on clicked" event on the fly.

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

Re: Capturing Full Path Names with Picture Imports

2020-05-27 Thread Bernd Fröhlich via 4D_Tech
Steven:

> I am trying to develop a small module to allow users to import images from 
> anywhere on the host computer, for now.  Using "READ PICTURE FILE","CREATE 
> THUMBNAIL” and "Get picture file name” I can accomplish most of what I want 
> to do.  But I am stuck on how to capture the long path to the picture 
> selected by the user in the selection dialog presented by "READ PICTURE FILE”.

Hi Steven,



"If the command is executed successfully, the system variable Document contains 
the full pathname to the open file"

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

Re: Long running reports to disk intermittently disrupted and fail

2020-04-19 Thread Bernd Fröhlich via 4D_Tech
Chip Scheide:

>> Now I create the document as before, do a document to blob on the 
>> client and call an "execute on server"-method that sends the blob to 
>> the server where it gets written to the directory with blob to 

> why not just save the blob in a (temporary) record?
> the blob is auto transmitted to the server via 4D.
> 
> and you can then (on the server) do a blob to document if necessary

That is more complicated than just calling an "execute on server" method.
Maybe I was not clear: with the "execute on server" method attribute set, the 
parameters (in this case the blob) is also transferred to the server 
automatically.
No need for records.

Greetings from Germany,
Bernd Fröhlich
**
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: Re: Long running reports to disk intermittently disrupted and fail

2020-04-17 Thread Bernd Fröhlich via 4D_Tech
Arnaud de Montard:

> Unfortunately on macOS it's not enough, I sometimes have the shared volume 
> when I ask "are you here", a while after it's gone. I use an applescript that 
> is called each time 4D sees a volume is gone to mount it, but same problem 
> can occur. I feel like fighting with windmills. I hope a more recent MacOS 
> will be better, something's wrong between macOS and smb shared volumes. 
> Everything's fine when I copy another way (ftp, for example.)


I switched some related code here recently.
Used to generate a document on the client and copy it to a mounted share which 
was on the server.
Now I create the document as before, do a document to blob on the client and 
call an "execute on server"-method that sends the blob to the server where it 
gets written to the directory with blob to document.
Works much better and has the added benefit that it now works for WAN-Clients 
without the need to have the volume mounted.

Greetings from Germany,
Bernd Fröhlich
**
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: Simple find and replace in 4D Write Pro.

2020-04-15 Thread Bernd Fröhlich via 4D_Tech
Luc Devar:

> Now I want to simply find and replace some text in the 4DwritePro document 
> before exporting in mime html. I am looking for a simple find and replace (WR 
> find in the old 4D write). I have spent more than 2 hours trying to find a 
> way with the documentation without success. I know this should be obvious but 
> cannot find it. So I am asking for help as I cannot lose all this time on a 
> simple command.

Hi Luc,
I had a bit of a struggle with this myself. WritePro is sometimes a lot more 
compilcated than good old Write.
It boils down to this:

$lPosition:=Position("MySearchText";WP Get text($oMyWriteProObject;wk 
expressions as space))
$oRange:=WP Text 
range($oMyWriteProObject;$lPosition;$lPosition+Length("MySearchText"))
WP SET TEXT($oRange;"MyNewText";wk replace)

Hope that helps.

Greetings from Germany,
Bernd Fröhlich
**
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: barcode

2020-03-19 Thread Bernd Fröhlich via 4D_Tech
Chuck Miller:

> The only problem is creation of of bar code. I think hmbar code does all 
> types (128 etc) which are harder to do programmatically.  When I tried, I was 
> able to get 128 working on a Mac or a PC but not both. The coding seems to 
> have been slightly different

If you need a "Code 39" barcode then you can use the following method.
I adapted it out of a component by Thomas Maul and made it standalone.
It returns a picure that you can place on a form to print.

C_TEXT($1;$tCode)
C_LONGINT($2;$lScale)
C_PICTURE($0)
C_TEXT($tPattern;$t;$tSVG;$tLine;$tPoints;$tRef)
C_LONGINT($i;$x;$x2;$y;$y2;$lCount;$lHeight;$lWidth;$lBarwidth;$lScale)

$tCode:=$1
If (Count parameters>1)
$lScale:=$2
Else 
$lScale:=1
End if 

If ($Tcode#"*@")
$tcode:="*"+$tcode
End if 
If ($tcode#"@*")
$tcode:=$tcode+"*"
End if 
If (Length($tcode)>32)
g4D_AlertErr ("Code zu lang!")
End if 

$tPattern:=""
For ($i;1;Length($tCode))
$t:=$tCode[[$i]]
Case of 
: ($t="*")
$tPattern:=$tPattern+"1001011011010"
: ($t="0")
$tPattern:=$tPattern+"1010011011010"
: ($t="1")
$tPattern:=$tPattern+"1101001010110"
: ($t="2")
$tPattern:=$tPattern+"1011001010110"
: ($t="3")
$tPattern:=$tPattern+"1101100101010"
: ($t="4")
$tPattern:=$tPattern+"1010011010110"
: ($t="5")
$tPattern:=$tPattern+"1101001101010"
: ($t="6")
$tPattern:=$tPattern+"1011001101010"
: ($t="7")
$tPattern:=$tPattern+"1010010110110"
: ($t="8")
$tPattern:=$tPattern+"1101001011010"
: ($t="9")
$tPattern:=$tPattern+"1011001011010"
: ($t="A")
$tPattern:=$tPattern+"1101010010110"
: ($t="B")
$tPattern:=$tPattern+"1011010010110"
: ($t="C")
$tPattern:=$tPattern+"1101101001010"
: ($t="D")
$tPattern:=$tPattern+"1010110010110"
: ($t="E")
$tPattern:=$tPattern+"1101011001010"
: ($t="F")
$tPattern:=$tPattern+"1011011001010"
: ($t="G")
$tPattern:=$tPattern+"1010100110110"
: ($t="H")
$tPattern:=$tPattern+"1101010011010"
: ($t="I")
$tPattern:=$tPattern+"1011010011010"
: ($t="J")
$tPattern:=$tPattern+"1010110011010"
: ($t="K")
$tPattern:=$tPattern+"1101010100110"
: ($t="L")
$tPattern:=$tPattern+"1011010100110"
: ($t="M")
$tPattern:=$tPattern+"1101101010010"
: ($t="N")
$tPattern:=$tPattern+"1010110100110"
: ($t="O")
$tPattern:=$tPattern+"1101011010010"
: ($t="P")
$tPattern:=$tPattern+"1011011010010"
: ($t="Q")
$tPattern:=$tPattern+"1010101100110"
: ($t="R")
$tPattern:=$tPattern+"1101010110010"
: ($t="S")
$tPattern:=$tPattern+"1011010110010"
: ($t="T")
$tPattern:=$tPattern+"1010110110010"
: ($t="U")
$tPattern:=$tPattern+"1100101010110"
: ($t="V")
$tPattern:=$tPattern+"1001101010110"
: ($t="W")
$tPattern:=$tPattern+"1100110101010"
: ($t="X")
$tPattern:=$tPattern+"1001011010110"
: ($t="Y")
$tPattern:=$tPattern+"1100101101010"
: ($t="Z")
$tPattern:=$tPattern+"1001101101010"
: ($t="-")
$tPattern:=$tPattern+"1001010110110"
: ($t=".")
$tPattern:=$tPattern+"1100101011010"
: ($t=" ")
$tPattern:=$tPattern+"1001101011010"
: ($t="$")
$tPattern:=$tPattern+"1001001001010"
: ($t="/")
$tPattern:=$tPattern+"1001001010010"
: ($t="+")
$tPattern:=$tPattern+"1001010010010"
: ($t="%")
$tPattern:=$tPattern+"1010010010010"
Else 
g4D_AlertErrCaseOf (Current method name)
End case 
End for 


Re: Remote working with 4D networks - what are people using ?

2020-03-19 Thread Bernd Fröhlich via 4D_Tech
Alexander Heintz:

> Complete lack of a remote terminal solution for Macs is the primary reason 
> why most businesses have switched to Windows in the last 8-10 years.

Sorry, but that´s just fake news.
I can log in the severel dozen Macs from home just fine.
Just switch on screen sharing and configure the router so that it connects to 
different macs depending on the port you are specifying in the connection.

Greetings from Germany,
Bernd Fröhlich
**
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: Post Key

2020-02-19 Thread Bernd Fröhlich via 4D_Tech
Koen Van Hooreweghe:

> You can set the standard action of the button to 'userMode'. This should do 
> the trick imho.

And if that does not work (IIRC it was broken in some version) then put

METHOD OPEN PATH("SomeMethod")

in the buttonscript as a workaround. 

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

Re: v18 and 4D Write Classic - does it work ?

2020-02-05 Thread Bernd Fröhlich via 4D_Tech
Peter Jakobsson:

> I’m going to be making the leap from v15 to v18. I think the biggest 
> transition will be moving to 4D Write Pro as I have quite a lot of legacy 4D 
> Write code to deal with.
> 
> In the meantime, does anybody have experience of migrating big 4D Write 
> codebases ? What are the major gotchas ?
> 
> Will legacy 4D Write work in v18 in the meantime or do we need to migrate to 
> 4D Write Pro to even run it ? (When I try it it invokes license privilege 
> errors everywhere).

Hi Peter,

the last version where you can run 4D Write and WritePro side by side is the 
32-Bit Version of V17R4.
I have used that version to let my users continue with 4D Write and alongside 
that rewrote all code to use WritePro so that I could switch back and forth 
when something did not work as expected.
When everything was working I removed all old 4D Write code and switched to V18.
It is A LOT of work and I´m glad I´ve got that behind me.

You will have to write everything completely from scratch since WritePro uses a 
very different approach than 4D Write.
Once you get the hang of it, it´s OK but now you have to use commands from 3 
areas (WP, ST and Object commands).

On the plus side: converting old Write documents to Write Pro is only one line 
of code.

Hope this info helps a little bit.

Greetings from Germany,
Bernd Fröhlich
**
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: High Sierra or Mojave?

2019-12-11 Thread Bernd Fröhlich via 4D_Tech
Doug Hall:

> I want to stay
> relatively close to the latest OS, but I'm a bit weary of the security
> measures Apple is imposing on Mojave/Catalina.

Mojave runs fine over here.
I would stay away from Catalina for some more months.

Greetings from Germany,
Bernd Fröhlich
**
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: Determining if a 4D Write Object has been changed since load.

2019-11-13 Thread Bernd Fröhlich via 4D_Tech
Eric Naujock:

> Initially I tried to add an attribute to the WP object, but wasn’t successful.

What was the problem? It´s as easy as

$oMyWriteProObject.MyNewProperty:="Something".

I find that very useful.

You have to keep in mind that object properties are case sensitive, so 
MyNewProperty and mynewproperty are different.

Greetings from Germany,
Bernd Fröhlich
**
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 write pro and rich text

2019-11-11 Thread Bernd Fröhlich via 4D_Tech
Pat Bensky:

> So are you saying that you want users to be able to paste formatted text
> from Word and have the formatting carry through to the 4D report?

Me too.
My users also complain that they can no longer paste formatted text into a 
WritePro area (like it was possible with the old 4D Write).

I know that this would not be easy on 4Ds part to implement, because they would 
have to filter out all the (invisible) characters that could mess up the WP 
area, but I can also understand my users. "It worked before, so why doesn´t it 
work anymore?".
Does not look good if you install an "update" and some basic functionality is 
gone.

Greetings from Germany,
Bernd Fröhlich
**
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: Write Pro Hide/clear pictures when printing

2019-10-30 Thread Bernd Fröhlich via 4D_Tech
Piotr Chabot Stadhouders:

> We want to print a Write Pro document without printing the contained pictures
> Say we print to paper that has corporate identity, we don’t want to print the 
> logo that is inside the Pro document
> So we want copy the pro document to a new one, and in this new document 
> hide/clear the pictures (logo) and then print


Same problem over here.
I clear the pictures with this code (V17R4):

$cPicts:=WP Get elements($oWriteProArea;wk type image)
For each ($oPic;$cPicts)
WP SELECT(oWriteProArea;$oPic)
INVOKE ACTION(ak clear)
End for each 

Unfortunately that works only if the WritePro area is in a layout.
Maybe in one of the next versions it will be possible to delete pictures in 
offscreen-areas.

Greetings from Germany,
Bernd Fröhlich
**
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: [repost - desperate]What runs before ON STARTUP?

2019-10-02 Thread Bernd Fröhlich via 4D_Tech
Chip Scheide:

> Thanks!
> I did use MCS to repair both the host and the component.
> I removed both .indy files and tried again...
> 
> Still not luck - still getting the stack space error.

Have you tried as another user / on another computer?
Just to make sure that it is not something in that specific setup that is 
causing the problem.

Greetings from Germany,
Bernd Fröhlich
**
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: Complex graph

2019-06-30 Thread Bernd Fröhlich via 4D_Tech
stardata.info:

> I've thought of this option.
> Have you a database example?

Here is part of a calendar that I create with a listbox:


The basics are quite simple:
Just setup the listbox in the form-editor (or by code if you like) and color 
the cells with
LISTBOX SET ROW COLOR

Greetings from Germany,
Bernd Fröhlich
**
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: Complex graph

2019-06-28 Thread Bernd Fröhlich via 4D_Tech
Scott Staley:

> I don't and I actually created the graph in microsoft excel and then opened
> it with view pro.

A simple graph like that can even be created using a Listbox (if you are on 4D 
V17).
Just set the background colour of the cells to any colour you like.

If it gets more complex I would use SVG.

Greetings from Germany,
Bernd Fröhlich
**
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: Custom Form Events

2019-04-25 Thread Bernd Fröhlich via 4D_Tech
Chris Belanger:

> One simple instance I want to experiment on — which, of course, is trivial, 
> is:
> 
> I have three fields (actually object attributes)
> City
> Province (or State)
> FullCityName
> 
> FullCityName is computed from City & Province
> : (City = “”) —> FullCityName := “”
> :(Province = “”) —> FullCityName := City
> else
> FullCityName := City + “, “ + Province
> 
> this same logic must be performed whenever City or Province changes.
> So it could be cool to set it as a ‘custom event’ that is ’triggered’ by City 
> and Province scripts. Naturally, it would have to take place at the end of 
> those scripts so as not to encounter unexpected behaviors.
> 
> Now, it could be copy/pasted into both City & Province scripts; it could be 
> made into a Project Method that gets called by either. Or it could be stuffed 
> into the Form Method as a ’custom event’.

Hi Chris,

I solve things like that with a Form.update property.
Whenever something gets "dirty" I set Form.update:=true and at the end of my 
Form method I have the code that updates all the dirty stuff.

Example:

case of
  :(form event= on load)
  ...
  Form.update:=true

  :(form event=on clicked)
  ...
  more event-cases here...
end case

if(Form.update)
   Form.update:=false
   ... do the necessary updating here
end if

In any button script that changes the City or Province in your example just add 
Form.update:=true

Works great, except of course for those cases where objects like listboxes are 
not fully initialized at the end of "on load".
Still need the timer clutch for that.

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

RE: Error connecting to 4D Server

2019-04-09 Thread Bernd Fröhlich via 4D_Tech
Stephen J. Orth:

> What we get are the multiple errors that started this thread, where already 
> connected clients simply can no longer talk to the server.  Either you get 
> the -10002/3/4 error message, or the one that is happening mostly is the 
> "non-blocking" error.

I encounter those from time to time. Usually that means, there are network 
related problems. (Bad/broken cable, too much load on the network, flaky VPN 
connection, etc...)
Nothing much on the 4D side that you can do about that.

Greetings from Germany,
Bernd Fröhlich
**
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 V16 R6 Vs 4D V16.5

2019-03-13 Thread Bernd Fröhlich via 4D_Tech
Milan Adamov:

> But there not announced as v16 features, that is simply not true, no one ever 
> said that. On the contrary, it is explicitly said and written many times that 
> those features are upcoming features in next major version.

So it IS a V17 beta after all...

Maybe all the folks at 4D understand how those R version numbering works, but 
for the rest of the world it is obviously quite confusing.

Gruß aus Bremen,
Bernd Fröhlich
**
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 V16 R6 Vs 4D V16.5

2019-03-13 Thread Bernd Fröhlich via 4D_Tech
Jim Dorrance:

> Wouldn't it be less confusing if 4D called v16 R6  something other
> than  v16 , because the v16 R6 new features will never be released in a v16
> upgrade.

Good Idea.
v16R6 should really be called V17Beta6. That´s what it is after all.
Would save a lot of confusion.

Greetings from Germany,
Bernd Fröhlich
**
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: Closing a window with another application in focus

2019-02-06 Thread Bernd Fröhlich via 4D_Tech
Jeffrey Kain:

> On macOS - some of the windows in my application will close if I click on the 
> close box while another application has the focus, but others don't.
> 
> Does anyone know what the secret is for this? They all close fine if 4D is 
> the frontmost application - even if other 4D windows are on top I can close 
> non-focused window with a single click to the close box.


I read about a a "click through" property (a long time ago and not connected to 
4D).
If that is not set, then the first click into a window brings it to the front 
and the second click has the desired outcome.
If it is set, then one click does both.
Not sure if that was per window or per program or if 4D even supports it.
Maybe something to do with the window type (composite vs. non composite)?

Sorry, that may be not much help, but that´s all I remember.

Greetings from Germany,
Bernd Fröhlich
**
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: REDRAW WINDOW not working v17?

2019-01-03 Thread Bernd Fröhlich via 4D_Tech
Alan Tilson:

> Hello again Bernd,
>
> I tried several other things but never got anything to work other than my
> original code.

Hi Alan,

sorry, I´m out of ideas.
If my workaround doesn´t help try to contact 4D.
Maybe someday we get a working REDRAW WINDOW command again...

Greetings from Germany,
Bernd Fröhlich
**
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
**

REDRAW WINDOW not working v17?

2019-01-02 Thread Bernd Fröhlich via 4D_Tech
Alan Tilson:

> Has anyone had issues with REDRAW WINDOW working differently or not working
> in v17? I have an output form with a boolean variable in the header that
> affects the text color of the fields in each line of output as well as
> determining which of a few optional fields are displayed. If I call REDRAW
> WINDOW after changing the boolean variable the records list does not
> change. If I click on another window and come back to the original window
> everything updates.
> 
> This worked fine in v13.
> 
> Am I missing something?

4D V6 or V7 was the last version where REDRAW WINDOW was redrawing the whole 
window, then 4D began to "optimize" the redrawing. Maybe it is faster now, but 
it definitely is no longer working as expected.
My workaround:

  // Methode: RedrawWindow
  // Angelegt: BF 16.09.03
  // Objekt: Dienstroutine
  // Beschreibung: Umgehung für das seit 4D 2003 nicht mehr zuverlässig 
funktionierende Redraw Window
  // 

C_LONGINT($lLeft;$lTop;$lRight;$lBottom)

GET WINDOW RECT($lLeft;$lTop;$lRight;$lBottom)
SET WINDOW RECT($lLeft;$lTop;$lRight-1;$lBottom)
SET WINDOW RECT($lLeft;$lTop;$lRight;$lBottom)


Gives a short flicker, but is the only way I know of to actually redraw a 
window.
Maybe someone else has found another solution without the flicker?

Greetings from Germany,
Bernd Fröhlich
**
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 Write for v17

2018-12-16 Thread Bernd Fröhlich via 4D_Tech
Mitchell Shiller:

> Where do I get a v17 version of the old 4D Write to run in 32 bit mode? Must 
> be having a brain cramp cause I don’t see it on the website.

It is a "little" bit hidden:

there is a tiny note at the bottom in light blue that says "Note about 4D v17 
32-bit versions" which will take you to another site with a lot of text and a 
link to the download at the end of the text.

I am running 4D V17 32 bit over here with 4D Write and WritePro side by side 
during the conversion.
No big problems so far. (Except that WritePro is a big pita to program but I 
guess I will have to get used to it.)

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

Re: v13 - Why can a record NOT be Pushed?

2018-11-06 Thread Bernd Fröhlich via 4D_Tech
Benedict, Tom:

> Another useful tool to avoid disturbing the current selection is to use SQL 
> queries within Begin SQL...End SQL. I use them frequently to collect data 
> from various tables into arrays (or objects if you're in the 21st Century).

If you´re really in the 21st Century, you use ORDA. No need for SQL.
(Of course that does not work in v13, but that is sooo last Century ;-)

Greetings from Germany,
Bernd Fröhlich
**
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: Defining and documenting Objects

2018-10-11 Thread Bernd Fröhlich via 4D_Tech
Dennis, Neil:

>> I LOVE it that there are no longer ANY global variables necessary when 
>> working with forms 
> 
> Is there a way to do hidden rows in a list box? So far I have not found a way 
> and still have to use a process array. If you know of something please share.

Sorry, maybe my enthusiasm got a bit far. Maybe you still need a global for 
this.
(Never tried that.)

Greetings from Germany,
Bernd Fröhlich
**
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: Defining and documenting Objects

2018-10-11 Thread Bernd Fröhlich via 4D_Tech
Peter Jakobsson:

> Out of interest, what advantages does this give you over using a global ? The 
> advantage of a global to me is that it preserves state throughout the life of 
> the form without any coding. (For example you don’t need to keep using Object 
> get Pointer(“myPopUp”) all over the place to re-create the state). Also, 
> using globals lets you do a lot of type-based debugging at compile time.

All true, but with globals you can have hard to find side effects.
E.g. i have a lot of buttons and other variables on a lot of forms use 
"standard" global variables (bOK, bCancel, bSave, bPrint, bWhetever) so that I 
don´t have to define new globals for each form.

Now and then it happened, that one form changed one of those variables that was 
also used by another form. Good luck with finding those bugs because they only 
happen now and then and are seldom reproducable.
Using only dynamic variables in my forms saves me from those headaches.

Also you don´t have a huge variable-table for each new process because 4D 
creates that table for every global variable in every process.

You have a point about using Object get Pointer to get access to the variables, 
but most of the time that is only necessary in the form method, since I handle 
almost everything in that method.

> If we take this to its logical conclusion won’t we just end up with Delphi, 
> .NET or Python instead of 4D ? (i.e. a low level environment that’s extremely 
> versatile but far less productive).

I don´t know those languages, but I can see nothing low level about 4Ds 
approach. Quite the opposite in fact.

Just my two Eurocent.

Greetings from Germany,
Bernd Fröhlich
**
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: Defining and documenting Objects

2018-10-11 Thread Bernd Fröhlich via 4D_Tech
Peter Jakobsson:

> So what I’m doing now is just using a single object to hold all form 
> properties that I’d previously used globals for. Then just use globals where 
> required for active objects like menus.

Hi Peter,

there are no globals required for menus (I assume here that you are talking 
about popup menus in the form).
Just give them an objectname, get a pointer in the "on load" phase with Object 
Get Pointer and define the array using that pointer.
Works great.

I LOVE it that there are no longer ANY global variables necessary when working 
with forms, even if the form has to give some information back to the calling 
method.
Just put that information in the Form-object and you get it back in the object 
that you passed into the form with the DIALOG command.

I think this is the best change since making pointers to local variables 
available.

I also love the .-notation for entity-selections. Now you can have multiple 
selections of one table that don´t overwrite each other.

V17 is really great (except for WritePRO which definitely needs several updates 
befor beeing able to replace 4D Write, but that´s another discussion. For now 
the old 4D Write still works in V17(32 Bit), so I am a very happy camper at the 
moment :-)

Greetings from Germany,
Bernd Fröhlich
**
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: Do I want to use SELECTION TO ARRAY instead of GOTO SELECTED RECORD server-side in V17?

2018-09-17 Thread Bernd Fröhlich via 4D_Tech
David Adams:

> I'm checking for the simplest, least difficult default as that should work in 
> the vast majority of cases.


Here are my two Eurocents:
it does not matter how you collect the data, but concatenating the text in 
memory vs. writing to a file makes a HUGE difference when you have lots of 
records.

I have a method in my toolbox  that writes out a selection or a whole table 
into a file.
Looping through the records and appending each record to a file.
Works great.

Then I did the same but instead of writing to a file, I appended to a 
textvariable.
Works well for small amounts of data but is unusable for more than about 2 
records as it slows down ever more.
(I am lazy and did not do any pre-sizing, chunking, whatever.)

So if you want to export the data anyway and look for the simplest way, then 
just loop through the data and write into a file.

Greetings from Germany,
Bernd Fröhlich
**
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 Write to 4D Write Pro

2018-08-30 Thread Bernd Fröhlich via 4D_Tech
Tim Nevels:

> The only legacy support they promised to provide is to convert legacy 4D 
> Write documents. 

And even that does have it´s problems: Line spacing is not preserved.
So if you have e.g. a 6 page 4DWrite document it is 8 pages after the 
conversion :-/

> But I have a crazy idea… 
> 
> What if someone created a 4D component that had the major 4D Write Plugin 
> commands with all the same parameters but as 4D component methods. And each 
> method accomplished the same results as the plugin command.

Would be an instant buy over here.

Greetings from Germany,
Bernd Fröhlich
**
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 record numbering system and CALL WORKER

2018-08-28 Thread Bernd Fröhlich via 4D_Tech
Kirk Brooks:

> scanning back over it a key point is that all of these
> contortions and workarounds to preserve a number sequence are based on the
> single design decision to use an invoice (in this case) number as a key
> field.

Nope, the invoice number has never been a key field over here.

Greetings from Germany,
Bernd Fröhlich
**
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 record numbering system and CALL WORKER

2018-08-28 Thread Bernd Fröhlich via 4D_Tech
Pat Bensky:

> The important thing is that all record cancellations go through a
> *CancelRecord* method.
> I created a [SpareRecordNumbers] table which contains 3 fields: unique id,
> table number, and spare record number

> As I said, it hasn't been thoroughly tested yet. So please feel free to
> chime in if you can see any flaws!


I have a similar system for invoice numbers.
Works perfectly in theory but in real life once or twice a year we got a 
missing invoice number.
Took me some time to figure out how it got lost (very obvious, once you know):

User starts writing the invoice - gets a number through the system.
User goes home, leaving the invoice open.
User is disconnected, so the number is never returned.

Now I look for lost number on every restart and if I find one I put it in the 
recycling bin.
Never lost a number since.

Greetings from Germany,
Bernd Fröhlich
**
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: Conversion to WritePro

2018-08-15 Thread Bernd Fröhlich via 4D_Tech
Pat Bensky:

> You can set the line spacing in WritePro v17 using an automatic action:
> lineHeight
> 
> *Syntax*: lineHeight?value={ | }
> 
> Paragraph line height.
> Ex: *lineHeight?value=120%*
> 
> For example:
> 
> *INVOKE ACTION*("lineHeight?value=110%")
> 
> 
> Maybe a bit of experimentation with the settings will provide the solution
> you need.

Thanks for the tip, maybe it will help when creating new documents.
But I really don´t want to change over 17 documents.
No one will ever be able to check wheather it all went right.

Greetings from Germany,
Bernd Fröhlich
**
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
**

Conversion to WritePro

2018-08-15 Thread Bernd Fröhlich via 4D_Tech
I moved our database from V16.3 to V17.0.
I converted 172300 4D Write documents from the last 20 Years to Write Pro using
[MyTable]WritePro:=WP New([MyTable]WriteBlob)

The good: conversion went without any errors. All the text seems to be there.

The bad: layout is not the same.
Documents that had e.g. 6 pages before, now have 8.
Seems like the space between lines is not kept as before.

Don´t quite know how to proceed now.
Luckily the old 4D Write still works in V17.
I guess I just stick to it until (hopefully) the conversion will keep the 
spacing in some future version.

Greetings from Germany,
Bernd Fröhlich
**
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: E-Mail in 4D

2018-08-15 Thread Bernd Fröhlich via 4D_Tech
Jody Bevan:

> The last time I wrote an E-Mail client with 4D was circuit 4D v11 and into 
> v12. It worked great. I left the programming world for a break for 2 years, 
> and then got back in.
> 
> Now I am using 16R6, and will likely move into the v17. releases for a 
> product I am working on.
> From my review today, and lurking over the last several months, it looks like 
> not much has changed within 4D to dramatically change from what I did back 
> then.


Well, there was at least one change in the V17 InternetCommands:

MSG_Extract now throws an error -35 (when I got my google-fu right that means 
"Volume not found")

Replaced IC V17 with the V16.3 version and all is well again.

Greetings from Germany,
Bernd Fröhlich
**
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: Orphaned blobs and SSD drives

2018-07-30 Thread Bernd Fröhlich via 4D_Tech
Scott Wirth:

> Is there a chance that you once had a blob field that was later converted to
> another type? If my understanding is correct this can lead to orphan blobs
> when the data in that converted field is changed, particularly if the blob
> was stored outside the datafile. I read somewhere, perhaps the KB, that if
> you change the type of a blob or picture field you should clear out the
> field before the change is made in the structure.

Could well be that one of the fields has in some point of time been a blob 
field but that must have been long ago.
I guess there is no way of finding out now.
All the data in that field would have been changed by now, so I still wonder 
where the orphans are coming from.
Not really a big problem, just a bit irritating.

Greetings from Germany,
Bernd Fröhlich
**
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: Orphaned blobs and SSD drives

2018-07-30 Thread Bernd Fröhlich via 4D_Tech
Keisuke Miyako:

> to be clear,
> 
> "BLOB" in this context means object, text, picture or BLOB field (anything 
> that can be saved outside the record).

Ah, OK.

> the table doesn't have any of those 4 types?

It does have textfields but those are all set to be stored in the record (just 
checked).
Nevertheless MSC tells me that there are orphaned blobs in that table.
I have no idea where they come from.

After the error Message there is a "(5;55)" displayed. Do you know what those 
mean? (It´s not the tablenumber).

As I said, I can repair the datafile to get rid of the orphans but after some 
time they are there again.

Greetings from Germany,
Bernd Fröhlich
**
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: Orphaned blobs and SSD drives

2018-07-30 Thread Bernd Fröhlich via 4D_Tech
Tim Nevels:

> Orphaned blobs are not serious. They are due to a bug in 4D. It’s not really 
> corruption. It’s just some blobs — the ones attached to blob fields that you 
> have set to store the blob outside the record but in the data file — are 
> hanging around in the data file and they are not attached to any records. 
> They are like crumbs laying on the floor. If you don’t mind a little dirt on 
> the floor no big deal. If you like a clean floor, then you want to remove 
> those unused and unneeded orphan blobs. 
> 
> I certainly hope 4D has fixed the bug that caused these orphan blobs to 
> appear.


Similar problem here. From time to time when I check with MSC I get a message 
about orphaned blobs.
I went the compact way and the blobs were gone, but popped up again some weeks 
later.
Funny thing is: that table does not even HAVE a blob field. Go figure...
Now I just ignore those errors but still hope that 4D will find and fix it.
I prefer a datafile that comes out "clean" when I check with MSC.

Greetings from Germany,
Bernd Fröhlich
**
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: Trouble Decoding Base64 Text

2018-06-30 Thread Bernd Fröhlich via 4D_Tech
Dave Nasralla:

> Nevermind, though I'm not entirely sure this isn't a kind of bug.
> If you change the Encoding by adding two equal signs to the end
> "eyJ1c2VySWQiOiJiMDhmODZhZi0zNWRhLTQ4ZjItOGZhYi1jZWYzOTA0NjYwYmQifQ=="
> 
> It properly decodes to:
> {"userId":"b08f86af-35da-48f2-8fab-cef3904660bd"}

It´s not a 4D bug although 4Ds implementation could be better.
If you base64 encode your string the correct result includes the == at the end.
If you ommit them, then some decoders are more robust than 4Ds and can decode 
the string anyway but technically the string without the == ist not a properly 
base64 encoded string.

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Delay process bug

2018-06-19 Thread Bernd Fröhlich via 4D_Tech
Jeffrey Kain:

> It seems like a big clue is that the 4D Server user interface stops updating 
> when this happens. Like the internal clock/heartbeat/metronome of 4D Server 
> just stops, and DELAY PROCESS comes along for the ride.

Server might be a clue indeed. It happened only on the Server over here.
Although the server interface was still working when I encountered the bug.

How about the others that have been bitten?
Anyone here where the bug was encountered on a client (or standalone)?

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Delay process bug

2018-06-18 Thread Bernd Fröhlich via 4D_Tech
Keisuke Miyako:

> it's not that the DELAY P. has a problem resuming,
> the problem manifests itself when the codes pauses a process that is already 
> in "delay" status.
> a double resume is required to cancel a delay-double combo.

That would be another bug then.

Over here it was a simple loop with Delay Process that stopped working after 
some time. It just did not wake up anymore. No Pause Process involved.

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Delay process bug

2018-06-15 Thread Bernd Fröhlich via 4D_Tech
Bryan Green:

> Actually, that's exactly what I meant -- short-term (5 minutes, 10 minutes, 
> etc.) kind of delay using DELAY PROCESS is more stable than something like 12 
> hours, 1 day, etc. using DELAY PROCESS.

If by "more stable" you mean "hangs only every few weeks" that may be right.
I still would not use it at the moment.
Until it stopped beeing reliable I used it to delay a process by 10 seconds.

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Delay process bug

2018-06-13 Thread Bernd Fröhlich via 4D_Tech
Cannon Smith:

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


I also have a palette window that runs On Timer.
So the workaround for the Delay Process bug was quite simple over here.
I replaced Delay Process with Pause Process (which is what Delay Process does 
anyway when the bug bites).
In On Timer I call Resume Process.
Never had any problems since I did it that way.

(Still this is only a workaround and the bug should of course be fixed by 4D. 
Until it is fixed Delay Process is a command that should be avoided.)

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: High Sierra - Export Text in 4D v13.6

2018-06-06 Thread Bernd Fröhlich via 4D_Tech
setar accnt:

> Came across a weird behavior and want to know if anyone else has encountered 
> this and how to solve this (mac & V13.6 & v15)
> I use a document (“StoreHere.txt") in the Resources folder to store some data 
> in it, to be used later. 
> 
> After using the command Export Text, the document is ‘updated’ allright BUT 
> there is a .temp file with a long filename 
> (“07B29AA87F90481387491D4EEF206BB6.temp”) ALSO created in that Resource 
> folder. 
> 
> But this is not wanted because every time the export is performed a new file 
> with long name is created !!
> 
> It does this ONLY with High Sierra (10.13.4), none of the previous mac os X 
> has this (I tested this). 
> (fyi: 4D v15 & up do not exhibit this behavior with os 10.13.4 )
> 
> Have a test db V13.6 with 1 table and 1 or 2 fields (doesn’t matter how many) 
> and 2 or more records. 
> I use one LongInt and one Text field.
> 
> then make a method that I can call using a button on the layout.
> 
> this is the method: 
> C_TEXT($sDocName)
> 
> $sDocName:=Get 4D folder(Current Resources folder)+"StoreHere.txt”


Might have to do with how High Sierra is putting Apps in a sandbox if they are 
not in the Applications directory.
I had something similar happen a while ago. I don´t remember the details but if 
you download 4D in a directory that belongs to a "normal" user you can start it 
like before, but the OS is putting it in a sandbox directory with a random name 
like 07B29AA87F90481387491D4EEF206BB6.
So if you use commands like Get 4D folder it does not return the folder where 
you THINK that 4D is located but the name of the random sandbox folder.

If you move 4D into the application folder you are asked to authorize with your 
admin password and the OS removes that quarantine-bit (or whatever it uses to 
mark the app). So from then on everything works as expected even when you the 
copy 4D from the applications folder to any other place.

As I said, my memory is a bit vague but I think your problem might be connected 
to this behavior of macOS.

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Bug or feature?

2018-04-07 Thread Bernd Fröhlich via 4D_Tech
David Adams:

> If anyone can suggest why this might be happening, I'd love to hear about it.

If I understood your description correctly, then the code only blows up if you 
process lots of data and not if you test every piece of data individually.

If that is the case then I would guess there might be a memory leak somewhere.

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: 4D data on the web - what do you use?

2018-03-15 Thread Bernd Fröhlich via 4D_Tech
John Baughman:

> I use Xojo, http://xojo.com. I may be the only 4D developer on the planet 
> that uses Xojo.

No, you are not alone :-)

I have written an iOS app to access data that comes from our 4D server using 
the REST approach.
So there is no zoo of ever changing languages/libraries, just 4D and Xojo.

Xojo has its own learning curve of course but since I know it from the start as 
RealBasic 1.0 that was no big problem for me.

If you have to learn anything besides 4D anyway, I would recommend to have a 
good look at Xojo.

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: European Data Protection Reglementation to take effect on May 25 - 4D compliance?

2018-02-11 Thread Bernd Fröhlich via 4D_Tech
Stephen Shaw:

> You may find the UK’s ICOs website more user friendly.
> 
> https://ico.org.uk 

Yup. It´s short and gets right to the point:

"We're sorry, but our website is unavailable at the moment. Please try again 
later.

We apologise for any inconvenience caused."

 :-))

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: 4D Parameter

2018-02-07 Thread Bernd Fröhlich via 4D_Tech
Tim Nevels:

> So I am assuming you are talking about “Stored Procedures” running on 4D 
> Server. Yes, you can slow them down and reduce the load on 4D Server. We call 
> it “throttling”. (Remove foot from the throttle pedal.)
> 
> To do this, add DELAY PROCESS(Current process;$delayTicks_l) in different 
> places. This will cause the process to pause for a short time and take zero 
> server CPU resources. Then it wakes up and resumes execution. 

..unless 4D decides to pause that process so that it never wakes up by itself 
and has to be kicked to action from the outside.

Before using DELAY PROCESS for anything critical I would wait until that 
elusive bug is fixed (or at least put in some code that detects such hangs.)

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: Problems installing built application

2018-02-06 Thread Bernd Fröhlich via 4D_Tech
macjimbo:

> Is there no way to get a built application to remember the location of the
> data file between application upgrades?

Have a look at 4D-link files.
Basically you store information about the datafile and program in the link-file 
and the user just doubleklicks the link file.
I don´t know if it works for built applications though.
Just try it out.

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: Problem with PDF Creation into Temporary Folder

2018-02-03 Thread Bernd Fröhlich via 4D_Tech
Stephen Shaw:

> Error -43 is returned on the following line
> $error:=SMTP_Attachment ($smtp_id; $document; 2; 0; ””; ”application/PDF”)

Error -43 is the OS error "file not found". 

Maybe try a shorter path to a known good location for a test.

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: "Goodbye 4D Write" email

2018-02-01 Thread Bernd Fröhlich via 4D_Tech
Don Lapin:

> You did not answer the question regarding whether 4D will continue to work 
> with 4D Write (the regular version, not the Pro). That's my primary concern 
> at the moment.

From my understanding the "old" 4D Write will continue working in 32Bit 
versions of 4D. There will be no 64Bit versions of 4D Write.

I sincerely hope that V17 and maybe V18 will still be available in 32Bit 
versions so we can continue using Write until WritePro will offer all the 
features of the old Write.

One thing that is missing for me is freely placing pictures on a page.

Rewriting all the old code will be a PITA for sure, but I guess it will have to 
be done sometimes in the next few years.
Fine with me, but I can only rewrite my code if the new version covers all the 
options that exist in the old version.
My users rightfully would complain if a new version would miss some features 
that have been there for decades.

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: Intermittent 4D Server / System crashes

2018-01-29 Thread Bernd Fröhlich via 4D_Tech
Mitchell Shiller:

> 4D Server 16.2
> Mac OS  10.13.2 running on a MacMini (Late 2014) 8GB RAM
> External RAID 0+1 Samsung SSD. Using SoftRaid XT 
> 
> Only applications running are:
> 4D Server (no stored procedures), 15 users
> Carbon Copy Cloner 5.05 (latest) scheduled to run every hour except from 
> 22:00 - 6:00 when there are no users logged in)
> Retrospect Client (14.6.0.127 latest) (which backs up a second attached drive 
> that contains the 4D backup files at 23:00)
> 
> I have been having  intermittent system crashes. These happen every 2-5 
> days.. Never when the system is in use. (8-21:00) Usually  early in the 
> morning long after Retrospect has run. Retrospect Client takes about 15-30 to 
> back up to our main Server. 
> I get the spinning beach ball of death. So it is not just a 4D crash.  
> Nothing is responsive. The computer requires a hard reboot to get going again 
> and then I am fine for 2-5 days.
> Usually no users are logged in at the time.
> 
> In the console I get the following information from the most recent 2 crashes;
> 
> https://www.dropbox.com/sh/2xejz2dehwqf3wu/AADcablM2L7vzu8uLRxY0-Hxa?dl=0
> 
> I have tested the disk integrity, RAM integrity. All OK. I changed to a new 
> computer with no change.
> The previous computer was running 10.12
> I contacted the SoftRaid support who downloaded  a crash report and stated 
> that the crash is not happening with a disk access to the RAID system.
> 
> 
> Any idea what the next step should be?


Hi Mitchell,

we had almost the same problem over here with the same hard- and software 
(minus the raid. Just a mini with High Sierra).
It was not the beachball of death but 4D Server just crashed every few days 
without any pattern (sometimes at night, sometimes during the day).
We tried everything to no avail.
What finally worked was to go back to El Capitan on the Server.
From then on we had no more crashes (you could try Sierra, maybe that would 
work too).
Must be some incompatibility of 4D V16 with High Sierra.

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: "Failed to synchronize Resources folder." Error

2018-01-16 Thread Bernd Fröhlich via 4D_Tech
Randy Jaynes:

> Bizarre, but true: When the user gets this dialog, she can continue on in. 
> Then immediately log out, then log back in with no issues.

To me that sounds as if some other software (malwareprotection or other 
diskcleaning stuff) has that file locked at the first attempt, so that 4D 
throws the error, while at the second attempt no other software is messing with 
that file.

Would be interesting to see if that error pops up on a computer with no 
"file-messing" software installed (not just turned off).

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: DELAY PROCESS bug

2018-01-08 Thread Bernd Fröhlich via 4D_Tech
John DeSoi:

> Are you having this issue with the server, client, or both? I'm just seeing 
> it with 4D Client. My new theory is that during a long delay 4D Server 
> disconnects the client because there is no activity and 4D Server timeout 
> (selector 13 for SET DATABASE PARAMETER) is reached. This may be wrong 
> because I ran experiments yesterday and still could not reproduce the 
> problem. But I changed the database setting in the dialog from 15 minutes to 
> unlimited and the client did not hang last night as it has the last several. 

I had the problem on the Server (Mac). About once a month my Cron-process would 
delay and never wake up again.
It can´t be an uptime-issue because the 4D-server is restarted every night.
It happend on every time of day, so no consistancy there either.
No idea what the cause may be.

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: DELAY PROCESS bug

2018-01-07 Thread Bernd Fröhlich via 4D_Tech
Drew Waddell:

> That's not really a solution though, we'd have to write like a process 
> watching that would have to make a call that process needed to be revived.

Just make sure the watching process does not depend on using Delay Process for 
itself.

Since Delay Process sometimes just behaves like Pause Process, I decided to use 
Pause Process instead and wake it from another process that uses a window with 
a timer to do a Resume Process.

Works fine so far.

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: 4D v16.2 false record locks

2017-10-04 Thread Bernd Fröhlich via 4D_Tech
David Adams:

> ..but seriously, what I'd like to see 4D do is an *entire release* that
> consists of *nothing* but fixing bugs - as many as they can find, as many
> as we can find and longstanding annoyances. No fancy new features. Just
> cleaning up crashes, usability bugs (I see lingering 2004 or V11 usability
> bugs in the Design environment every single day in V16) and other weird
> stuff.

YES, PLEASE!!!

It is NOT my job as a 4D user to jump through hoops the report bugs and not 
even be able to see reported bugs of others.
It is 4Ds job to fix bugs that they know of, regardles where they got to know 
them.

When I find a bug, I report it here to warn other users, find a workaround and 
move on.
When 4D decides to make their bug list public (like e.g. Xojo does), I might 
change my view.

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: Server Process "Frozen"-ish

2017-09-14 Thread Bernd Fröhlich via 4D_Tech
Cannon Smith:

> Thanks for the idea. I did try that before to see if I could jumpstart the 
> process, but unfortunately it doesn’t work. 4D thinks the process is already 
> there. And it it there. It just doesn’t seem to be executing.

Yep, same here.
I do have a method that would start the process again. Problem is: when it 
hangs it can´t be quit, even from the Server-admin-window.

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

Object fields (Was: Re: QUERY BY ATTRIBUTE is slow af)

2017-09-13 Thread Bernd Fröhlich via 4D_Tech
David Adams:

> I've been asking about real-world use of object fields for quite some time

Here´s my real-world use:
I wrote an iPhone app that collects data (scans barcodes).
That data is in JSON format and transferred via HTTP to a 4D Server.
The server stores that data in an object field (which is never queried. It just 
holds the collected data).
The beauty is: when I need to send additional data that I did not think of 
while writing the app, I just stuff that data into the JSON along with the rest.
Of course the parsing routine on 4D Server has to be tweaked to make use of the 
additional data, but that´s all that is needed.
I am quite happy with this approach.
The same would work with a text- or blob-field to store the data, but an object 
field makes it a bit easier.

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: Server Process "Frozen"-ish

2017-09-11 Thread Bernd Fröhlich via 4D_Tech
Cannon Smith:

> I’ve seen something odd since upgrading our customers to v16.1 a few months 
> ago. This is on 64-bit server, both platforms. There are a few background 
> processes that continually run on the servers, waking up every few seconds to 
> see if there is work to be done. This has worked without problem for a decade 
> now, but starting with v16.1 we occasionally have a process the just sort of 
> quits.
> 
> By occasionally, I mean maybe once in 2-3 months per server. Little enough 
> that I didn’t pay much attention at first—just relaunched the server. But 
> cumulatively (across all servers) it has happened probably 20-30 times in the 
> last few months.
> 
> By the process sort of quitting, I mean that the tasks it is supposed to take 
> care of just stop getting taken care of. The activity monitor shows the 
> process is still there and nothing I have noticed seems out of the ordinary. 
> It’s like the code just quit executing in that process.
> 
> I know I need to get more detailed information and will start trying to do 
> that, but wonder if anyone has experienced anything similar that might give 
> me a starting place to look?


Same here. 4D V16.1 32 Bit on OS X 10.11.6.
A background process does some reporting, sends and receives mails, etc.
Every once in a while it just stops. No idea why. At least I am not the only 
one.
Now we just have to find what is common on all our servers...

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: 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: Rotate Picture in 4D

2017-06-27 Thread Bernd Fröhlich via 4D_Tech
Peter Mew:

> I am trying to use Miyako's rotate picture component in v13.
> I dont know if its not compatible but It wont run.

Hi Peter,
I had some problems also (not sure what exactly), so I rolled my own:

  // Methode: PIC_Rotate
  // Angelegt: BF 04.04.12
  // Objekt: Bildbearbeitung
  // Beschreibung: Dreht das übergebene Bild um 90,180 oder 270 Grad im 
Uhrzeigersinn
  // 

C_PICTURE($1;$Pict)
C_LONGINT($2)  //Rotationsgrad
C_PICTURE($0)

C_LONGINT($lWidth;$lHeigth;$lMax)
C_TEXT($tSVGRoot;$tPicRef)

PICTURE PROPERTIES($1;$lWidth;$lHeigth)
CREATE THUMBNAIL($1;$Pict;$lWidth;$lHeigth)  //EXIF-Daten entfernen, sonst geht 
SVG_SET_TRANSFORM_ROTATE schief, wenn EXIF-Tags am Bild kleben, die auch schon 
Rotationsinfos enthalten!
$lMax:=MaxInt ($lWidth;$lHeigth)
$tSVGRoot:=SVG_New ($lMax*2;$lMax*2)  //Bereich der gross genug ist, Platz für 
das Bild und die Rotation zu haben
$tPicRef:=SVG_New_embedded_image ($tSVGRoot;$Pict;$lMax;$lMax)  //Obere Linke 
Ecke des Bildes ist jetzt am Punkt $lMax,$lMax. Um diesen Punkt wird das Bild 
rotiert
SVG_SET_TRANSFORM_ROTATE ($tPicRef;$2;$lMax;$lMax)
$0:=SVG_Export_to_picture ($tSVGRoot;1)
  //Jetzt noch den gedrehten Teil wieder extrahieren:
Case of 
: ($2=90)
TRANSFORM 
PICTURE($0;Crop;$lMax-$lHeigth;$lMax;$lHeigth;$lWidth)  //Breite und Höhe 
vertauscht, da das Bild gedreht wurde
: ($2=180)
TRANSFORM 
PICTURE($0;Crop;$lMax-$lWidth;$lMax-$lHeigth;$lWidth;$lHeigth)
: ($2=270)
TRANSFORM PICTURE($0;Crop;$lMax;$lMax-$lWidth;$lHeigth;$lWidth) 
 //Breite und Höhe vertauscht, da das Bild gedreht wurde
Else 
g4D_AlertErrCaseOf (Current method name;String($2))
End case 
SVG_CLEAR ($tSVGRoot)


Works, but unfortunately is quite slow.
I wonder when 4D will implement a native picture rotate method.
I think it is much needed.

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: Storing an using Print sttings

2017-06-23 Thread Bernd Fröhlich via 4D_Tech
Keisuke Miyako:

> the commands are deprecated in v16,
> in favour of a native command.
> 
> http://doc.4d.com/4Dv16/4D/16/BLOB-to-print-settings.301-2999340.en.html

"The parameters set are used more particularly by the PRINT SELECTION, PRINT 
LABEL, PRINT RECORD, Print form and QR REPORT commands, as well as by the menu 
commands of 4D, including those of the Design environment."

What about WritePro? Does that respect "BLOB to print settings" as well, or 
does it use something different?

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: Enterable Variables in Output Form headers

2017-06-20 Thread Bernd Fröhlich via 4D_Tech
Robert Livingston:

> But I am curious and ask the assembled crowd. Has everyone basically given up 
> on using DISPLAY/MODIFY SELECTION? The cool kids have moved on?

Not sure if I´m a cool kid but I don´t use DISPLAY/MODIFY SELECTION anymore.
Selection based Listboxes are really comfortable.

Just my 2 Eurocent.

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

TEXT TO ARRAY won't break solid text

2017-06-01 Thread Bernd Fröhlich via 4D_Tech
Don Lapin:

> Does anyone know how to measure the size of an unbroken text string, in a 
> particular font, size, etc, such as --
> 
> But because TEXT TO ARRAY doesn't work on the codes, I get --


I think this was one of the reasons I still use hmFree 


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: Write Pro beginner question

2017-05-30 Thread Bernd Fröhlich via 4D_Tech
Pat Bensky:

> Please don't cry, Bernd :)
> I think you have slightly misunderstood ST SET PLAIN TEXT. In this context
> PLAIN TEXT means *unformatted*, rather than *unstyled*. In other words, ST
> SET PLAIN TEXT inserts text into whatever styling is already in place. So
> to remove the bold, you would need to change the style.
> 
> I would liken it to using Style Sheets in a regular word processing
> program. You've applied a style to some text, and then you've added more
> text without changing the style.
> 
> I am still trying to get my head around the way 4D Write Pro handles text
> styling. Take a look at Bookmarks
> http://doc.4d.com/4Dv16/4D/16/Accessing-document-contents-by-programming.300-3051923.en.html
> and Attributes
> http://doc.4d.com/4Dv16/4D/16/WP-SET-ATTRIBUTES.301-3048101.en.html


Thanks for the help and the links Pat.
I´m very slowly beginning to understand the concepts used by WritePro.

In 4D Write I could just set all the attributes to my liking and then insert my 
text.

In WritePro I have to insert the text, select the inserted text and then apply 
attributes.
Seems all very backwards to me.
Takes about double the lines of code and is four times as hard to understand 
(at least for me).

Well, I guess I will have to get used to it.

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

Write Pro beginner question

2017-05-29 Thread Bernd Fröhlich via 4D_Tech
(First mail was truncated, so here I go again)


I am doing lots of work with 4D Write and really like it.

Now I am trying to take my first babysteps with 4D WritePro (V16.1).
Unfortunately I am falling down at each little step so far and need a grown-up 
to help me before I start crying really loud.

What I did a lot in 4D Write is to create documents/reports/etc. in methods, 
e.g.:

$lArea:=WR_InitArea 
WR SET FONT ($lArea;"Lucida Grande")
WR SET TEXT PROPERTY ($lArea;wr font size;14)
WR INSERT TEXT ($lArea;"Title\r\r")
WR SET TEXT PROPERTY ($lArea;wr font size;12)
WR INSERT TEXT ($lArea;"Some plain text")
WR SET TEXT PROPERTY ($lArea;wr bold;1)
WR INSERT TEXT ($lArea;"Some bold text")
WR SET TEXT PROPERTY ($lArea;wr bold;0)
WR INSERT TEXT ($lArea;"Some more plain text")


First try in WritePro:

$oArea:=WP New
ST SET TEXT($oArea;"Line 1\r";ST End 
text)
ST SET PLAIN TEXT($oArea;"Line 2";ST End text)

I would expect that gets me a document with "Line 1" in bold and "Line 2" in 
plain.
What it actually does is giving me 2 bold lines.
What am I doing wrong?

text-decoration: underline is not working at all.

Next question:
How do I set up a default font size and style?
Or do I really have to tell WP all those information with every SET TEXT 
command?
That seems overly complicated.

I read through the sparse documentation for hours but that confuses me more 
than it helps.

Thanks for any hints.

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

Write Pro beginner questions

2017-05-29 Thread Bernd Fröhlich via 4D_Tech
I am doing lots of work with 4D Write and really like it.

Now I am trying to take my first babysteps with 4D WritePro (V16.1).
Unfortunately I am falling down at each little step so far and need a grown-up 
to help me before I start crying really loud.

What I did a lot in 4D Write is to create documents/reports/etc. in methods, 
e.g.:

$lArea:=WR_InitArea 
WR SET FONT ($lArea;"Lucida Grande")
WR SET TEXT PROPERTY ($lArea;wr font size;14)
WR INSERT TEXT ($lArea;"Title\r\r")
WR SET TEXT PROPERTY ($lArea;wr font size;12)
WR INSERT TEXT ($lArea;"Some plain text")
WR SET TEXT PROPERTY ($lArea;wr bold;1)
WR INSERT TEXT ($lArea;"Some bold text")
WR SET TEXT PROPERTY ($lArea;wr bold;0)
WR INSERT TEXT ($lArea;"Some more plain text")
.
**
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: Favorite tricks and keystrokes: Please take one and leave on

2017-05-29 Thread Bernd Fröhlich via 4D_Tech
Douglas von Roeder:

> I *do* like how it works - if something's selected, Ctrl-k will go to its
> definition

Yup, works. I like that and use it quite often.

> but if nothing's selected, Ctrl-k opens the Explorer.

Nope, not in V16.1 on macOS 10.12.5


My favorite trick:
moving a selection of code with alt+uparrow/downarrow

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: v13 - Warning Compiler misses syntax error

2017-05-25 Thread Bernd Fröhlich via 4D_Tech
Chip Scheide:

> I accidentally typed the following line of code:
> $0:=(Type($To_Validate->->)=Is Pointer)
> 
> Notice anything wrong?
> At least the compiler did not...
> 
> Error is :
> ->->

That is not an error. $To_Validate could be a pointer to a pointer, so from the 
compiler´s viewpoint all is fine.

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: repost : Printer selection issue

2017-03-24 Thread Bernd Fröhlich via 4D_Tech
Chip Scheide:

> I have found that the margins(?) or Page Size(?), are different than 
> the Xerox printers that are used here, and probably different than any 
> actual printer. This affects printing, usually by causing an extra 
> blank page to be printed.  In some instances the blank page is first, 
> and others it is after. Either way, when working with printing 
> precisely aligned forms (customized label forms) this causes a problem.
> 
> The users know, or at least should know by now, to select a specific 
> printer in the page setup dialog; however, often they don't, and this 
> screws up label printing.


I had a similar problem over here. (Users almost never remember to change the 
printer. And to be honest: they shouldn´t have to.)
Solution:
I have a record with user preferences.
In the input form for those preferences I have a button for the user to select 
the print settings.

Those settings are stored via
[User]WR_PrintSettings:=WR Print settings to BLOB ($lArea)

Before I start a printjob I call BLOB to print settings
WR BLOB TO PRINT SETTINGS ($lArea;[User]WR_PrintSettings;wr layout and print 
settings)

As you can see from my example I do most of my printing with 4D Write but I 
guess the same should work with
Print settings to BLOB
and
BLOB TO PRINT SETTINGS

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: osx open url vs osascript FYI

2017-03-11 Thread Bernd Fröhlich via 4D_Tech
David Ringsmuth:

> I tried many different things to launch a .htm on OSX using OPEN URL, and it 
> would not automatically open the document.


Have you tried using ".html" instead of ".htm"?
What happens if you doubleclick your .htm-document in the finder?

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: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-10 Thread Bernd Fröhlich via 4D_Tech
Kirk Brooks:

> If a subsequent call to sequence number is made it causes the sequence to
> increment. So the final call my test method makes causes the sequence to
> increment by 3 even through at the time that call is made the other
> processes have quit and 'released' their numbers.

Yes, if you try to follow the logic it might be a bit strange but what counts 
for me is:
It just works.

I use Sequence Number to fill my primary key fields for ages.
In the last milennium there was a bug with Sequence numbers but that has long 
been fixed.

You don´t have to think about multiple processes, transactions, etc. if you use 
the Sequence Number command.
Of course you could run your own, but why would I do that?
Never change a running system.

(Just my 2 Eurocent)

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