RE: v13+ self referentail relations

2019-01-10 Thread Chip Scheide via 4D_Tech
this used to be possible.
what happens when an older structure with a self referential relation is 
upgraded?

>>  how do I draw a self-referential relation?
> You cannot make a single field both the primary and foreign keys of a 
> relation. You must choose two different fields.
> For example, you can make [Table_1]Field1 related to [Table_1]field2
> Reminder: the fields must be compatible with each other as you would 
> not be able to relate a longint field to an alpha field...

Hell is other people 
 Jean-Paul Sartre
**
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
**

v13+ self referentail relations

2019-01-10 Thread Chip Scheide via 4D_Tech
How do you create a self referential relation?
in older versions you could drag the relational arrow back to the same 
field to get a 'loop'

This does not work now, and I tried to modify the system tables but 
these are locked, and I can not get them to unlock.

2 questions:
-  how do I draw a self referential relation?
-  how do I modify the system tables?

Thanks
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: v13- Chasing Relations

2019-01-10 Thread Chip Scheide via 4D_Tech
Thanks!

on the first look it would appear to be simpler/faster to use Sql.

On Thu, 10 Jan 2019 21:15:48 +0100, Arnaud de Montard via 4D_Tech wrote:
> 
>> Le 10 janv. 2019 à 20:21, cjmiller--- via 4D_Tech 
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> You could run it on server 
> 
> Running a method on server is great if there a lot of data to read 
> and/or write, because it avoids the transfer of these data through 
> network. Here the data is very small, time to ask server to run the 
> method and time to get that little data will be the same. Some times:
> - using SQL ~ 250 ms 1st time, then ~60 ms (I don't know why 1st time 
> is longer, BTW)
> - loop ~ 9 ms (and the server can do something better for other clients)
> 
> -- 
> Arnaud de Montard 
> 
> 
> 
> 
> 
> **
> 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
**

Re: v13- Chasing Relations

2019-01-10 Thread Chip Scheide via 4D_Tech
Thanks Arnuad,
however, that will work, but requires a bunch of 'work'.

Thanks to Keisuke, again :), his query component contains code that 
pulls all relations ENDING (where the current field of parent table is 
the many of a one to many relation). without having to troll through 
the entire table structure.


So my final code looks like this:

For (all valid fields of parent table)
 query hidden structure definition tables for related many
 on current parent table field
  
  if (related many exist)
   clear selections on those tables
   RELATE MANY
   
   if (records in selection of any related many tables >0)
exit loop
$Dependancies_Exist := true
   end if
  else
   GET RELATION PROPERTIES (Current field)
   RELATE ONE

if Records in selection one table >0)
 exit loop
 $Dependancies_Exist := true
end if
  end if
end for
$0:= $Dependancies_Exist 


On Thu, 10 Jan 2019 17:02:52 +0100, Arnaud de Montard via 4D_Tech wrote:
> 
>> Le 8 janv. 2019 à 21:47, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> given a pointer to a table, or a pointer to a field of a table,
>> I want to be able, for the current record of this table, to :
> 
> Hi Chip, 
> I use this for foreign keys: 
> 
> //DB_getForeignKeys (aTable_p)
> $parentTable_l:=Table($1)
> $FKarray_p:=$2
> CLEAR VARIABLE($FKarray_p->)
> For ($table_l;1;Get last table number)
>   Case of
>   : (Not(Is table number valid($table_l)))
>   : ($table_l=$parentTable_l)
>   Else
>   For ($field_l;1;Get last field number($table_l))
>   If (Is field number valid($table_l;$field_l))
>   GET RELATION 
> PROPERTIES($table_l;$field_l;$destinationTable_l;$destinationField_l)
>   If ($parentTable_l=$destinationTable_l)
>   APPEND TO 
> ARRAY($FKarray_p->;Field($table_l;$field_l))
>   End if
>   End if
>   End for
>   End case
> End for
> $0:=Size of array($FKarray_p->)
> 
> Primary is easier, just loop through fields of the start table and 
> check if a relation exists for the current one (as above). 
> 
> -- 
> Arnaud de Montard 
> 
> 
> 
> **
> 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
**

Re: v13+ - Hidden tables

2019-01-09 Thread Chip Scheide via 4D_Tech
Thanks!

On Wed, 9 Jan 2019 07:44:23 -0800, Tom Benedict wrote:
> Hi Chip,
> 
> Here’s a link which may help:  
> https://doc.4d.com/4Dv15/4D/15/System-Tables.300-2288116.en.html 
> <https://doc.4d.com/4Dv15/4D/15/System-Tables.300-2288116.en.html>
> 
> Tom Benedict
> 
>> On Jan 9, 2019, at 07:05, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Is there documentation regarding the hidden tables, such as 
>> _USER_CONSTRAINTS, of a structure?
>> If so where?
>> 
>> 
>> Thanks
>> 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
>> **
> 
---
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
**

v13+ - Hidden tables

2019-01-09 Thread Chip Scheide via 4D_Tech
Is there documentation regarding the hidden tables, such as 
_USER_CONSTRAINTS, of a structure?
If so where?


Thanks
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: v13- Chasing Relations

2019-01-08 Thread Chip Scheide via 4D_Tech
Thanks!

As you might guess from the pseudo code, I am looking to have some 
generic code to check for record dependencies before doing something 
(most likely deletion)

So, given a record in [Table], I want to follow (1 level) all relations 
to check for related record dependancies, and kick back a 
warning/boolean that there are/are not dependancies.

Chip

On Tue, 8 Jan 2019 21:38:06 +, Keisuke Miyako via 4D_Tech wrote:
> I follow every 1-to-n and n-to-1 relations in this component
> 
> https://github.com/miyako/4d-component-classic-query-editor
> 
> mind you, relations can be circular...
> 
> 2019/01/09 5:47、Chip Scheide via 4D_Tech 
> <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>>のメール:
> 
> --- if there are 1 or more relations, I want 'follow' each relation to
> determine if there exists 1 or more related records at the other end of
> the relation - I am not sure I know how to do this
> 
> 
> 
> **
> 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
**

Re: v13- Chasing Relations

2019-01-08 Thread Chip Scheide via 4D_Tech
aren't there hidden tables which contain the various table and field 
attributes?



On Tue, 8 Jan 2019 15:47:11 -0500, Chip Scheide via 4D_Tech wrote:
> given a pointer to a table, or a pointer to a field of a table,
> I want to be able, for the current record of this table, to :
> - iterate over all the fields of the table - I know how to do this
> -- determine if the current field has 1 or more relations - I do not 
> know how to do this
> --- if there are 1 or more relations, I want 'follow' each relation to 
> determine if there exists 1 or more related records at the other end of 
> the relation - I am not sure I know how to do this
> 
> what I want looks something like this
> 
> $Table_Num:=table->([table])
> $Field_Count:=get last field number([table])
> 
> For ($i; 1; $Field_Count)
>   
>  if (field number valid($Table_Num; $i))
>   // get field relational information
> 
>   // if (relations)
> 
>// For ($Realation_count)  
> // check related table for records
>  
> // if (related records exist) 
>  $Dependencies := True
> 
>  // exit loops
> 
> Thanks
> 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
> **
---
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: v13- Chasing Relations

2019-01-08 Thread Chip Scheide via 4D_Tech
Thanks!

On Tue, 8 Jan 2019 15:27:34 -0600, Keith Culotta via 4D_Tech wrote:
> Would these help?
> 
> https://doc.4d.com/4Dv17/4D/17/GET-RELATION-PROPERTIES.301-3729513.en.html 
only works from the child table. from documentation:
>> returns the properties of the relation (if any) which starts from the 
source field defined by tableNum and fieldNum or by fieldPtr

all of the below apply only to v17...
> <https://doc.4d.com/4Dv17/4D/17/GET-RELATION-PROPERTIES.301-3729513.en.html>
> 
https://doc.4d.com/4Dv17/4D/17/dataClassAttributerelatedDataClass.303-3884018.en.html
 
> 
<https://doc.4d.com/4Dv17/4D/17/dataClassAttributerelatedDataClass.303-3884018.en.html>
> 
> 
> Keith - CDI
> 
>> On Jan 8, 2019, at 2:47 PM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> given a pointer to a table, or a pointer to a field of a table,
>> I want to be able, for the current record of this table, to :
>> - iterate over all the fields of the table - I know how to do this
>> -- determine if the current field has 1 or more relations - I do not 
>> know how to do this
>> --- if there are 1 or more relations, I want 'follow' each relation to 
>> determine if there exists 1 or more related records at the other end of 
>> the relation - I am not sure I know how to do this
>> 
>> what I want looks something like this
>> 
>> $Table_Num:=table->([table])
>> $Field_Count:=get last field number([table])
>> 
>> For ($i; 1; $Field_Count)
>> 
>> if (field number valid($Table_Num; $i))
>>  // get field relational information
>> 
>>  // if (relations)
>> 
>>   // For ($Realation_count)  
>>// check related table for records
>> 
>>// if (related records exist) 
>> $Dependencies := True
>> 
>> // exit loops
>> 
>> Thanks
>> 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
> **
---
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
**

v13- Chasing Relations

2019-01-08 Thread Chip Scheide via 4D_Tech
given a pointer to a table, or a pointer to a field of a table,
I want to be able, for the current record of this table, to :
- iterate over all the fields of the table - I know how to do this
-- determine if the current field has 1 or more relations - I do not 
know how to do this
--- if there are 1 or more relations, I want 'follow' each relation to 
determine if there exists 1 or more related records at the other end of 
the relation - I am not sure I know how to do this

what I want looks something like this

$Table_Num:=table->([table])
$Field_Count:=get last field number([table])

For ($i; 1; $Field_Count)
  
 if (field number valid($Table_Num; $i))
  // get field relational information

  // if (relations)

   // For ($Realation_count)  
// check related table for records
 
// if (related records exist) 
 $Dependencies := True

 // exit loops

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

[Resolved] v13 - Out of Stack Space

2019-01-08 Thread Chip Scheide via 4D_Tech
I posted this before the holidays, but it never showed up


I did manage to track down the problem -

The problem was related screen resolution and orientation. -- 
Apparently 4D does not like mixed monitor orientations.
In this particular case 1 monitor is in 'normal' orientation (wider 
then high), the second monitor was in vertical orientation (taller then 
wide).  

My system will auto create a window setting for a specific user & form 
if they adjust the window, and the next time the user opens that form, 
the window is opened to the last size specified. Similar to 4D's design 
environment.

The user had open/moved a list form to the normal orientated screen and 
adjusted its width. The next time they opened the same list form, the 
vertical monitor was the default monitor, and the width of the form 
window was larger then the vertical screen's width.  In the process of 
this form opening - 4D choked and crashed to the desktop.

Once I tracked this down, and changed the default form width - the 
crashing problem stopped

Chip


On Tue, 11 Dec 2018 18:36:00 +, Timothy Penner wrote:
> Tech Tip: Generic troubleshooting steps for isolating and narrowing 
down an issue
http://kb.4d.com/assetid=78115

-Tim


Timothy Penner
Senior Technical Services Engineer

4D Inc
95 S. Market Street, Suite #240
CA 95113 San Jose
United States

Téléphone : +1-408-557-4600
Standard :  +1-408-557-4600
Fax :   +1-408-271-5080
Email : tpen...@4d.com
Web :   www.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
**

Re: CalDAV server from 4D

2019-01-07 Thread Chip Scheide via 4D_Tech
If I understand you correctly,
you are sharing the raw .ics files, not running a caldev server.

In this case, while I am not using the newest version of OS X Server, 
you can/should still be able to share these files.
Create a mount point. Setup a user group with access, and add existing 
users.

This should work from either OS X Server, or simple OS X desktop.

From OS X Desktop:
 Create the folder
 open System preferences - Sharing
  turn on file sharing
  drag, or navigate to the folder to be shared, adding it to the shared 
folders
  add user(s) and/or User groups

  
On Fri, 4 Jan 2019 19:27:59 -0500, Mitchell Shiller via 4D_Tech wrote:
> Hi,
> 
> For years I have generated read only .ics files from data in 4D. 
> These were then stored on a share point on my OSX Server. Well, now 
> Apple has removed almost all features from Server. (In fact, I have 
> now installed it).  I would like to still serve up the .ics files so 
> that they can be subscribed to on the desktops and iPhones,etc.
> 
> Anyone know how if and how that can be done on 4D Server? 
> 
> Thanks and happy new year to all.
> 
> Mitch
> 
> Sent from my iPad
> **
> 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
**

Re: Replacement Code for very old DisplayList plugin

2019-01-07 Thread Chip Scheide via 4D_Tech
Walt,
Not sure how much hiding of the listbox(es) Foundation does, as I do 
not use it...

but if can get access to the listbox(es) before display, and after user 
interaction
you can loop over the displayed arrays looking for the value of TRUE

Before display:
Set the listbox(es) Selection Mode (property) to multiple.
NOTE: I do not have v16's documentation handy, but as of v15 it is not 
possible to set the selection mode on a listbox via code. In v16 this 
maybe possible.


In code after user dialog acceptance:

Repeat
  $Found := Find in array(Listbox_Name;True)
 
  if ($Found>0)
   append to array($User_Selected_Row_Numbers;$Found)
  end if

  // alternatively
  if ($Found > 0)
   Do_stuff_with_Selected_Row
  end if

until ($Found < 0)
On Sun, 6 Jan 2019 15:05:42 -0800, Walt Nelson via 4D_Tech wrote:
> Folks,
> 
> I recently inherited a VERY, VERY old database that uses the 
> DisplayList plugin. They need this updated to run in 4D v16.
> 
> Before reinvented the wheel…
> 
> I was wondering if anyone has written a component/set of code that 
> replaces the functionality of DisplayList (this is a volunteer effort 
> - therefore, they can’t afford a new AreaList license - I see that 
> DisplayList has been rolled into AreaList now).
> 
> All they need is the ability to select from a dialog with 3 arrays in 
> it and return the multiple rows that were selected by the user in a 
> returning array.
> 
> Foundation Shell has the command Fnd_List_ChoiceList which would be 
> perfect, but it was designed only for a single row selection.
> 
> I need the option of multiple row selection from the old DisplayList.
> 
> Thanks,
> Walt
> 
> **
> 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
**

Re: REDRAW WINDOW not working v17?

2019-01-06 Thread Chip Scheide via 4D_Tech
Alan,
try:
On Click or On Data change (for your boolean)
  set timer(1)  or some other small value

in the form method, On Timer
call process(current process)
or Call Process(-1)

Chip
> Hello again Bernd,
> 
> I tried several other things but never got anything to work other than my
> original code. I even tried setting a timer and running your code there,
> but it still didn't redraw each line of the display.
> 
> Thanks again,
> Alan
> 
> On Thu, Jan 3, 2019 at 5:37 AM Alan Tilson  wrote:
> 
>> Hello Bernd,
>> 
>> Your solution seemed much more elegant than mine, which was to cut and use
>> a named selection, but for some reason it doesn't work for me. The boolean
>> variable that I'm clicking on goes grey and nothing else changes. If I
>> click another window and come back the boolean and the rows do update.
>> 
>> Any ideas about what might be different?
>> 
>> I tried HIDE WINDOW / SHOW WINDOW which caused a flicker but not a redraw
>> as did HIDE PROCESS / SHOW PROCESS.
>> 
>> I also tried Open Window / CLOSE WINDOW... didn't work.
>> 
>> This does work with some side effects, especially if the user has scrolled
>> down...
>> 
>> CUT NAMED SELECTION(Current form table->;"tempNS")
>> USE NAMED SELECTION("tempNS")
>> HIGHLIGHT RECORDS
>> 
>> 
>> Thanks from North Carolina,
>> Alan Tilson
>> 
>> On Thu, Jan 3, 2019 at 2:18 AM Bernd Fröhlich via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>> 
>>> Alan Tilson:
>>> 
 Has anyone had issues with REDRAW WINDOW working differently or not
>>> working
 in v17? I have an output form with a boolean variable in the header that
 affects the text color of the fields in each line of output as well as
 determining which of a few optional fields are displayed. If I call
>>> REDRAW
 WINDOW after changing the boolean variable the records list does not
 change. If I click on another window and come back to the original
>>> window
 everything updates.
 
 This worked fine in v13.
 
 Am I missing something?
>>> 
>>> 4D V6 or V7 was the last version where REDRAW WINDOW was redrawing the
>>> whole window, then 4D began to "optimize" the redrawing. Maybe it 
>>> is faster
>>> now, but it definitely is no longer working as expected.
>>> My workaround:
>>> 
>>>   // Methode: RedrawWindow
>>>   // Angelegt: BF 16.09.03
>>>   // Objekt: Dienstroutine
>>>   // Beschreibung: Umgehung für das seit 4D 2003 nicht mehr zuverlässig
>>> funktionierende Redraw Window
>>>   // 
>>> 
>>> C_LONGINT($lLeft;$lTop;$lRight;$lBottom)
>>> 
>>> GET WINDOW RECT($lLeft;$lTop;$lRight;$lBottom)
>>> SET WINDOW RECT($lLeft;$lTop;$lRight-1;$lBottom)
>>> SET WINDOW RECT($lLeft;$lTop;$lRight;$lBottom)
>>> 
>>> 
>>> Gives a short flicker, but is the only way I know of to actually redraw a
>>> window.
>>> Maybe someone else has found another solution without the flicker?
>>> 
>>> Greetings from Germany,
>>> Bernd Fröhlich
>>> **
>>> 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
> **

Hell is other people 
 Jean-Paul Sartre
**
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
**

[resolved] v13 - Interpreted - Out of Stack space - Wierd

2018-12-21 Thread Chip Scheide via 4D_Tech

I did manage to track down the problem -

The problem was related screen resolution and orientation. -- 
Apparently 4D does not like mixed monitor orientations.
In this particular case 1 monitor is in 'normal' orientation (wider 
then high), the second monitor was in vertical orientation (taller then 
wide).  

My system will auto create a window setting for a specific user & form 
if they adjust the window, and the next time the user opens that form, 
the window is opened to the last size specified. Similar to 4D's design 
environment.

The user had open/moved a list form to the normal orientated screen and 
adjusted its width. The next time they opened the same list form, the 
vertical monitor was the default monitor, and the width of the form 
window was larger then the vertical screen's width.  In the process of 
this form opening - 4D choked and crashed to the desktop.

Once I tracked this down, and changed the default form width - the 
crashing problem stopped

Chip


On Tue, 11 Dec 2018 18:36:00 +, Timothy Penner wrote:
> Tech Tip: Generic troubleshooting steps for isolating and narrowing 
> down an issue
> http://kb.4d.com/assetid=78115
> 
> -Tim
> 
> 
> Timothy Penner
> Senior Technical Services Engineer
> 
> 4D Inc
> 95 S. Market Street, Suite #240
> CA 95113 San Jose
> United States
> 
> Téléphone : +1-408-557-4600
> Standard :  +1-408-557-4600
> Fax :   +1-408-271-5080
> Email : tpen...@4d.com
> Web :   www.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
**

Re: UI Form Updates

2018-12-19 Thread Chip Scheide via 4D_Tech
With an array listbox, 
after you delete the record you can delete the row from the listbox.


NOTES about array listboxes:
there is a boolean array associated with the array listbox which is the 
listbox
lb_Display_Listbox  <- name of the listbox also name of the boolean 
array.

to locate selected row(s):

Repeat
  $Loc:=find in array(lb_Display_Listbox;true)

  if ($Loc>0)
do stuff  //* see below for an example of Do stuff
  end if
until ($Loc<0)


So... for the record deletion issue you can do something like this:
* - Do stuff example

  delete record
  Listbox Delete Rows(lb_Display_Listbox;$Row_Number;$How_Many)
   
This should be much faster, as you do not have to recreate the listbox 
content through selection to array

Chip

On Wed, 19 Dec 2018 09:21:56 -0500, Sandor Szatmari wrote:
> 
> Actually, I'm using an array based ListBox, but your comment led me 
> to understand how I should apply the underlying concept of what you 
> were getting at.
> I added this code to the appropriate locations, to reestablish the 
> selection in the child table and then propagate that data into the 
> arrays being displayed in the ListBox.
> 
> 
> QUERY([table];[table]ID=[LinkedTable]ID) 
> SELECTION TO 
> 
ARRAY([table];Numbers;[table]EndpointType;Names;[table]EndpointAddress;Addresses)
> 
> 
> Now the ListBox updates as desired.
> 
> Thanks so much for helping understand what I was missing.
> 
> 
> Sandor
> 
> 
> 
>  From:   Chip Scheide <4d_o...@pghrepository.org> 
>  To:   Sandor Szatmari  
>  Cc:   4D iNug Technical <4d_tech@lists.4d.com> 
>  Sent:   12/18/2018 4:30 PM 
>  Subject:   Re: UI Form Updates 
> 
>  
> asumming the listbox is a selection listbox there is a set associated  
> with the listbox which represents the selected record(s). The listbox  
> property is called 'highlight set'. 
>  
> This set (i am going to call it "Selected_Set") holds all record(s)  
> selected by the user. 
> So your code is much easier done like this: 
>  
>  
>// the user has selected at least 1 record 
> if Records in set("Selected_Set")>0) 
>  
>   Create set([AccountSOAPEndpoints];"$Temp")  //holds all currently  
> displayed records 
>   CONFIRM("Are you SURE you want to remove the selected Web Service  
> Endpoint?";"Remove";"Cancel")  
>  
>   If (OK=1)  
>//places the selected record(s) into the current selection 
> use set("Selected_Set")   
> 
>// assuming the records are not locked by another user/process they  
> are deleted 
> delete selection([AccountSOAPEndpoints]) 
> 
>// this removes the deleted records from the originally displayed  
> records 
>// and places the resulting set into "$Temp" 
> difference("$Temp";"Listbox_Selection_Set";"$Temp") 
>  
>// this places the originally displayed records, minus the deleted  
> ones 
>// into the current selection of [AccountSOAPEndpoints] 
>// this should update the listbox  
> use set("$Temp")
>  
> clear set("$Temp") // clear the set to avoid excess memory usage 
>   end if 
> end if 
>  
>  
>  
> your code would: 
>// create a set with the originally displayed records 
>>  CREATE SET([AccountSOAPEndpoints];"$TempSet")  
>  
>//retrieve all records into current selection 
>>  ALL RECORDS([AccountSOAPEndpoints])  
>  
>/replace the current selection (all records) with the originally  
> displayed records 
>>  USE SET("$TempSet")  
>>  CLEAR SET("$TempSet")  
>  
>  
>  
> On Tue, 18 Dec 2018 16:06:13 -0500, Sandor Szatmari wrote: 
>>  
>> Chip, 
>>  
>>  
>> Thanks for your help.  Here is my adaptation of your suggestion.   
>> NOTE: It does not work.  :) 
>>  
>>  
>> Can you please offer some advise on what I am missing here?  Thanks. 
>>  
>>   
>> $TheEvent:=Form event  
>> Case of   
>>  : ($TheEvent=On Load)  
>>// We should only be enabled for Accounts that are non themselves  
>> Secondaries  
>>  OBJECT SET ENABLED(Self->;True)  
>>  
>>   
>>  : ($TheEvent=On Clicked)  
>>// Delete the selected Secondary  
>>  LISTBOX GET CELL POSITION(SOAPEndpointListBox;$col;$row)  
>>  If ($row>0)  
>>  
>>   
>>  CONFIRM("Are you SURE you want to remove the selected Web Service  
>> Endpoint?";"Remove";"Cancel")  
>>  If (OK=1)  
>>  $selectedSOAPEndpoint:=SOAPEndpointNumbers{$row}  
>>  
>>   
>>  GOTO RECORD([AccountSOAPEndpoints];$selectedSOAPEndpoint)  
>>  DELETE RECORD([AccountSOAPEndpoints])  
>>  
>>   
>>  CREATE SET([AccountSOAPEndpoints];"$TempSet")  
>>  ALL RECORDS([AccountSOAPEndpoints])  
>>  USE SET("$TempSet")  
>>  CLEAR SET("$TempSet")  
>>  
>>   
>>  End if   
>>  
>>   
>>  End if   
>> End case  
>> Sandor Szatmari 
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>> Senior Software Developer 
>> Bristol Capital Inc. - InfoPlus 
>> 201 746 7215 
>> www.infoplusonline.com 
>>  
>>  
>>  
>>  From:   Chip Scheide <4d_o...@pghrepository.org>  
>>  To:   4D iNug Technical <4d_tech@lists.4d.com>  
>>  Cc:   Sandor Szatma

Re: UI Form Updates

2018-12-18 Thread Chip Scheide via 4D_Tech

asumming the listbox is a selection listbox there is a set associated 
with the listbox which represents the selected record(s). The listbox 
property is called 'highlight set'.

This set (i am going to call it "Selected_Set") holds all record(s) 
selected by the user.
So your code is much easier done like this:


   // the user has selected at least 1 record
if Records in set("Selected_Set")>0)

  Create set([AccountSOAPEndpoints];"$Temp")  //holds all currently 
displayed records
  CONFIRM("Are you SURE you want to remove the selected Web Service 
Endpoint?";"Remove";"Cancel") 

  If (OK=1) 
   //places the selected record(s) into the current selection
use set("Selected_Set")  
   
   // assuming the records are not locked by another user/process they 
are deleted
delete selection([AccountSOAPEndpoints])
   
   // this removes the deleted records from the originally displayed 
records
   // and places the resulting set into "$Temp"
difference("$Temp";"Listbox_Selection_Set";"$Temp")

   // this places the originally displayed records, minus the deleted 
ones
   // into the current selection of [AccountSOAPEndpoints]
   // this should update the listbox 
use set("$Temp")   

clear set("$Temp") // clear the set to avoid excess memory usage
  end if
end if



your code would:
   // create a set with the originally displayed records
>  CREATE SET([AccountSOAPEndpoints];"$TempSet") 

   //retrieve all records into current selection
>  ALL RECORDS([AccountSOAPEndpoints]) 

   /replace the current selection (all records) with the originally 
displayed records
>  USE SET("$TempSet") 
>  CLEAR SET("$TempSet") 



On Tue, 18 Dec 2018 16:06:13 -0500, Sandor Szatmari wrote:
> 
> Chip,
> 
> 
> Thanks for your help.  Here is my adaptation of your suggestion.  
> NOTE: It does not work.  :)
> 
> 
> Can you please offer some advise on what I am missing here?  Thanks.
> 
>  
> $TheEvent:=Form event 
> Case of  
>  : ($TheEvent=On Load) 
>// We should only be enabled for Accounts that are non themselves 
> Secondaries 
>  OBJECT SET ENABLED(Self->;True) 
> 
>  
>  : ($TheEvent=On Clicked) 
>// Delete the selected Secondary 
>  LISTBOX GET CELL POSITION(SOAPEndpointListBox;$col;$row) 
>  If ($row>0) 
> 
>  
>  CONFIRM("Are you SURE you want to remove the selected Web Service 
> Endpoint?";"Remove";"Cancel") 
>  If (OK=1) 
>  $selectedSOAPEndpoint:=SOAPEndpointNumbers{$row} 
> 
>  
>  GOTO RECORD([AccountSOAPEndpoints];$selectedSOAPEndpoint) 
>  DELETE RECORD([AccountSOAPEndpoints]) 
> 
>  
>  CREATE SET([AccountSOAPEndpoints];"$TempSet") 
>  ALL RECORDS([AccountSOAPEndpoints]) 
>  USE SET("$TempSet") 
>  CLEAR SET("$TempSet") 
> 
>  
>  End if  
> 
>  
>  End if  
> End case 
> Sandor Szatmari
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Senior Software Developer
> Bristol Capital Inc. - InfoPlus
> 201 746 7215
> www.infoplusonline.com
> 
> 
> 
>  From:   Chip Scheide <4d_o...@pghrepository.org> 
>  To:   4D iNug Technical <4d_tech@lists.4d.com> 
>  Cc:   Sandor Szatmari  
>  Sent:   12/17/2018 5:19 PM 
>  Subject:   Re: UI Form Updates 
> 
> you need to update the current selection of records in the selection  
> from the table the listbox is displaying. 
> ex: 
> create set([table];"$Temp") 
> use set("Listbox_Selection_Set") 
> delete selection([table]) 
> difference("$Temp";"Listbox_Selection_Set";"$Temp") 
> use set("$Temp") 
> clear set("$Temp") 
>  
> Chip 
>  
> On Mon, 17 Dec 2018 16:00:33 -0500, Sandor Szatmari via 4D_Tech wrote: 
>> I added a page to an existing form.  I can add and delete rows.  I  
>> have + button to show the data entry form and a '-' button to display  
>> a 'confirm the deletion of the selected row' dialog.  However, once  
>> the entry form or the dialog are dismissed the ListBox in the table  
>> does not update to show that the new data has been entered or  
>> deleted.  If I switch to one of the other tabs in form and then  
>> switch back, the ListBox reflects the addition or deletion of the  
>> data.  Thanks for any help you can give. 
>>  
>> Sandor Szatmari 
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>> Senior Software Developer 
>> Bristol Capital Inc. - InfoPlus 
>> 201 746 7215 
>> www.infoplusonline.com 
>>  
>> CONFIDENTIALITY NOTICE: This email (and any related attachments)  
>> contains information from InfoPlus (a service of Bristol Capital,  
>> Inc.). It is intended only for the addressee and may contain  
>> information that is confidential and/or otherwise exempt from  
>> disclosure under applicable law. If you are not the intended  
>> recipient or are acting as agent for the intended recipient, any use  
>> or disclosure of this communication is prohibited. If you have  
>> received this communication in error, please notify us immediately to  
>> arrange for the appropriate method of returning or disposing of the  
>> communication. If our respective Companies have confidentiality

Re: v13+ - plugins

2018-12-18 Thread Chip Scheide via 4D_Tech
thanks

it seems I have a different plugin issue than I initially thought.
it is not a matter of does the plugin exist...

Thanks
Chip

On Tue, 18 Dec 2018 07:27:19 -0800, Kirk Brooks via 4D_Tech wrote:
> 
http://livedoc.4d.com/4D-Language-Reference-17/4D-Environment/PLUGIN-LIST.301-3730399.en.html
> 
> On Tue, Dec 18, 2018 at 7:26 AM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Is there a way to determine what plugins are currently installed?
>> 
>> Thanks
>> 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
>> **
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 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
**

v13+ - plugins

2018-12-18 Thread Chip Scheide via 4D_Tech
Is there a way to determine what plugins are currently installed?

Thanks
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: How can I identify a process with an active transaction from outside the process

2018-12-18 Thread Chip Scheide via 4D_Tech
Kirk,
different resolution
generate the invoice ID from outside the transaction, and pass it back 
in.
then even if a transaction is open for days, you do not get duplicated 
IDs.
On exit of the transaction/new record - it is created with the given ID 
and no duplication, OR if canceled you 'return' the generated but 
un-used ID to a pool where it is then assigned the next time an invoice 
is created.

Your Invoice IDs remain unbroken, although it is possible to have out 
of temporal order IDs.
ex:
Invoice 1 - 12:00
Invoice 2 - 12:02
Invoice 3 - 12:01
Invoice 4 - 12:05

Chip

P.S. if you need/desire I have code for managing this

On Mon, 17 Dec 2018 17:04:09 -0800, Kirk Brooks via 4D_Tech wrote:
> Here's the deal - I only want a user logged in once. So if I am logged in
> and walk into another room and attempt to login using a different computer
> I get a message informing me I'm already logged in and asking if I want to
> cancel that session.
> 
> The mechanism for managing this involves registering the clients. Clients
> are registered with a string starting with their name and session id. The
> check comes before a new session is created. This has been working great
> for a long time.
> 
> Today I became aware of an issue involving a situation where a user had an
> open transaction, got up and went to the other room and logged in. The
> transaction wasn't completed. This is the first time I've been aware of an
> issue because an invoice was being created in the open transaction. The
> issue came to light when another user created an invoice with the same
> number moments later.
> 
> The easy way to resolve this is for my method that kills the remote client
> to be able to check if a process has an open transaction. I'm not coming up
> with a way to do that, though. At least not one that requires adding a
> bunch of overhead to track transactions.
> 
> So that's the question - can I tell a process has a transaction 'from the
> outside' as it were?
> 
> From a larger perspective this illustrates how beneficial it is to
> structure transactions such that they start and complete in the context of
> a single operation. And yeah that means you don't open a record and start
> data entry in a transaction.
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 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
**

Re: Appearance of Tab Control objects

2018-12-17 Thread Chip Scheide via 4D_Tech
not using v17, but maybe a method which returns an RGB value in the 
background(?) color of the tab object

Chip


> Using v17 -
> Is there any way to control the appearance of tab control objects? I have 3
> tab controls on a form and I'd like to differentiate them by maybe giving
> them a background colour or setting the font in a different colour. The
> only options seem to be the font style. I tried using *OBJECT SET COLOR *but
> that doesn't have any effect.
> 
> Pat

Hell is other people 
 Jean-Paul Sartre
**
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: UI Form Updates

2018-12-17 Thread Chip Scheide via 4D_Tech
you need to update the current selection of records in the selection 
from the table the listbox is displaying.
ex:
create set([table];"$Temp")
use set("Listbox_Selection_Set")
delete selection([table])
difference("$Temp";"Listbox_Selection_Set";"$Temp")
use set("$Temp")
clear set("$Temp")

Chip

On Mon, 17 Dec 2018 16:00:33 -0500, Sandor Szatmari via 4D_Tech wrote:
> I added a page to an existing form.  I can add and delete rows.  I 
> have + button to show the data entry form and a '-' button to display 
> a 'confirm the deletion of the selected row' dialog.  However, once 
> the entry form or the dialog are dismissed the ListBox in the table 
> does not update to show that the new data has been entered or 
> deleted.  If I switch to one of the other tabs in form and then 
> switch back, the ListBox reflects the addition or deletion of the 
> data.  Thanks for any help you can give.
> 
> Sandor Szatmari
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Senior Software Developer
> Bristol Capital Inc. - InfoPlus
> 201 746 7215
> www.infoplusonline.com
> 
> CONFIDENTIALITY NOTICE: This email (and any related attachments) 
> contains information from InfoPlus (a service of Bristol Capital, 
> Inc.). It is intended only for the addressee and may contain 
> information that is confidential and/or otherwise exempt from 
> disclosure under applicable law. If you are not the intended 
> recipient or are acting as agent for the intended recipient, any use 
> or disclosure of this communication is prohibited. If you have 
> received this communication in error, please notify us immediately to 
> arrange for the appropriate method of returning or disposing of the 
> communication. If our respective Companies have confidentiality 
> provisions in effect, this email and the materials contained herein 
> are deemed CONFIDENTIAL and should be treated accordingly unless 
> expressly provided otherwise.
> **
> 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
**

Re: Coding/Development Style Guide?

2018-12-14 Thread Chip Scheide via 4D_Tech
Tom,
They do - 
you can create a form and then inherit it.
Form properties -> Inherited form table --- only if the form is from a 
table
Form properties -> Inherited form Name

This is what I do for list forms when I need to add functionality 
different from my base list form.

Chip
On Fri, 14 Dec 2018 09:07:10 -0800, Tom Benedict via 4D_Tech wrote:
> 
> I’d be interested in more comments about UI standards. I’ve often 
> wished that 4D allowed the creation of custom form ‘templates’. I 
> know that 4D has built-in form templates, button etc, but I’ve never 
> found them appealing and the templates didn't support for dialog 
> forms very well.
---
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: Coding/Development Style Guide?

2018-12-14 Thread Chip Scheide via 4D_Tech
no -
I probably should...
my UI is fairly simple in design:
- color coded entry areas
 -- Black - optional
 -- Red - non enterable (display only)
 -- Green - mandatory


I use the same record navigation buttons on all forms : Philadelphia 
 from 4D v2003?
these are arranged vertically on the left side of the page.


My list forms either directly calla Project form with a listbox, or use 
the same project form as a parent where I need to add/remove 
functionality. So these always look the same. The standard list form 
has the following controls in the header (top) of the list form
- controls:
 - add button (if appropriate)
 - delete button  (if appropriate)
 - Print button (prints the related listing)
 - Search entry area (iTunes like) which searches the current selection 
on a specific field (selectable via popup)
 - 'Quick Search' drop down menu containing pre defined searches which 
are difficult for the user to construct (like searching for a field 
which contains any value vs no value), searches across non related 
tables, or searches across relations 2 or more level deep.
 - optional buttons specific to the table.


I generally use just a few Style-sheets - various font sizes as needed
Lucida-Grande [bold] (mac), Arial Baltic (windows) for buttons
Lucida-Grande (mac), Tahoma (windows) for entry areas and labels
  Printing - various font sizes as needed
Helvetica, Times/times New Roman, and Courier for printing


As of placement of entry areas on the screen, what ever order seems to 
make the most sense for the purpose. I usually try to constrain the 
width of entry form to the width of the listing form so no resizing is 
needed when switching from list to entry form.


Tab controls/related record listbox are always on the bottom, with a 
standard set of 'controls'
- controls:
 - add button (if appropriate)
 - delete button  (if appropriate)
 - Print button (prints the related listing)
 - Search entry area (iTunes like) which searches the current selection 
on a specific field (selectable via popup)
 - optional buttons to open (separate process) other table list forms 
for Drag-N-Drop (if appropriate)


I have not created a project form for inheritance for entry forms... 
maybe I should. But I do have project form which contains all the base 
components of my entry forms which I copy/paste as needed.
- header area
- navigation buttons
- a combobox & label
- a text entry area & label one each of differing color
- a couple of buttons for whatever need on the entry form
- cancel & accept buttons for dialogs
- invisible buttons for catching key strokes to close entry forms and 
list form
  - command-period, esc, command-w, Alt-F4 etc

On Fri, 14 Dec 2018 08:28:09 -0800, Tom Benedict wrote:
> Thanks Chip. Very comprehensive! Do you have a similar guide for User 
> Interface?
> 
> Tom
> 
>> On Dec 14, 2018, at 08:18, Chip Scheide <4d_o...@pghrepository.org> wrote:
>> 
>> 
>> you asked for it   :)
>> 
>> here is my 'conventions' comment only method -
>> I place this in every project.
>> 
>> 
>> On Fri, 14 Dec 2018 07:28:21 -0800, Tom Benedict via 4D_Tech wrote:
>>> Anybody out there have a style guide for development that they’ve 
>>> written? 
> 
---
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: Coding/Development Style Guide?

2018-12-14 Thread Chip Scheide via 4D_Tech

you asked for it   :)

here is my 'conventions' comment only method -
I place this in every project.

  //Project Method: _Conventions

  // • Created 2/16/10 by Chip - 
  //• Updated 2/17/16 by Chip - 
  //• Updated 3/24/16 by Chip - 
  //• Updated 9/2/16 by Chip - added object naming, popup naming, 
underscores, tab controls, listboxes

  //Underscores
  //Underscores '_' are used to sperarate words in a name, 
field/variable/object/table/method, This is done to make
  //reading easier, and to make selection of the name simple. However, 
in some cases a good name may be too long,
  //since 4D restricts some names to 32 characters, and so to make a 
good name unserscores may be removed/not included.
  //However the CamelCase (as outlined below) is still respected, again 
to make reading of the name(s) understandable.
  //ex: the variable name : popup_Share_Restriction_Specific is too 
long (more then 32 characters).
  //  the actual name used is : popup_ShareRestrictionSpecific

  //Object names  `• Updated 9/2/16 by Chip - 
  //Object names are the variable, or field name (or as close as 
possible) + the prefix 'obj_'
  //obj_ - indicates that we are referencing the 
item by it's objcet name

  //Variables
  //all process or interprocess vars are preceded by a type designator 
  // I do not hold these conventions for local variables
  //this is in the form of :
  //letter(s)_variablename
  //letters for designator are always lower case

  //Variable names are always 1 word, with separate 'phrases' connected 
by an underscore
  //the first letter of each 'phrase' is always capitalized.  
  //ex: al_My_Longint_Array

  //Variable type designators (trailing underscore NOT included here) :
  //a - array, this will always be followed by another type designator, 
indicating the type of the array
  //b - button nearly always a long integer
  //blb - blob
  //cb - check box
  //cmb - combo box array, may NOT be the array on the form but a 
secondary array of look up values (usually longint)
  //d - date
  //f - boolean (f=flag)
  //grf - graph
  //l - long integer
  //lb - list box
  //obj - is a prefix for OBJECTS, any object, which will be referenced 
in code, or which has an object method
  //pic - picture
  //pop - popup/drop down menu   `• Updated 9/2/16 
by Chip - 
  //ptr - pointer 
  //r - real
  //rb - radio button
  //s - alphanumeric of some designated length -- may start including 
string length but is not currently included (2-16-10)
  //this designator is soon to vanish as string variable 
definitions have been obsoleted (09-02-16)
  //t - time
  //tab - these are text arrays, and are tab controls objects
  //wa - web areas and related variables
  //x - text

  //Tab Controls
  //The titles - for the tab control are stored in internal Lists (as 
of 09-02-16 -- Design -> Tool Box -> Lists).
  //Tab control - title lists are named:   Tab_
  //tab controls - are dimensioned as size 0 text arrays, a List to 
Array command sizes and titles the tab control.
  //tab controls - usually have a project method to manage their 
functioning. This method, if it exists, is named:
  //_Manage_Tab

  //Listboxes
  //listboxes are complex objects. There are 3 modules of code to 
manage these objects:
  //lstbox_Incld_,  `lstbox_Output_   and   
arylstbx_
  //"Incld" - is used for listboxes displayed in an entry form.
  //"Output - is for listing forms,
  //'arylstbx' - is for all array based listboxes
  //Incld and Output listboxes - are expected to be (current) selection 
based listboxes.
  //Output listboxes - are either NOT explicitly created (using a 
default scheme based on {project form} 'List_box_Output'),
  //or are inherited from this same form.
  //Output listing forms - are based on this method call : 
lstbox_Output_Open_Form, while inherited list forms
  //use the same command, but explicitly reference the inherited form's 
name.
  //Ouput listboxes - are expected to be dragable.
  //Incld listboxes - are often droppable (from an output list box, or 
desktop)
  //Listboxes - often have a project method to manage their 
functioning, this method is named:
  //_Manage_Listbox

  //Constants - 
  //I use the 4D defined constants as needed, however, I have never 
been comfortable with attempting to create my own constants.
  //To this end I use interprocess variables as constants.
  //These "constants" are defined in a variety of methods, all are 
called from "strt_Variable_Assignments".
  //These methods are named in the following manner:
  //IPvars  

  //Method Names
  //Method names are always 1 word, with separate 'phrases' connected 
by an underscore
  //the first character of each 'phrase' is capitalized
  //ex : modul_My_Method_Name

  //Method names attempt to group related methods together. The first 
few (usually 5 or less) characters 
  //indicate the 'module' or table which the method is intended to 
operate on/with
  //modu

Re: Managing different indexes for different databases

2018-12-14 Thread Chip Scheide via 4D_Tech
turn the indexes on the customer tables OFF?
for development - indexed or not should not matter signifcantly.

Chip

On Fri, 14 Dec 2018 14:25:08 +, Pat Bensky via 4D_Tech wrote:
> In our app (CatBase) each customer can manage their own tables and fields
> and one of the things they can do is specify whether a particular field is
> indexed. Since these indexes are different for each customer, when they get
> a program update from us, the indexes have to be recreated and built (there
> is a FieldMap table which stores each field's attributes). This is n't a
> problem for our customers, but for us developers, it means that if we are
> working on several projects, each time we switch from one customer's
> database to another, the indexes are all rebuilt. One project I'm currently
> working on has about 4 million records and it takes ages to rebuild all the
> indexes! The only way around it as far as I can see is to keep two copies
> of the structure - one to use just with that database and one for all the
> others. But that would introduce all kinds of possibilities for error ...
> 
> Anybody got a better idea for managing this?
> 
> 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
**

v13 - Interpreted - Out of Stack space - Wierd

2018-12-11 Thread Chip Scheide via 4D_Tech
Weird problem.
4D v13.6, C/S, both on Macs. OS X 10.9.5
for 1 user, doing a specific action causes an out of stack space crash.

The user is attempting to add a requisition item to the system.
To do this they:
- open an entry screen from the main menu (in its own process)
- click a '+' button on the entry screen to open an inventory listing 
(in its own, separate process)

during the opening of the second process, the window is open and the 
display detail event is (presumably) happening. An out of stack space 
error occurs.

However!
- If I login to the system on m y computer and do the same thing - no 
errors
- If a different user logs in to the system (on their own computer) - 
no errors
- If I login to the system from the 'problematic' computer - no errors
- if I trace through the code from the problematic user's account and 
on the problematic computer - no errors.
- if I then immediately repeat the process, and do NOT trace (F5 at all 
breaks), - errors and crash

The user has 2 monitors. 1 is setup vertically (90 degree rotation), 
and this is set as the primary monitor. If they change the primary 
monitor to the horizontally oriented monitor and try the task that 
errors, no problem.
Switch back to the vertical monitor as primary, repeat -- error and 
crash.
BUT - 
- this whole thing worked last week
- the error and crash does NOT happen if I log in.

BTW - did a restart of the computer - no change in behavior.

Any ideas?!?!
Thanks
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: Converting _O_PLATFORM PROPERTIES to Get system info

2018-12-11 Thread Chip Scheide via 4D_Tech
not available in v13...

On Tue, 11 Dec 2018 16:19:50 +0100, Christian Sakowski wrote:
>> depending on what property you are looking for, I have found the 
>> simplest way to manage which platform (Windows/Mac) is to use the 4D 
>> Konstant 'Folder separator':
>> 
>> if (Folder separator = ":") //this is a Mac
>>  do_Mac_Stuff
>> else //this is Windows
>>  do_Windows_stuff
>> end if 
> 
> …or just use the commands "Is macOS“ and "Is Windows“.
> 
> Keep in mind, that Folder separator can change one day, when 4D 
> switches to native POSIX path system.
> --
> 
> Grüße/Regards,
> [heubach-media] | Christian Sakowski
> christian.sakow...@heubach-media.de
> Tel: +49/(0)40/52 10 59-23
> 
> 
> 
> 
>> Am 11.12.2018 um 16:14 schrieb Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com>:
>> 
>> depending on what property you are looking for, I have found the 
>> simplest way to manage which platform (Windows/Mac) is to use the 4D 
>> Konstant 'Folder separator':
>> 
>> if (Folder separator = ":") //this is a Mac
>>  do_Mac_Stuff
>> else //this is Windows
>>  do_Windows_stuff
>> end if 
>> 
>> Depending on your need, here might be other Konstants (which are not 
>> constant across platforms) which can/could be used in a similar manner.
>> 
>> Chip
>> 
>> On Tue, 11 Dec 2018 13:49:18 +, Drew Waddell via 4D_Tech wrote:
>>> Is anyone using _O_PLATFORM PROPERTIES?  How do you change your code 
>>> that used the old version to the new Get system info?  The osVersion 
>>> contains far more data than the previous command and I am afraid 
>>> striping information off would just be prone to errors.
>>> 
>>> Thanks,
>>> Drew
>>> **
>>> 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
>> **
> 
> 
> --
> 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.
> 
---
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: Converting _O_PLATFORM PROPERTIES to Get system info

2018-12-11 Thread Chip Scheide via 4D_Tech
depending on what property you are looking for, I have found the 
simplest way to manage which platform (Windows/Mac) is to use the 4D 
Konstant 'Folder separator':

if (Folder separator = ":") //this is a Mac
  do_Mac_Stuff
else //this is Windows
  do_Windows_stuff
end if 

Depending on your need, here might be other Konstants (which are not 
constant across platforms) which can/could be used in a similar manner.

Chip

On Tue, 11 Dec 2018 13:49:18 +, Drew Waddell via 4D_Tech wrote:
> Is anyone using _O_PLATFORM PROPERTIES?  How do you change your code 
> that used the old version to the new Get system info?  The osVersion 
> contains far more data than the previous command and I am afraid 
> striping information off would just be prone to errors.
> 
> Thanks,
> Drew
> **
> 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
**

Re: Form Scaling & Optimal Fonts...

2018-12-07 Thread Chip Scheide via 4D_Tech
to me - form scaling means:
I hit a key (press a button, whatever) and the form enlarges -
think of Command/Control + on a web page.
think of the designer form control 50% 100% 200% 400%

I have implemented this in v13 by using Object Set Font Size(+/-1) on 
everything on the form (list forms only).

the form (and all the objects get bigger, and stay in place relative to 
each other (maybe not so much for the web, but mostly).

I do not think of form scaling as changing the monitor resolution from 
1600 x 1200 to 800 x600

Chip

On Fri, 7 Dec 2018 15:33:41 -0600, Tim Nevels via 4D_Tech wrote:
> 
> Form scaling is really a legacy feature that is still hanging around 
> for those old database that used it back in the 90’s when 4D was 
> first ported to Windows. Style sheets are the way to go. 
---
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: Formula as Variable

2018-12-07 Thread Chip Scheide via 4D_Tech

vtFormula:="([ItemDiscounts]BasePrice*(1-([ItemDiscounts]PerCentDiscount*0.01)))"

my_sort(->[ItemDiscounts];vtFormula;">")

`My_sort
c_pointer($1;$Table)
c_text($2,$Formula;$Table_Name;$Direction;$3)

$Table:=$1
$Formula:=$2
$Direction:=$3

$Table_Name:=table name($Table)
$Formula:="Order by 
Formula(["+$table_Name+"];"+$Formula+";"+$Direction+")")
Execute Formula($Formula)


On Fri, 7 Dec 2018 16:32:16 +, Jim Medlen via 4D_Tech wrote:
> 
> Is there a way to pass a formula into a method as a variable ?
> 
> 
vtFormula:="([ItemDiscounts]BasePrice*(1-([ItemDiscounts]PerCentDiscount*0.01)))"
> vtSort:="<"
> ORDER BY FORMULA([ItemDiscounts];Execute text(vtFormula);vtSort)
> 
> Thanks,
> 
> Jim Medlen
> 
> This email was transmitted on 100 percent recycled electrons
> 
> **
> 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
**

Re: CONVERT PICTURE not seeming to work for me...

2018-12-07 Thread Chip Scheide via 4D_Tech
Where do you find this font?  I can't seem to find it listed in my 
system fonts   :)

On Thu, 6 Dec 2018 20:26:06 -0500, Charles Miller via 4D_Tech wrote:
> font of great info
---
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: Form Scaling & Optimal Fonts...

2018-12-07 Thread Chip Scheide via 4D_Tech
I have a followup question:
if you can not apply a color to the style sheet then that would mean 
manually (programmatically) applying a color to every object on a form 
every time the form is displayed. --  A PITA to be sure.
BUT..
once a color is applied via code (Object Set Color, or Object Set RGB 
Color) does THIS also break the automatic style sheet functionality?

Chip

On Thu, 6 Dec 2018 18:49:11 -0600, Robert ListMail via 4D_Tech wrote:
> 
> From the manual: "Automatic style sheets manage the font as well as 
> its size and color. If you modify one of the properties managed by an 
> automatic style sheet in the Form editor, this style sheet no longer 
> works dynamically. However, you can apply custom style properties 
> (Bold, Italic or Underline) without altering its functioning.”
---
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
**

v13 - Odd behavior

2018-11-30 Thread Chip Scheide via 4D_Tech
I was testing some code. The method presents the user with a 
confirmation dialog, and returns value as the user response. I copied 
my intended message, and the method call for the confirmation into a 
testing method (so I can run just the message).

$msg:="blah blahl Blah"
(utl_msg_4ButtonConfirm ($msg;"Umm No";"Confirm") 

When I tested this, the dialog was presented, as it should have been, 
then it was presented a SECOND time!

NOTE: there is a left parenthesis in the method call. For whatever 
reason, the extra paren caused 4D to execute the method call 2x.

Odd

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: Windows Server Hardware Recommendations for 4DServer v17 Application

2018-11-30 Thread Chip Scheide via 4D_Tech
Always...

more is better
faster is better

:)


On Fri, 30 Nov 2018 17:29:42 +, Neal Schaefer via 4D_Tech wrote:
> Thanks Chuck! Good point on the Pro versions of SSDs. Our data file 
> is 32GB, and 14GB index file (about 1080 indexed fields). Would love 
> your thoughts on appropriate RAM and processor speed for our 
> scenario. Thanks again!
> 
> -Neal
> 
> ==
> 
> Date: Thu, 29 Nov 2018 17:53:32 -0500
> 
> From: Charles Miller mailto:miller.c...@gmail.com>>
> 
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> 
> Subject: Re: Windows Server Hardware Recommendations for 4DServer v17
> 
> Application
> 
> Message-ID:
> 
> 
> 
mailto:cadksfq7kwjxccy32ppg2elyqavvbwl_tlw6x3tncnx3uik2...@mail.gmail.com>>
> 
> Content-Type: text/plain; charset="UTF-8"
> 
> 
> 
> How big is data file? You will need this for how much memory. 
> Indexes? I would also recommend a raid SSD setup.  More memory is 
> always better. If you want to have your entiore data file in cache 
> you wil need requisite memory. Also make sure to get Pro versions of 
> SSDs not consumer versions.
> 
> 
> 
> Hope this helps?
> 
> 
> 
> Regards
> 
> 
> Chuck
> 
> From: Neal Schaefer
> Sent: Thursday, November 29, 2018 2:34 PM
> To: '4d_tech@lists.4d.com' <4d_tech@lists.4d.com>
> Subject: Windows Server Hardware Recommendations for 4DServer v17 
> Application
> 
> We're planning to upgrade to v17 in Q1 this coming year. We're 
> currently running our 4DServer v16 r6 application on a Windows 2008r2 
> server (DELL Server PER420 with Xeon CUP E5-2407 v2 @2.40Ghz 2.40 Ghz 
> (2 processors) with 32GB RAM, 64-bit). Our budget for the coming year 
> includes funds for a new server machine. I'm looking for hardware 
> recommendations based on our current users and setup. We average 
> about 45 concurrent users via 4D client/server and another 50 - 70 
> web connections.
> 
> 4D doesn't like to make recommendations beyond minimum requirements, 
> so I'm wondering if anyone on the list has a similar scenario and 
> could recommend processor speed, RAM, etc.
> 
> Thanks in advance!
> 
> Neal Schaefer
> Director, Product & Content Management Systems
> 
> ABC-CLIO
> 130 Cremona Drive, Suite C | Santa Barbara, CA | 93117
> nschae...@abc-clio.com | 
> www.abc-clio.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
> **
---
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: [off-ish] Regex help

2018-11-29 Thread Chip Scheide via 4D_Tech
Thanks

On Thu, 29 Nov 2018 08:37:42 +, Epperlein, Lutz (agendo) via 
4D_Tech wrote:
> Peter answered already, but if you want to test your regex, you can 
> use e.g.:
>   https://regexr.com/440e2
> this is with Kirk's example.
> 
> You regex looks there:
>   https://regexr.com/440ee
> 
> This is a nice tool which provides explanations for your regex too.
> 
> Regards Lutz
> 
> 
>> -Original Message-
>> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Chip 
>> Scheide via
>> 4D_Tech
>> Sent: Wednesday, November 28, 2018 7:29 PM
>> To: 4D iNug Technical <4d_tech@lists.4d.com>
>> Cc: Chip Scheide <4d_o...@pghrepository.org>
>> Subject: Re: [off-ish] Regex help
>> 
>> Thanks Kirk,
>> 
>> That will be useful, but mostly I am wondering based on what (very
>> tiny) understanding I have of Regex why the previously posted statement
>> does not do what your loop does.
>> 
>> According to Wiki :
>> . - matches any single character
>> ( ) - defines a marked subexpression
>> * - matches the preceding element zero or more times
>> so... as I read the definitions...
>> "(.*:)"
>> 
>> match any character(s), before a ":"
>> a file path (on a Mac) is  :  :  ... : 
>> 
>> Match Regex says:
>> "...If you pass arrays, the command returns the position and length of
>> the occurrence in the element zero of the arrays and the positions and
>> lengths of the groups captured by the regular expression in the
>> following elements."
>> 
>> so I would expect(ed)
>> Match regex($folderPathMotif;$File_Path;1;$path_pos;$path_len)
>> 
>> to populate the arrays with each occurrence of ":", as your supplied
>> code appears to do,
>> OR
>> if the Match Regex does not find/report all occurrences of ":" to
>> report the FIRST instance of a ":", not the last.
>> 
>> Thanks
>> again
>> Chip
>> 
>> On Wed, 28 Nov 2018 10:16:01 -0800, Kirk Brooks via 4D_Tech wrote:
>>> Chip,
>>> 
>>> I think what you want is to parse the path into its component parts.
>>> 
>>> This this pattern for matching:
>>> 
>>> ([ \w\d-_]+):
>>> 
>>> This will match letters, numbers, spaces, underscores and dashes up to the
>>> semi colon. You will want to use it in a loop like so:
>>> 
>>> $pattern:="([ \\w\\d-_]+):"
>>> $start:=1
>>> While(Match regex($patters;$text;$start;$aPos;$aLen))  //  pass arrays for
>>> pos and len
>>> 
>>> //  $aLen[0]  will be the length of the entire match
>>> 
>>> // $aLen[1] will be the length of the match within the parens
>>> 
>>> APPEND TO ARRAY($aTheParts;Substring($text;$aPos{1};$aLen{1})
>>> 
>>> $start:=$aPos{0}+$aLen{0}  // move up to the next match
>>> 
>>> End while
>>> 
>>> 
>>> On Wed, Nov 28, 2018 at 9:51 AM Chip Scheide via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
>>>> can anyone who has a clue help me?
>>>> 
>>>> I am looking at some code:
>>>> Match regex($folderPathMotif;$File_Path;1;$path_pos;$path_len)
>>>> 
>>>> where:
>>>> ARRAY LONGINT($path_pos;0)
>>>> ARRAY LONGINT($path_len;0)
>>>> $folderPathMotif:="(.*:)"
>>>> and
>>>> File_Path is, well.., a file path on a Mac (so folder separator is ":")
>>>> 
>>>> When the above regex runs, $Path_pos and $path_len each have 1 element,
>>>> and that element is a reference to the LAST occurrence of ":" in the
>>>> file path.
>>>> 
>>>> Why does the regex not populate the arrays with the location of ALL
>>>> occurrences of ":", or the first occurrence of ":"?
>>>> 
>>>> Thanks for any help...
>>>> and off Nug help is fine
>>>> ---
>>>> 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: v13 - Exporting tab delimited

2018-11-28 Thread Chip Scheide via 4D_Tech
I did get a copy, and opened it. - Thanks

I pulled some of the regex from it.
hence the questions earlier about why the results from the regex.

BTW - my impression on the CSV export is that it would work for a simple one 
table export, but that a complex export (like an invoice) would not really be 
possible using just you component.

Did I understand how the object(s) worked correctly? As I did not see a way to 
do relational data export.

Thanks

> that's fair, exporting XML spreadsheets only makes sense if the idea 
> is to open it with Excel.
> 
> for CSV or TSV with proper quotation of data that contains CR, LF, 
> quotes, commas, etc.
> the example https://github.com/miyako/4d-component-csv is for v15 and above
> but the core regex stuff might be portable to v13.
> 
> 2018/11/29 0:30、Chip Scheide 
> <4d_o...@pghrepository.org>のメール:
> And yes I realize the irony - intentional - in using xml/html style
> markers for the rant  :)
> 
> 
> 
> **
> 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
> **

Hell is other people 
 Jean-Paul Sartre
**
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: [off-ish] Regex help

2018-11-28 Thread Chip Scheide via 4D_Tech
Peter
Thanks for that explanation!

On Wed, 28 Nov 2018 20:27:40 +0100, Peter Bozek wrote:
> On Wed, Nov 28, 2018 at 7:30 PM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Thanks Kirk,
>> 
>> According to Wiki :
>> . - matches any single character
>> ( ) - defines a marked subexpression
>> * - matches the preceding element zero or more times
>> so... as I read the definitions...
>> "(.*:)"
>> 
>> match any character(s), before a ":"
>> a file path (on a Mac) is  :  :  ... : 
>> 
>> Match Regex says:
>> "...If you pass arrays, the command returns the position and length of
>> the occurrence in the element zero of the arrays and the positions and
>> lengths of the groups captured by the regular expression in the
>> following elements."
>> 
>> so I would expect(ed)
>> Match regex($folderPathMotif;$File_Path;1;$path_pos;$path_len)
>> 
>> to populate the arrays with each occurrence of ":", as your supplied
>> code appears to do,
>> OR
>> if the Match Regex does not find/report all occurrences of ":" to
>> report the FIRST instance of a ":", not the last.
>> 
> 
> Regex behaves like that because, by default, its matching is greedy, what
> means it tries to match the pattern to as many characters as possible. In
> your case, it tries to find longest run that match pattern .*; - and the
> run consist of all characters up to last :.
> 
> If you want the match stop on first occurrence of : you need to make
> operator * ungreedy by attaching ? to it. If you try pattern (.*?:) it
> should return substring up to first :. While pattern .*: says "find the
> longest run of characters ending with :" pattern .*?: means "find the
> shortest run of characters ending with :
> 
> Size of array is number of matching groups, in your case 1. This is how it
> works, IMHO. If the whole pattern repeats itself several times, you need to
> run Match regex in loop.
> 
> HTH,
> 
> --
> 
> Peter Bozek
---
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: [off-ish] Regex help

2018-11-28 Thread Chip Scheide via 4D_Tech
Thanks Kirk,

That will be useful, but mostly I am wondering based on what (very 
tiny) understanding I have of Regex why the previously posted statement 
does not do what your loop does.

According to Wiki :
. - matches any single character
( ) - defines a marked subexpression
* - matches the preceding element zero or more times
so... as I read the definitions...
"(.*:)"

match any character(s), before a ":"
a file path (on a Mac) is  :  :  ... : 

Match Regex says:
"...If you pass arrays, the command returns the position and length of 
the occurrence in the element zero of the arrays and the positions and 
lengths of the groups captured by the regular expression in the 
following elements."

so I would expect(ed) 
Match regex($folderPathMotif;$File_Path;1;$path_pos;$path_len)

to populate the arrays with each occurrence of ":", as your supplied 
code appears to do, 
OR 
if the Match Regex does not find/report all occurrences of ":" to 
report the FIRST instance of a ":", not the last.

Thanks
again
Chip

On Wed, 28 Nov 2018 10:16:01 -0800, Kirk Brooks via 4D_Tech wrote:
> Chip,
> 
> I think what you want is to parse the path into its component parts.
> 
> This this pattern for matching:
> 
> ([ \w\d-_]+):
> 
> This will match letters, numbers, spaces, underscores and dashes up to the
> semi colon. You will want to use it in a loop like so:
> 
> $pattern:="([ \\w\\d-_]+):"
> $start:=1
> While(Match regex($patters;$text;$start;$aPos;$aLen))  //  pass arrays for
> pos and len
> 
> //  $aLen[0]  will be the length of the entire match
> 
> // $aLen[1] will be the length of the match within the parens
> 
> APPEND TO ARRAY($aTheParts;Substring($text;$aPos{1};$aLen{1})
> 
> $start:=$aPos{0}+$aLen{0}  // move up to the next match
> 
> End while
> 
> 
> On Wed, Nov 28, 2018 at 9:51 AM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> can anyone who has a clue help me?
>> 
>> I am looking at some code:
>> Match regex($folderPathMotif;$File_Path;1;$path_pos;$path_len)
>> 
>> where:
>> ARRAY LONGINT($path_pos;0)
>> ARRAY LONGINT($path_len;0)
>> $folderPathMotif:="(.*:)"
>> and
>> File_Path is, well.., a file path on a Mac (so folder separator is ":")
>> 
>> When the above regex runs, $Path_pos and $path_len each have 1 element,
>> and that element is a reference to the LAST occurrence of ":" in the
>> file path.
>> 
>> Why does the regex not populate the arrays with the location of ALL
>> occurrences of ":", or the first occurrence of ":"?
>> 
>> Thanks for any help...
>> and off Nug help is fine
>> ---
>> 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
>> **
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 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
**

[off-ish] Regex help

2018-11-28 Thread Chip Scheide via 4D_Tech
can anyone who has a clue help me?

I am looking at some code:
Match regex($folderPathMotif;$File_Path;1;$path_pos;$path_len)

where:
ARRAY LONGINT($path_pos;0)
ARRAY LONGINT($path_len;0)
$folderPathMotif:="(.*:)"
and 
File_Path is, well.., a file path on a Mac (so folder separator is ":")

When the above regex runs, $Path_pos and $path_len each have 1 element, 
and that element is a reference to the LAST occurrence of ":" in the 
file path.

Why does the regex not populate the arrays with the location of ALL 
occurrences of ":", or the first occurrence of ":"?

Thanks for any help...
and off Nug help is fine
---
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: v13 - Exporting tab delimited

2018-11-28 Thread Chip Scheide via 4D_Tech
Keisuke,
a text file is being created (tab delimited, or CSV) as the exact use 
case for the export may vary by user. Some may/will want to open in 
excel, others may want to use the data in other programs. A text file 
is basic, can (in principle) be opened by anything.


(not) XML for 3 reasons
- one is the above
- while I can read, and can manually (by code) rip an xml file apart*, 
I am not comfortable(?) knowledgable in creating xml.  Sure I can setup 
"tags" ( data ) but F if I know if it is correct, or 
parsable by anything.
- for most (of my) uses xml is a waste of time and space.

* NOTE: I just had a situation where I had to import an "xml" file. The 
file format as provided (and required) does/did not follow xml 
standards (no line breaks, and other issues), so none of the xml 
commands work. Ended up tearing it apart as if it were a fancy 
formatted text file. So much work so much extra garbage in the file to 
skip over 
Converting 1 data block to tab delimited changes the size (characters) 
of the data block from 11 lines, and 400 characters to 1 line and 102 
characters. There is NO, ZERO, NONE advantage to using xml in this 
situation, as if there is any change in the format in the future, the 
code to manage the import will need to be revisited as the "xml" is 
invalid.


And yes I realize the irony - intentional - in using xml/html style 
markers for the rant  :)



On Wed, 28 Nov 2018 08:43:27 +, Keisuke Miyako via 4D_Tech wrote:
> I suppose the right way to create a "cell" with multiple lines in TSV 
> is to use vertical tab char(11) instead of CRLF,
> but the last time I checked, Excel doesn't handle VT well. (Numbers does).
> 
> for CSV with quotes I published
> 
> https://github.com/miyako/4d-component-csv
> 
> which follows the various rules explained here
> 
> https://en.wikipedia.org/wiki/Comma-separated_values
> 
> https://tools.ietf.org/html/rfc4180
> 
> in any case, it doesn't feel right to pretend that CSV or TSV is an 
> Excel spreadsheet.
> 
> why not at least use XML, if XLS or XLSX is a bit of an overkill?
> 
> the method has been around since v2004 (introduction of PROCESS 4D 
> TAGS and DOM/SAX XML commands)
> 
> 
> **
> 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
**

RE: v13 - Exporting tab delimited

2018-11-28 Thread Chip Scheide via 4D_Tech
Thanks
- I'll try that too

On Wed, 28 Nov 2018 08:30:01 +, Epperlein, Lutz (agendo) via 
4D_Tech wrote:
> You have to escape the data cell containing the linefeed with double 
> quotes. The linefeed has to be encoded as a LF (0x0a) or as CRLF 
> (0x0d 0x0a).
> 
> E.g.
> Data  data   data 
> data  data   "line1 
> line2"
> datadatadata
> 
> This text file you can drag onto Excel to open it (Windows).
> Double click on Windows Explorer doesn't work since it is a .txt file.
> 
> Better is to save it as a .csv file and use a semicolon ";" instead 
> of a tab. So you can use double click to open it (again on Windows).
> 
> Regards
> Lutz
> 
>> -Original Message-
>> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of 
>> Chip Scheide via
>> 4D_Tech
>> Sent: Tuesday, November 27, 2018 11:08 PM
>> To: 4D iNug Technical <4d_tech@lists.4d.com>
>> Cc: Chip Scheide <4d_o...@pghrepository.org>
>> Subject: v13 - Exporting tab delimited
>> 
>> I would like to be able to embed a return and/or line feed into column
>> in a tab delimited file (opening with Excel).
>> 
>> ex:
>> data  data  text data with return more data  data
>> 
>> 
>> Excel will give me:
>> Col1 Col2Col3
>> Data Datatext data with
>> more datadata
>> 
>> 
>> I can not see a way to do this.
>> Is it possible?
>> if so, how?
>> 
>> Thanks
>> 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
> **
---
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: v13 - Exporting tab delimited

2018-11-28 Thread Chip Scheide via 4D_Tech
THANKS!

On Tue, 27 Nov 2018 16:06:39 -0800 (PST), THOMAS BENEDICT wrote:
> I spent many hours sorting this out a few months ago. The file needed 
> to be easily read by Excel (as in your case) plus it needed to be 
> importable into SQL Server. I ended up creating a CSV with CRLF 
> record delimiters. But I also processed the embedded soft returns in 
> a way that escapes me right now. I'll try to look that code up 
> tomorrow, if it still exists.
> 
> Once you have a .csv, it can be double-clicked to open in Excel 
> avoiding the Import Wizard entirely. BTW, the difficulty here is all 
> due to Excel's bizarre and unique way of handling things.
> 
> I'll see whether I can shed any light on this tomorrow.
> 
> Tom
> 
>> On November 27, 2018 at 3:50 PM Chip Scheide 
>> <4d_o...@pghrepository.org> wrote:
>> 
>> 
>> Thomas & Chuck
>> the intent is to create the export file in such a manner that NO 
>> user intervention is required to open the file with the embedded 
>> returns.
>> 
>> changing the end of row marker will work, but then the user(s) need 
>> to know that -- and they won't or they won't remember etc -- after 
>> all they are users
>> 
>> typing Alt-return is not really an option s the data is already exported...
>> The embedded character is listed as &Char(10)& for line feed, and 
>> &Char(13)& for carriage return, however, replacing the return (4D) 
>> with either or both of these strings does NOT result in return or 
>> line feed in Excel; just the exact characters "&Char(10)&"
>> A bit of experimentation shows that to get the character code to 
>> work requires a formal where for example you have
>> =A1+&Char(10)&+B3
>> 
>> any other ideas??
>> 
>> Thanks
>> 
>>> Hi Chip,
>>> 
>>> The trick with Excel is that it uses a 'soft return' within a cell. 
>>> To get that soft-return within Excel you type Alt-Return (on Windows) 
>>> or Control-Option-Return (on MacOS).
>>> 
>>> I don't remember what the Character Code is for that character, but 
>>> that's what you'll need to include in your extract script. I seem to 
>>> recall that it is a newline. Google should be able to help you.
>>> 
>>> Hope this helps, and sorry it doesn't have more details.
>>> 
>>> Tom Benedict
>>> Optum
>>> 
>>>> On November 27, 2018 at 2:07 PM Chip Scheide via 4D_Tech 
>>>> <4d_tech@lists.4d.com> wrote:
>>>> 
>>>> 
>>>> I would like to be able to embed a return and/or line feed into column 
>>>> in a tab delimited file (opening with Excel).
>>>> 
>>> 
>> 
>> Hell is other people 
>>  Jean-Paul Sartre
> 
---
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: v13 - Exporting tab delimited

2018-11-27 Thread Chip Scheide via 4D_Tech
Thomas & Chuck
the intent is to create the export file in such a manner that NO user 
intervention is required to open the file with the embedded returns.

changing the end of row marker will work, but then the user(s) need to know 
that -- and they won't or they won't remember etc -- after all they are 
users

typing Alt-return is not really an option s the data is already exported...
The embedded character is listed as &Char(10)& for line feed, and &Char(13)& 
for carriage return, however, replacing the return (4D) with either or both of 
these strings does NOT result in return or line feed in Excel; just the exact 
characters "&Char(10)&"
A bit of experimentation shows that to get the character code to work requires 
a formal where for example you have
=A1+&Char(10)&+B3

any other ideas??

Thanks

> Hi Chip,
> 
> The trick with Excel is that it uses a 'soft return' within a cell. 
> To get that soft-return within Excel you type Alt-Return (on Windows) 
> or Control-Option-Return (on MacOS).
> 
> I don't remember what the Character Code is for that character, but 
> that's what you'll need to include in your extract script. I seem to 
> recall that it is a newline. Google should be able to help you.
> 
> Hope this helps, and sorry it doesn't have more details.
> 
> Tom Benedict
> Optum
> 
>> On November 27, 2018 at 2:07 PM Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> 
>> I would like to be able to embed a return and/or line feed into column 
>> in a tab delimited file (opening with Excel).
>> 
> 

Hell is other people 
 Jean-Paul Sartre
**
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
**

v13 - Exporting tab delimited

2018-11-27 Thread Chip Scheide via 4D_Tech
I would like to be able to embed a return and/or line feed into column 
in a tab delimited file (opening with Excel).

ex:
data  data  text data with return more data  data 


Excel will give me:
Col1Col2Col3
DataDatatext data with
more data   data


I can not see a way to do this.
Is it possible?
if so, how?

Thanks
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: Create text object

2018-11-27 Thread Chip Scheide via 4D_Tech
well... not exactly programatically - it does require a creating an 
object (or duplicating an existing one).

- You can place a text object anywhere on the form (I am assuming you 
mean a static text object, like a field/variable label).
- Name to object.
- set the property 'invisible by default'.

During runtime you can then:
- object set title(*;;Array{element})
- object set visible(*;;True)
- utl_Object_Move(Nil_ptr;Absolute_left;absolute_top;)



code for utl_object_Move:

  //Project Method:  utl_Move_Object
  //$1 - Pointer - to object to move - if Nil, use object name passed 
in $4
  //$2 - Longint - absolute left location to place object
  //$3 - Longint - absolute top location to place object
  //$4 - Text (optional) - Object Name, only used if Nil pointer passed 
in $1

  //move an object to it's absolute left and top (supplied) position
  // ∙ Created 10/17/12 by Chip - 
C_POINTER($1;$Object_ptr)
C_LONGINT($2;$3;$New_Top;$New_Left;$Top;$Bottom;$Left;$Right)
C_TEXT($4;$Object_Name)

$Object_ptr:=$1

If (Nil($Object_Ptr))
$Object_Name:=$4
$Object_ptr:=OBJECT Get pointer(Object named;$Object_Name)
End if 
$New_Left:=$2
$New_Top:=$3

If (Not(Nil($Object_ptr)))
OBJECT GET COORDINATES($Object_ptr->;$Left;$Top;$Right;$Bottom)

$Right:=$Right+($New_Left-$Left)
$Bottom:=$Bottom+($New_Top-$Top)
OBJECT MOVE($Object_ptr->;$New_Left;$New_Top;$Right;$Bottom;*)
Else   //object to be moved is a text or other object which can't be 
referenced via pointer
OBJECT GET COORDINATES(*;$Object_Name;$Left;$Top;$Right;$Bottom)

$Right:=$Right+($New_Left-$Left)
$Bottom:=$Bottom+($New_Top-$Top)
OBJECT MOVE(*;$Object_Name;$New_Left;$New_Top;$Right;$Bottom;*)
End if 
  //End utl_Move_Object


On Tue, 27 Nov 2018 19:48:20 +, Peter Mew via 4D_Tech wrote:
> Hi
> Is it possible to, programatically, create an object that consists of text
> from an element of an array, and place it at a specific location on a form
> 
> thanks
> -pm
> **
> 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
**

Re: Explorer bottom toolbar not displaying...

2018-11-22 Thread Chip Scheide via 4D_Tech
Tim,
listbox columns etc are saved -- does this include list boxes that are 
dynamically built?
i.e. are simply empty place holders in the designer environment?

Chip

> On Nov 21, 2018, at 7:48 PM, John DeSoi  wrote:
> 
>> I'm happy there is a simpler work-around than finding some obscure 
>> file to delete. But it would be better if 4D just fixed the issue. 
>> If you use multiple monitors and change configurations this is an 
>> ongoing issue. Other Mac applications have no problems, but I'm 
>> often surprised by how 4D windows end up. I try to remember to quit 
>> 4D before unplugging my external monitor because of all the problems.
> 
> I agree John. It would be great if a 4D engineer that has multiple 
> monitors and also a laptop were assigned the task of updating their 
> code to be more defensive about where it opened windows. Checking the 
> window rect to see if it will be fully displayed with the current 
> monitor configuration, making sure windows don’t appear partially 
> offscreen, etc. I’ve been doing this for years in my own “OpenWindow
> ” method and it’s a lot of work, but it can be done. And there are 
> complications to make it work well on both macOS and Windows.
> 
> But I am now abandoning using my OpenWindow method and I’m now using 
> a new method called “OpenFormWindow” that relies on the “save 
> geometry” option so that windows remember where the user positioned 
> them and how they configured listbox columns, splitters, etc. 
> 
> It’s a great 4D feature that you can use by simply checking a 
> checkbox for a form and using the “Open form window” command. They 
> just need to add a bit more polish to it and then we can enjoy using 
> it without these “edge case” problems. I can’t do the work I was 
> doing with my OpenWindow method because now 4D is in full control of 
> where to position a new window. I have to trust them that they will 
> do a good job. Sometimes they let me down. :(
> 
> This secret command key will help my users when this situation 
> occurs. I can now tell them to just hold down the shift key before 
> they select a menu item. 
> 
> Tim
> 
> *
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.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
> **

Hell is other people 
 Jean-Paul Sartre
**
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: Explorer bottom toolbar not displaying...

2018-11-22 Thread Chip Scheide via 4D_Tech
I got 2 new monitors at work, moved from 22" -> 24" 
Now... windows that were previously (or never) opened on the 22" monitor now 
opens so that 1/2 is on one screen and 1/2 on the other...   

Chip

> I'm happy there is a simpler work-around than finding some obscure 
> file to delete. But it would be better if 4D just fixed the issue. If 
> you use multiple monitors and change configurations this is an 
> ongoing issue. Other Mac applications have no problems, but I'm often 
> surprised by how 4D windows end up. I try to remember to quit 4D 
> before unplugging my external monitor because of all the problems.
> 
> John DeSoi, Ph.D.
> 
> 
>> On Nov 21, 2018, at 6:47 PM, Tim Nevels via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Thanks so much for telling everyone about this keyboard fix. And I’
>> m sure it’s probably documented somewhere with a single sentence 
>> that most of us never bothered to read. 
>> 
>> As least now we all know… when a 4D window opens in a stupid 
>> location, close it and then open it again with the shift key down to 
>> fix it. A simple, elegant solution. No more wandering to the 
>> preferences folder and deleting a file to fix it. 
>> 
>> Do we know what version this was implemented in?
>> 
> 
> **
> 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
> **

Hell is other people 
 Jean-Paul Sartre
**
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: Audit File Updates via Triggers...

2018-11-20 Thread Chip Scheide via 4D_Tech
Kirk,
since I don't have objects yet...
Trigger actions - 1 method
tracking actions (including created and modified) - 4 methods


On Tue, 20 Nov 2018 12:48:01 -0800, Kirk Brooks via 4D_Tech wrote:
> Robert,
> My thoughts on the created by/modified by stuff:
> 
> 1) I moved all this to a single object field. I call it '_meta' and it's on
> every table I want to manage.
> 
> 2) At a minimum the field has:
> 
> {"created"; {"name: "", "date": ""},
> 
>  "modified"; {"name": "", "date": ""}}
> 
> 3) I wrote a few (I think it's 5) methods to manage it. Mainly:
> 
> META_UPDATE(ptr to _meta field) //  generally in table trigger code
> 
> //  figures out the table and trigger event then update _meta
> 
> Meta_get_text(object) -> returns a pretty text string of "Created: ...
> Modified: ... "
> 
> 
> Once I started using this I liked it so much I've converted most of my
> projects to it. Having a single method to return the create/mod info string
> is a delight. This field is also good for other types of meta data.
> Calculation dates are one I use. Could include things like last printed or
> whatever. Totally optional.
> 
> Keep in mind trigger code always runs on the server regardless of where the
> record mod takes place. So client side IP vars are meaningless in a
> trigger. Current user is the fastest reliable way to know who the user is.
> 
> Avoid trigger operations that do lookups or long verification procedures.
> Do that stuff prior to saving if you need it. Trigger code is best when
> it's lean and fast.
> 
> On Tue, Nov 20, 2018 at 11:59 AM Robert ListMail via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> At a minimum, I just have the simple need of recording “CreatedBy” and
>> “ModifiedBy” values (username or ID) for one particular table. I do have
>> extra fields already in that table that could be repurposed and I would
>> probably add “DateModified” to that. However, that’s three fields 
>> used just
>> for auditing. When I look back at previous posts I see that some of you are
>> tracking (saving audit data for) for tables and even individual fields. So,
>> as I have a chance to redesign this DB, I wanted to re-think how this is
>> implemented.
>> 
>> 
>> So, Chip, when you have the need to store the username (or ID) of the user
>> that created and/or last modified a key record, do you ever have this data
>> in the field of the original record? I’m sure I have seen this more
>> commonly where the data is in the original record. I guess to keep things
>> normalized, you would use a related table (or a standalone table) where
>> each transaction that you want to remember is stored. However, with the
>> separate table method I suppose you would have to search this audit table
>> every time your detail form is loaded (assuming you want to show who
>> created or modified a record) and that each time the record is updated the
>> audit table would be getting a new record.
>> 
>> Thoughts about your data audit strategy are appreciated.
>> 
>> Thanks,
>> 
>> Robert
>> 
>> ===
>> Robert Broussard
>> Houston, TX
>> ===
>> 
>>> On Aug 26, 2015, at 9:26 AM, Chip Scheide <4d_o...@pghrepository.org>
>> wrote, Re: Triggers and error handling:
>>> 
>>> so my triggers tend to look like this:
>>> case of
>>> (Database event = : (Database event=On Saving New Record Event)
>>>  trk_Last_Modified (->[Account_Postings]Created_Who)
>>>  trk_Last_Modified (->[Account_Postings]Modified_Who)
>> 
>> **
>> 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
>> **
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 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
**

Re: Audit File Updates via Triggers...

2018-11-20 Thread Chip Scheide via 4D_Tech
I use 2 fields (nearly) every table, some linking (many to many) tables 
do not have this.
[Table]Created_Who [text]
[Table]Modifed_Who [text]

both fields track the same info Current User, Date, time   (in that 
order and that format)
This info is updated, most often by a trigger, using the Database 
Events.

I also have a separate table for specific action(s) I want to track 
(ex: deleting a record, user created some specific type of record, user 
logged in etc).

In this table I track basically the same information as above (in a 
different manner) as well as what the action was. 
For Record deletions, I track the table, and original record ID and I 
convert all the data of the record to text (I do/can/will/would lose 
blob and pict data, however, not an issue at the moment) and save the 
text of the deleted record data in the record with the tracked action.

For the tracked actions I use another table, to hold the actions I want 
to track.


On Tue, 20 Nov 2018 13:59:36 -0600, Robert ListMail via 4D_Tech wrote:
> At a minimum, I just have the simple need of recording “CreatedBy” 
> and  “ModifiedBy” values (username or ID) for one particular table. 
> I do have extra fields already in that table that could be repurposed 
> and I would probably add “DateModified” to that. However, that’s 
> three fields used just for auditing. When I look back at previous 
> posts I see that some of you are tracking (saving audit data for) for 
> tables and even individual fields. So, as I have a chance to redesign 
> this DB, I wanted to re-think how this is implemented. 
> 
> 
> So, Chip, when you have the need to store the username (or ID) of the 
> user that created and/or last modified a key record, do you ever have 
> this data in the field of the original record? I’m sure I have seen 
> this more commonly where the data is in the original record. I guess 
> to keep things normalized, you would use a related table (or a 
> standalone table) where each transaction that you want to remember is 
> stored. However, with the separate table method I suppose you would 
> have to search this audit table every time your detail form is loaded 
> (assuming you want to show who created or modified a record) and that 
> each time the record is updated the audit table would be getting a 
> new record.
> 
> Thoughts about your data audit strategy are appreciated.
> 
> Thanks,
> 
> Robert
> 
> ===
> Robert Broussard
> Houston, TX
> ===
> 
>> On Aug 26, 2015, at 9:26 AM, Chip Scheide 
>> <4d_o...@pghrepository.org> wrote, Re: Triggers and error handling:
>> 
>> so my triggers tend to look like this:
>> case of
>> (Database event = : (Database event=On Saving New Record Event)
>>  trk_Last_Modified (->[Account_Postings]Created_Who)
>>  trk_Last_Modified (->[Account_Postings]Modified_Who)
> 
> **
> 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
**

Re: Redrawing List Subform...

2018-11-20 Thread Chip Scheide via 4D_Tech
a listbox (selection) has to have it's content updated to show a change 
in display. Use set, use named selection, query <[table]>.

if you:
- delete a record from the list - but do not remove it from the current 
selection (which seems to force the redraw) the listbox still shows the 
deleted record.
- add 1 (or more) records through the listbox, you need to update the 
selection displayed (add the new record(s) to the current selection) or 
they will not show up.

As I mentioned before, I do whatever query is is needed to gather the 
data to be displayed, then place those results into a set. 

- If I delete record(s) they are differenced out of the original 
records displayed. & Used
- If I add record(s) they added to the set. & Used
- If the user does a query (which is a query selection), and then 
clears the query entry area, the original records (with deletions and 
additions) is redisplayed by Using the set. -- this has an advantage of 
not having to re-run the original query repeatedly.


On Tue, 20 Nov 2018 12:37:27 -0600, Robert ListMail via 4D_Tech wrote:
> I have a list subform showing related records and when a record is 
> added via programming the list does not update. So, I tried to use 
> Redraw using the: object name; variable name, table name as a 
> parameter and the redraw did not occur. Also, Redraw window had no 
> affect either. Any ideas on how to get this simple subform to refresh?
> 
> Searching the NUG I found:
> 
>> On May 13, 2016, at 2:40 PM, Gary Boudreaux  wrote 
>> Re: redrawing subform:
>> REDRAW([ManyTable]) //[this worked for Gary]
> 
> 
>> On Sep 5, 2018, at 2:43 PM, Stephen J. Orth via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote, Re: v13 - screen redraw:
>> Chip, Another option is to use CALL PROCESS (-1) and see if that works...
>> Steve
> 
> Also, 4D v17 does not seem to have the Call Process command….  Was 
> this removed?
> 
> Thanks,
> 
> Robert
> **
> 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
**

Re: Selection-based Listbox Deletions...

2018-11-20 Thread Chip Scheide via 4D_Tech
the old sub records are no longer sub records.
make the button no action

Confirm with the user
use set()
delete selection([table])

repopulate the listbox
if you are using a set to track the originally displayed records (I do 
this),
difference the selected set from the tracking set
use original set

Chip

On Mon, 19 Nov 2018 20:06:09 -0600, Robert ListMail via 4D_Tech wrote:
> I have a rather simple form with a selection-based Listbox from a 
> related table where the automatic action button “Delete Subrecord” 
> simply does not work. The unexpected results include: a) one of the 
> parent records are deleted and it may not be the parent record you 
> are working with; b) no records deleted at all; or c) the parent 
> record is deleted instead of the selected child record.
> 
> The documented behavior that I was expecting is:
> Using standard actions
>> 
http://doc.4d.com/4Dv17R2/4D/17-R2.1720/Using-standard-actions.300-3839577.en.html
 
>> 

> 
> History: this related table started life as a subtable and has been 
> converted to regular table. This deletion behavior occurs with the 
> special relation in place or not. I built a new structure via XML and 
> the undocumented behavior still occurs.
> 
> So, when you are working with selection-based list boxes on a detail 
> form from a related table how do you handle deletions?
> 
> Thanks,
> 
> Robert
> **
> 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
**

Re: Format of MySql data file

2018-11-16 Thread Chip Scheide via 4D_Tech
Pat,
you can get the file to open in Bbedit.
have you tried resaving the file?

you can/should be able to set the line endings, and the character set.
Chip

On Fri, 16 Nov 2018 11:13:13 +, Pat Bensky via 4D_Tech wrote:
> Hi John,
> I've tried opening the document with Document to Text, Receive Packet, and
> Blob to Text. They all yield the same result.
> 
> Pat
> 
> On Fri, 16 Nov 2018 at 02:03, John DeSoi via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> Pat,
>> 
>>> 
>>> On Nov 15, 2018, at 5:18 PM, Pat Bensky via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>>> 
>>> I want to break this file down into individual files for each table, to
>>> make it more manageable. So I created a method to parse the file and
>> create
>>> a new file for each table.
>>> But ...
>>> The content all looks like gobbledygook when opened in 4D - eg:
>>> ,'xÃÃÆ
>>> ’Æ’ÃÂ
>>> 
>> 
>> You did not say how you opened it in 4D. If you used Document to text, you
>> need to specify right character set. If you used BLOB commands or RECEIVE
>> PACKET, all the possible parameters involved can lead to the problems you
>> are seeing.
>> 
>> 
>>> The character set is UTF-8.
>>> If I open it in BBEdit it looks fine (readable text).
>> 
>> And the popup at the bottom in BBEdit says "UTF-8"?
>> 
>> John DeSoi, Ph.D.
>> 
>> **
>> 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
>> **
> 
> 
> 
> -- 
> *
> 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
**

Re: v13 - how to manage not enough stack space error

2018-11-16 Thread Chip Scheide via 4D_Tech
Thanks

I actually have this in place due to the fact that the initial call is 
for one parent (i.e maternal or paternal lineage), and subsequent 
(recursive) calls are for both parents; however I am reluctant to use 
the level limit as I do not know what a 'real' limit is.  With a 
breeding colony, the genealogy could go back many many generations, and 
while a limit for monkeys might be 10, a  limit for mice might be 100, 
how many generations do you limit fruit flies, or bacteria?

 
On Fri, 16 Nov 2018 08:46:04 +0100, Ingo Wolf via 4D_Tech wrote:
> In such cases I use a longint parameter "level" to the recursive 
> method. On first run this parameter is set to 1 and is incremented 
> with every level of recursion. I then test for an arbitrary "level" 
> (e.g. 1000) and abort the further recursion.
> 
> HTH
> Ingo Wolf
> 
> 
> 4d_tech-requ...@lists.4d.com schrieb am Thu, 15 Nov 2018 12:00:01 -0800:
>> From: Chip Scheide <4d_o...@pghrepository.org>
>> To: 4D iNug Technical <4d_tech@lists.4d.com>
>> Subject: v13 - how to manage not enough stack space error
>> Message-ID: <20181115111943838786.b0800...@pghrepository.org>
>> Content-Type: text/plain; charset=us-ascii
>> 
>> 
>> I have a recursive routine (genology) 
>> The routine is fine and works as expected - as long as the data is 
>> valid.
>> 
>> I was working in my test data, which I have apparently F*&^%ed and the 
>> routine recurses until I get a stack error and 4D crashes (stand alone).
>> 
>> How can I manage this so that I can exit the recursion gracefully with 
>> a useful(?) error message. Memory available measurements? free stack 
>> space?
>> I.E. The operation is being truncated due to inconsistent data.
>> 
>> Thanks 
>> Chip
> 
> 
> -- 
> ViELMAC Ingo Wolf
> Rheinhessenring 53A
> D 55597 Wöllstein
> Tel. +49 (0)6703 3070320
> Fax  +49 (0)6703 3070321
> e-mail i...@vielmac.de
> **
> 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
**

Re: v13 - how to manage not enough stack space error

2018-11-15 Thread Chip Scheide via 4D_Tech
Chuck,
The recursion issue is a data related issue.
When the data is good, tested and running for years, there is no memory 
issue, and no crashing.
It is the bad data which is causing the issue.
-- I created a relative relationship where an animal was it's own 
parent... this is/was the data problem.

In the instance of bad data - no amount of increasing of the process 
memory will help, as the recursion will simply continue until no memory 
& a crash - it will just take longer to reach that point with more 
memory.


In the process of writing my original reply to your email, I came up 
with an answer to my data problem, basically a way to detect the 
problematic data.
So... THANKS  :)

Chip

On Thu, 15 Nov 2018 12:47:38 -0500, Charles Miller via 4D_Tech wrote:
> You could keep track of memory, but why not increase size of process first.
> Additionally, you could get stack memory and meory data. Call it before
> exit get memory stats. You housl now have a ballpark of how much emory each
> call takes. You can then perhaps use a counter.
> 
> Regards
> 
> Chuck
> 
> On Thu, Nov 15, 2018 at 11:20 AM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> 
>> I have a recursive routine (genology)
>> The routine is fine and works as expected - as long as the data is
>> valid.
>> 
>> I was working in my test data, which I have apparently F*&^%ed and the
>> routine recurses until I get a stack error and 4D crashes (stand alone).
>> 
>> How can I manage this so that I can exit the recursion gracefully with
>> a useful(?) error message. Memory available measurements? free stack
>> space?
>> I.E. The operation is being truncated due to inconsistent data.
>> 
>> Thanks
>> 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
>> **
> 
> 
> 
> -- 
> 
-
>  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
>   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)
> 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
**

[off] no matter how bad the code you have/wrote/work on....

2018-11-15 Thread Chip Scheide via 4D_Tech

it can not be this bad
https://news.ycombinator.com/item?id=18442941

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

v13 - how to manage not enough stack space error

2018-11-15 Thread Chip Scheide via 4D_Tech

I have a recursive routine (genology) 
The routine is fine and works as expected - as long as the data is 
valid.

I was working in my test data, which I have apparently F*&^%ed and the 
routine recurses until I get a stack error and 4D crashes (stand alone).

How can I manage this so that I can exit the recursion gracefully with 
a useful(?) error message. Memory available measurements? free stack 
space?
I.E. The operation is being truncated due to inconsistent data.

Thanks 
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: Placing a picture or graphic object

2018-11-12 Thread Chip Scheide via 4D_Tech
Peter,
here is code I use for moving things. it simplifies the whole process 
for me. I no longer have to remember exact syntax etc. 
Note you can use a pointer to a n active object (button, variable etc), 
or pass Nil as $1 and the object name in $4 for static objects (text, 
etc)

  //Project Method:  utl_Move_Object
  //$1 - Pointer - to object to move - if Nil, use object name passed 
in $4
  //$2 - Longint - absolute left location to place object
  //$3 - Longint - absolute top location to place object
  //$4 - Text (optional) - Object Name, only used if Nil pointer passed 
in $1

  //move an object to it's absolute left and top (supplied) position
  // ∙ Created 10/17/12 by Chip - 
C_POINTER($1;$Object_ptr)
C_LONGINT($2;$3;$New_Top;$New_Left;$Top;$Bottom;$Left;$Right)
C_TEXT($4;$Object_Name)

$Object_ptr:=$1

If (Nil($Object_Ptr))
$Object_Name:=$4
$Object_ptr:=OBJECT Get pointer(Object named;$Object_Name)
End if 
$New_Left:=$2
$New_Top:=$3

If (Not(Nil($Object_ptr)))
OBJECT GET COORDINATES($Object_ptr->;$Left;$Top;$Right;$Bottom)

$Right:=$Right+($New_Left-$Left)
$Bottom:=$Bottom+($New_Top-$Top)
OBJECT MOVE($Object_ptr->;$New_Left;$New_Top;$Right;$Bottom;*)
Else   //object to be moved is a text or other object which can't be 
referenced via pointer
OBJECT GET COORDINATES(*;$Object_Name;$Left;$Top;$Right;$Bottom)

$Right:=$Right+($New_Left-$Left)
$Bottom:=$Bottom+($New_Top-$Top)
OBJECT MOVE(*;$Object_Name;$New_Left;$New_Top;$Right;$Bottom;*)
End if 
  //End utl_Move_Object




On Sun, 11 Nov 2018 19:56:41 +, Peter Mew via 4D_Tech wrote:
> Hi
> I am creating a graphic  object, could be a line or rectangle or a picture.
> Having created it, how do I place it on the form where I Want it.
> Bear in mind Im on v13 and dont have access to object set coordinates, only
> move picture, transform picture, and object get coordinates.
> Object Move, using absolute coordinates, doesnt seem to work
> For Example I want to place a Grapic called "Cursor" at absolute
> coordinates ^0 pixels from the top of the form, and 55 pixels from the left
> edge of the form, no resizing.
> so I call
> $CursorPosPix:=55
> OBJECT MOVE(*;"<>Cursor2";$CursorPosPix;60;0;0;*)
> <>Cursor2 is a Vertical Line 1 pixel in width and 60 pixels high
> The result is a diagonal line starting at 0 pixels on the form and
> finishing at 60 pixels from the top and about 600 pixels from the left edge.
> Thanks
> -pm
> Mac Yosemite
> 4D v13.6
> **
> 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
**

Re: Listbox multiple select

2018-11-09 Thread Chip Scheide via 4D_Tech
never tried to implement this...
you would probably have to :
use On Mouse down, and on mouse up, to get the coords of the dragged 
over area.
then estimate/calculate how many lines were to be selected based on row 
height.
Then use the listbox command to highlight those rows.

I might note that for any interface I have used where you can drag 
select, the software allows the drag 'drawing' of a selection 'square', 
which 4D list boxes do not natively support.

I have not used it so I od not know how much work [probably a LOT] 
would be involved, but maybe rather then a list box, you might want to 
try SVG if you *must* implement a drag select interface.

Chip

On Fri, 9 Nov 2018 17:58:50 + (UTC), vagelis fallias wrote:
>  
> To clarify, I want to have the same behaviour as most lists have, 
> click, drag the mouse pointer down and select the rows as you go past 
> them. The same result as Shift and Click but by dragging. 
> ThanksΣτις Παρασκευή, 9 Νοεμβρίου 2018, 10:10:02 π.μ. GMT-5, ο 
> χρήστης Chip Scheide <4d_o...@pghrepository.org> έγραψε:  
>  
>  Click on one line/row.
> Then (platform dependent)
> - Shift click on the end of the selection you desire for a contiguous 
> selection
> - Command (Mac), or Control (windows) click on discontiguous rows.
> 
> Note:
> Option/Alt click on a previously selected row and drag to move/drag 
> multiple rows from a listbox to other object.
> Chip
> 
>  
> On Fri, 9 Nov 2018 13:54:31 + (UTC), vagelis fallias via 4D_Tech 
> wrote:
>> Hello all,
>> how do I make a multiple selection in a listbox using the mouse? 
>> Using Click and drag, is there a setting I m missing? or it doesn't 
>> do it?
>> 
>> Thanks
>> **
>> 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 
>   
---
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: Semaphores and Server-Side Data Updates in Multi-User Environment

2018-11-09 Thread Chip Scheide via 4D_Tech
my outline for this would be as follows. I am not up to v16 yet, so 
this will be a 'classic' solution, use of call worker might simplify 
this.

write a deamon (a process which spends most of it's life asleep), is 
started at server startup.
 Deamon :
   repeat loop
examine IP array, or Object for data to process
  if there is stuff to do
do it
remove processed item from Array/object
if on a timed execution : Delay process(Delay time;Current process)
if only as an on needed basis : Pause process(current process)
   until (Quit 4D)


Add item to Array/object:
(on client, adding)
  Execute on server : method with needed values
Set semaphore to protect array/object
  add as needed
clear semaphore
wake deamon 
  if (already running : wake (call process deamon process #))
  else start deamon

Remove Item from array/object (only runs on server, called from deamon):
  Set semaphore to protect array/object
 remove as needed
  clear semaphore



Chip

On Wed, 7 Nov 2018 00:40:41 +, Ben Sokal via 4D_Tech wrote:
> Hello,
> 
> Hoping someone can point me in the right direction as I've never done 
> something like this before.
> 
> We have a multi-user environment running v16r5. Through various 
> means, a user can call a method that updates company-specific 
> financial data. The problem is that it can take 30+ seconds and the 
> user is left waiting until this finishes. What we want to do is this:
> 
> - Return control to the user while the task runs in the background. 
> We want the task to run on the server instead of on the client 
> machine like it's currently doing.
> - If this user or a different user runs the task again for the same 
> company, we need to queue it up somehow and do this after the 
> previous processing finishes. If this user or a different user runs 
> the task for a different company, we could either do the server 
> processing at the same time since there's no data conflict, or queue 
> it up if there is a risk of trying to do too many things at once.
> 
> I've read the language manual and understand the syntax of 
> semaphores, which is what I'm thinking I need to use (but am not 
> completely sure). Beyond the syntax of commands, I don't know how to 
> implement this. For example if I'm doing an "execute on server", is 
> the semaphore going to be set on the client side before we call the 
> server to run its method, or is it the server method that does the 
> semaphore? Is this going to be a local semaphore or global? There are 
> transactions involved in the actual processing...does this impact at 
> all how I need to go about doing this?
> 
> Thanks for any tips!
> Ben
> **
> 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
**

Re: Forms Stop Receiving Certain Events

2018-11-09 Thread Chip Scheide via 4D_Tech
the configuration is pretty simple.

Open the database, go to:
Database settings : Backup : Configure
turn on the check box(es) you want to be backed up and add any 
additional file(s) you want
set your destination, and schedule.

the .4BK file obtains whatever is supposed to be backed up.
The 4BL is a log file, and I assume tells 4D what is supposed to be in 
the 4BK film and how large.

To restore:
Open 4D 
Fiel menu : Restore
Select 4BK to restore, and select a destination
wait

if, as default, structure and data are included you will have a 
functional database, and structure.

As for reading -- the documentation  RTFM  :)
not that I do  :)

Chip



On Fri, 9 Nov 2018 10:47:07 -0500, Sandor Szatmari wrote:
> I’m glad to learn that.  However, the way our backups are configured 
> I only see 4BL (the log) and and 4BK (the data) files.  Looks like I 
> need to learn more about the backup configuration process.  What is 
> the recommended way to configure backups so that I would have access 
> to these individual files?  Or, are they accessible individually 
> during the restore process from the 4BK file?  Also, if there is any 
> good reading on this you could point me too, It’d be appreciated.  
> Thanks for your response, very helpful indeed!
> 
> Sandor Szatmari
> 
>> On Nov 9, 2018, at 10:08, Chip Scheide <4d_o...@pghrepository.org> wrote:
>> 
>> depending on what your form method looks like, it does not hurt (much) 
>> to simply turn everything on.
>> Chip
>>> On Fri, 9 Nov 2018 09:24:16 -0500, Sandor Szatmari via 4D_Tech wrote:
>>> OK, so it looks like there's some strange bug I ran into.  For some 
>>> reason most of the events for my forms got disabled at the form 
>>> level.  So, even though they were checked off at the element level 
>>> the form was not registered for those events anymore.  I am going to 
>>> have to go through all the UI elements and look though their event 
>>> handling code to make sure all the correct events are registered at 
>>> the form level.
>>> 
>>> 
>>> Has anyone heard of this before?  If anyone knows of a way to best 
>>> determine the previous state of the form event configuration any 
>>> thoughts would be appreciated.
>>> 
>>> Thanks,
>>> Sandor Szatmari
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Senior Software Developer
>>> Bristol Capital Inc. - InfoPlus
>>> 201 746 7215
>>> www.infoplusonline.com
>>> 
>>> 
>>> 
>>> From:   Sandor Szatmari via 4D_Tech <4d_tech@lists.4d.com> 
>>> To:   <4d_tech@lists.4d.com> 
>>> Cc:   Sandor Szatmari  
>>> Sent:   11/9/2018 12:18 AM 
>>> Subject:   Forms Stop Receiving Certain Events 
>>> 
>>> Has this ever happened to anyone?  UI Elements on certain forms 
>>> appear to have stopped receiving certain events.  This form and 
>>> related code that have been functioning for many many years.  I was 
>>> adding an additional page to the form when this started happening.  I 
>>> did not edit or change the code or properties on any of the other 
>>> pages/ui elements.  Any help in tracking down the cause would be 
>>> helpful and greatly appreciated.  I do have backups but I don't want 
>>> to roll back the database because it is an active database where data 
>>> is added every day.  I am under the impression that you cannot roll 
>>> back the interface programming separately from the actual data.  An 
>>> example is below.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Platform: MacOSX (10.11.6)
>>> 4D Version: v15 R5
>>> 
>>> 
>>> Here's an example…
>>> 
>>> 
>>> A Popup button, has 'On Load', 'On Clicked' and 'On Unload' enabled 
>>> in the property list (i.e. checked off').
>>> 
>>> 
>>> The object method for the popup has a case statement for reacting to 
>>> these events. (The rest of the code is removed for brevity)
>>> 
>>> 
>>> 
>>> 
>>> $TheEvent:=Form event 
>>> Case of  
>>> : ($TheEvent=On Load) 
>>> 
>>> ALERT("Load") 
>>> : ($TheEvent=On Clicked) 
>>>   ALERT("Clicked")  
>>> : ($TheEvent=On Unload) 
>>>   ALERT("Unload")  
>>> End case 
>>> 
>>> 
>>> The only alert that is displayed is the unload alert.  
>>> 
>>> 
>>> How can I figure out where this the events are being lost/swallowed.
>>> 
>>> 
>>> Thanks in advance,
>>> Sandor Szatmari
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Senior Software Developer
>>> Bristol Capital Inc. - InfoPlus
>>> 201 746 7215
>>> www.infoplusonline.com
>>> 
>>> CONFIDENTIALITY NOTICE: This email (and any related attachments) 
>>> contains information from InfoPlus (a service of Bristol Capital, 
>>> Inc.). It is intended only for the addressee and may contain 
>>> information that is confidential and/or otherwise exempt from 
>>> disclosure under applicable law. If you are not the intended 
>>> recipient or are acting as agent for the intended recipient, any use 
>>> or disclosure of this communication is prohibited. If you have 
>>> received this 

Re: Forms Stop Receiving Certain Events

2018-11-09 Thread Chip Scheide via 4D_Tech
Krik,

I just checked, and On Clicked and buttons does work regardless of form 
event, but I think this depends on the event. I know some events, like 
On Timer, On Before/after Keystroke will not work if the form event is 
not checked at the form level.

Chip

On Fri, 9 Nov 2018 06:57:15 -0800, Kirk Brooks via 4D_Tech wrote:
> Hi Sandor,
> Form object form events are not linked to the form's events. So the events
> a button responds to aren't limited by what the form does.
> 
> If the button is invisible, perhaps disabled - I have never tried - it
> won't execute until it's visible. So a button that's invisible to start
> will never run On load because a button's On load runs before the Form's On
> load event.
> 
> 
> On Fri, Nov 9, 2018 at 6:24 AM Sandor Szatmari via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> OK, so it looks like there's some strange bug I ran into.  For some reason
>> most of the events for my forms got disabled at the form level.  So, even
>> though they were checked off at the element level the form was not
>> registered for those events anymore.  I am going to have to go through all
>> the UI elements and look though their event handling code to make sure all
>> the correct events are registered at the form level.
>> 
>> 
>> Has anyone heard of this before?  If anyone knows of a way to best
>> determine the previous state of the form event configuration any thoughts
>> would be appreciated.
>> 
>> Thanks,
>> Sandor Szatmari
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Senior Software Developer
>> Bristol Capital Inc. - InfoPlus
>> 201 746 7215
>> www.infoplusonline.com
>> 
>> 
>> 
>>  From:   Sandor Szatmari via 4D_Tech <4d_tech@lists.4d.com>
>>  To:   <4d_tech@lists.4d.com>
>>  Cc:   Sandor Szatmari 
>>  Sent:   11/9/2018 12:18 AM
>>  Subject:   Forms Stop Receiving Certain Events
>> 
>> Has this ever happened to anyone?  UI Elements on certain forms appear to
>> have stopped receiving certain events.  This form and related code that
>> have been functioning for many many years.  I was adding an additional page
>> to the form when this started happening.  I did not edit or change the code
>> or properties on any of the other pages/ui elements.  Any help in tracking
>> down the cause would be helpful and greatly appreciated.  I do have backups
>> but I don't want to roll back the database because it is an active database
>> where data is added every day.  I am under the impression that you cannot
>> roll back the interface programming separately from the actual data.  An
>> example is below.
>> 
>> 
>> 
>> 
>> 
>> Platform: MacOSX (10.11.6)
>> 4D Version: v15 R5
>> 
>> 
>> Here's an example…
>> 
>> 
>> A Popup button, has 'On Load', 'On Clicked' and 'On Unload' enabled in the
>> property list (i.e. checked off').
>> 
>> 
>> The object method for the popup has a case statement for reacting to these
>> events. (The rest of the code is removed for brevity)
>> 
>> 
>> 
>> 
>> $TheEvent:=Form event
>> Case of
>>  : ($TheEvent=On Load)
>> 
>>  ALERT("Load")
>>  : ($TheEvent=On Clicked)
>>ALERT("Clicked")
>>  : ($TheEvent=On Unload)
>>ALERT("Unload")
>> End case
>> 
>> 
>> The only alert that is displayed is the unload alert.
>> 
>> 
>> How can I figure out where this the events are being lost/swallowed.
>> 
>> 
>> Thanks in advance,
>> Sandor Szatmari
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Senior Software Developer
>> Bristol Capital Inc. - InfoPlus
>> 201 746 7215
>> www.infoplusonline.com
>> 
>> CONFIDENTIALITY NOTICE: This email (and any related attachments) contains
>> information from InfoPlus (a service of Bristol Capital, Inc.). It is
>> intended only for the addressee and may contain information that is
>> confidential and/or otherwise exempt from disclosure under applicable law.
>> If you are not the intended recipient or are acting as agent for the
>> intended recipient, any use or disclosure of this communication is
>> prohibited. If you have received this communication in error, please notify
>> us immediately to arrange for the appropriate method of returning or
>> disposing of the communication. If our respective Companies have
>> confidentiality provisions in effect, this email and the materials
>> contained herein are deemed CONFIDENTIAL and should be treated accordingly
>> unless expressly provided otherwise.
>> **
>> 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
>> **
>> 
>> CONFIDENTIALITY NOTICE: This email (and any related attachments) contains
>> information from InfoPlus (a service of Bristol Capital, Inc.). It is
>> intended only for the addressee and may contain informati

Re: Forms Stop Receiving Certain Events

2018-11-09 Thread Chip Scheide via 4D_Tech
depending on what your form method looks like, it does not hurt (much) 
to simply turn everything on.
Chip
On Fri, 9 Nov 2018 09:24:16 -0500, Sandor Szatmari via 4D_Tech wrote:
> OK, so it looks like there's some strange bug I ran into.  For some 
> reason most of the events for my forms got disabled at the form 
> level.  So, even though they were checked off at the element level 
> the form was not registered for those events anymore.  I am going to 
> have to go through all the UI elements and look though their event 
> handling code to make sure all the correct events are registered at 
> the form level.
> 
> 
> Has anyone heard of this before?  If anyone knows of a way to best 
> determine the previous state of the form event configuration any 
> thoughts would be appreciated.
> 
> Thanks,
> Sandor Szatmari
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Senior Software Developer
> Bristol Capital Inc. - InfoPlus
> 201 746 7215
> www.infoplusonline.com
> 
> 
> 
>  From:   Sandor Szatmari via 4D_Tech <4d_tech@lists.4d.com> 
>  To:   <4d_tech@lists.4d.com> 
>  Cc:   Sandor Szatmari  
>  Sent:   11/9/2018 12:18 AM 
>  Subject:   Forms Stop Receiving Certain Events 
> 
> Has this ever happened to anyone?  UI Elements on certain forms 
> appear to have stopped receiving certain events.  This form and 
> related code that have been functioning for many many years.  I was 
> adding an additional page to the form when this started happening.  I 
> did not edit or change the code or properties on any of the other 
> pages/ui elements.  Any help in tracking down the cause would be 
> helpful and greatly appreciated.  I do have backups but I don't want 
> to roll back the database because it is an active database where data 
> is added every day.  I am under the impression that you cannot roll 
> back the interface programming separately from the actual data.  An 
> example is below.
> 
> 
> 
> 
> 
> Platform: MacOSX (10.11.6)
> 4D Version: v15 R5
> 
> 
> Here's an example…
> 
> 
> A Popup button, has 'On Load', 'On Clicked' and 'On Unload' enabled 
> in the property list (i.e. checked off').
> 
> 
> The object method for the popup has a case statement for reacting to 
> these events. (The rest of the code is removed for brevity)
> 
> 
> 
>  
> $TheEvent:=Form event 
> Case of  
>  : ($TheEvent=On Load) 
>  
>  ALERT("Load") 
>  : ($TheEvent=On Clicked) 
>ALERT("Clicked")  
>  : ($TheEvent=On Unload) 
>ALERT("Unload")  
> End case 
> 
> 
> The only alert that is displayed is the unload alert.  
> 
> 
> How can I figure out where this the events are being lost/swallowed.
> 
> 
> Thanks in advance,
> Sandor Szatmari
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Senior Software Developer
> Bristol Capital Inc. - InfoPlus
> 201 746 7215
> www.infoplusonline.com
> 
> CONFIDENTIALITY NOTICE: This email (and any related attachments) 
> contains information from InfoPlus (a service of Bristol Capital, 
> Inc.). It is intended only for the addressee and may contain 
> information that is confidential and/or otherwise exempt from 
> disclosure under applicable law. If you are not the intended 
> recipient or are acting as agent for the intended recipient, any use 
> or disclosure of this communication is prohibited. If you have 
> received this communication in error, please notify us immediately to 
> arrange for the appropriate method of returning or disposing of the 
> communication. If our respective Companies have confidentiality 
> provisions in effect, this email and the materials contained herein 
> are deemed CONFIDENTIAL and should be treated accordingly unless 
> expressly provided otherwise.
> **
> 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
> **
> 
> CONFIDENTIALITY NOTICE: This email (and any related attachments) 
> contains information from InfoPlus (a service of Bristol Capital, 
> Inc.). It is intended only for the addressee and may contain 
> information that is confidential and/or otherwise exempt from 
> disclosure under applicable law. If you are not the intended 
> recipient or are acting as agent for the intended recipient, any use 
> or disclosure of this communication is prohibited. If you have 
> received this communication in error, please notify us immediately to 
> arrange for the appropriate method of returning or disposing of the 
> communication. If our respective Companies have confidentiality 
> provisions in effect, this email and the materials contained herein 
> are deemed CONFIDENTIAL and should be treated accordingly unless 
> expressly provided otherwise.
> **
> 4D Internet U

Re: Listbox multiple select

2018-11-09 Thread Chip Scheide via 4D_Tech
Click on one line/row.
Then (platform dependent)
- Shift click on the end of the selection you desire for a contiguous 
selection
- Command (Mac), or Control (windows) click on discontiguous rows.

Note:
Option/Alt click on a previously selected row and drag to move/drag 
multiple rows from a listbox to other object.
Chip

 
On Fri, 9 Nov 2018 13:54:31 + (UTC), vagelis fallias via 4D_Tech 
wrote:
> Hello all,
> how do I make a multiple selection in a listbox using the mouse? 
> Using Click and drag, is there a setting I m missing? or it doesn't 
> do it?
> 
> Thanks
> **
> 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
**

Re: Forms Stop Receiving Certain Events

2018-11-09 Thread Chip Scheide via 4D_Tech
this is not correct.
The structure (.4DB) is a separate entity from the data (.4DD)

Other then having added tables and/or fields, rolling back the 
structure to a previous one (say yesterday) is simple and is not a 
significant issue.

If you have added fields and/or tables then there can be issues, 
however, I am not well versed in this part of a roll back. I know that 
if you simply changed one field type to another, with no other change 
to the tables, this type of change is also NOT an issue to roll back.

To the problem of not responding, I have seen 2 things with this.
- something inside 4D has simply gotten FUBAR(tm) and a restart of the 
program (4D & database) will resolve it
- there are 1 or more in obvious interface objects interfering with the 
expected behavior of your form.
ex: you have a (supposed) back ground object as part of the form 
appearance (say a box with no fill) and this box has "moved" to the 
foreground. The box then receives all the interface actions (clicks 
etc.) and the intended entry objects (buttons for example) do not 
appear to function.
Summary - check your 'Z' stacking of objects.

On Fri, 9 Nov 2018 00:18:13 -0500, Sandor Szatmari via 4D_Tech wrote:
> I am under the impression that you cannot roll back the interface 
> programming separately from the actual data.
---
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: Reindex

2018-11-06 Thread Chip Scheide via 4D_Tech
you probably need to grab not just the 4DD but ale the index files too

On Tue, 6 Nov 2018 16:07:15 +0100, stardata.info via 4D_Tech wrote:
> hi all,
> sometimes I need to take data files from one application running on 
> some my customer without close the application.
> I notice that when I restart the application on my pc, 4D reindex the 
> data for all indexes.
> 
> Is normal this? How I can do to bypass this issue?
> 
> Thanks
> Ferdinando
> **
> 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
**

Re: Sorting an array of email addresses

2018-11-06 Thread Chip Scheide via 4D_Tech
there is a setting to use or ignore the "@" as a wildcard
I am not sure if it can be turned off/on dynamically
CHip

On Tue, 6 Nov 2018 10:17:13 +, David Samson via 4D_Tech wrote:
> Would this be reliable since they all contain the "@" sign? You might have "
> i...@abc.com" and "i...@def.com".
> 
> (Windows v17 if it matters)
> 
> D Samson
> Manchester
> UK
> **
> 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
**

Re: v13 - Why can a record NOT be Pushed?

2018-11-05 Thread Chip Scheide via 4D_Tech
Thanks Kirk,
I found the problem I was having.

PUSH RECORD can't push a record if there is no record to push...
so as you suggested no selection.

On Mon, 5 Nov 2018 13:51:18 -0800, Kirk Brooks via 4D_Tech wrote:
> Stack is full?
> The record is not selected?
> 
> I was trying to use PUSH & POP the other day for something. It caused me to
> re-read the docs about it and I found that over the years I'd forgotten the
> whole idea for these two commands is to allow you to PUSH the record you
> are currently using to allow you to do queries on the same table without
> having to save it first. They aren't there to allow editing multiple
> records in the same process because a process, at least in  have 1 current record at a time.

Yes I know that about Push and Pop

In this case I have a complicated set of inter relations (some as 
relational lines and some not) and in many cases trying to get related 
records loses the current starting record, so pushing and piping 
insures that I end up on the same starting record.

This is in a situation where I have :
* A storage unit, in side are 1 or more containers
* - Container (Type -S) - this is allowed to have (many) of either or 
both of 2 other types of containers, or end products
* -- Type B container - holds end products
* -- Type R container - holds only other containers, of Type B

There are 2 types of end products (End Product S and End Product I)


The interface allows drag n drop on list boxes to populate the various 
containers.
As well as printing the contents of the containers, at every level.

I was having issues after printing, then switching to a different 
page/listbox.

all of the above is probably TMI - but there it is  :)


Thanks again
 
> On Mon, Nov 5, 2018 at 1:46 PM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> I am getting this error, and i can not figure out why.
>> 
>> Thanks
>> 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
>> **
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 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
**

v13 - Why can a record NOT be Pushed?

2018-11-05 Thread Chip Scheide via 4D_Tech
I am getting this error, and i can not figure out why.

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

v13 (+?) - is there a way to "see" the stack?

2018-11-05 Thread Chip Scheide via 4D_Tech
Is there some way to determine if, and what record(s) are on the stack 
for either the database, or (better) a single table?

something like the following, whatever is required to do **Records on 
stack**:
Push ([table])
do stuff
Push ([table])
do more stuff

for($i;1;**Records on stack([table])**)
 Pop record([table])
end for

Thanks
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: v13 - UUID COLLISION!!! [observation]

2018-10-29 Thread Chip Scheide via 4D_Tech
according to Wikipedea:
the number of random version 4 UUIDs which need to be generated in 
order to have a 50% probability of at least one collision is 2.71 
quintillion,

 

This number is equivalent to generating 1 billion UUIDs per second for 
about 85 years, and a file containing this many UUIDs, at 16 bytes per 
UUID, would be about 45 exabytes, many times larger than the largest 
databases currently in existence, which are on the order of hundreds of 
petabytes.[17][18]

so... why couldn't I have gotten this duplication on a power ball ($720 
million) or mega millions ($1.7 Billion) ticket :p

Chip
On Mon, 29 Oct 2018 14:53:29 -0400, Chip Scheide via 4D_Tech wrote:
> UUID value ="E092AB501E1D41F5A5D15B56E835D2EE"
> this value appears to be duplicated in my database!
> 
> ideas? thoughts?
> 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
> **
---
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: v13 - UUID COLLISION!!!

2018-10-29 Thread Chip Scheide via 4D_Tech
no -

the new record is a related record added via a double click on a 
listbox.
The code being used has been in operation for years.
it works/worked else where.

I am working though trying to figure out what has happened.
4D is throwing an error about a duplicated (unique) value.

after checking the structure (to be sure there was not a field 
accidentally set to unique that shouldd not have been). I confirmed 
there are 2 unique fields in the table.
- Record_ID the table's relational key (longint, indexed, unique, 
mandatory)
- Journal_Key UUID, auto generated, unique, primary key, text

I verified the record_ID field is NOT duplicated.
I copied the UUID from the new record in the debugger, 
searched the table's journal_key for the UUID just copied from the 
debugger
-- it exists! --
with a different Record ID and different record data.

In addition, the new record is not saved (4D error) and even if it had 
been saved it would NOT be visible to another process, as the new 
record is being created inside a transaction (which is currently open).

Chip


On Mon, 29 Oct 2018 13:57:16 -0500, Stephen J. Orth wrote:
> Chip,
> 
> Did you duplicate a record?
> 
> 
> Steve
> 
> *
>   Stephen J. Orth
>   The Aquila Group, Inc. Office:  (608) 834-9213
>   P.O. Box 690   Mobile:  (608) 347-6447
>   Sun Prairie, WI 53590
> 
>   E-Mail:  s.o...@the-aquila-group.com
> *
> 
> 
> -Original Message-
> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Chip 
> Scheide via 4D_Tech
> Sent: Monday, October 29, 2018 1:53 PM
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Cc: Chip Scheide <4d_o...@pghrepository.org>
> Subject: v13 - UUID COLLISION!!!
> 
> UUID value ="E092AB501E1D41F5A5D15B56E835D2EE"
> this value appears to be duplicated in my database!
> 
> ideas? thoughts?
> 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
> **
> 
> 
---
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: v13 - UUID COLLISION!!!

2018-10-29 Thread Chip Scheide via 4D_Tech
yes - auto generate
No - not imported, nor exported.

Collision happened on saving a new record
Chip

On Mon, 29 Oct 2018 18:57:11 +, Dennis, Neil wrote:
>> UUID value ="E092AB501E1D41F5A5D15B56E835D2EE"
>> this value appears to be duplicated in my database!
> 
> Is the field set to auto generate?
> Was a record exported and imported?
> 
> 
> Neil
> 
> 
> 
> 
> 
> 
> --
> 
> Privacy Disclaimer: This message contains confidential information 
> and is intended only for the named addressee. If you are not the 
> named addressee you should not disseminate, distribute or copy this 
> email. Please delete this email from your system and notify the 
> sender immediately by replying to this email.  If you are not the 
> intended recipient you are notified that disclosing, copying, 
> distributing or taking any action in reliance on the contents of this 
> information is strictly prohibited.
> 
> The Alternative Investments division of UMB Fund Services provides a 
> full range of services to hedge funds, funds of funds and private 
> equity funds.  Any tax advice in this communication is not intended 
> to be used, and cannot be used, by a client or any other person or 
> entity for the purpose of (a) avoiding penalties that may be imposed 
> on any taxpayer or (b) promoting, marketing, or recommending to 
> another party any matter addressed herein.
---
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
**

v13 - UUID COLLISION!!!

2018-10-29 Thread Chip Scheide via 4D_Tech
UUID value ="E092AB501E1D41F5A5D15B56E835D2EE"
this value appears to be duplicated in my database!

ideas? thoughts?
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: Longing IDs or UUIDs as primary key?

2018-10-24 Thread Chip Scheide via 4D_Tech
how do you do this?


> In 4D list boxes, a column can be set up to show an ellipsis in the 
> middle of a string (instead of the end) when a column is too small. 
> This is perfect for UUID columns. Just make them wide enough to only 
> show the first and last 3 characters. Just as easy as a longint, 
> really.

Hell is other people 
 Jean-Paul Sartre
**
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: v13 - Why does this query not work? [resolved]

2018-10-24 Thread Chip Scheide via 4D_Tech
I do not know why...
but doing a simple query now works.

John,
all of the following queries (now) work.

: ($Selected_Search="has Inventory")
QUERY 
SELECTION([Bench_Protocols];[Bnchprot_LabInv_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID)

: ($Selected_Search="has Attached Files")
QUERY 
SELECTION([Bench_Protocols];[BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID)

: ($Selected_Search="Is Used by an Experiment")
QUERY 
SELECTION([Bench_Protocols];[Bnchprot_Exper_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID)


The structure for all of these queries is:
[Bench_Protocols] <--[BnchProt__Link]--> []

I believe that it is possible to query across as many relations as you 
want/have as long as there is a (drawn line) relational path between 
the 2 tables in the query.
ex:   Query([Bench_Protocols]; []Field=$SomeValue)

On Wed, 24 Oct 2018 07:55:51 -1000, JOHN BAUGHMAN via 4D_Tech wrote:
> Chip,
> 
>   I may be wrong but I don’t think you can query a table based on a 
> many table relation. I would…
> 
>   RELATE MANY SELECTION([BnchProt_File_Link]Bench_Protocol_ID)
>   RELATE ONE SELECTION( [BnchProt_File_Link];[Bench_Protocols] )
> 
> John 
> 
> 
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.com <mailto:john...@hawaii.rr.com>
> 
> 
>> On Oct 24, 2018, at 7:32 AM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Structure:
>> [Bench_Protocols] <- [BnchProt_File_Link] -> [Attached_Files]
>> 
>> QUERY SELECTION BY 
>> 
FORMULA([Bench_Protocols];([BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID))
>> 
>> I have tried:
>> QUERY SELECTION 
>> 
([Bench_Protocols];[BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID)
>> 
>> 
>> The relations are manual and I have tried adding
>> SET AUTOMATIC RELATIONS(True;True)
>> 
>> there are records in the linking table ([BnchProt_File_Link]) with IDs 
>> that match [Bench_Protocols] records, but nothing returns any records.
>> 
>> Ideas?
>> Thanks
>> 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
> **
---
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: v13 - Why does this query not work?

2018-10-24 Thread Chip Scheide via 4D_Tech
Doug,
Thanks

no compatibility setting - so it must already be on.
I realized that the auto relations should not come into play - but when 
things are not working, you try ... well... whatever.  :)

I know about query execution, but have never really looked into it.  I 
will.

On Wed, 24 Oct 2018 10:54:56 -0700, Douglas von Roeder wrote:
> Chip:
> 
> Check your settings in Database Settings/Compatability - check the query by
> formula uses SQL joins and you'll want to Execute QbF on Server, as well.
> :-)
> 
> I don't think that Auto relations comes into play.
> 
> Try creating the join yourself, a la:
> 
> QUERY BY
> FORMULA([Contacts];([Proposal_Contact_Link]ProposalID=$proposalID_T) &
> ([Contacts]ID=[Proposal_Contact_Link]ContactID))
> 
> Also, and I meant to give you a heads up on this the other day, it can be
> very helpful to see how 4D is running the query. I call this code before a
> query DESCRIBE QUERY EXECUTION(True) and call QRY_QueryPlanToClipboard
> after the query.
> 
> Code in QRY_QueryPlanToClipboard:
> 
> C_TEXT($plan_T;$path_T)
> 
> $plan_T:="Query Plan"+Char(13)+Get last query plan(Description in text
> format)
> 
> 
> $path_T:="Query Path"+Char(13)+Get last query path(Description in text
> format)
> 
> 
> SET TEXT TO PASTEBOARD($plan_T+Char(13)+Char(13)+$path_T)
> 
> 
> HTH.
> --
> Douglas von Roeder
> 949-336-2902
> 
> 
> On Wed, Oct 24, 2018 at 10:33 AM Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Structure:
>> [Bench_Protocols] <- [BnchProt_File_Link] -> [Attached_Files]
>> 
>> QUERY SELECTION BY
>> 
>> 
FORMULA([Bench_Protocols];([BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID))
>> 
>> I have tried:
>> QUERY SELECTION
>> 
>> 
([Bench_Protocols];[BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID)
>> 
>> 
>> The relations are manual and I have tried adding
>> SET AUTOMATIC RELATIONS(True;True)
>> 
>> there are records in the linking table ([BnchProt_File_Link]) with IDs
>> that match [Bench_Protocols] records, but nothing returns any records.
>> 
>> Ideas?
>> Thanks
>> 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
>> **
---
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
**

v13 - Why does this query not work?

2018-10-24 Thread Chip Scheide via 4D_Tech
Structure:
[Bench_Protocols] <- [BnchProt_File_Link] -> [Attached_Files]

QUERY SELECTION BY 
FORMULA([Bench_Protocols];([BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID))

I have tried:
QUERY SELECTION 
([Bench_Protocols];[BnchProt_File_Link]Bench_Protocol_ID=[Bench_Protocols]Bench_Protocol_ID)


The relations are manual and I have tried adding
SET AUTOMATIC RELATIONS(True;True)

there are records in the linking table ([BnchProt_File_Link]) with IDs 
that match [Bench_Protocols] records, but nothing returns any records.

Ideas?
Thanks
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: Longing IDs or UUIDs as primary key?

2018-10-24 Thread Chip Scheide via 4D_Tech
Kirk,

I am not suggesting using SS numbers, or anything the user can 
change/touch as a linking value.
a longint (or other sequential value [text] - like a license plate) 
generated for each new record for each table which is used explicitly 
for identifying the record and possibly linking relational data, as 
needed.

On Wed, 24 Oct 2018 09:59:07 -0700, Kirk Brooks via 4D_Tech wrote:
> Another way to look at this is in terms of separating the logical structure
> from the data. Using UUIDs compels you to think about the logical structure
> separately from the contents. That's a good thing. I agree it can be useful
> to have a unique serial number on some tables. But that doesn't mean it's a
> good idea to use it as a key. Social Security numbers are the perfect
> example of this.

I don't think the 2 fields vs 1 field is really an issue.
I do see what you are getting at though.

> Another instance is being able to identify records any place in the
> database by a single value. For instance, I have a table for recording
> notes users attach to records. The idea it to be able to attach a note to
> anything. If I'm using longints it takes two fields to identify the record,
> table # & id #. With a UUID I only need one.

Other points well taken.
---
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: Longing IDs or UUIDs as primary key?

2018-10-24 Thread Chip Scheide via 4D_Tech
I and Admin(s) may need to see/work with the relational key to attempt 
to determine why/if something is F-ed.

off the top of my head scenario:
invoice does not show expected line items.
-(for me) first step examine raw data to see if the 'missing' line 
item(s) exist.
 -- to do this you need to at least search the line item table for the 
Invoice ID
  --- invoice ID is longint (type 1234567) poof line items
  --- invoice ID is UUID (type UUID 17 times because : typos, TL;DR, 
transposition) finally line items (maybe)
   try search again (at least look at search dialog) to be sure 
UUID was typed correctly, and the location of line items was not a 
fluke where a typed UUID was in fact another UUID in use.

- proceed with determining if the line items found are what was 
expected.


On Wed, 24 Oct 2018 16:53:16 +, Dennis, Neil wrote:
> 
>> - Do I **really** want to type a UUID to try to follow/check on 
>> related records when something goes pear-shaped?
>> - Do I want my admin(s) to have to type a UUID to try to chase 
>> related records?
>> - Do I want to have to work with UUIDs, other then knowing that they 
>> exist and are inplace as requested/required?
> 
> Do I ever want to have a user ever know anything about or see a 
> primary or foreign key anyway 😊
> 
> Neil
> 
> 
> 
> 
> 
> 
> --
> 
> 
> 
> Privacy Disclaimer: This message contains confidential information 
> and is intended only for the named addressee. If you are not the 
> named addressee you should not disseminate, distribute or copy this 
> email. Please delete this email from your system and notify the 
> sender immediately by replying to this email.  If you are not the 
> intended recipient you are notified that disclosing, copying, 
> distributing or taking any action in reliance on the contents of this 
> information is strictly prohibited.
> 
> The Alternative Investments division of UMB Fund Services provides a 
> full range of services to hedge funds, funds of funds and private 
> equity funds.  Any tax advice in this communication is not intended 
> to be used, and cannot be used, by a client or any other person or 
> entity for the purpose of (a) avoiding penalties that may be imposed 
> on any taxpayer or (b) promoting, marketing, or recommending to 
> another party any matter addressed herein.
---
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: Longing IDs or UUIDs as primary key?

2018-10-24 Thread Chip Scheide via 4D_Tech
why not:
- Add UUID as needed.
- populate


Using Send/receive record
during synchronization

repeat for each record to import
- read the record to import
- verify the UUID of the imported record
 - if it exists 
   -- do whatever record merging you need
 - if it does not exist, assign a NEW longint ID (relational field(s)), 
this gives each record unique relational ID(s) in each database in 
which that data resides.
   -- assign these new relational ID(s) to the relational field(s) of 
other imported records

no need to redraw, no need to convert, no need to change existing 
working code.

On Wed, 24 Oct 2018 09:37:08 -0700, Kirk Brooks via 4D_Tech wrote:
> 
>  a) go through every table affected and add the UUID field
>  b) at the same time remove the old relations & draw in the new ones
>  c) write a conversion method(s) to loop through all affected records
>i) lookup the linked records based on the old longint field
>   ii) set the new UUID foreign key
>  d) update all the queries that relied on the old key fields
---
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: Longing IDs or UUIDs as primary key?

2018-10-24 Thread Chip Scheide via 4D_Tech
it is more of a situation of:
- Do I **really** want to type a UUID to try to follow/check on  
related records when something goes pear-shaped?
- Do I want my admin(s) to have to type a UUID to try to chase related 
records?
- Do I want to have to work with UUIDs, other then knowing that they 
exist and are inplace as requested/required?


On Wed, 24 Oct 2018 10:59:48 -0500, Keith Culotta via 4D_Tech wrote:
> RE: never use them to link between tables
> 
> Is using them to link between tables (establish 4D Relations, 
> correct?) a hazardous practice? 
> 
> Thanks,
> Keith - CDI
> 
>> On Oct 24, 2018, at 10:49 AM, Charles Miller via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Rudy
>> 
>> For me this always choose UUID for primary key and never use them to link
>> between tables. The overhead from space is not so great Andy I never want
>> to type in uuid to find related records etc
>> 
>> Regards
>> 
>> Chuck
>> 
>> On Wed, Oct 24, 2018 at 10:52 AM Two Way Communications via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>> 
>>> I have an application with a big database file ( + 60 GB), with 128
>>> tables. (4D v17)
>>> 
>>> All id fields and foreign keys are of type longint.
>>> 
>>> Now, for replication and sharing purposes, I would like to change the type
>>> to UID.
>>> 
>>> The process seems quite cumbersome: to start, I need to remove the
>>> ‘primary key’ flag from all the ID fields, then I need to add UID 
>>> fields to
>>> every table,
>>> change the foreign keys as well, and use apply formula to make sure the
>>> relations are intact. I am a bit worried that this will have a 
>>> major impact
>>> on the size of the data file.
>>> 
>>> Furthermore, I need to automate the whole process so the upgrade works
>>> flawlessly at the customers site.
>>> 
>>> Has anyone ever done this?
>>> Any tips?
>>> 
>>> Regards,
>>> 
>>> Rudy Mortier
>>> Two Way Communications bvba
>>> 
>>> 
> 
> **
> 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
**

Re: ORDA Entity From

2018-10-23 Thread Chip Scheide via 4D_Tech
can you wrap the call to create the entity, tracking the detail(s) you 
want to track as you create the entity?


On Tue, 23 Oct 2018 13:49:07 -0700, Douglas von Roeder via 4D_Tech 
wrote:
> Neil:
> 
> I asked, essentially, the same question yesterday and got no response.
> 
> Given that ORDA is a work in progress, perhaps it will be added to the
> language.
> 
> --
> Douglas von Roeder
> 949-336-2902
> 
> 
> On Tue, Oct 23, 2018 at 1:23 PM Dennis, Neil via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Is there a way to determine where an entity is from? In the debugger it
>> shows in the value "Entity () from ", but I can't fine a way to
>> get  using a method from code. Does such a method exist?
>> 
>> Neil
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> 
>> Privacy Disclaimer: This message contains confidential information and is
>> intended only for the named addressee. If you are not the named addressee
>> you should not disseminate, distribute or copy this email. Please delete
>> this email from your system and notify the sender immediately by replying
>> to this email.  If you are not the intended recipient you are notified that
>> disclosing, copying, distributing or taking any action in reliance on the
>> contents of this information is strictly prohibited.
>> 
>> The Alternative Investments division of UMB Fund Services provides a full
>> range of services to hedge funds, funds of funds and private equity funds.
>> Any tax advice in this communication is not intended to be used, and cannot
>> be used, by a client or any other person or entity for the purpose of (a)
>> avoiding penalties that may be imposed on any taxpayer or (b) promoting,
>> marketing, or recommending to another party any matter addressed herein.
>> **
>> 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
> **
---
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: Shared Object - NOT!

2018-10-21 Thread Chip Scheide via 4D_Tech
Not to mention how much old/legacy code would likely break

> 
> the language might be more consistent if 4D got rid of all native 
> scalar types and treating everything as an object,
> but there is a performance advantage (memory footprint and speed) in 
> having scalar native types.

Hell is other people 
 Jean-Paul Sartre
**
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: Scope of entity selection

2018-10-18 Thread Chip Scheide via 4D_Tech
Christian,
I *think* that the intent was to pass an ordered collection from 
process to process.
i.e. 
- process 1 order the data in whatever manner is desired.
- pass the collection from process 1 to process 2
- process 2 receive the ordered collection and do stuff with it, in the 
order in which it was passed -- without -- having to know the specifics 
of the ordering.

All of that said... and me with NO use of collections or objects (I'm 
still in v13)
could you:
- create your collection
- add a property to the collection which defines the desired ordering
- pass collection to secondary process
- use the collection's 'order' property to order the collection as 
desired.

it does not 'pass an ordered collection', but it comes close; and would 
allow a generic routine on the receiving end to execute the ordering.

Chip

On Thu, 18 Oct 2018 14:30:43 +0200, Christian Sakowski via 4D_Tech 
wrote:
> 
> I create an ordered selection from a collection by doing this:
> 
> ARRAY LONGINT($ids;0)
> COLLECTION TO ARRAY($collection;$ids)
> 
> QUERY WITH ARRAY([table]ID;$ids)
> ORDER BY FORMULA([table];Find in array($ids;[table]ID))
> 
---
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: Help->v11 to v17 Upgrade or New?

2018-10-17 Thread Chip Scheide via 4D_Tech
At some point, v18(?), 4D will completely drop support for subtables.

as I understand:
a simple conversion to the current version will allow all the functions 
of existing subtables to continue working -- without -- any change to 
code.
As noted by Tim Penner, but typo-ed :), this applies to a SINGLE level 
of sub-tables.

table OK
  sub-table OK
   sub-sub-table ... sub--table FAIL

There are changes to the structure during this conversion.
The subtable becomes a normal 4D table, with a new "relation" created 
between the previous subtable and it parent. This "special Relation" 
allows the sub-table commands to continue working.

If you delete/change this special relation all subtable functionality 
for that relationship is gone and can not be recovered (without 
reconverting the database).



On Wed, 17 Oct 2018 14:45:52 -0500, Robert ListMail via 4D_Tech wrote:
> I have an old v11 database running on Windows that’s not particularly 
> well-designed and where there are more than a few subtables to deal 
> with. Assuming that there is no additional budget for writing a new 
> clean app, would you likely upgrade or re-write in v17 with the old 
> v11 structure as guide?  I’m concerned that the upgrade path will be 
> difficult because of the subtables and that by the time you deal with 
> all of the legacy junk not this database from the early 90s you could 
> have created something fresh and new. How might you approach this?
> 
> Also, the client originally said the new database would not have to 
> migrate data forward from the old system and now they are wanting to 
> have the data too.
> 
> Thanks,
> 
> Robert
> 
> **
> 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
**

[off] Holy Geez! Boston Dynamics - Spot

2018-10-16 Thread Chip Scheide via 4D_Tech
~15 min video
https://www.youtube.com/watch?v=AO4In7d6X-c

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: v13 - Why would a query fail to change current reocrd?

2018-10-16 Thread Chip Scheide via 4D_Tech
Pat,
Thanks!

this occurred to me last night, after I had gone home - of course  :)

And the answer is --YES-- there was/is a set query destination command.
I have it wrapped as part of a component for set management (Setutl).  
It was silently failing :(

Chip
On Tue, 16 Oct 2018 10:04:25 +0100, Pat Bensky via 4D_Tech wrote:
> Chip,
> You haven't got a SET QUERY DESTINATION somewhere have you?
> Pat
> 
> On Mon, 15 Oct 2018 at 23:24, Chip Scheide via 4D_Tech 
> <4d_tech@lists.4d.com>
> wrote:
> 
>> Background
>> - I use 2 tables to manage listboxes.
>> - I am on an entry form, which includes a selection listbox.
>> - I am trying to display, in a dialog (Mac so a type 34 sheet window),
>> a different listbox (array) to allow the user to make a selection.
>> 
>> before the below code executes, the current selection of
>> [listbox_table] reflects the definition for selection listbox
>> displaying on the current entry form (ID 1327).
>> 
>> I make this call : arylstbx_Setup ("lb_Display_Choices";"Choose_Item")
>> In the above call there are these lines of code:
>>   //gets base info for listbox description
>> QUERY([List_Box_Table];[List_Box_Table]Listbox_Name=$Listbox_Name;*)
>> QUERY([List_Box_Table]; & ;[List_Box_Table]Primary_Use=$Primary_Use)
>> 
>> $Listbox_Name = $1 = lb_Display_Choices
>> Primary_Use = $2 = Choose_Item
>> 
>> Results:
>> - after the Query, the current record has not changed!
>> - If I issue an Unload record (in debugger) before the query, no record
>> is loaded
>> - in 'user' environment' the same query locates, and loads a different
>> record (ID 1505).
>> 
>> State:
>> in transaction [Listbox_Table] is read only & Locked
>> all actions are occurring inside the same transaction.
>> 
>> My thoughts and attempts to resolve:
>> - entry form listbox was doing some sort of background query on
>> [listbox_table] during on display detail, so I set the listbox
>> invisible before opening the type 34 dialog window. -- no effect.
>> - I have put traces in the code for the listbox and the form  to see if
>> something is running and changing the selection of the [listbox_table]
>> table - noting is running.
>> - all of the code for the dialog is 'linear' to the entry form, i.e.
>> the dialog is opened inside the same process and same transaction so -
>> conceptually - no other code should be running to change the selection
>> in the [listbox_table]
>> - relations - only one relation, completely manual.
>> 
>> and ideas?
>> sorry for wall of text
>> 
>> 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
>> **
> 
> 
> 
> -- 
> *
> 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
**

RE: how do I turn it into a component or a database

2018-10-16 Thread Chip Scheide via 4D_Tech
I just DLed the two github libraries
they are BOTH from v17r3

so the versioning/feature set maybe important

On Tue, 16 Oct 2018 09:30:54 +, Epperlein, Lutz (agendo) via 
4D_Tech wrote:
> @Pat: No, this is the wrong approach. Did you looked at the github 
> repositories? 
> The sources are contained in text files and the data of forms in json 
> files. 
> The only way I'm aware of is to import the methods manually or use a 
> component like https://github.com/elutz/vc-framework-v15. I don't 
> know how to import the forms. It seems this points to a new feature 
> in a future version of 4D.
> 
> Regards
> Lutz
> 
> 
> --  
> Lutz Epperlein  
> --
> Agendo Gesellschaft für politische Planung mbH
> Köpenicker Str. 9
> 10997 Berlin
> http://www.agendo.de/
> --
> 
> 
> 
> 
> 
>> -Original Message-
>> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Pat 
>> Bensky via
>> 4D_Tech
>> Subject: Re: how do I turn it into a component or a database
>> 
>> Axel,
>> 
>> See:
>> 
http://doc.4d.com/4Dv17R3/4D/17-R3/Compiled-structure-page.300-3961299.en.html
>> 
> **
> 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
**

v13 - Why would a query fail to change current reocrd?

2018-10-15 Thread Chip Scheide via 4D_Tech
Background
- I use 2 tables to manage listboxes.
- I am on an entry form, which includes a selection listbox.
- I am trying to display, in a dialog (Mac so a type 34 sheet window), 
a different listbox (array) to allow the user to make a selection.

before the below code executes, the current selection of 
[listbox_table] reflects the definition for selection listbox 
displaying on the current entry form (ID 1327).

I make this call : arylstbx_Setup ("lb_Display_Choices";"Choose_Item")
In the above call there are these lines of code:
  //gets base info for listbox description
QUERY([List_Box_Table];[List_Box_Table]Listbox_Name=$Listbox_Name;*)
QUERY([List_Box_Table]; & ;[List_Box_Table]Primary_Use=$Primary_Use)

$Listbox_Name = $1 = lb_Display_Choices
Primary_Use = $2 = Choose_Item

Results:
- after the Query, the current record has not changed!
- If I issue an Unload record (in debugger) before the query, no record 
is loaded
- in 'user' environment' the same query locates, and loads a different 
record (ID 1505).

State:
in transaction [Listbox_Table] is read only & Locked
all actions are occurring inside the same transaction.

My thoughts and attempts to resolve:
- entry form listbox was doing some sort of background query on 
[listbox_table] during on display detail, so I set the listbox 
invisible before opening the type 34 dialog window. -- no effect.
- I have put traces in the code for the listbox and the form  to see if 
something is running and changing the selection of the [listbox_table] 
table - noting is running.
- all of the code for the dialog is 'linear' to the entry form, i.e. 
the dialog is opened inside the same process and same transaction so - 
conceptually - no other code should be running to change the selection 
in the [listbox_table]
- relations - only one relation, completely manual.

and ideas?
sorry for wall of text

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: Resetting the table sequence number

2018-10-15 Thread Chip Scheide via 4D_Tech
2 things:
1 - why not
all records
order by([table];[table]ID_Field;<)
$New_Sequence_Value:=[table]ID_Field+1
then you are sure to exceed the last assigned value.

2 - try assigning **Table*($iTableNumber)* to a local variable, and 
then dereference,
sometime 4D does not like to dereference equations as a parameter to a 
command.

Chip

On Mon, 15 Oct 2018 17:56:58 +0100, Pat Bensky via 4D_Tech wrote:
> I have a method that creates record numbers using the Sequence number. I'm
> running into a situation where I am getting duplicate record numbers for
> some reason. So I added some code to check and - supposedly - fix it by
> resetting the table sequence number, but it doesn't seem to work.
> 
> This is what I'm doing:
> 
> $Sequence:=*Sequence number*(*Table*($iTableNumber)->)
> 
> *If* (*Find in field*(*$1*->;$Sequence)>-1) // $1 is a pointer to the
> record number field
> 
> *While* (*Find in field*(*$1*->;$Sequence)>-1)
> 
> $Sequence:=$Sequence+1
> 
> *End while*
> 
> *SET DATABASE PARAMETER*(*Table*($iTableNumber)->;Table sequence number;
> $Sequence)
> 
> *End if*
> 
> *$1*->:=*Sequence number*(*Table*($iTableNumber)->)
> 
> Suppose $Sequence = 4496 when we get to the SET DATABASE PARAMETER line.
> 
> Then the next call to *Sequence number* should return 4497, right? But it
> doesn't. It returns 4495.
> 
> 
> Any suggestions as to what I'm doing wrong here?
> 
> Note- this is not happening inside a transaction.
> 
> 
> 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
**

Re: v13 - Change Button Shortcut

2018-10-15 Thread Chip Scheide via 4D_Tech

Thanks!

> 
>> Le 12 oct. 2018 à 22:47, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> Is there a way to globally change the key shortcut assigned to a button 
>> across multiple forms.
>> 
>> I inadvertently use Command (control) + Esc as short cut rather then 
>> just Esc for form cancel buttons...
>> I just found this.
>> I would prefer NOT to have to manually go through every entry and 
>> listing form to reset this value.
>> The buttons are invisible, are all named the same, and are ubiquitous 
>> on all of my entry and listing forms.
> 
> object set shortcut (*;"allNamedTheSame"; Shortcut with Carriage 
> Return)  ;-)
> 
> I noticed this works better with all keyboards than hardcoded setting 
> (legacy dialog)

Hell is other people 
 Jean-Paul Sartre
**
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
**

v13 - Change Button Shortcut

2018-10-12 Thread Chip Scheide via 4D_Tech
Is there a way to globally change the key shortcut assigned to a button 
across multiple forms.

I inadvertently use Command (control) + Esc as short cut rather then 
just Esc for form cancel buttons...
I just found this.
I would prefer NOT to have to manually go through every entry and 
listing form to reset this value.
The buttons are invisible, are all named the same, and are ubiquitous 
on all of my entry and listing forms.

Thanks
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: Defining and documenting Objects

2018-10-12 Thread Chip Scheide via 4D_Tech
David,
Any chance you might make this system available to the rest of us poor 
and unworthy?
as a component? for a fee?

Chip

On Fri, 12 Oct 2018 15:35:03 +1100, David Adams via 4D_Tech wrote:
> 
> Anyway, with all of that stuff in place, you then can build your own type
> declaration and validation system. The validation is done using *JSON
> Validate* and then a custom checker that reads any extended attributes
> you've designed
---
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: Defining and documenting Objects

2018-10-12 Thread Chip Scheide via 4D_Tech
I recently went through my code and removed IP vars, to future proof my 
code for pre-emptive possibilities. I went from >500, including sets, 
to 1 which is a set.

Have not done Process vars, still in v13 so

Chip

On Thu, 11 Oct 2018 18:09:23 -0600, Jody Bevan via 4D_Tech wrote:
> 
> Our goal was to have as few of global, and interprocess variables as 
> possible. We got a long way in before we needed more than a few of 
> each. Yes, one of those is for the hiding/showing of listbox rows.
---
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: What causes a record to be Locked but Locked By has no info?

2018-10-11 Thread Chip Scheide via 4D_Tech
if the record is new - other processes can not see it.
if the record existed before the transaction, then it should show what 
process/user/etc has hold of it.

beginning (I think) in v13 - if the table is read only, a selected 
record shows as locked.
Chip 
On Thu, 11 Oct 2018 14:17:45 -0400, Randy Jaynes via 4D_Tech wrote:
> My first thought is transaction in another process somewhere.
> 
> Randy
> 
> --
> Randy Jaynes
> Senior Programmer and Customer Support
> 
> http://printpoint.com ∙ 845.687.3741 ∙ PrintPoint, Inc ∙ 57 Ludlow 
> Lane ∙ Palisades, NY 10964 
> Please send all email contacts to supp...@printpoint.com 
> 
> 
> 
> 
> 
>> On Oct 11, 2018, at 1:48 PM, Kirk Brooks via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I have a method that tests if a record is locked and if it is attempts to
>> figure out by whom:
>> 
>> $text:="["+Table name($1)+"] "
>> 
>> LOCKED BY($1->;$process;$4Duser;$machineName;$p_Name)
>> PROCESS
>> 
PROPERTIES($process;$processName;$procState;$procTime;$procVisible;$uniqueID;$origin)
>> 
>> Case of
>> : ($process=-1)
>> 
>> $text:=$text+"The record has been deleted."
>> 
>> : ($process=0)
>> 
>> $text:=$text+" is locked but there is no information available about who
>> has it."
>> 
>> Else
>> 
>> $text:=$text+\
>> 
>> "Record number "+String(Record number($1->))+" is locked.\r"+\
>> 
>> "It's open by "+$4dUser+".\r\r"+\
>> 
>> "  Process : "+$p_Name+"\r"+\
>> 
>> "  Machine : "+$machineName+"\r\r"+("-"*20)+"\r"+\
>> 
>> "   Proc # : "+String($process)+"\r"+\
>> 
>> " Alt name : "+$processName
>> 
>> End case
>> 
>> 
>> I've been using this for years. Recently I noticed (but it may have been
>> going on for a while) records will return true for locked but LOCKED BY
>> doesn't have any process associated with it. The only way I've been able to
>> recreate this is to open a record in User Mode and attempt to load the
>> record from another process. This works as expected. Then if I close the
>> record in User and click off of it to deselect attempting to load from
>> another process shows the record locked but no info.
>> 
>> It also occurs other times though I haven't been able to replicate it.
>> Regardless, what to do?
>> 
>> This is v15 running on Mac Mojave so there is all sorts of possibilities
>> for weirdness there. Wondering if anyone else has come across this?
>> 
>> -- 
>> Kirk Brooks
>> San Francisco, CA
>> ===
>> 
>> *We go vote - they go home*
>> **
>> 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
> **
---
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: What causes a record to be Locked but Locked By has no info?

2018-10-11 Thread Chip Scheide via 4D_Tech
Read only

On Thu, 11 Oct 2018 10:48:12 -0700, Kirk Brooks via 4D_Tech wrote:
> I have a method that tests if a record is locked and if it is attempts to
> figure out by whom:
> 
> $text:="["+Table name($1)+"] "
> 
> LOCKED BY($1->;$process;$4Duser;$machineName;$p_Name)
> PROCESS
> 
PROPERTIES($process;$processName;$procState;$procTime;$procVisible;$uniqueID;$origin)
> 
> Case of
> : ($process=-1)
> 
> $text:=$text+"The record has been deleted."
> 
> : ($process=0)
> 
> $text:=$text+" is locked but there is no information available about who
> has it."
> 
> Else
> 
> $text:=$text+\
> 
> "Record number "+String(Record number($1->))+" is locked.\r"+\
> 
> "It's open by "+$4dUser+".\r\r"+\
> 
> "  Process : "+$p_Name+"\r"+\
> 
> "  Machine : "+$machineName+"\r\r"+("-"*20)+"\r"+\
> 
> "   Proc # : "+String($process)+"\r"+\
> 
> " Alt name : "+$processName
> 
> End case
> 
> 
> I've been using this for years. Recently I noticed (but it may have been
> going on for a while) records will return true for locked but LOCKED BY
> doesn't have any process associated with it. The only way I've been able to
> recreate this is to open a record in User Mode and attempt to load the
> record from another process. This works as expected. Then if I close the
> record in User and click off of it to deselect attempting to load from
> another process shows the record locked but no info.
> 
> It also occurs other times though I haven't been able to replicate it.
> Regardless, what to do?
> 
> This is v15 running on Mac Mojave so there is all sorts of possibilities
> for weirdness there. Wondering if anyone else has come across this?
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 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
**

v13 - No Logiin

2018-10-11 Thread Chip Scheide via 4D_Tech
if I use the Commands Edit Access (as an admin), or access the Users or 
User Groups from the design environment there ARE users.

All users, including the designer & admin, have passwords.
Database settings are set to : No default user, display user list in 
password dialog, user list alphabetically sorted

Change Current user, will open the user password dialog.
Edit Access will open, in application environment, the user editor

BUT - NO - User login on start of the program.

I have repaired both the structure and the datafile - no difference.
Any Ideas??

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: List Box Font Color Expression, how?

2018-10-11 Thread Chip Scheide via 4D_Tech
John,
the property fires during On display detail (v13)
 in the listbox property: Row Font Color enter a method which executes 
your conditional(s) and returns an RGB color value (longint)

Chip

On Wed, 10 Oct 2018 15:43:49 -1000, JOHN BAUGHMAN via 4D_Tech wrote:
> In a Selection based list box how do you set a row font color based 
> on a condition such as if records in a related many table exist or 
> not. I would like to set the font color for the row to red if the 
> related many table has records and black if it does not.
> 
> I see that a method entered in Font Color Expression only fires On Load.
> 
> Seems like I have figure this out before but am stumped today.
> 
> Thanks,
> 
> John
> 
> 
> 
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.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
> **
---
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: Pictures Outside Datafile - Calculate Path

2018-10-10 Thread Chip Scheide via 4D_Tech
any incremental backup software will note when the files were last 
backed up and skip those that have not changed since the last backup

as to the deleted record issue, if deletions are allowed, the process 
of deleting a record which is (or possibly is) associated with an 
external file (picture or otherwise) should locate and delete the 
external file(s) when the record is deleted.  referencing back to the 
backup, once the file has been backed up, it should not be an issue, if 
it is not deleted with it's parent record, as it should be skipped 
during any subsequent incremental backup.

Chip

 
On Thu, 4 Oct 2018 19:23:04 -0400, Illustration House via 4D_Tech wrote:
> 
> Within that folder, other folders are created as needed that hold the 
> picture files, which are named with the Table and Field and record 
> numbers. You can retrieve these external to 4D, but this is not the 
> handiest system otherwise, and you should beware that this makes 
> backup schemes more complicated as there is no way to determine when 
> the pictures were placed into the folders, and backups may contain 
> images whose records have since been deleted.
---
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
**

<    1   2   3   4   5   6   7   8   9   10   >