4D View Pro (How to set the"options.autoFitType" property?)

2019-04-26 Thread Jeremy French via 4D_Tech
How do I set the “options.autoFitT” type property?

I am using the command "WA Evaluate JavaScript” to access more features of 4D 
View Pro (which uses SpreadJS from GrapeCity.)

When I invoke “activeSheet.autoFitColumn”, I would like to **include** column 
header text for column resizing (as well as text in the column’s data).

The “options.autoFitType" property is mentioned in the documentation for "Using 
Automatic Fit". But where do I find the documentation on how to set the 
“options.autoFitType" property?

Documentation at:
https://help.grapecity.com/spread/SpreadSheets11/webframe.html#autofit.html

Using:
4D v17R4 (release).

**
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: How to use collection.query for specific element of embedded collection

2019-04-26 Thread Keisuke Miyako via 4D_Tech
square brackets have a specific meaning in query by attribute

see Example 5

or

Linking array attribute query arguments (16R2 and later)

https://doc.4d.com/4Dv17/4D/17.1/QUERY-BY-ATTRIBUTE.301-4178904.en.html

> 2019/04/27 2:01、Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>のメール:
>
> $queryString:="fields[1].name = :1"
>
> But this throws an error:
>
> Array element reference must be a letter in the object path: fields[1].




**
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: How to use collection.query for specific element of embedded collection

2019-04-26 Thread Christian Sakowski via 4D_Tech
Hi Kirk,

in your example it should work like:

$obj:=New object("id";"some string";"fields";New collection(New 
object("i";0;"name";"value1");New object("i";1;"name";"value2");New 
object("i";1;"name";"value3")))

$selection:=$obj.fields.query("(i == 1) && (name == :1)";"value2")


--

Grüße/Regards,
[heubach-media] | Christian Sakowski
christian.sakow...@heubach-media.de
Tel: +49/(0)40/41 455 455





> Am 26.04.2019 um 19:01 schrieb Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>:
> 
> Imagine a collection or entity selection populated with objects like:
> 
> {
> 
> id: "some string",
> 
> fields: [
> 
> {i:0, name:value1},
> 
> {i:1, name:value2},
> 
> {i:2, name:value3},
> 
> ...
> 
> ]
> 
> }
> 
> 
> I want to find collection elements by searching for 'fields[1].name' =
> someValue.
> That is, only matches on the second element.
> 
> I thought the query string would be:
> 
> $queryString:="fields[1].name = :1"
> 
> 
> But this throws an error:
> 
> Array element reference must be a letter in the object path: fields[1].
> 
> 
> The query works without attempting to limit it to the particular collection
> index.
> What's the correct syntax for this kind of query?
> 
> Thanks!
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> What can be said, can be said clearly,
> and what you can’t say, you should shut up about
> 
> *Wittgenstein and the Computer *
> **
> 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
> **


--
heubach media
Osterfeldstr. 12-14 | Haus 1 | Eingang Nord
22529 Hamburg
tel: 040 / 52 10 59 - 10 | fax: -99
mail: i...@heubach-media.de
home: www.heubach-media.de
Geschäftsführer|CEO: Matthias Heubach

Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei:
http://www.milo-rental.com

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht 
gestattet.
 
This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.
**
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
**

How to use collection.query for specific element of embedded collection

2019-04-26 Thread Kirk Brooks via 4D_Tech
Imagine a collection or entity selection populated with objects like:

{

id: "some string",

fields: [

{i:0, name:value1},

{i:1, name:value2},

{i:2, name:value3},

...

]

}


I want to find collection elements by searching for 'fields[1].name' =
someValue.
That is, only matches on the second element.

I thought the query string would be:

$queryString:="fields[1].name = :1"


But this throws an error:

Array element reference must be a letter in the object path: fields[1].


The query works without attempting to limit it to the particular collection
index.
What's the correct syntax for this kind of query?

Thanks!

-- 
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**
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: Blanket Font/Stylesheet Change

2019-04-26 Thread Keisuke Miyako via 4D_Tech
I wrote this utility for a local customer

https://github.com/miyako/4d-utility-restore-object-with-font-number

how to use:

install component
open in 32-bit, on the target platform
run shared method "restore_object_with_font_number"

what does it do?

every object of every form is parsed.
for each object whose stylesheet is "", code is added to the form method
which calls OBJECT SET FONT for that object

how does it work?

on 32-bit, 4D can read the font name of objects directly set in the property 
list
since this system is based on font numbers, the name is always "" on 64-bit

otherwise, the code is fairly basic.
just be sure to create a backup structure.

> 2019/04/26 17:02、Ronnie Teo via 4D_Tech <4d_tech@lists.4d.com>のメール:
> I recently upgraded a v11 application to v15 on Windows Server 2012.
> All works till now when one of their users upgraded their OS to Windows 10.
>
> Now when the user logs in, the some fields and objects on the forms show 
> gibberish.  The fields and other objects normally render in Arial, as 
> specified in the default stylesheet.
> When the forms were checked, the affected field and object properties showed 
> that neither the form nor the stylesheet is not brought over in the 
> conversion.
>
> While this does not pose an issue for clients on other Windows flavours up 
> till now, on Windows 10 it has flared up.
> If the font is re-specified or the stylesheet is re-set from blank to 
> default, everything goes back to normal.
> Short of changing the stylesheet specification for every object for every 
> form by hand, is there a way to do a blanket change?




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

Blanket Font/Stylesheet Change

2019-04-26 Thread Ronnie Teo via 4D_Tech
Hi All,

I recently upgraded a v11 application to v15 on Windows Server 2012.  
All works till now when one of their users upgraded their OS to Windows 10.

Now when the user logs in, the some fields and objects on the forms show 
gibberish.  The fields and other objects normally render in Arial, as specified 
in the default stylesheet.
When the forms were checked, the affected field and object properties showed 
that neither the form nor the stylesheet is not brought over in the conversion.

While this does not pose an issue for clients on other Windows flavours up till 
now, on Windows 10 it has flared up.
If the font is re-specified or the stylesheet is re-set from blank to default, 
everything goes back to normal.
Short of changing the stylesheet specification for every object for every form 
by hand, is there a way to do a blanket change?

Regards,
Ronnie
Tarawerkz

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