Re: 4D v17.1HF1 to v17.2HF1

2019-08-13 Thread Tim Nevels via 4D_Tech
On Aug 13, 2019, at 8:36 PM, Keith Goebel wrote:

> Hi all.
> We are using Win 4D v17.1HF1 and would like to upgrade to v17.2HF1 but 
> haven’t the resources at the moment to test everything to see if there are 
> any new “features" introduced since v17.1HF1.
> I would sure like to make the upgrade as there are a lot of handy bug fixes 
> between the 2 versions.
> So, if anyone has made that upgrade, have you noticed any new “gotchas”?

I did a v17.0HF3 to v17.2HF1 upgrade a few weeks ago and have not had any 
problems reported so far. 

v17.2HF1 fixed a problem where the 4D Server Administration window would often 
not show the correct number of connected users if you are using the SSO feature 
and the new network layer. 

Tim

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

Re: save listbox

2019-08-13 Thread JOHN BAUGHMAN via 4D_Tech
Responded earlier but don’t think my post made it to the NUG…

Store the arrays into an object, either a 4D object or ObjectTools object, then 
save the object to field or file.

I have a couple of methods that do just that, either native or OT. I will be 
happy to share them with you if you contact me directly. 


Here are the calls to save and retrieve the arrays  using my native object 
method…

//Save the arrays to a field
//assuming this thee arrays aFiles, aDistrict, and aFilesImported exist 
in the listbox.
oFiles:=New object
OBSetGetVariables_Jut 
("Set";->oFiles;"aFiles";"aDistrict";"aFilesImported")
GetSaveConstants ("load")
[_Constants]Project_Imports:=oFiles
GetSaveConstants ("Save”)   

//Retrieve the arrays from the field
ARRAY TEXT(aFiles;0)
ARRAY TEXT(aDistrict;0)
ARRAY BOOLEAN(aFilesImported;0)
oFiles:=[_Constants]Project_Imports 
OBSetGetVariables_Jut 
("Get";->oFiles;"aFiles";"aDistrict";"aFilesImported”)

Here are the calls to save and retrieve the arrays usingmy ObjectTools method…

/Save the arrays to a field
C_BLOB($blob)   
$otObject:=OTPutGetVariables_Jut ("New")
OTPutGetVariables_Jut 
("Put";$otObject;"aFiles";"aDistrict";"aFilesImported")
OT ObjectToBLOB ($otObject;$blob)
[_Constants]Project_Imports:=$blob
OT Clear ($otObject)

//Retrieve the arrays from the field
ARRAY TEXT(aFiles;0)
ARRAY TEXT(aDistrict;0)
ARRAY BOOLEAN(aFilesImported;0)
$otObject:=OTPutGetVariables_Jut ("New")
$blob:=[_Constants]Project_Imports
$otObject:=OT BLOBToObject ($blob)
OTPutGetVariables_Jut 
("Get";$otObject;"aFiles";"aDistrict";"aFilesImported")
OT Clear ($Object)

John


John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com

> On Aug 13, 2019, at 11:29 AM, Peter Mew via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi
> Does anyone have a routine, component, plugin, or pointer to the right
> direction, that will save the contents of an array based listbox, so that
> the data can be restored at a later date
> thanks
> -pm
> 4d v13
> **
> 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
**

Re: Read Only Mode for Structure Editor

2019-08-13 Thread Chip Scheide via 4D_Tech
simple one:
locate the structure file in the OS
on Mac "get Info' tick the 'locked' check box
on Windows, right-click -> Properties set the Read Only bit

alternatively -
copy and open the copy

Internally - I do not know of any way -- that does not mean there is not one  :)

maybe export the structure, on start up ask to load it?

Chip

> Is there a read only mode for the 4D Structure Editor? I find it very 
> easy to inadvertently change things while browsing or when moving 
> tables around. I seem to recall it was possible to lock the editor in 
> the past, but I may be dreaming.
> 
> Tom Benedict
> **
> 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: ORDA (Why does query fail to find zero uuid value, i.e ("0"*32))

2019-08-13 Thread Kirk Brooks via 4D_Tech
Jeremy,
Try searching the UUID fields for:  "20202020202020202020202020202020"

I got that here:  https://kb.4d.com/assetid=77576

On Tue, Aug 13, 2019 at 3:46 PM Jeremy French via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Give the following
>
> Table with:
> 1) primary key "key_uuid"
> 2) another field named "some_key_uuid"
> 3) 20-records
> 4) 12 of 20 have value assigned to "some_key_uuid"
> 5) 8 of 20 have no value assigned to "Some_key_uuid". Field value is
> 32-zeroes
>
> Code to locate the 8-records whose "some_key_uuid" contains 32-zeroes:
>
> 
> C_OBJECT($not_assigned1_eso)
> C_OBJECT($not_assigned2_eso)
> C_TEXT($key_t)
>
> $not_assigned1_eso:=ds[Table name(->[test])].query(Field
> name(->[test]some_uuid_key)+" = :1";String(32*"0"))
>
> $key_t:=(32*"0")
> $not_assigned2_eso:=ds.test.query("some_uuid_key = :1";$key_t)
>
> QUERY([test];[test]some_uuid_key=(32*"0"))
> 
>
> Why does ORDA **fail** to locate the entities with 32-zeroes in
> "some_key_uuid", but legacy 4D **does** locate the 8-records?
>
> Here's what I see in the debugger:
>
> https://i.postimg.cc/Pfy88KhZ/p01-orda-vs-legacy-query.png
>
> **
> 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
===

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

*Wittgenstein and the Computer *
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

ORDA (Why does query fail to find zero uuid value, i.e ("0"*32))

2019-08-13 Thread Jeremy French via 4D_Tech
Give the following

Table with:
1) primary key "key_uuid"
2) another field named "some_key_uuid"
3) 20-records
4) 12 of 20 have value assigned to "some_key_uuid"
5) 8 of 20 have no value assigned to "Some_key_uuid". Field value is 32-zeroes

Code to locate the 8-records whose "some_key_uuid" contains 32-zeroes:


C_OBJECT($not_assigned1_eso)
C_OBJECT($not_assigned2_eso)
C_TEXT($key_t)

$not_assigned1_eso:=ds[Table name(->[test])].query(Field 
name(->[test]some_uuid_key)+" = :1";String(32*"0"))

$key_t:=(32*"0")
$not_assigned2_eso:=ds.test.query("some_uuid_key = :1";$key_t)

QUERY([test];[test]some_uuid_key=(32*"0"))


Why does ORDA **fail** to locate the entities with 32-zeroes in 
"some_key_uuid", but legacy 4D **does** locate the 8-records?

Here's what I see in the debugger:

https://i.postimg.cc/Pfy88KhZ/p01-orda-vs-legacy-query.png

**
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: save listbox

2019-08-13 Thread Charles Miller via 4D_Tech
You are better of creating CSV files so you can handle carriage returns
etc. there are a few tech notes on the subject

Regards
Chuck
On Tue, Aug 13, 2019 at 6:30 PM Adam Bevan via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Chips solution probably the quickest.
> I ended up writing to a tab deliminated text file, so I could load it up
> into a spreadsheet.
>
> $vH_FileRef:=Create document($vT_FilePath)
> LISTBOX GET
>
> ARRAYS(*;$vT_ListboxName;$aT_ColumnNames;$aT_HeaderNames;$aptr_ColumnVars;$aptr_HeaderVars;$aB_ColVisible;$aL_ColStyle)
>
> $ vL_rCount:=Size of array($ aptr_ColumnVars{1}->)
> For($vL_rNum;1;$vL_rCount)
> CLEAR VARIABLE($vT_TextToWrite)
>
> $vL_Count:=$aT_ColumnNames
> for($vL_cNum;1;$vL_cCount)
> if(length($vT_TextToWrite)#0)
> $vT_TextToWrite:=$ vT_TextToWrite +Char(tab)
> end if
> Case of
> :(Type($vptr_Column->{$vL_cNum})=Is Text)
> $vT_TextToWrite:=$vT_TextToWrite+$vptr_Column->{$vL_cNum}
>
> : (Type($vptr_Column->{$vL_Num})=Is date)
> $vT_TextToWrite:=$vT_TextToWrite+String(Year
> of($vptr_Column->{$vL_Num}))+"-"+String(Month
> of($vptr_Column->{$vL_Num}))+"-"+String(Day of($vptr_Column->{$vL_Num}))
>
> :(Type($vptr_Column->{$vL_cNum})=Is Time)
> $vT_TextToWrite:=$vT_TextToWrite+String($vptr_Column->{$vL_cNum};HH MM SS)
>
> :(Type($vptr_Column->{$vL_cNum})=Is Longint)
> $vT_TextToWrite:=$vT_TextToWrite+String($vptr_Column->{$vL_Num})
>
> else   // unsupported array types
> // don't write to text file.
> end case
> end for   // each column
>
> $vH_FileRef:=Append document($vT_FilePath)
> SEND PACKET($vH_FileRef;$vT_TextToWrite)
> end for   // each row
>
> CLOSE DOCUMENT($vH_FileRef)
>
> Adam Bevan
> Developer & CEO, Argus Productions Inc.
> 
>
>
> On Tue, 13 Aug 2019 at 15:29, Peter Mew via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
>
> > Hi
> > Does anyone have a routine, component, plugin, or pointer to the right
> > direction, that will save the contents of an array based listbox, so that
> > the data can be restored at a later date
> > thanks
> > -pm
> > 4d v13
> > **
> > 4D Internet Users Group (4D iNUG)
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  https://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption from
disclosure as to this communication.
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: save listbox

2019-08-13 Thread Adam Bevan via 4D_Tech
Chips solution probably the quickest.
I ended up writing to a tab deliminated text file, so I could load it up
into a spreadsheet.

$vH_FileRef:=Create document($vT_FilePath)
LISTBOX GET
ARRAYS(*;$vT_ListboxName;$aT_ColumnNames;$aT_HeaderNames;$aptr_ColumnVars;$aptr_HeaderVars;$aB_ColVisible;$aL_ColStyle)

$ vL_rCount:=Size of array($ aptr_ColumnVars{1}->)
For($vL_rNum;1;$vL_rCount)
CLEAR VARIABLE($vT_TextToWrite)

$vL_Count:=$aT_ColumnNames
for($vL_cNum;1;$vL_cCount)
if(length($vT_TextToWrite)#0)
$vT_TextToWrite:=$ vT_TextToWrite +Char(tab)
end if
Case of
:(Type($vptr_Column->{$vL_cNum})=Is Text)
$vT_TextToWrite:=$vT_TextToWrite+$vptr_Column->{$vL_cNum}

: (Type($vptr_Column->{$vL_Num})=Is date)
$vT_TextToWrite:=$vT_TextToWrite+String(Year
of($vptr_Column->{$vL_Num}))+"-"+String(Month
of($vptr_Column->{$vL_Num}))+"-"+String(Day of($vptr_Column->{$vL_Num}))

:(Type($vptr_Column->{$vL_cNum})=Is Time)
$vT_TextToWrite:=$vT_TextToWrite+String($vptr_Column->{$vL_cNum};HH MM SS)

:(Type($vptr_Column->{$vL_cNum})=Is Longint)
$vT_TextToWrite:=$vT_TextToWrite+String($vptr_Column->{$vL_Num})

else   // unsupported array types
// don't write to text file.
end case
end for   // each column

$vH_FileRef:=Append document($vT_FilePath)
SEND PACKET($vH_FileRef;$vT_TextToWrite)
end for   // each row

CLOSE DOCUMENT($vH_FileRef)

Adam Bevan
Developer & CEO, Argus Productions Inc.



On Tue, 13 Aug 2019 at 15:29, Peter Mew via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Hi
> Does anyone have a routine, component, plugin, or pointer to the right
> direction, that will save the contents of an array based listbox, so that
> the data can be restored at a later date
> thanks
> -pm
> 4d v13
> **
> 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
**

Read Only Mode for Structure Editor

2019-08-13 Thread Tom Benedict via 4D_Tech
Is there a read only mode for the 4D Structure Editor? I find it very easy to 
inadvertently change things while browsing or when moving tables around. I seem 
to recall it was possible to lock the editor in the past, but I may be dreaming.

Tom Benedict
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Drag n drop (between processes)

2019-08-13 Thread Chip Scheide via 4D_Tech
This is a problem is of my own making, as the code for drag_n_drop was 
moved from the host system to a component. As a result in the case of 2 
or more allowed source tables, a process variable which contained a 
pointer to the dropped record's source table was no longer accessible.


right now the code looks like this:

In the host
:(On Begin Drag Over)
  Drag_n_Drop_Begin("Source_set";->[Source_Table])
  // Source set is most often the selection set of a listbox
  // source table is most often the source table for the listbox

:(On Drag Over)
  $0:=Drag_n_Drop_Verify(Form Event;Allowed_to_Drop(_One or 
_Many);->[allowed_table1_1...->[allowed_table_N]
  // allows or fails drag over & drop

:(On Drop)
  Drag_n_Drop_Verify(Form Event;Allowed_to_Drop(_One or 
_Many);->[allowed_table1_1...->[allowed_table_N]
  // Places dragged record(s) into current selection of allowed_Table


the Drag_n_Drop methods are all in a component.
Drag_n_Drop works as follows:
- Drag_n_Drop_Begin -- an IP set is created which holds the record(s) 
being dragged.
- On Drag over, the table to which the set belongs** is compared 
against the the allowed source table(s), and a long int is returned 
allowing (0) or dis-allowing (-1) the drag over/Drop action.
- On Drop the IP set is used & cleared, and the dropped record(s) are 
left in the current selection.

** I can do this due to code Ive written (is available as the component 
'Setutl') which allows me to ask the question:
To which table does a specified set belong?

All of this works very well, when there is only 1 source table allowed. 
As I have recently found, this breaks down when there are 2 or more 
source tables allowed, as, Outside of the component, I do not know 
which of the allowed tables the drag n drop belongs too.

After reading through the various replies, the simplest solution is to 
return a pointer to source table of the drag n drop, or Nil so my new 
code will look like this:

:(On Drag Over)
  $0:=Drag_n_Drop_Verify(Allowed_to_Drop(_One or 
_Many);->[allowed_table1_1...->[allowed_table_N])
  // allows or fails drag over & drop

:(On Drop)
  $Source_Table:=Drag_n_Drop_Process
  if (Not(Nil($Source_Table)))
// do stuff



On Mon, 12 Aug 2019 17:12:50 -0600, Adam Bevan via 4D_Tech wrote:
> I throw the data i want dropped into an object for dragndrop. Then 
> when i drop I know what iam getting as i include the table and record 
> numbers. Where i dragged it from(process,form,object) are also 
> included. Made my listbox drag an drop so much easier to handle and 
> very generic.
> 
> Sent from my iPhone
> 
>> On Aug 12, 2019, at 3:06 PM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I am dragging and dropping 1 or more records from 1 process onto a 
>> listbox in a second process.
>> 
>> I see that I can use the pasteboard to mange the data during this 
>> action.
>> 
>> However(dragging 1 record)
>> I am looking at the data types returned by GET PASTEBOARD DATA TYPE
>> com.4d.private.pid & com.4d.private.Form.Object -- neither of these 
>> makes much sense to me.
>> 
>> By using GET PASTEBOARD DATA i get a blob which is either
>> 4 bytes (com.4d.private.pid)
>> or
>> 524 bytes (com.4d.private.object.form)
>> 
>> I do not know what to do with either of these blocks of data... can 
>> someone point me in the right direction.
>> 
>> The drop area is allowed to accept data from 5 different tables.
>> I need to be able to differentiate which table the data is from, & 
>> which record(s) were dropped.
>> 
>> Once I have which ever of the above data types hand, what do I do with 
>> them to extract the needed information.
>> 
>> 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: save listbox

2019-08-13 Thread Chip Scheide via 4D_Tech
conceptually:
c_blob($Blob)

for (every column)
 Append variable(Column_x;$blob)
end for
Blob to document(Docuemnt_Path)
 
On Tue, 13 Aug 2019 22:29:17 +0100, Peter Mew via 4D_Tech wrote:
> Hi
> Does anyone have a routine, component, plugin, or pointer to the right
> direction, that will save the contents of an array based listbox, so that
> the data can be restored at a later date
> thanks
> -pm
> 4d v13
> **
> 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
**

save listbox

2019-08-13 Thread Peter Mew via 4D_Tech
Hi
Does anyone have a routine, component, plugin, or pointer to the right
direction, that will save the contents of an array based listbox, so that
the data can be restored at a later date
thanks
-pm
4d v13
**
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
**

Old 4D Write .4w6 format

2019-08-13 Thread Scott H via 4D_Tech
All,

Is there a way to examine the bytes in a 4D Write picture field and
determine if the Write document is stored in the old .4w6 format? Or, for
that matter, any other way of determining it?

TIA





--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.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
**