Re: How to set the file name of a QR Report to disk file.

2017-12-29 Thread bernard--- via 4D_Tech
I use QR reports with a custom form and an adaptation of tech notes 05-13 to 15 
QR Editor Source.
This allows me to have a save button using QR REPORT TO BLOB : I can give the 
path...

HTH

Bernard Escaich


> Le 28 déc. 2017 à 01:43, John Baughman via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> I am executing a report with…
> 
> QR REPORT([Timesheets];Get 4D folder(Database folder)+"Resources"+Folder 
> separator+"TimeSheetEmployeeExport.4qr”)
> 
> This works fine, but I want to dictate or at least offer a preset file name 
> to the end user in the save dialogue. Tried various approaches without any 
> success. 
> 
> Thanks for any help.
> 
> John
> 
> 
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.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: Listbox column width and pointers

2017-09-16 Thread bernard--- via 4D_Tech
Thanks Jeremy,

> Le 16 sept. 2017 à 03:32, Jeremy French via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> It's better to use an object name in place of a pointer. That's because a 
> pointer could reference more than one object on the form. Object names are 
> unique and so reference only a single object.

I began with object name and after tried with variable name ; I copied the code 
after modification.
> 
> Here are a couple of things you might try.
> 
> ...
> 
> Try #3
> =
> 
> Set the listbox column widths **after** you make SLQ SELECT calls.

I do that.


> Le 16 sept. 2017 à 13:08, Arnaud de Montard via 4D_Tech 
> <4d_tech@lists.4d.com> a écrit :
> 
> 
>> Le 16 sept. 2017 à 03:32, Jeremy French via 4D_Tech <4d_tech@lists.4d.com> a 
>> écrit :
>> 
>> [...]
>> See "Displaying the result of an SQL query in a list box” at:
>> http://doc.4d.com/4Dv16R3/4D/16-R3/Managing-List-Box-Objects.300-3218275.en.html#429187
>>  
>> 
> 
> It says "for example, the fifth column, its name is sql_column5 and its 
> header name is sql_header5" but doesn't mention that, if a second listbox is 
> filled the same (SELECT...INTO LISTBOX), 4D restarts objects naming from 1 so 
> you get duplicate names in the form. 
> 
> Duplicate names can also be obtained with LISTBOX INSERT COLUMN, while doc 
> says "Note: Object names must be unique in a form. You must be sure that the 
> names passed in the colName, headerName and footerName parameters are not 
> already used. Otherwise, the column is not created and an error is generated."
> 
> 
> Knowing the listbox name unicity is correctly ensured by 4d in the form, I 
> create names with listbox name as prefix:
>  myLB
>  myLB_h1, myLB_h2... headers
>  myLB_c1, myLB_c2... columns
>  myLB_f1, myLB_f2... footers
> 
> So obvious. 
> 
> -- 
> Arnaud 

Thanks Arnaud, you were right ; it's an issue with object names => it's a bug.
When applying your solution, I had mistyped something.
Now, it is OK.

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

Listbox column width and pointers

2017-09-15 Thread bernard--- via 4D_Tech
Hi all,

I have a form with two listboxes.
I wrote some code to manage automatic column width (OBJECT GET BEST SIZE, 
LISTBOX SET COLUMN WIDTH).

I build listbox1 with records from Table1 (fill by SQL) ; code for automatic 
width is executed for LB1.
When I click on a row of LB1, I fill listbox2 with records from TableN (always 
by SQL) ; code for automatic width is executed for LB2.

Why LB1 is redrawn with default width* ?

* I don't understand column width given by 4D : neither leader with, neither 
data width...

I did a new test with automatic width for the two LB : same issue.

Here is the code (simplified) :
LISTBOX GET 
ARRAYS(Listbox1;$Column_ta;$Header_ta;$Column_pa;$Header_pa;$Col_visible_ba;$Style_pa)

For($i;1;Size of array($Column_pa))
OBJECT GET BEST SIZE($Column_pa{$i}->;$Width_best1_l;$Height_best_l)
OBJECT GET BEST SIZE($Header_pa{$i}->;$Width_best2_l;$Height_best_l)
$Width_best_l:=MTH_Maximum($Width_best1_l;$Width_best2_l)+10
LISTBOX SET COLUMN WIDTH($Column_pa{$i}->;$Width_best_l)
LISTBOX SET COLUMN WIDTH($Header_pa{$i}->;$Width_best_l)
LISTBOX SET COLUMN WIDTH(*;$Header_ta{$i};$Width_best_l)
LISTBOX SET COLUMN WIDTH(*;$Column_ta{$i};$Width_best_l)
End for

LISTBOX GET 
ARRAYS(Listbox2;$Column_ta;$Header_ta;$Column_pa;$Header_pa;$Col_visible_ba;$Style_pa)

For($i;1;Size of array($Column_pa))
OBJECT GET BEST SIZE($Column_pa{$i}->;$Width_best1_l;$Height_best_l)
OBJECT GET BEST SIZE($Header_pa{$i}->;$Width_best2_l;$Height_best_l)
$Width_best_l:=MTH_Maximum($Width_best1_l;$Width_best2_l)+10
LISTBOX SET COLUMN WIDTH($Column_pa{$i}->;$Width_best_l)
LISTBOX SET COLUMN WIDTH($Header_pa{$i}->;$Width_best_l)
LISTBOX SET COLUMN WIDTH(*;$Header_ta{$i};$Width_best_l)
LISTBOX SET COLUMN WIDTH(*;$Column_ta{$i};$Width_best_l)
End for

I tried also : 

$Listbox_t:="Listbox1"
LISTBOX GET 
ARRAYS(*;"$Listbox_t";$Column_ta;$Header_ta;$Column_pa;$Header_pa;$Col_visible_ba;$Style_pa)

Same behavior.

I see that the second LB takes column width from first LB
A track : pointer is form.3C.4357.
I suppose 3C is object ID ; pointers on objects of LB1 and LB2 have same ID...
**
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: How to show / hide all on Property List in v16?

2017-08-16 Thread bernard--- via 4D_Tech
I did not know that snippet.
It works for me with V16R3 on my MacBook Pro on macOS Sierra.

> Le 11 août 2017 à 00:34, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> In prior versions when working with a form and the Property List is
> displayed I could show/hide all panes on the list by holding the Control
> (not the Command) key and clicking on one of the pane triangles. This
> doesn't work for me in v16.
> 
> I've tried on two different Macs, one running Sierra and the other
> Yosemite. And I've tried every combination of modifiers I can think of.
> 
> I believe I asked about this before. Is there some option I may have either
> set or unset to cause this? Really annoying.
> 
> Thanks
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
> 
> *- Edmund Burke*
> **
> 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: Diff 4D Write Documents

2017-04-26 Thread bernard--- via 4D_Tech
Doug,

It would be better to migrate to Write Pro before creating a diff for Write 
documents.
As Chuck pointed, you could compare plain text.
If written in 4D, you could adjust your features ; not too difficult (I have 
written one for comparing methods).

Bernard Escaich


> Le 25 avr. 2017 à 19:17, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> a écrit :
> 
> Chuck:
> 
> Thanks for your thoughts. They want to track *any* change in the document.
> 
> This is a classic case of the client telling me the "how" instead of
> telling me the "what" (*what* they want versus *how* to get it).
> 
> I don't need a solution to run on multiple machines. Instead, I can track
> changes as the documents are synchronized from server to standalone and
> back and, if there's a change, do the diff on the server and generate a
> report. That's much easier than having the diff function available for each
> machine on the system.
> 
> --
> Douglas von Roeder
> 949-336-2902
> 
> On Tue, Apr 25, 2017 at 7:57 AM, Charles Miller via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> On Mon, Apr 24, 2017 at 5:20 PM, Douglas von Roeder via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>> 
>>> I've been asked to update the code in an Audit Trail system so it will
>> work
>>> with 4D Write documents. Rather than simply tracking that there's been a
>>> change and showing the old document vs the new one, I'd like to diff the
>>> old vs new and be able to display the diff.
>>> 
>>> The system has about a dozen LAN users and 25 users on standalones.
>> Second,
>>> it's Windows-only now but will be Windows and OS X as part of an upgrade
>>> from V13 to V15/16.
>>> 
>>> Any suggestions or recommendations will be appreciated.
>>> 
>> 
>> One comment is you will need to identify what should be compared. What are
>> the rules.
>> 1. Are formatting changes to be logged and shown?
>> 2. Are spacing differences important?
>> 3. Is case important?
>> 
>> If you look at BBEDIT or Textwrangler you can see settings there for other
>> ideas
>> 
>> 
>> Regards
>> Chuck
>> 
>> 
>> --
>> 
>> -
>> 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 Sever connectivity
>>  http://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)
>> 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: 4D Write Pro using expressions with XML merge file (or JSON)

2017-04-02 Thread bernard--- via 4D_Tech
Koen,

4D does not handle dot notation (not quite true : see 
http://doc.4d.com/4Dv16/4D/16/QUERY-BY-ATTRIBUTE.301-3036512.en.html 
) ; I 
have written a component published on jan 12

This component emulates 4D standard commands for objects such as OB Set or OB 
Get to add access to properties or sub-objects by path with dot notation.
It has been clearly inspired by OBJ_Module of Cannon Smith but differs by :
- it emulates standard commands and does not have commands by type
- it resolves paths with arrays elements
- it gives some advanced controls such as search in an array by the value of a 
property.
It does not intend to replace all functions of OBJ_Module.
You can download it here 
.
Method OBJ_Test gives several operational examples ; some functions are not yet 
implemented.

For this thread, I separate setter and getter ; the two commands have same 
syntax and you can copy the setter, change one letter and have the getter 
 OBJ_Set(MyObject;"MyPath";->MyValue)
 ... do something
 OBJ_Get(MyObject;"MyPath";->MyValue)

Direct access to the post where you can download the component : 
http://forums.4d.fr/Post//18896257/1/  

Cannon Smith has also added this feature in its component.

Cordialement,

Bernard Escaich


> Le 29 mars 2017 à 11:24, Koen Van Hooreweghe via 4D_Tech 
> <4d_tech@lists.4d.com> a écrit :
> 
> Hi Piotr,
> 
> I would advise JSON or rather 4D objects. 4D objects and JSON are not exactly 
> the same, but very closely related. JSON is actually a text representation of 
> a 4D object. The 4D debugger handles objects nicely too. You can store your 
> data into a 4D object and then retrieve the values in your 4D Write area 
> using your proposed commands. Unfortunately there is no dot notation (yet) 
> available. 
> But if your needs are not too complex, you could easily implement a basic 
> version yourself.
> 
> HTH
> Koen
> 
> Op 29-mrt.-2017, om 09:02 heeft Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> het volgende geschreven:
> 
>> Has anybody already done "my new way" and have experience with this?
>> Does this make sense or is there a better way to do this?
>> Is JSON for example a better alternative over XML?
> 
> 
> 
> 
> Compass bvba
> Koen Van Hooreweghe
> Kloosterstraat 65
> 9910 Knesselare
> Belgium
> tel +32 495 511.653
> 
> **
> 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: Insert a picture in Write Pro

2017-03-22 Thread bernard--- via 4D_Tech
OK, I understood what happens : WP create a copy of the picture in a folder 
with same name as HTML document.
This is not what I need, because I may have to insert images used elsewhere and 
duplication does not interest me.
I organize my pictures in folders and then create my pages.
I will ask the feature "drag and drop without duplication".

Anyone using WP here ?
For which use ?

> Le 22 mars 2017 à 14:14, bern...@escaich.com a écrit :
> 
> Hi all,
> 
> I use Write Pro to generate HTML pages and it does the job pretty well.
> 
> But I have a difficulty : I use drag and drop to place pictures in the text ; 
> the picture is displayed, but when I export WP area in HTML code, path is not 
> the one expected.
> 
> I have a relative path, i.e. MyFolder/MyPicture, where MyFolder is last level 
> of folder got by SELECT FOLDER.
> If MyPicture is in MySubFolder, I would like to get MySubFolder/MyPicture.
> 
> Any idea ?
> 
> 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
**

Insert a picture in Write Pro

2017-03-22 Thread bernard--- via 4D_Tech
Hi all,

I use Write Pro to generate HTML pages and it does the job pretty well.

But I have a difficulty : I use drag and drop to place pictures in the text ; 
the picture is displayed, but when I export WP area in HTML code, path is not 
the one expected.

I have a relative path, i.e. MyFolder/MyPicture, where MyFolder is last level 
of folder got by SELECT FOLDER.
If MyPicture is in MySubFolder, I would like to get MySubFolder/MyPicture.

Any idea ?

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