ON ERR CALL: Comments & Seeking Comments

2017-05-12 Thread David Adams via 4D_Tech
Use it. All of the time.

If you're a long-time 4D devleloper like me, you may have started out not
using ON ERR CALL much, if at all. I can't remember why I was scared of it,
but I tended to avoid it. That all changed forever some versions back for
me (6? 6.5?)

I think that it's 4D's job to give us errors, but it's our job to catch
them. As 4D doesn't have anything else, ON ERR CALL is the tool to use.

If you're one of the people that doesn't use it (there must be some), it
might help to understand that ON ERR CALL serves a couple of purposes:

* Catch errors that are outside of our control and that we can deal with.
For example, if you deal with the file system, you may get a file locked
error. That's not a bug in our code, it's information about the current
state of play in the world. So, ON ERR CALL is functioning as a helpful
probe.

* Catch errors that shouldn't happen. Like, you know, those darn 4D bugs
that we write into our code ;-) Very helpful! Record them, dump details to
disk/record and you give yourself a huge head start on solving the problem.

If you haven't worked with ON ERR CALL in some time, you'll also be happy
to know that there is a lot more information available than there used to
be. In the past, there was the Error system variable. Now there's a lot
more:

Error method
The name of the method that caused the error.

Error line
The line of code that caused the error.

Error formula
The text of the formula where the error occurred. (Really? When did this
show up? I never noticed it before.)

Additionally, the GET LAST ERROR STACK provides programmatic access to the
error details you may have seen in the new(ish) 4D error dialog.

Docs for 16.1:

ON ERR CALL
http://doc.4d.com/4Dv16/4D/16.1/ON-ERR-CALL.301-3374749.en.html

GET LAST ERROR STACK
http://doc.4d.com/4Dv16/4D/16.1/GET-LAST-ERROR-STACK.301-3374753.en.html

System Variables
http://doc.4d.com/4Dv16/4D/16.1/System-Variables.300-3374917.en.html#205035

If you haven't been using ON ERR CALL everywhere, there are some details to
sort out. Mainly, what handler applies where on the 4D Server machine. I
don't remember them off the top of my head but I do remember that it
mattered if you are running compiled or not. I think that triggers share
one error handler compiled but need a custom one installed for each trigger
in interpreted? Perhaps someone else can post a summary of the current
situation.

The normal way it works (in almost all cases) is that there is one error
handler per process. If there's no custom handler, you fall back on 4D's.
If you install a handler, the previous one is cleared. I use a custom stack
to track handlers in case I want to install a more specific one and then
restore the previous one...but everyone develops  there own style.

It would be great if some other folks could comment on how they use ON ERR
CALL in support of our friends that may not be using it to it's fullest.
Anything along these lines is helpful to know:

* Gotchas
* Details on what to install where
* Places that they don't work
* What to do with errors
* How you handle handlers (like my stack)
* Gripes, suggestions, tips
**
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: Preemptive mode flaw

2017-05-12 Thread David Adams via 4D_Tech
For anyone following along or reading this on the archives, I wanted to add
an update here from the 4D Forums:

http://forums.4d.fr/Post/EN/19391591/1/19391592

Thomas MAULRe: Provide developer control when a preemptive worker receives
non-preemptive code

> For me this is ON ERR CALL, which should be executed, but seems not.

as written, it was expected tht ON ERR CALL detects an illegal usage inside
a preemptive process and not quietly abort. It was filed as ACI0096789.
Already fixed in our development branch, modification currently in testing,
supposed to be available soon in 16.x nightly build branch.

So the answer is: always use ON ERR CALL in every process to detect
unexpected failures (out of memory, disk error - or using non thread safe
commands in a preemptive process).


So, not a design flaw - just a bug that's being addressed.
**
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: Website development path

2017-05-12 Thread Robert ListMail via 4D_Tech
Alex, please tell us more about that—thanks!

Robert

> On Jan 19, 2017, at 2:43 AM, Herr Alexander Heintz  
> wrote:
> 
> Recently did a shop for car spare parts with it, a fast and reliable 
> combination.

**
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: Schemes for record level access control

2017-05-12 Thread David Adams via 4D_Tech
Just as a simple point, it's nice to have access values as a number:

1 2 3 4 5

Imagine that access increases at each step.

// On after query
C_LONGINT($1;$user_access_level)
$user_access_level:=$1

QUERY SELECTION([Foo];[Foo]Minimum_access_score <= $user_access_level)

So, if the user has a level of 3, they only get a selection of records
allowed to people with a score of 1, 2, or 3. If their level were 2, they
would only get records with a value of 1 or 2. If the initial selection
found a more restricted record, it's filtered out very easily I like to
filter selections because then you don't have to jump through any more
hoops when using 4D's built-in editors and tools.

That's code off the top of my head, it only accounts for some requirements,
etc., etc.
**
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: Schemes for record level access control

2017-05-12 Thread Jörg Knebel via 4D_Tech
G’day Kirk,

> On 13 May 2017, at 05:42 AEST, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I'd like to hear from some of you who have implemented systems that allow
> for record-level access control in a 4D database.

Pick me! ;-)

You’re sure you want to discuss this on the list down to the last detail?

Here are some important starting points:

First, forget everything about putting users in groups the 4D-way, actually 
forget/don’t touch the 4D-Access implementation at all.

Now think of access strictly in to ways:  Read Only and Read/Write.

Imagine an organisation structure 5 level deep (relation arrows like in 4D):

Organisation <—— Branch <—— Department <—— Unit <—— User (have a table for each 
and you can build your application to be a multi-tenant one)

Define access levels and apply for RO  and  RW (2D array LongInt):

Full access (Designer)  FA
Org access  OA
Branch access   BA
Department access   DA
Unit access UA
Author/User access  AA
NO access   NA

apply these levels to a spread sheet with columns like this:

4dTable name/#  RO_FA   RO_OA   … —> …  RW_AA   RW_NA


- Keep this matrix for each and every user.

At log in time assign the relevant information to interprocess variables or to 
an object.

have the following LongInt reference fields in EVERY table

UserCreated
UnitCreated
DepartmentCreated
BranchCreated
OrgCreated

Every time someone likes to access the content of a table one has to check the 
access rights like this

(code snippet sample)

Case of 
: ($vlAccess=0)  //No Access

If ($vlStatusField>0)
QUERY($TablePtr->; & ;Field($TableNo;$vlStatusField)->=-9)
End if 
$0:=2
: ($vlAccess=1)  //Author Access

If ($vbWholeTable)  //all non deleted records in table
If ($vlCreatorField>0)
QUERY($TablePtr->;Field($TableNo;$vlCreatorField)->=<>vlUserID;*)
If ($vlDepartmentField>0)
QUERY($TablePtr->; & ;Field($TableNo;$vlDepartmentField)->=<>vlUserDepartment;*)
End if 
If ($vlBranchField>0)
QUERY($TablePtr->; & ;Field($TableNo;$vlBranchField)->=<>vlUserBranch;*)
End if 
If ($vlUnitField>0)
QUERY($TablePtr->; & ;Field($TableNo;$vlUnitField)->=<>vlUserUnit;*)
End if 
If ($vlStatusField>0)
QUERY($TablePtr->; & ;Field($TableNo;$vlStatusField)->=1)
Else 
QUERY($TablePtr->)
End if 
$vbAccess:=True
Else 
$0:=2
End if 
Else   // in the current selection only
If ($vlCreatorField>0)
QUERY SELECTION($TablePtr->;Field($TableNo;$vlCreatorField)->=<>vlUserID;*)
If ($vlDepartmentField>0)
QUERY SELECTION($TablePtr->; & 
;Field($TableNo;$vlDepartmentField)->=<>vlUserDepartment;*)
End if 
If ($vlBranchField>0)
QUERY SELECTION($TablePtr->; & 
;Field($TableNo;$vlBranchField)->=<>vlUserBranch;*)
End if 
If ($vlUnitField>0)
QUERY SELECTION($TablePtr->; & ;Field($TableNo;$vlUnitField)->=<>vlUserUnit)
Else 
QUERY SELECTION($TablePtr->)
End if 
$vbAccess:=True
Else 
$0:=2
End if 
End if 
end case


This is all I have time for, but I hope that helps.

Cheers
Jörg



**
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: Schemes for record level access control

2017-05-12 Thread Alan Chan via 4D_Tech
It would be a lot easier if 4D password system is activated. Just a new group 
"TeamAccess_Bypass". LIke I said before, 4D password system does great help on 
achieving this.

While we find 4D password system is invaluable, I know many developers don't 
like it.

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>Right - so the ultimate permission is the most permissive of all available.
>
>On Fri, May 12, 2017 at 4:56 PM, Alan Chan via 4D_Tech <4d_tech@lists.4d.com
>> wrote:
>
>> I assume a member might belongs to multiple teams but will a member
>> belongs to multiple clubs?
>>
>> Alan Chan
>>
>> 4D iNug Technical <4d_tech@lists.4d.com> writes:
>> >Hi Alan,
>> >Those are the go-to solutions. In my case we aren't using the 4D password
>> >system so I can't rely on that. Plus I need actual record level
>> >restriction. So to follow your example, I may want a Team to be able to
>> see
>> >themselves and other teams in their Club (just making this up) but not
>> >teams in other Clubs.
>> >
>> >
>

**
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: Schemes for record level access control

2017-05-12 Thread Kirk Brooks via 4D_Tech
Right - so the ultimate permission is the most permissive of all available.

On Fri, May 12, 2017 at 4:56 PM, Alan Chan via 4D_Tech <4d_tech@lists.4d.com
> wrote:

> I assume a member might belongs to multiple teams but will a member
> belongs to multiple clubs?
>
> Alan Chan
>
> 4D iNug Technical <4d_tech@lists.4d.com> writes:
> >Hi Alan,
> >Those are the go-to solutions. In my case we aren't using the 4D password
> >system so I can't rely on that. Plus I need actual record level
> >restriction. So to follow your example, I may want a Team to be able to
> see
> >themselves and other teams in their Club (just making this up) but not
> >teams in other Clubs.
> >
> >
>
> **
> 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
> **
>



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

Re: Schemes for record level access control

2017-05-12 Thread Alan Chan via 4D_Tech
If implemented correctly, performance hit could be minimum.

Do what query 
if(records in selection([WhateverTable]>0)
if(<>TeamAccessRequired)\\some customers do not need this feature
Query selection with array([WhateverTable]Team;<>CurTeam)
end if
end if

<>CurTeam is loaded from team member table at startup method.

Query selection with array is NOT preemptive in 4D 13/15 that might have 
performance hit on server. Based on v16 doc, this command would be preemptive 
and hopefully it does not have hidden limitation.

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>That sounds like real DOD level stuff. Fortunately I don't need that level
>but it gives me some ideas.
>
>What kind of performance hit did you see as a result of all that extra
>processing?

**
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: Schemes for record level access control

2017-05-12 Thread Alan Chan via 4D_Tech
I assume a member might belongs to multiple teams but will a member belongs to 
multiple clubs?

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>Hi Alan,
>Those are the go-to solutions. In my case we aren't using the 4D password
>system so I can't rely on that. Plus I need actual record level
>restriction. So to follow your example, I may want a Team to be able to see
>themselves and other teams in their Club (just making this up) but not
>teams in other Clubs.
>
>

**
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: Schemes for record level access control

2017-05-12 Thread Kirk Brooks via 4D_Tech
Hi Alan,
Those are the go-to solutions. In my case we aren't using the 4D password
system so I can't rely on that. Plus I need actual record level
restriction. So to follow your example, I may want a Team to be able to see
themselves and other teams in their Club (just making this up) but not
teams in other Clubs.

On Fri, May 12, 2017 at 4:33 PM, Alan Chan via 4D_Tech <4d_tech@lists.4d.com
> wrote:

> We restricted record access based on Team (Field related to Team and
> Member table), Module (menu bar), History (Date) and other access such as
> cross team and also by field level such as viewing cost, modifying sales
> price, bypassing margin control
> or credit control, just name a few, through 4D standard user/group access
> feature.
>
> With combination of all of above, we can restrict/control access from
> users on almost all level.
>
> 4D standard user/groups access are extremely helpful for these kind of
> control and we have more than 200 user groups for these purpose.
>
> Alan Chan
>
> 4D iNug Technical <4d_tech@lists.4d.com> writes:
> >Hi folks,
> >I'd like to hear from some of you who have implemented systems that allow
> >for record-level access control in a 4D database. This is the sort of
> thing
> >where we want to prevent unauthorized users from seeing or inferring the
> >'restricted' records.
> >
> >Theoretically it's pretty easy - include a field on relevant tables called
> >'restricted' or some such and the rules are you filter those records out
> if
> >the user's permission doesn't allow them. Simple enough but, as we know,
> >there be devils there. Maybe it's a whole different approach to the
> >structure?
> >
> >I want to hear about the details of what it took to make that work with
> >respect to related records, queries on related records, sorting and so on.
> >
>
> **
> 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
> **
>



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

Re: Schemes for record level access control

2017-05-12 Thread G-Mail via 4D_Tech
Kirk:

Of course there are all sorts of ways this could be done. It all depends on the 
complexity.

We had to record by each user which records they were restricted from seeing. 
We also needed to permit / restrict by a group as well.
Therefore we could not put a ‘flag’ within the record. When a record was first 
found (i.e. Query) before being displayed we would have to check each record in 
the selection to see if there was a record in our ‘Restricted’ table for the 
currently signed in User. There could be different levels of restrictions as 
well.

For some kinds of restricted records we also needed to record what the query 
was that found the record(s). This was to see if they were hunting for that 
record, or it was by accident.

Therefore for each user there was an associated table that indicated which 
groups they were in. 
We used the record keys (Primary Key) to search for each record to see if the 
current user was restricted in regard to the record.

Of course this could be much easier if there are less possibilities.

Jody


> On 05/12/2017, at 1:42 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi folks,
> I'd like to hear from some of you who have implemented systems that allow
> for record-level access control in a 4D database. This is the sort of thing
> where we want to prevent unauthorized users from seeing or inferring the
> 'restricted' records.
> 
> Theoretically it's pretty easy - include a field on relevant tables called
> 'restricted' or some such and the rules are you filter those records out if
> the user's permission doesn't allow them. Simple enough but, as we know,
> there be devils there. Maybe it's a whole different approach to the
> structure?
> 
> I want to hear about the details of what it took to make that work with
> respect to related records, queries on related records, sorting and so on.
> 
> -- 
> 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
**

unrendered spaces

2017-05-12 Thread Malcolm Stone via 4D_Tech
My numeric display format issue is not confined to numbers.
If I put “abc” and “abc “ into an array (or into a table) and display it on a 
form, I get
abc|
abc|
( | represents edge of object)
instead of
abc|
abc |

The space is in the array value (or table), 4D doesn’t display it. If you want 
to play along at home, try this:
Create a Project Form
Add a List Box (not Hierarchical, it should get the default name of "List Box”)
Paste the following into the form method, display the form. My first column 
aligns to the right with no spaces. Other columns are just for fun to show that 
the spaces are there.

The question is: why are trailing spaces not displayed?

Cheers,
Malcolm

//v15.4
Case of 
: (Form event=On Load)
ARRAY TEXT(a;0)
ARRAY LONGINT(wide;0)
ARRAY TEXT(star;0)
ARRAY TEXT(reverse;0)
C_TEXT($this;$temp)

C_LONGINT($i;$j)
C_POINTER($NilPtr)

OBJECT SET DATA SOURCE(*;"Column1";Get pointer("a"))
OBJECT SET TITLE(*;"Header1";"right")

LISTBOX INSERT COLUMN(*;"List Box";2;"second";wide;"length";$NilPtr)
OBJECT SET TITLE(*;"length";"length")

LISTBOX INSERT COLUMN(*;"List Box";3;"third";reverse;"reversed";$NilPtr)
OBJECT SET TITLE(*;"reversed";"reversed")

LISTBOX INSERT COLUMN(*;"List Box";4;"fourth";star;"star";$NilPtr)
OBJECT SET TITLE(*;"star";"replaced")

OBJECT SET HORIZONTAL ALIGNMENT(*;"Column1";Align right)
OBJECT SET HORIZONTAL ALIGNMENT(*;"second";Align center)
OBJECT SET HORIZONTAL ALIGNMENT(*;"fourth";Align right)
LISTBOX SET COLUMN WIDTH(*;"List Box";60)

For ($i;0;9)
$this:=Choose($i;"D";"D";"D";"G";"G";"A";"A";"D+";"B";"G")+(Char(32)*$i)
APPEND TO ARRAY(a;$this)
APPEND TO ARRAY(wide;Length($this))
$temp:=""
For ($j;Length($this);1;-1)  //reverse the string
$temp:=$temp+Substring($this;$j;1)
End for 
APPEND TO ARRAY(reverse;$temp)
APPEND TO ARRAY(star;Replace string($this;" ";"*"))
End for 
End case 

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

Schemes for record level access control

2017-05-12 Thread Kirk Brooks via 4D_Tech
Hi folks,
I'd like to hear from some of you who have implemented systems that allow
for record-level access control in a 4D database. This is the sort of thing
where we want to prevent unauthorized users from seeing or inferring the
'restricted' records.

Theoretically it's pretty easy - include a field on relevant tables called
'restricted' or some such and the rules are you filter those records out if
the user's permission doesn't allow them. Simple enough but, as we know,
there be devils there. Maybe it's a whole different approach to the
structure?

I want to hear about the details of what it took to make that work with
respect to related records, queries on related records, sorting and so on.

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

Re: Limit input into alpha characters into variable

2017-05-12 Thread Garri Ogata via 4D_Tech
Hi Keith,

Heres a code snippet if it helps

$iFormEvent:=Form event

Case of

: ($i=On Load)

C_TEXT(Test)

: ($i=On After Keystroke)

$t:=Get edited text

If (Length($t)>10)

Test:=Substring($t;1;10)

End if

End case




From: Garri Ogata 
Sent: Friday, May 12, 2017 5:39 PM
To: 4D iNug Technical
Subject: Re: Limit input into alpha characters into variable


Hi Keith,


You can use a field with a set size.  Or you can trap for after Keystroke and 
use get edited Text and do  substring.


Garri



From: 4D_Tech <4d_tech-boun...@lists.4d.com> on behalf of Keith White via 
4D_Tech <4d_tech@lists.4d.com>
Sent: Friday, May 12, 2017 5:12 PM
To: 4d_tech@lists.4d.com
Cc: Keith White
Subject: Limit input into alpha characters into variable

Hi

Is there a way to limit the number of characters you can impose on the user for 
alpha _variables_ (in a 4D form)?

I tried using an entry filter, but that changes how the data is entered (you 
can only highlight one character at a time).  Setting an entry format didn't 
seem to do it.

I'm sure someone came up with something, but I've searched all places and 
haven't found it.

4D v13.6

Many thanks.

Best regards

Keith White
Synergist Express Ltd, UK.


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
lists.4d.com
lists.4d.com
Information about the 4D Tech Mailing List <4D_Tech@lists.4D.com>, 4D Biz 
Mailing List <4d_...@lists.4d.com>, and 4D Pub Mailing List 
<4d_...@lists.4d.com ...



Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
[http://lists.4d.com/images/mailman/gnu-head-tiny.jpg]

4D_Tech list: member options login 
page
lists.4d.com
Unsubscribe: By clicking on the Unsubscribe button, a confirmation message will 
be emailed to you. This message will have a link that you should click on to ...



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: Limit input into alpha characters into variable

2017-05-12 Thread Garri Ogata via 4D_Tech
Hi Keith,


You can use a field with a set size.  Or you can trap for after Keystroke and 
use get edited Text and do  substring.


Garri



From: 4D_Tech <4d_tech-boun...@lists.4d.com> on behalf of Keith White via 
4D_Tech <4d_tech@lists.4d.com>
Sent: Friday, May 12, 2017 5:12 PM
To: 4d_tech@lists.4d.com
Cc: Keith White
Subject: Limit input into alpha characters into variable

Hi

Is there a way to limit the number of characters you can impose on the user for 
alpha _variables_ (in a 4D form)?

I tried using an entry filter, but that changes how the data is entered (you 
can only highlight one character at a time).  Setting an entry format didn't 
seem to do it.

I'm sure someone came up with something, but I've searched all places and 
haven't found it.

4D v13.6

Many thanks.

Best regards

Keith White
Synergist Express Ltd, UK.


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
lists.4d.com
lists.4d.com
Information about the 4D Tech Mailing List <4D_Tech@lists.4D.com>, 4D Biz 
Mailing List <4d_...@lists.4d.com>, and 4D Pub Mailing List 
<4d_...@lists.4d.com ...



Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
[http://lists.4d.com/images/mailman/gnu-head-tiny.jpg]

4D_Tech list: member options login 
page
lists.4d.com
Unsubscribe: By clicking on the Unsubscribe button, a confirmation message will 
be emailed to you. This message will have a link that you should click on to ...



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: Limit input into alpha characters into variable

2017-05-12 Thread David Porter via 4D_Tech
Use an alpha field with the character limit you want from a temporary table.
Copy the alpha field to the variable.

Dave Porter
Tailored Solutions, Inc.
Business Management Software for Label Converters

> On May 12, 2017, at 12:12 PM, Keith White via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi
> 
> Is there a way to limit the number of characters you can impose on the user 
> for alpha _variables_ (in a 4D form)?
> 
> I tried using an entry filter, but that changes how the data is entered (you 
> can only highlight one character at a time).  Setting an entry format didn't 
> seem to do it.
> 
> I'm sure someone came up with something, but I've searched all places and 
> haven't found it.
> 
> 4D v13.6
> 
> Many thanks.
> 
> Best regards
> 
> Keith White
> Synergist Express Ltd, UK.
> 
> 
> **
> 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
**

Limit input into alpha characters into variable

2017-05-12 Thread Keith White via 4D_Tech
Hi

Is there a way to limit the number of characters you can impose on the user for 
alpha _variables_ (in a 4D form)?

I tried using an entry filter, but that changes how the data is entered (you 
can only highlight one character at a time).  Setting an entry format didn't 
seem to do it.

I'm sure someone came up with something, but I've searched all places and 
haven't found it.

4D v13.6

Many thanks.

Best regards

Keith White
Synergist Express Ltd, UK.


**
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: Disable close button on Splash screen windows v12

2017-05-12 Thread Douglas von Roeder via 4D_Tech
John:

The code shown above is from V12.5 and an old version of Win32. Per the
docs for Win32 8.1.2, the three commands listed above have been deprecated.
The new versions of the command use the same command name with an "Ex"
appended.

--
Douglas von Roeder
949-336-2902

On Thu, May 11, 2017 at 4:55 PM, Douglas von Roeder 
wrote:

> John:
>
> Just snarfed this from a legacy application and watched the code execute.
>
> $Error_Code:=gui_SetWndRect ($Window_Handle;0;0;<>WND_
> vWindow_Width;<>WND_vWindow_Height)
> $Error_Code:=gui_SetWindowLong ($Window_Handle;WS_THICKFRAME |
> WS_MAXIMIZEBOX;WIN_DISABLE;WIN_STYLE)
> $Error_Code:=gui_DisableCloseBox ($Window_Handle)
>
> Line 1 sets the window size
> Line 2 disables the minimize
> Line 3 disables the close box
>
>
>
> --
> Douglas von Roeder
> 949-336-2902 <(949)%20336-2902>
>
> On Tue, May 9, 2017 at 7:18 AM, truegold via 4D_Tech <4d_tech@lists.4d.com
> > wrote:
>
>> Hi All,
>>
>> 4D v12 Windows clients
>>
>> I have read all the threads in the Nug concerning this and can’t seem to
>> find a solution.
>>
>> I have been trying to figure out how to disable the close button on
>> Splash screen windows v12. Not the main Application window (that works).
>>
>> If I use the command “gui_DisableCloseBox(windowHandle)” from Win32API
>> it does disable the close button of the application window but not the
>> splash screen.
>>
>> I need the Splash screen to also have a disable close button.
>>
>> Why would I want to do that? because the client WANTS the splash screen
>> and keeps it maximized.
>>
>> Is there any straight-forward way using Win32API?
>>
>> Thanks,
>> John…
>>
>> **
>> 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
**

INTO LISTBOX

2017-05-12 Thread Arnaud de Montard via 4D_Tech
I accidentally discovered something yesterday using SELECT ... INTO LISTBOX. I 
had 2 listboxes filled with SELECT ... INTO LISTBOX and 4D gave both identical 
names to columns and headers (sql_column1..sql_columnN, 
sql_header1..sql_headerN), resulting in duplicated object names in the same 
form. To turn around this, I did this (shortly):

for(i;1;number of columns)
  c_p := pointer on column i
  h_p := pointer on header i
  listbox insert column (*;lbName;number of 
columns+i;newColumnName;c_p->;newHeaderName;h_p->)
  listbox delete column (*;lbName;1)
end for

I've always thought a listbox obtained with INTO LISTBOX could not have more 
columns that the number of fields in the SELECT, but the code above gave me the 
idea to use this "column cloning" to add my own columns: clone, put the data 
you want, use… until now it seems to be working fine. As this is new to me, i'm 
wondering if it's reliable: some experience?

-- 
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: Finding where a filter or format is used in a structure

2017-05-12 Thread Paul Lovejoy via 4D_Tech
Randy,

The log from the verify does in any case.


Paul

> Le 12 mai 2017 à 15:04, Randy Jaynes via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> I haven’t tried this - does the log let you know where these deletions 
> occurred so you can go set them to more appropriate filters?
> 
> That was the reason I had written my method - I needed to track down 
> inconsistencies.
> 
> Randy
> 
> --
> Randy Jaynes
> Senior Programmer and Customer Support
> 
> http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
> Palisades, NY 10964 
> 
> 
> 
> 
>> On May 12, 2017, at 9:00 AM, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Yes, great idea. Deleting the filter and the repairing with MSC removes all 
>> the filters in variables and fields.
>> 
>> Thanks for the tip.
>> 
>> 
>> Paul
>> 
>>> Le 12 mai 2017 à 13:15, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
>>> écrit :
>>> 
>>> you could FORM GET NAMES ,
>>> iterate with FORM LOAD, FORM GET OBJECTS, OBJECT Get filter
>>> and process the results.
>>> 
>>> alternatively,
>>> you could create a copy of the structure,
>>> delete the filter in toolbox and run MSC verify.
>>> 
>>> 2017/05/12 20:08、Paul Lovejoy via 4D_Tech 
>>> <4d_tech@lists.4d.com> のメール:
>>> 
>>> With the good old 4D Insider it was easy to find where filters and formats 
>>> created in the Toolbox were used in a structure. This feature disappeared 
>>> with v11 and I certainly miss it, as I have to remove filters from fields 
>>> and variables in v15 which are causing problems with certain accented 
>>> characters (per my topic "Circumflex strangeness with v15 on OS X 10.10.5”.
>>> 
>>> Is there a way in v15 to find where filters and formats are used?
>>> 
>>> 
>>> **
>>> 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
> **

**
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: Finding where a filter or format is used in a structure

2017-05-12 Thread Randy Jaynes via 4D_Tech
I haven’t tried this - does the log let you know where these deletions occurred 
so you can go set them to more appropriate filters?

That was the reason I had written my method - I needed to track down 
inconsistencies.

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
Palisades, NY 10964 




> On May 12, 2017, at 9:00 AM, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Yes, great idea. Deleting the filter and the repairing with MSC removes all 
> the filters in variables and fields.
> 
> Thanks for the tip.
> 
> 
> Paul
> 
>> Le 12 mai 2017 à 13:15, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
>> écrit :
>> 
>> you could FORM GET NAMES ,
>> iterate with FORM LOAD, FORM GET OBJECTS, OBJECT Get filter
>> and process the results.
>> 
>> alternatively,
>> you could create a copy of the structure,
>> delete the filter in toolbox and run MSC verify.
>> 
>> 2017/05/12 20:08、Paul Lovejoy via 4D_Tech 
>> <4d_tech@lists.4d.com> のメール:
>> 
>> With the good old 4D Insider it was easy to find where filters and formats 
>> created in the Toolbox were used in a structure. This feature disappeared 
>> with v11 and I certainly miss it, as I have to remove filters from fields 
>> and variables in v15 which are causing problems with certain accented 
>> characters (per my topic "Circumflex strangeness with v15 on OS X 10.10.5”.
>> 
>> Is there a way in v15 to find where filters and formats are used?
>> 
>> 
>> **
>> 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: Finding where a filter or format is used in a structure

2017-05-12 Thread Paul Lovejoy via 4D_Tech
Yes, great idea. Deleting the filter and the repairing with MSC removes all the 
filters in variables and fields.

Thanks for the tip.


Paul

> Le 12 mai 2017 à 13:15, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> you could FORM GET NAMES ,
> iterate with FORM LOAD, FORM GET OBJECTS, OBJECT Get filter
> and process the results.
> 
> alternatively,
> you could create a copy of the structure,
> delete the filter in toolbox and run MSC verify.
> 
> 2017/05/12 20:08、Paul Lovejoy via 4D_Tech 
> <4d_tech@lists.4d.com> のメール:
> 
> With the good old 4D Insider it was easy to find where filters and formats 
> created in the Toolbox were used in a structure. This feature disappeared 
> with v11 and I certainly miss it, as I have to remove filters from fields and 
> variables in v15 which are causing problems with certain accented characters 
> (per my topic "Circumflex strangeness with v15 on OS X 10.10.5”.
> 
> Is there a way in v15 to find where filters and formats are used?
> 
> 
> **
> 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: Finding where a filter or format is used in a structure

2017-05-12 Thread Randy Jaynes via 4D_Tech
I have a utility method and a calling method for looping through the forms that 
dumps the following information into a text file on desktop for all table forms 
and project forms.

The columns it writes are

Table
Form Name
Page #
Object Name
Variable / Field Name
Format
Help Tip
Filter

I created it for exactly the purpose you outlined, but it should be easy to add 
any additional info you want.

I’m happy to email them to you if it will help.

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
Palisades, NY 10964 




> On May 12, 2017, at 7:15 AM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> you could FORM GET NAMES ,
> iterate with FORM LOAD, FORM GET OBJECTS, OBJECT Get filter
> and process the results.
> 
> alternatively,
> you could create a copy of the structure,
> delete the filter in toolbox and run MSC verify.
> 
> 2017/05/12 20:08、Paul Lovejoy via 4D_Tech 
> <4d_tech@lists.4d.com> のメール:
> 
> With the good old 4D Insider it was easy to find where filters and formats 
> created in the Toolbox were used in a structure. This feature disappeared 
> with v11 and I certainly miss it, as I have to remove filters from fields and 
> variables in v15 which are causing problems with certain accented characters 
> (per my topic "Circumflex strangeness with v15 on OS X 10.10.5”.
> 
> Is there a way in v15 to find where filters and formats are used?
> 
> 
> **
> 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: Finding where a filter or format is used in a structure

2017-05-12 Thread Keisuke Miyako via 4D_Tech
you could FORM GET NAMES ,
iterate with FORM LOAD, FORM GET OBJECTS, OBJECT Get filter
and process the results.

alternatively,
you could create a copy of the structure,
delete the filter in toolbox and run MSC verify.

2017/05/12 20:08、Paul Lovejoy via 4D_Tech 
<4d_tech@lists.4d.com> のメール:

With the good old 4D Insider it was easy to find where filters and formats 
created in the Toolbox were used in a structure. This feature disappeared with 
v11 and I certainly miss it, as I have to remove filters from fields and 
variables in v15 which are causing problems with certain accented characters 
(per my topic "Circumflex strangeness with v15 on OS X 10.10.5”.

Is there a way in v15 to find where filters and formats are used?


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

Finding where a filter or format is used in a structure

2017-05-12 Thread Paul Lovejoy via 4D_Tech
Hi everyone,

With the good old 4D Insider it was easy to find where filters and formats 
created in the Toolbox were used in a structure. This feature disappeared with 
v11 and I certainly miss it, as I have to remove filters from fields and 
variables in v15 which are causing problems with certain accented characters 
(per my topic "Circumflex strangeness with v15 on OS X 10.10.5”.

Is there a way in v15 to find where filters and formats are used?

Cheers,


Paul
**
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: Circumflex strangeness with v15 on OS X 10.10.5

2017-05-12 Thread Milan Adamov via 4D_Tech

> On 12May, 2017, at 08:44, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> The users are based in Europe and have keyboards which make entering these 
> accented characters quite easy. There is one key for the “^” and the system 
> waits for a vowel over which it will be placed. With this bug, the user winds 
> up with the “^” on the vowel as well as stand-alone

Hi Paul,

this is kind of Mac thing ffrom the beginning more than 30 years ago, but 
usually circumflex only shouldn't trigger that behaviour, only in combination 
with Option key. It is the same with some other characters, for example using 
US keyboard layout you can type Option-n folowed by n and get ñ without 
activating Spanish keyboard to get this Spanish character.

Regards,

Milan

**
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: Circumflex strangeness with v15 on OS X 10.10.5

2017-05-12 Thread Paul Lovejoy via 4D_Tech
Hi Miyako,

The users are based in Europe and have keyboards which make entering these 
accented characters quite easy. There is one key for the “^” and the system 
waits for a vowel over which it will be placed. With this bug, the user winds 
up with the “^” on the vowel as well as stand-alone.

I have progressed somewhat. We use entry filters to avoid users cutting and 
pasting garbage such as control characters from outside sources. If we remove 
the entry filter it works normally. We haven’t been able to construct a filter 
which does what we want. We can’t use an empty filter either, so we have a 
database with thousands of fields using the filter that causes the problem :-(


Paul
> Le 12 mai 2017 à 02:20, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> how is the user typing the circumflex character?
> assuming the U.S. keyboard layout is used,
> option+I would enter a combining circumflex with yellow background.
> following it with another letter would yield the accented character.
> but other keyboard layouts (U.S. extended, or FR, for example) have other 
> conventions.
> 
> there is also the feature that allows the user to long-press a key to enter 
> accented characters.
> 
> last but not least, it the problem restricted to 4D or any application?
> 
>> 2017/05/11 22:54、Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> 
>> We have noticed an annoying issue with the circumflex character (^) on OS X 
>> 10.10.5.
>> 
>> If a user wants to write the word capôter, the circumflex “^" is typed 
>> before typing the “o". The system then placed the circumflex on top of the o 
>> to produce “ô".
>> 
>> What we are seeing is cap^ôter instead of capôter because somehow the user 
>> gets two circumflexes even though only one was typed (wish ATMs worked that 
>> way).
>> 
>> Has anyone else seen this? Perhaps there’s a compatibility setting I’m 
>> missing somewhere?
>> 
>> It seems to work fine on OSX 10.12x
> 
> 
> 
> **
> 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: Problems with LISTBOX SET FOOTER CALCULATION and dynamic columns (v15)

2017-05-12 Thread Kirk Brooks via 4D_Tech
Hey Lahav,
You are correct - thanks for saying something. It prompted me to go look at
my actual code which is pretty similar:

    get the current doc values obj
$obj:=JSON Parse("{}")
$obj:=IG_get_curDocValues ($igPtr)

For ($i;1;Size of array(aIG_ftrVars))

OBJECT SET RGB COLORS(aIG_ftrVars{$i}->;$color;$bgColor)

OBJECT SET HORIZONTAL ALIGNMENT(aIG_ftrVars{$i}->;Align right)


Case of

: (aIG_ftrNames{$i}="sumSales")

aIG_ftrVars{$i}->:=String(OBJ_Get_Real ($obj;IG sum
subtotal);"###,###,##0.00")

: (aIG_ftrNames{$i}="sumCosts")

aIG_ftrVars{$i}->:=String(OBJ_Get_Real ($obj;IG sum cost);"###,##0.00")

​and so on ...


​I'd forgotten about using text vars in the footers. Do you know if they
changed it in v16?



On Thu, May 11, 2017 at 10:53 PM, lists via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Hi Kirk,
>
> The issue is the inability to use any of the automatic footer calculations
> such as SUM or AVG in a footer of a numeric column, since regardless of
> what type the column is, the dynamic footer variables are always of type
> Text.
>
>
-- 
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
**