Re: Drag & drop a file - what am I missing?

2019-06-21 Thread Jeremy French via 4D_Tech
Hi Pat,

Take a look at the documentation for "Get file from pasteboard” at:
https://doc.4d.com/4Dv17/4D/17.2/Get-file-from-pasteboard.301-4387094.en.html 


Put the following in the object method of a text variable and drag a file atop 
the text variable. Remember to check-mark the “On Drop” form event.
—
Case of 
: (Form event=On Drop)

OBJECT Get pointer(Object current)->:=Get file from pasteboard(1)

End case 
—
The text object will display the file’s absolute path.


Best regards,
- Jeremy

> On Jun 21, 2019, at 4:16 PM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>  I want to allow the user to drop a file onto a field and save the
> file's pathname in the field.

**
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: Drag & drop a file - what am I missing?

2019-06-21 Thread Chip Scheide via 4D_Tech
Pat,
not using v17 - but yes.

I have never tried picture dropping, but I was unable to get Drag N 
drop to function to a field.

I work around this (and it makes the target easier for the user) by 
using an invisible button which covers a section of the screen so that 
the user can drag n drop anywhere in that area, rather then just on the 
(small?) field.

You can easily place the path into the desired text field after 
validating the drop.
 
Chip
On Fri, 21 Jun 2019 21:16:49 +0100, Pat Bensky via 4D_Tech wrote:
> Using v17 -
> 
> Until now I've implemented drag & drop between objects, for example list
> boxes. No problem.
> But now I want to allow the user to drop a file onto a field and save the
> file's pathname in the field. I cannot get this to work and indeed the docs
> imply that this should only work with variables and objects:
> 
> "For example, it is possible to drag and drop a PNG picture file onto a 4D
> picture field. It is also possible to select text in a word processing
> application and drop it onto a 4D text variable or a list box."
> 
> So you can drop a picture onto a picture FIELD but any other type of file
> (eg .txt) only onto a variable?
> 
> Pat
> -- 
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Drag & drop a file - what am I missing?

2019-06-21 Thread Pat Bensky via 4D_Tech
Using v17 -

Until now I've implemented drag & drop between objects, for example list
boxes. No problem.
But now I want to allow the user to drop a file onto a field and save the
file's pathname in the field. I cannot get this to work and indeed the docs
imply that this should only work with variables and objects:

"For example, it is possible to drag and drop a PNG picture file onto a 4D
picture field. It is also possible to select text in a word processing
application and drop it onto a 4D text variable or a list box."

So you can drop a picture onto a picture FIELD but any other type of file
(eg .txt) only onto a variable?

Pat
-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: [Tip]Set Query Destination

2019-06-21 Thread JOHN BAUGHMAN via 4D_Tech
I use a macro whenever I call SET QUERY DESTINATION…




SET QUERY DESTINATION(;)

SET QUERY DESTINATION(Into current selection)

So if I write…
Query([Patient];[Patient]Dentist_Name="John Baughman")

Then realize I need to a query destination other than the current selection I 
highlight the above line of code and call the macro, I get…

SET QUERY DESTINATION(;)
QUERY([Patient];[Patient]Dentist_Name="John Baughman")
SET QUERY DESTINATION(Into current selection)

Cursor is now right after the first open parenthesis. Never miss putting it 
back to current selection.

Hope someone out there finds this useful.

John


> On Jun 21, 2019, at 6:30 AM, Charles Miller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote
> :
> 
> Also I would bet crash wa due to undefined variable and not set query
> destination.
> 
> Regards
> 
> Chuck
> 
> On Fri, Jun 21, 2019 at 10:38 AM Douglas von Roeder via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Chip:
>> 
>> When Set query limit and Set query destination came out, I ran into the
>> situation where queries “stopped working” because I had forgotten to add
>> the code to reset them. To avoid that, I made it a practice to type the
>> “reset” code *before* I type the code to change the destination or limit
>> from their normal settings.
>> 
>> --
>> Douglas von Roeder
>> 949-336-2902
>> 
>> 
>> On Fri, Jun 21, 2019 at 6:50 AM Chip Scheide via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>> 
>>> [Tl;DR] at end
>>> 
>>> This command is your friend - and - your foe!  :)
>>> 
>>> Yesterday I spent a significant amount of time trying to track down a
>>> compiled/built app crash, but did/does not happen interpretedly.
>>> 
>>> The crash happened only occasionally, after placing alerts and asserts,
>>> I determined that the crash was happening in a utility method which was
>>> doing a query. A method which, in the running code, had already been
>>> called repeatedly - without - issue.
>>> Since the method which was doing the query had been called repeatedly
>>> -before- the crash, I was perplexed as to what the issue was.
>>> After some more poking and prodding, it appeared that the crashing only
>>> occurred in the utility method, after a specific method (X) was called.
>>> Looking at X and watching it execute (interpretedly) provided no
>>> obvious clue as what the cause was.
>>> After staring at the code, and running both interpretedly and built
>>> many more times it finally dawned on me what the issue was...
>>> Set Query Destination
>>> 
>>> In method X I was doing some work looking for duplicate data, and in so
>>> doing I was loping over a code that looked like this:
>>> Set Query Destination(Into variable;$Local)
>>> 
>>> Set Query destination(Into current selection)
>>> 
>>> Set Query Destination(Into variable;$Local)
>>> 
>>> You might see the issue now...
>>> It turns out I never returned the query destination back to Current
>>> Selection.
>>> To make the problem even more challenging, the utility method where the
>>> query was crashing was in a component.
>>> 
>>> Interpretedly, 4D was happy to create and type the local any time a
>>> query was executed after query destination was left into a local
>>> variable but... Needless to say compiled/built 4D DID NOT LIKE
>>> THAT!  :)
>>> 
>>> [TL;DR]
>>> -- always -- reset your query destinations  :)
>>> Chip
>>> ---
>>> Gas is for washing parts
>>> Alcohol is for drinkin'
>>> Nitromethane is for racing
>>> **
>>> 4D Internet Users Group (4D iNUG)
>>> Archive:  http://lists.4d.com/archives.html
>>> Options: https://lists.4d.com/mailman/options/4d_tech
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>> **
>> **
>> 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
>> **
> 
> -- 
> -
> Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
> Informed Solutions, Inc.
> Brookline, MA 02446 USA Registered 4D Developer
>   Providers of 4D, Sybase & SQL Server connectivity
>  https://www.informed-solutions.com
> -
> This message and any attached documents contain information which may be
> confidential, subject to privilege or exempt from disclosure under
> applicable law.  These materials are intended only for the use of the
> intended recipient. If you are not the intended recipient of this
> transmission, you are hereby notified that any distribution, disclosure,
> printing, copying, storage, modification or the taking of any acti

Re: 'Clairvoyance' in listBox (v17r5)

2019-06-21 Thread John DeSoi via 4D_Tech
This was just discussed and requested on the Forums. Some examples were posted 
on how it can be done.

http://forums.4d.com/Post/EN/30170877/1/30278226

Vote for the feature request here

http://forums.4d.com/Post/EN/15446498/1/30188166

John DeSoi, Ph.D.



> On Jun 21, 2019, at 12:00 PM, Chris Belanger via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Has anyone been able to achieve this feature?
> 
> If not, I would like to put it in as a feature request to 4D.

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

'Clairvoyance' in listBox (v17r5)

2019-06-21 Thread Chris Belanger via 4D_Tech
I would to:
• click a listbox (to ‘focus’ on it)
• type - and have it automatically search in the list and highlight the closest 
match.

Of course, this is common in ’traditional’ apps.

For many years, I have jury-rigged this by using a ‘quick scroll’ var on a 
form. The user clicks into this var, types, and then I find the match in the 
listBox, highlighting it of course.

I would much prefer doing this by having the user click into the listBox (to 
focus on it) and then just type, with the result of doing the search there. 
Much more natural.

In v17r5, I decided to revisit this to see if it would **finally** work. I 
enabled ‘Before Keystroke’ and ‘After Keystroke’ in the listBox object.
Then in its script, I tried processing these events. However, they do not 
’trigger’ in the listBox. I tried it with the listBox both in ’selection mode: 
single and multiple’.

I understand that there would be no ‘variable’ into which the characters would 
be inserted (as it would be in a comboBox, for example). But I would still like 
to capture and process the keyboard import anyway.

Has anyone been able to achieve this feature?

If not, I would like to put it in as a feature request to 4D.

regards,
Chris Belanger
**
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
**

WP EXPORT VARIABLE does not work Windows Server.

2019-06-21 Thread Luc Devar via 4D_Tech
4D Server V15.5

I am sending email created in a 4D writes zone that contains images and text. 

wpArea:=WP New([EMAIL_TEMPLATE]TEMPLATE_)
ST SET OPTIONS(wpArea;ST Expressions display mode;ST Values)
WP EXPORT VARIABLE(wpArea;$str;wk mime html)

This worked fine on my Mac ( OSX.13.6), but fail on server (Window Server 
2012r2).  The images are replaced by an interrogation mark ? The rest of the 
email is just fine. 
When I look at the content of the email.  I do not see the image on windows. 

Any idea what is causing this ?

Luc Devar

**
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: [Tip]Set Query Destination

2019-06-21 Thread Charles Miller via 4D_Tech
Also I would bet crash wa due to undefined variable and not set query
destination.

Regards

Chuck

On Fri, Jun 21, 2019 at 10:38 AM Douglas von Roeder via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Chip:
>
> When Set query limit and Set query destination came out, I ran into the
> situation where queries “stopped working” because I had forgotten to add
> the code to reset them. To avoid that, I made it a practice to type the
> “reset” code *before* I type the code to change the destination or limit
> from their normal settings.
>
> --
> Douglas von Roeder
> 949-336-2902
>
>
> On Fri, Jun 21, 2019 at 6:50 AM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
> > [Tl;DR] at end
> >
> > This command is your friend - and - your foe!  :)
> >
> > Yesterday I spent a significant amount of time trying to track down a
> > compiled/built app crash, but did/does not happen interpretedly.
> >
> > The crash happened only occasionally, after placing alerts and asserts,
> > I determined that the crash was happening in a utility method which was
> > doing a query. A method which, in the running code, had already been
> > called repeatedly - without - issue.
> > Since the method which was doing the query had been called repeatedly
> > -before- the crash, I was perplexed as to what the issue was.
> > After some more poking and prodding, it appeared that the crashing only
> > occurred in the utility method, after a specific method (X) was called.
> > Looking at X and watching it execute (interpretedly) provided no
> > obvious clue as what the cause was.
> > After staring at the code, and running both interpretedly and built
> > many more times it finally dawned on me what the issue was...
> > Set Query Destination
> >
> > In method X I was doing some work looking for duplicate data, and in so
> > doing I was loping over a code that looked like this:
> > Set Query Destination(Into variable;$Local)
> >  
> > Set Query destination(Into current selection)
> >  
> > Set Query Destination(Into variable;$Local)
> >
> > You might see the issue now...
> > It turns out I never returned the query destination back to Current
> > Selection.
> > To make the problem even more challenging, the utility method where the
> > query was crashing was in a component.
> >
> > Interpretedly, 4D was happy to create and type the local any time a
> > query was executed after query destination was left into a local
> > variable but... Needless to say compiled/built 4D DID NOT LIKE
> > THAT!  :)
> >
> > [TL;DR]
> > -- always -- reset your query destinations  :)
> > Chip
> > ---
> > Gas is for washing parts
> > Alcohol is for drinkin'
> > Nitromethane is for racing
> > **
> > 4D Internet Users Group (4D iNUG)
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **
> **
> 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
> **

-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  https://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption from
disclosure as to this communication.
**
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: [Tip]Set Query Destination

2019-06-21 Thread Jody Bevan via 4D_Tech
Doug:

Good practice. I always have the set and reset code within the same method. 
Then when we run our QA method, if one is missing it records the error, and 
places the method with the error description in our listbox to fix.

Good structured coding practices, also makes it much easier to write Quality 
Assurance methods, to ensure the code is correct.

Jody

> On Jun 21, 2019, at 8:37 AM, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Chip:
> 
> When Set query limit and Set query destination came out, I ran into the
> situation where queries “stopped working” because I had forgotten to add
> the code to reset them. To avoid that, I made it a practice to type the
> “reset” code *before* I type the code to change the destination or limit
> from their normal settings.
> 
> --
> Douglas von Roeder
> 949-336-2902
> 
> 

**
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: [Tip]Set Query Destination

2019-06-21 Thread Douglas von Roeder via 4D_Tech
Chip:

When Set query limit and Set query destination came out, I ran into the
situation where queries “stopped working” because I had forgotten to add
the code to reset them. To avoid that, I made it a practice to type the
“reset” code *before* I type the code to change the destination or limit
from their normal settings.

--
Douglas von Roeder
949-336-2902


On Fri, Jun 21, 2019 at 6:50 AM Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> [Tl;DR] at end
>
> This command is your friend - and - your foe!  :)
>
> Yesterday I spent a significant amount of time trying to track down a
> compiled/built app crash, but did/does not happen interpretedly.
>
> The crash happened only occasionally, after placing alerts and asserts,
> I determined that the crash was happening in a utility method which was
> doing a query. A method which, in the running code, had already been
> called repeatedly - without - issue.
> Since the method which was doing the query had been called repeatedly
> -before- the crash, I was perplexed as to what the issue was.
> After some more poking and prodding, it appeared that the crashing only
> occurred in the utility method, after a specific method (X) was called.
> Looking at X and watching it execute (interpretedly) provided no
> obvious clue as what the cause was.
> After staring at the code, and running both interpretedly and built
> many more times it finally dawned on me what the issue was...
> Set Query Destination
>
> In method X I was doing some work looking for duplicate data, and in so
> doing I was loping over a code that looked like this:
> Set Query Destination(Into variable;$Local)
>  
> Set Query destination(Into current selection)
>  
> Set Query Destination(Into variable;$Local)
>
> You might see the issue now...
> It turns out I never returned the query destination back to Current
> Selection.
> To make the problem even more challenging, the utility method where the
> query was crashing was in a component.
>
> Interpretedly, 4D was happy to create and type the local any time a
> query was executed after query destination was left into a local
> variable but... Needless to say compiled/built 4D DID NOT LIKE
> THAT!  :)
>
> [TL;DR]
> -- always -- reset your query destinations  :)
> Chip
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
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
**

[Tip]Set Query Destination

2019-06-21 Thread Chip Scheide via 4D_Tech
[Tl;DR] at end

This command is your friend - and - your foe!  :)

Yesterday I spent a significant amount of time trying to track down a 
compiled/built app crash, but did/does not happen interpretedly.

The crash happened only occasionally, after placing alerts and asserts, 
I determined that the crash was happening in a utility method which was 
doing a query. A method which, in the running code, had already been 
called repeatedly - without - issue.
Since the method which was doing the query had been called repeatedly 
-before- the crash, I was perplexed as to what the issue was.
After some more poking and prodding, it appeared that the crashing only 
occurred in the utility method, after a specific method (X) was called. 
Looking at X and watching it execute (interpretedly) provided no 
obvious clue as what the cause was. 
After staring at the code, and running both interpretedly and built 
many more times it finally dawned on me what the issue was...
Set Query Destination

In method X I was doing some work looking for duplicate data, and in so 
doing I was loping over a code that looked like this:
Set Query Destination(Into variable;$Local)
 
Set Query destination(Into current selection)
 
Set Query Destination(Into variable;$Local)

You might see the issue now... 
It turns out I never returned the query destination back to Current 
Selection.
To make the problem even more challenging, the utility method where the 
query was crashing was in a component.

Interpretedly, 4D was happy to create and type the local any time a 
query was executed after query destination was left into a local 
variable but... Needless to say compiled/built 4D DID NOT LIKE 
THAT!  :)

[TL;DR] 
-- always -- reset your query destinations  :)
Chip
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Username/password dialog timeout in v17

2019-06-21 Thread Jeremy French via 4D_Tech
Perhaps in "Database Settings -> Client-server -> Client-Server Connections 
Timeout”.

> On Jun 20, 2019, at 9:14 PM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> if the timeout that 4D Server will allow 4D Remote to stay at the 
> username/password dialog can be adjusted?

**
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: Dot Notation in Legacy 4D Code

2019-06-21 Thread Epperlein, Lutz (agendo) via 4D_Tech
If you deal with variables you can use "Rename..." in the context menu of the 
method editor too.

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