Re: Automatic type-ahead on single-column listbox?

2017-06-27 Thread Guy Algot via 4D_Tech
It does if it’s only a single column. You don’t use a listbox, you use a 
hierarchical list.

If it’s more than one column then ditch the listbox and use DisplayList or ALP.

> On Jun 27, 2017, at 3:14 AM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I might be remembering this wrong, but I thought that 4D had a built-in way
> of letting you type ahead to a row in a listbox. I have a one-column
> listbox based on an array and want to select items by type. Like, typing
> 'ca' selects the first item starting with 'ca'.


Later,
Guy

--
Guy Algot, Solutions Specialist
Edmonton, Alberta
(780) 974-8538

hardware, installation, training, support, programming, internet
specializing in 4th Dimension
=-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Microsoft is a cross between the Borg and the Ferengi. Unfortunately,
they use Borg to do their marketing and Ferengi to do their programming."
-- Simon Slavin



**
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: Automatic type-ahead on single-column listbox?

2017-06-27 Thread Sujit Shah via 4D_Tech
There are some really nice TA examples on the french forum  also our Man
Keisuke.. I think it is a KB called Address Validation or something
similar. I like the way Keisuke use Styled text to generate double row list
boxes that pretty much look like JS drop downs.


On Wed, Jun 28, 2017 at 12:52 PM, John DeSoi via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> > On Jun 27, 2017, at 8:54 PM, Wayne Stewart via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Have 36 buttons that trigger to the 26 characters and 10 numerals.
> >
> > These are combined into a string and if that text is found (in the
> current
> > sorted column) that line is highlighted.
> >
> > If there is no typing after one second then the buffer is cleared.
>
> I did the same thing years ago for AreaList. But bringing this up again
> makes me wonder if you could make it much nicer now by just putting one
> button and duplicating it on the fly for all the letters and numbers. Maybe
> even a subform (or master form) somehow to make it easy to add to any form.
>
> 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
> **
>



-- 

xxx
"There must be ingenuity as well as intention, strategy as well as
strength. "
**
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: Automatic type-ahead on single-column listbox?

2017-06-27 Thread John DeSoi via 4D_Tech

> On Jun 27, 2017, at 8:54 PM, Wayne Stewart via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Have 36 buttons that trigger to the 26 characters and 10 numerals.
> 
> These are combined into a string and if that text is found (in the current
> sorted column) that line is highlighted.
> 
> If there is no typing after one second then the buffer is cleared.

I did the same thing years ago for AreaList. But bringing this up again makes 
me wonder if you could make it much nicer now by just putting one button and 
duplicating it on the fly for all the letters and numbers. Maybe even a subform 
(or master form) somehow to make it easy to add to any form.

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

Re: Automatic type-ahead on single-column listbox?

2017-06-27 Thread Justin Carr via 4D_Tech
On 28 Jun 2017, at 12:01 pm, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> On Wed, Jun 28, 2017 at 11:54 AM, Wayne Stewart via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Hi,
>> 
>> I did it with help from Dave Batton (so you can imagine how fresh this
>> solution is)!
>> 
>> The way it works is this and you will laugh/wince.
>> 
> 
> Dang, I'm kind of impressed. That's actually a lot easier than a lot of
> solutions would be! I guess that you could set it up to be pretty easy to
> copy and paste between forms and then just tweak it a bit for the target
> object. Hmmm.

Hey David

We do it using ON EVENT CALL to trap the keystrokes. Slightly less clunkier 
than Wayne's approach but to be fair I'm not a huge fan of ON EVENT CALL. Its 
scope is application wide so you need to take care to disable it or uninstall 
it when the window you need it for no longer has the focus. Which way to go 
depends on your particular situation. We use an event handler pretty much 
continuously in our appointments book and we found that it was better to 
enable/disable it (with accessor methods on an IP var) rather than uninstall it 
and re-install it every time the window loses/gains focus. The event handler is 
actually instantiated by 4D as a separate local process so we were creating and 
destroying the process more or less continuously, i.e. every time the user did 
anything other than type a keystroke.

Certainly if 4D were to make it a listbox option we would breathe a little 
easier. :)

cheers
J
**
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: Automatic type-ahead on single-column listbox?

2017-06-27 Thread David Adams via 4D_Tech
On Wed, Jun 28, 2017 at 11:54 AM, Wayne Stewart via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi,
>
> I did it with help from Dave Batton (so you can imagine how fresh this
> solution is)!
>
> The way it works is this and you will laugh/wince.
>

Dang, I'm kind of impressed. That's actually a lot easier than a lot of
solutions would be! I guess that you could set it up to be pretty easy to
copy and paste between forms and then just tweak it a bit for the target
object. Hmmm.
**
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: Automatic type-ahead on single-column listbox?

2017-06-27 Thread Wayne Stewart via 4D_Tech
Hi,

I did it with help from Dave Batton (so you can imagine how fresh this
solution is)!

The way it works is this and you will laugh/wince.

Here is a screenshot of the form:

http://www.4dsupport.guru/iNUGPictures/2017/Select.png

Have 36 buttons that trigger to the 26 characters and 10 numerals.

These are combined into a string and if that text is found (in the current
sorted column) that line is highlighted.

If there is no typing after one second then the buffer is cleared.



Regards,

Wayne


[image: --]
Wayne Stewart
[image: http://]about.me/waynestewart



On 28 June 2017 at 11:07, David Adams via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> On Wed, Jun 28, 2017 at 1:01 AM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
> I've been messing around with type ahead recently. I came across that as
> > well and I seem to recall the solution was some 'regular' type ahead
> > methodology wired up to the list box. So you'd still have the list object
> > as a separate object on your form and move/show it when doing entry on
> the
> > listbox cell. Then hide it when done. And if you want to include a
> 'shadow'
> > TA object (to show what the TA completion would be if you selected it at
> > that moment - looks like the placeholder) it's more complicated by issues
> > of transparency and z-axis locations. Sigh.
> >
>
> Sigh :( Thanks for letting me know all the same
>
> If anyone can think up a clear feature request, post back here! This looks
> like something a lot of folks would vote for. It's an ideal request in a
> few ways because
> * Lots of people already want it.
> * Lots more people would want it as soon as it was available.
> * It's sounds pretty over-the-top hard to do today.
>
> I'd bet 4D could do a very nice job of adding as an optional behavior on a
> listbox column. Like, 'it has to be sorted and then when the object has
> focus, we'll use a binary search to find the best place for where they've
> typed.' After that, they could apply the same logic to the Explorer window
> where type-ahead only seems to respect 2-3 characters...
> **
> 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: Automatic type-ahead on single-column listbox?

2017-06-27 Thread David Adams via 4D_Tech
On Wed, Jun 28, 2017 at 1:01 AM, Kirk Brooks via 4D_Tech <
4d_tech@lists.4d.com> wrote:

I've been messing around with type ahead recently. I came across that as
> well and I seem to recall the solution was some 'regular' type ahead
> methodology wired up to the list box. So you'd still have the list object
> as a separate object on your form and move/show it when doing entry on the
> listbox cell. Then hide it when done. And if you want to include a 'shadow'
> TA object (to show what the TA completion would be if you selected it at
> that moment - looks like the placeholder) it's more complicated by issues
> of transparency and z-axis locations. Sigh.
>

Sigh :( Thanks for letting me know all the same

If anyone can think up a clear feature request, post back here! This looks
like something a lot of folks would vote for. It's an ideal request in a
few ways because
* Lots of people already want it.
* Lots more people would want it as soon as it was available.
* It's sounds pretty over-the-top hard to do today.

I'd bet 4D could do a very nice job of adding as an optional behavior on a
listbox column. Like, 'it has to be sorted and then when the object has
focus, we'll use a binary search to find the best place for where they've
typed.' After that, they could apply the same logic to the Explorer window
where type-ahead only seems to respect 2-3 characters...
**
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 (+?) - Replace String [warning]

2017-06-27 Thread Alan Chan via 4D_Tech
Hi Chip,

Try the following and it should be done in a second or 2 (compiled).

  //ES_ReplaceStr_Shrink($source;$oldString;$newString;{$count 
pointer})->Resulted text
C_TEXT($0;$1;$2;$3;$source;$oldStr;$newStr;$result;$tempTxt)
C_POINTER($4)
C_LONGINT($oldLen;$newLen;$oldStrLen;$NewStrLen;$count;$offset;$offset2;$start;$pos)
C_BLOB($blob;$blob2)
$source:=$1
$oldLen:=Length($source)  //$source is the source text
$oldStr:=$2
$newStr:=$3
$oldStrLen:=Length($oldStr)
$newstrlen:=Length($newStr)

SET BLOB SIZE($blob;$oldlen*2+9;0)
$offset:=9
$start:=1
$count:=0
Repeat 
$pos:=Position($oldstr;$source;$start;*)
If ($pos>0)
$tempTxt:=Substring($source;$start;$pos-$start)+$newStr
$start:=$pos+$oldStrLen
If (Length($tempTxt)>0)
$offset2:=0
VARIABLE TO BLOB($tempTxt;$blob2;$offset2)
COPY BLOB($blob2;$blob;9;$offset;$offset2-9)
$offset:=$offset+$offset2-9
End if 
$count:=$count+1
End if 
Until ($pos=0)

If ($count>0)
If ($start<=$oldlen)
$tempTxt:=Substring($source;$start)
If (Length($tempTxt)>0)
$offset2:=0
VARIABLE TO BLOB($tempTxt;$blob2;$offset2)
COPY BLOB($blob2;$blob;9;$offset;$offset2-9)
End if 
End if 
If ($oldStrlen>$NewStrLen)
$newLen:=$oldLen+(($NewStrLen-$oldStrLen)*$count)
SET BLOB SIZE($blob;$newlen*2+9)
Else 
$newlen:=$oldLen
End if 

$blob{0x}:=Character code("R")
$blob{0x0001}:=Character code("V")
$blob{0x0002}:=Character code("L")
$blob{0x0003}:=Character code("B")
$blob{0x0004}:=0x0021
$blob{0x0005}:=$newlen%256
$blob{0x0006}:=($newlen\256)%256
$blob{0x0007}:=($newlen\65536)%256
$blob{0x0008}:=($newlen\16777216)
$offset:=0
BLOB TO VARIABLE($blob;$result;$offset)
$0:=$result

Else 
$0:=$1
End if 

If (Count parameters>3)
$4->:=$count
End if 

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>$Source:=Replace String($Source;Char(9);"";*)
>
>Doesn't look so bad, does it?
>Turns out there are over 550,000 tabs in the text.
>Replace String, did indeed (eventually) return, but it took about 30 
>minutes.

**
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 (+?) - Replace String [warning]

2017-06-27 Thread Chip Scheide via 4D_Tech
It was lunch time any way  :)


On Tue, 27 Jun 2017 22:59:01 +0200, Arnaud de Montard via 4D_Tech wrote:
>> 
>> [...]
>> I have a 4.8 meg text, I am using for testing.
>> I accidentally ran the following line of code against it.
>> 
>> $Source:=Replace String($Source;Char(9);"";*)
>> 
>> [...] it took about 30 minutes.
> 
> 
> Hi Chip, 
> you're more patient than me  ;-)
---
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: Max Password Length

2017-06-27 Thread Jeremy French via 4D_Tech
15 alphanumeric characters.

See item #5 of “ Adding and modifying users” at:
http://doc.4d.com/4Dv16/4D/16.1/Managing-users-and-groups.300-3373309.en.html


> On Jun 27, 2017, at 3:05 PM, Jim Medlen via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What is the maximum Length of a 4D Password ?

**
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: Max Password Length

2017-06-27 Thread Arnaud de Montard via 4D_Tech

> Le 27 juin 2017 à 21:05, Jim Medlen via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> 
> What is the maximum Length of a 4D Password ?

In the change password dialog, the upper input becomes unpleasantly noisy after 
15. 

--  
Arnaud de Montard 




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

Max Password Length

2017-06-27 Thread Jim Medlen via 4D_Tech


What is the maximum Length of a 4D Password ?


Thanks,

Jim Medlen
Computer & Information Systems
Functional Devices, Inc.
j.med...@functionaldevices.com
phone (765) 883-5538 x 428
fax (765) 883-4262
http://www.functionaldevices.com

This email was transmitted on 100 percent recycled electrons




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

v13 (+?) - Replace String [warning]

2017-06-27 Thread Chip Scheide via 4D_Tech
I was playing around with the code StringOmit from Keith Culotta.

I made some changes, which should make it faster... still testing.
but in the process I found a 'problem' with Replace String.

I have a 4.8 meg text, I am using for testing.
I accidentally ran the following line of code against it.

$Source:=Replace String($Source;Char(9);"";*)

Doesn't look so bad, does it?
Turns out there are over 550,000 tabs in the text.
Replace String, did indeed (eventually) return, but it took about 30 
minutes.

So
You might want to watch out for number of occurrences of a character 
you are replacing, and how large the source is.

Chip
---
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: Automatic type-ahead on single-column listbox?

2017-06-27 Thread Arnaud de Montard via 4D_Tech

> Le 27 juin 2017 à 17:01, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> [...]
> I've been playing around with the idea of trying to implement TA in a text
> field, the way the method editor looks up method names for instance. Not
> really liking anything I've got yet.

That thing in the editor makes me dream; I wish it will be available in 4D one 
day… 
I made some type ahead in text but without list of values during input and I 
use a trigger char = @. 
If the user's input is "@", I get the word before @, search with it in list of 
values, then:
- none -> nothing
- one -> complete word
- many -> choose in list and complete 
better than nothing  :-/

-- 
Arnaud de Montard  



**
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: Generating Random Numbers

2017-06-27 Thread Arnaud de Montard via 4D_Tech

> Le 26 juin 2017 à 20:46, Jim Medlen via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> I think that my method was based on your original tech note
> http://kb.4d.com/assetid=76055

It's based on Random, same problem of distribution… 

> I found the PHP command mt_rand which generates a random number using
> Mersenne Twister.

Using php won't suit an "intensive need" of numbers (a demo, for example). If I 
call php 'rand' 10,000 times, it takes 9 seconds, while Random takes 10ms.  

-- 
Arnaud de Montard




**
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: Generating Random Numbers

2017-06-27 Thread Chip Scheide via 4D_Tech
I ran into a problem with the PHP execute code, it was throwing an 
error, I do not know exactly why, and of course 
I can't get it to repeat now to capture the error message...

Also it was a bit slower. replacing (for capital letters)
Char(Random%($CapEnd-$CapStart+1))+$CapStart) -- (656 seconds for 
100,000)
with 
PHP Execute("";"mt_rand";$Result;$CapStart;$Capend) -- (709 seconds for 
100,000)
Char($Result)

resulted in an approximately 10% increase in execution time over 
100,000 iterations.
Also..
for this type of usage - I am not sure that it really matters.
1 - we are significantly restricting the random number range

2 - Since this is for passwords, all that really matters is that it is 
better then ""  :)

On Mon, 26 Jun 2017 14:46:36 -0400, Jim Medlen via 4D_Tech wrote:
> 
> 
> Tim,
> 
> Thanks for the help.
> 
> I think that my method was based on your original tech note
> http://kb.4d.com/assetid=76055
> 
> I found the PHP command mt_rand which generates a random number using
> Mersenne Twister.
> This function was recommended on several web pages regarding random number
> generators.
> 
> Using vbOK:=PHP Execute("";"mt_rand";vi1;1;36) in place of
> vi1:=(Random%35)+1 works well.
> 
> It is fast and has not created any collisions with existing passwords in
> initial testing.
> 
> vText:=""
>   vtSet:="abcdefghijklmnopqrstuvwxyz0123456789"
> 
> For (vi2;1;8)
> //vi1:=(Random%35)+1
>   vbOK:=PHP Execute("";"mt_rand";vi1;1;36)  // Mersenne 
> Twister
>   vText:=vText+vtSet[[vi1]]
>   End for 
> 
> 
> Thanks,
> 
> Jim Medlen
> Computer & Information Systems
> Functional Devices, Inc.
> j.med...@functionaldevices.com
> phone (765) 883-5538 x 428
> fax (765) 883-4262
> http://www.functionaldevices.com
> This email was transmitted on 100 percent recycled electrons
> 
> 
> 
> Confidentiality Notice:
> The information transmitted is intended only for the person or entity
> to which it is addressed and may contain confidential and/or
> privileged material. If the reader of this message is not the intended
> recipient, you are hereby notified that your access is unauthorized,
> and any review, dissemination, distribution or copying of this message
> including any attachments is strictly prohibited. If you are not the
> intended recipient, please contact the sender at (800) 888-5538 and
> permanently delete the original and any copy including printed copies
> of this e-mail and any attachments.
> 
> 
> 
> 
> 
> On 6/26/17, 12:54 PM, "Timothy Penner"  wrote:
> 
>>> Is the 4D Random function considered a good random number generator ?
>> 
>> It's OK, it produces a 15-bit random number between 1 and 32,767.
>> If you need numbers above 32,767 you can use this:
>> http://kb.4d.com/assetid=7
>> 
>> If the built in command doesn't meet your need then you can use PHP (like
>> David said).
>> 
>> There is also this plugin: https://github.com/miyako/4d-plugin-PRNG
>> 
>>> I concatenate 8 characters to build a ³random² password which then has
>>> to meet a few simple rules.
>> 
>> I wrote this tech tip 7 years ago, maybe it will help:
>> http://kb.4d.com/assetid=76055
>> 
>> -Tim PENNER
>> 
>> 
>> Timothy Penner
>> Technical Services Engineer
>> 
>> 4D Inc
>> 95 S. Market Street, Suite #240
>> CA 95113 San Jose
>> United States
>> 
>> Telephone : +1-408-557-4600
>> Standard :  +1-408-557-4600
>> Fax :   +1-408-271-5080
>> Email : tpen...@4d.com
>> Web :   www.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
> **
---
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: Expose with 4D Mobile Service

2017-06-27 Thread Timothy Penner via 4D_Tech
> It seems like everything just got it when we upgraded and the only way to 
> unset it is to manually go through every field and table and uncheck the box.

You can multi-select tables and fields as shown here:
http://kb.4d.com/assetid=77316

-Tim PENNER



**
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: Generating Random Numbers

2017-06-27 Thread Chip Scheide via 4D_Tech
Below are some links to sites which show statistics on various password 
frequency, some based on  hacked password systems.

A summary on passwords - from where I do not remember -
We have succeeded in enfacing passwords which are difficult for us 
humans to use/remeber, and easy for computers to (hackers) to break.

https://qz.com/772977/millions-of-stolen-last-fm-passwords-have-been-decrypted-these-are-the-top-50/
http://www.jbonneau.com/doc/B12-IEEESP-analyzing_70M_anonymized_passwords.pdf  
(note : pdf)
http://www.microsoft.com/en-us/research/publication/a-large-scale-study-of-web-password-habits/

a place for discussion of passwords and related topics : 
http://reddit.com/r/passwords
(an interesting link from there)
https://www.servethehome.com/password-cracking-with-8x-nvidia-gtx-1080-ti-gpus/

Summary: using about $15,000 in computer/GPUs they were getting up to 
441 BILLION hashes a second (MD4)
They were also using a bit over 3kw of power to do so (article says 
about $1/hour in electricity)
ignoring a lot of stuff... at that hash rate:
a 5 character password, which allows 128 characters (basic ascii) 
COMPLETELY BY BRUTE FORCE falls in just over 9 hours.  That is 128^5 
(34,359,738,368).


One analysis I read  - I can't find it again -
not only looked at common passwords, but at common passwords of varying 
length. 
i.e. the most common 8 character, 6 character 10 character etc 
passwords.
The commonest 25 or 30% of passwords fell into the stupid category
..., 2... etc


They also looked at common 4 and 6 digit PINs.
besides the obvious 1234,  etc they also looked at entry patterns 
so passwords that were common, but did not on the surface make sense 
such as 1397, 7931, 7139 etc, when examined in light of the standard 
key pad did make sense as these are all variations on the 'outer 
corners' of the keypad. Other patterns of entry were also discovered, 
diagonals (951x), down the middle (8520), etc.  As I recall, between 
stupid simple PINs ,  etc, and basic keypad patterns something 
like 65% of PINs were covered.



My take on passwords:
- they keep honest people honest.
- passwords for sites which are 1 time use, and do not have access to $ 
(credit cards, etc) Who cares what the password is. Use an easy to 
remember 'junk' password.
- Sites/apps which have access to $ - use a 'good' password (random so 
that social engineering doesn't help, or phrases), stored in a password 
manager  (I use a custom one I wrote in 4D of course).
- Sites which ask 'security questions' - use the same random string 
generator for the answers and store them too.
- given sufficient incentive, time, and $ any password can be cracked, 
or the site/app hacked to either expose or by-pass a password.
- Bio-metrics -- **BAD** idea, maybe I watch/read too much Science 
fiction, but... the loss of a body part to an interested party.. I'll 
pass thank you.



On Mon, 26 Jun 2017 16:32:35 -0600, Cannon Smith via 4D_Tech wrote:
> I can’t agree more with what David has said about passwords. Here is 
> another article about it including a comic that I like:
> 
>   
> 

> 
> --
> Cannon.Smith
> Synergy Farm Solutions Inc.
> Hill Spring, AB Canada
> 403-626-3236
> 
> 
> 
> 
>> On Jun 26, 2017, at 3:49 PM, David Adams via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>>  I didn't
>> find the reference I wanted for this
> 
> **
> 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
**

Expose with 4D Mobile Service

2017-06-27 Thread Douglas Cryer via 4D_Tech
Hello,

Is there any way to get or set the property in 4D tables and fields to identify 
if a field or table is exposed with 4D Mobile Service.

Is there any penalty or risk associated with having this setting on?  It seems 
like everything just got it when we upgraded and the only way to unset it is to 
manually go through every field and table and uncheck the box.

I will likely never use this feature for a variety of reasons, but if the 
setting could be read and set I could use it with my own REST implementation.

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com   Web : 
http://www.telekinetix.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: v13+ - component method parameters

2017-06-27 Thread Chip Scheide via 4D_Tech
Yes.
It is mine.

On Mon, 26 Jun 2017 17:24:55 -0400, Alan Tilson wrote:
> Chip,
> Thanks for the link. I'll try to check it out. Is it your component?
> Alan
> 
> On Mon, Jun 26, 2017 at 11:13 AM, Chip Scheide <4d_o...@pghrepository.org>
> wrote:
> 
>> Alan,
>> First the specific problem was/is trying to compile (testing database)
>> with interpreted component.
>> The error provided "Invalid parameter" is not really the correct error
>> to generate.
>> 
>> As to your question regarding sets.
>> download the (shareware) component.
>> https://www.dropbox.com/s/075k0ap7afervs8/Sets_Component_v1.0.zip?dl=0
>> 
>> Basically, you run all your set creation code through the component, it
>> tracks everything.
>> This makes it possible to ask (and answer!!) questions you could not do
>> so before.
>> Such as:
>> - To which table does a set belong?
>> - What set(s) exists for a specified table?
>> - Does a set exist?
>> 
>> Chip
>> 
>> 
>> On Mon, 26 Jun 2017 10:43:52 -0400, Alan Tilson wrote:
>>> Hello Chip,
>>> Sorry, I don't know the answer to your issues, but I am curious about how
>>> you determine what sets if any exist for a table? I thought the only test
>>> available was Records in Set()>0?
>>> Thanks,
>>> Alan
>>> 
>>> On Wed, Jun 21, 2017 at 12:30 PM, Chip Scheide via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
 Thanks.
 
 The code runs, interpretably just fine.
 I have to re-test, but I think the code runs fine when the component is
 compiled and built.
 
 The method (from original code I posted, and this code posted below) :
 utl_sets_whatsets_Validate
 does all of this validation and returns a boolean (true - everything is
 OK)
 
 I do not do a parameter count check, in that I believe that 4D is
 *supposed* to do that
 However, tracing this code, interpretedly it works correctly.
 
 The problem is when I try to compile the test database. It is when
 compiling the test database that I get the invalid parameter errors,
 when making calls to (for example, and as previously posted)
 utl_sets_What_Sets.
 
 
 code for utl_sets_whatsets_Validate
   //(m) utl_whatsets_Validate
   // $1 - pointer - to a table to determine what, if any sets exist
   // $2 - pointer - to text Array
   // $3 - pointer - to error text
 
   //RETURNS - boolean - are parameters valid
   // • Created 06-09-17 by Chip -
 C_POINTER($1;$2;$Table;$Array;$3;$Errors)
 C_TEXT($Sets;$msg)
 C_BOOLEAN($0)
 
 $Table:=$1
 $Array:=$2
 $Errors:=$3
 
 Case of
 : (Nil($Table))  //nil table pointer (nil passed, or nothing)
   $msg:="Table pointer is Nil."
 
 : (Not(utl_type_Is_Table ($Table)))  // pointer passed, but not to a
 table
   $msg:="Table pointer does not point to a table."
 
 : (Nil($Array))  //nil array pointer (nil passed, or nothing)
   $msg:="Array pointer is Nil."
 
 : (Not(utl_type_Is_An_Array ($Array;"Text")))  // array is not text
   $msg:="Array pointer does not point to an Array."
 Else   //everything is OK
   $0:=True
 End case
 
 If (Not(utl_Is_Empty (->$msg)))  // there was an error above
 utl_errtxt_Add ($msg)  //add it to the error handler
 End if
 utl_errtxt_End (Current method name;$Errors)  //report the error
   //End utl_whatsets_Validate
 
 
 On Wed, 21 Jun 2017 17:37:19 +0200, Arnaud de Montard via 4D_Tech wrote:
> 
>> Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> $Table:=$1
>> $Array:=$2
> 
> Hi Chip,
> If you trace in the component code, nothing helps?
> 
> Some times it helps to "look into the pointer", for example:
> 
> case of
>  :(count parameters < 2)
>   //err 1
>  :(not(Ptr_isTable($1)))
>   //err 2
>  :(not(Ptr_isArray($2;is text array)))
>   //err 3
>  else
>   //run method
> end case
> 
> --
> Arnaud
> 
> 
> 
> **
> 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: Error -19191

2017-06-27 Thread Spencer Hinsdale via 4D_Tech
this is cant use new network layer from old clients...
http://kb.4d.com/assetid=77427 

Spencer


> On Jun 27, 2017, at 6:15 AM, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi,
> 
> We have a client trying to connect to a database from Austria and they are 
> getting a -19191 error when trying to connect.
> 
> Anyone know what this error is?
> 
> Regards,  Dougie
> 
> 
> telekinetix Limited- J. Douglas Cryer
> Phone : 01234 761759  Mobile : 07973 675 218
> 2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
> Email : jdcr...@telekinetix.com   Web : 
> http://www.telekinetix.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
**

Error -19191

2017-06-27 Thread Douglas Cryer via 4D_Tech
Hi,

We have a client trying to connect to a database from Austria and they are 
getting a -19191 error when trying to connect.

Anyone know what this error is?

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com   Web : 
http://www.telekinetix.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: Rotate Picture in 4D

2017-06-27 Thread Keisuke Miyako via 4D_Tech
http://blog.4d.com/component-source-code-sharing-4d-partners/

good news is that svg component is open source


**
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 Peter Mew via 4D_Tech
V13 I'm afraid
Thanks
-pm

Sent from my iPad

> On 27 Jun 2017, at 08:52, Vincent de Lachaux via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hello,
> 
> If you are using v14 or more, you can try the command SVG_ROTATION_CENTERED ( 
> svgObject ; angle )
> 
> 
> 
> 
> 
>> On 27 Jun 2017, at 08:53, Bernd Fröhlich via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> 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
>> **
> 
> **
> 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: Rotate Picture in 4D

2017-06-27 Thread Peter Mew via 4D_Tech
Hi Bernd
I went with LEP and imagemagick, which is also quite slow.
I will try your code and see how it compares"
Thanks
-pm

Sent from my iPad

> On 27 Jun 2017, at 07:53, Bernd Fröhlich via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 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
> **
**
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 and Exchange Server with IMAP

2017-06-27 Thread 4dialog via 4D_Tech
A shot in the dark - what happends if you change the LOCAL $id to a global
var vID?




-
Hilsen
--
Helge Antonsen
4Dialog as
Tel: +47 64 000 164
Mob: +47 90 15 56 19
Web: www.4dialog.no 
--
View this message in context: 
http://4d.1045681.n5.nabble.com/4D-and-Exchange-Server-with-IMAP-tp5752675p5752802.html
Sent from the 4D Tech mailing list archive at Nabble.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
**

Automatic type-ahead on single-column listbox?

2017-06-27 Thread David Adams via 4D_Tech
I might be remembering this wrong, but I thought that 4D had a built-in way
of letting you type ahead to a row in a listbox. I have a one-column
listbox based on an array and want to select items by type. Like, typing
'ca' selects the first item starting with 'ca'.

I messed around with the various attributes (16.1) but didn't find anything
like what I was looking for. Am I remembering something from the old-style
form arrays before listboxes? Am I missing something?

Any help appreciated. It's not worth a ton of code, unless there's some
very generic solution available. Just to be clear, I'm not talking about
type-ahead based on an entry area, I'm talking about a listbox has focus
and you just type. The Finder does this on macOS when you type - it picks
the first matching file or folder. I don't know if there's a shorthand name
for this behavior, but it's widespread in common in the world

Thanks!
**
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: Contextual Cut, Copy & Paste...?

2017-06-27 Thread Keisuke Miyako via 4D_Tech
the source code for this example is lost,
but an early version (with bugs) is still hosted here:

http://forums.4d.fr/Post//6273875/1

> 2017/06/27 17:51、Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> http://sources.4d.com/trac/4d_keisuke/wiki/CustomContextualMenu




**
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: Contextual Cut, Copy & Paste...?

2017-06-27 Thread Keisuke Miyako via 4D_Tech
contextual (or otherwise) click on an editable text input is only available in 
v14 or later,
in older version you need to work around with ON EVENT CALL.

http://sources.4d.com/trac/4d_keisuke/wiki/CustomContextualMenu

but then, if your are on v14 or later,
you could simply use the built-in contextual menu...

> 2017/06/27 9:47、Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> のメール:
> On clicked event with Contextual Click.



**
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 Keisuke Miyako via 4D_Tech
by the way,

GD has a rotate function too,

https://github.com/miyako/4d-plugin-gd

also available via 4D native PHP


**
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 Vincent de Lachaux via 4D_Tech
Hello,

If you are using v14 or more, you can try the command SVG_ROTATION_CENTERED ( 
svgObject ; angle )





> On 27 Jun 2017, at 08:53, Bernd Fröhlich via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
>
> 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
> **

**
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 bernard--- via 4D_Tech

> Le 27 juin 2017 à 08:53, Bernd Fröhlich via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> 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
> ...
> 
> 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

It would be useful to have a lossless rotation method for multiples of 90° !

Cordialement,

Bernard Escaich

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