Re: Old 4D Transporter (ResTransporter) or Equivalent

2020-07-10 Thread Nigel Greenlee via 4D_Tech
Peter

This may not be exactly what you need.

 I recently had need to look in some Resource files to see what was there..as I 
am sure you know we used to have ResEdit. I came across an app call Resilla 
which allows you to look in the resources, you might find that a useful way to 
view the resources you are trying to extract,

Nigel Greenlee

> On 5 Jul 2020, at 12:14, Peter Jakobsson via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Folks
> 
> Many thanks for all the tips - much appreciated.
> 
> I managed to solve my problem with Spencer’s suggestion to write my own 
> Transporter in 4D using DOCUMENT TO BLOB(file;*) to split the resource fork 
> away and save it as a data fork.
> 
> That let me transfer to Windows.
> My old structure and data now work fine in my Windows 7 VM with 4D 2004 
> server.
> 
> Many thanks again for the useful responses !
> 
> Regards
> 
> Peter
> 
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> 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)
New Forum: https://discuss.4D.com
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: Time to work on this task..

2020-03-24 Thread Nigel Greenlee via 4D_Tech
John


Yeah. 


Think i have not been digging around in that bit for a while(since V16), its 
not the manifest i need to read-that tells the commands(which I will probably 
do something with later-less annoying for what i am doing-its the constants.xlf 
and they do seem to generally be in the same format(i will ignore some old plug 
ins)


i just need to slightly remodel the way i read the 4D constants.

Nigel Greenlee




> On 24 Mar 2020, at 16:27, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi Nigel,
> 
> Do you mean old plugins that store information in resource (rsrc) files? I 
> think anything recent uses a JSON file (manifest.json).
> 
> John DeSoi, Ph.D.
> 
> 
>> On Mar 24, 2020, at 6:08 AM, Nigel Greenlee via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Also..whilst i am at..anyone written anything reliable they would like to 
>> share that gets the constants used by plug ins..there are different formats 
>> in different plug ins and i would like to get the constants list similar to 
>> how i get them for the 4D code.
> 
> **
> 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
**

Time to work on this task..

2020-03-24 Thread Nigel Greenlee via 4D_Tech
Hi

So this one is for the deep divers. I am working on a project whilst all my 
other projects are a bit on hold,  that has been a background task for me for a 
while. I won't bore everyone with WHY I am doing this, but i suspect this same 
information is applicable to other developers as I have seen posts on the 
subject.

As some of you know you can delve into the 4D resources and extract some 
information about 4D Commands and there parameters. There are are actually two 
relevant files. One is the 4DSyntax.xlf on the (en.)lproj folder and the other 
is gram.4dSyntax in the resources folder. The later one i found rather 
unhelfpul for my purposes as the ‘paramters’ are described by letters and the 
same letters can mean different things. The xlf is nicer stuctured for me-and 
someone has posted a nice parser on the forums that will read the document 
which always saves work(thank you-Maurice Inzirillo i think).

So where i am is that in the absence of 4D producing something which defines 
that data types for each command i am proposing producing a JSON file(for 
English commands), and wondered if this is of interest to anyone else.

 if it is i would be happy to discuss the formatting(maybe it should have the 
command number as well as the name to make translation to other languages 
easier) . Maybe other people have better ideas on how to encapsulate a few 
oddifties(repeating parameters 2..n, Optional parameters), better ways to 
describe a parameter that is a table or a field or a variable or a *. at the 
moment the Json looks something like this(just a short extract), a shared 
concept would probably be better than me inventing a wheel that only suits me, 
and by having others involved it would mean we could section up the document 
for validation to ensure it does not have mistakes. At the moment it includes 
handling for the latest V18 command parameters although i have been extracting 
using V17(and i am not currently extracting the 4D write pro commands)  This is 
of limited use to most programmers but for some of us this data helps us create 
better code validation tools(if anyone really wants to know what i am doing let 
me know and if it interests you, you will be welcome to try it out)



{
"Command Name": "collection.combine",
"Command Parameters": [
"col2",
"index"
],
"Parameter Data Types_1": [
42
],
"Parameter Flags_1": [
"Mandatory"
],
"Parameter Data Types_2": [
6,
9
],
"Parameter Flags_2": [
"Optional",
"Optional"
]
}


Any interest?..before humanity dies out.(hell... most us must be ‘at risk’).

Also..whilst i am at..anyone written anything reliable they would like to share 
that gets the constants used by plug ins..there are different formats in 
different plug ins and i would like to get the constants list similar to how i 
get them for the 4D code.


Nigel Greenlee





**
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: MySQL connection from 4D

2019-10-28 Thread Nigel Greenlee via 4D_Tech
Jeff

Indeed i did look at that(-its overkill for what i need) but it does say on 
there it works for Mysql V4 and up-hence why i am wondering of 4D in itself 
won’t connect to and older version.

Thanks

Nigel

> On 28 Oct 2019, at 15:54, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> If you don't get anywhere with SQL LOGIN (which should work, given the right 
> driver settings), Pluggers Software sells the MyConnect plug-in which works 
> perfectly and is very fast/reliable.
> 
> https://www.pluggers.nl/product/myconnect-plugin/
> 
> We've been using it for many years performing crucial functions interfacing 
> 4D with our web stack that run 24x7x365.
> 
>> On Oct 28, 2019, at 11:40 AM, Nigel Greenlee via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Should I be doing something else other that SQL 
>> LOGIN(ODBC:xx.xx.xx.xx;username;password) for a MySQL server?
> 
> **
> 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
**

MySQL connection from 4D

2019-10-28 Thread Nigel Greenlee via 4D_Tech
Hi


I am pretty sure other people are connecting to MySQL from 4D so i am hoping 
someone can advise me on where my problems may lie.

Pre-amble:—

I want to connect to the database of an Asterisk Telephone server. We have 
established that the database is accessible on the network and using 
‘sequel-pro’ i can connect from my Mac(Seqel-pro bypasses ODBC manager so its 
not that helpful in diagnosing my problem).

I have also been able to setup and test an ODBC connection using the ODBC 
manager on WIndows, as i was not having much luck getting a connection from 4D 
to the MySQL database on my mac i switched my efforts to there.


After some flapping around I established that the my-sql connector we had did 
not match the my-sql server which is running 3.5x. Later drivers on the pc 
would not connect but the 3.5 driver does connect to the MySQL database From 
Windows(as you know the odbc administrator on PC

The problem in a nutshel:—


However when i try to get my 4D app to to perform a login i get a stack 
overflow problem from 4D V17.(recursive errors eventually returning control to 
me!).

Does anyone know if 4D is able to connect to a MySQL server running version 3x? 

Should I be doing something else other that SQL 
LOGIN(ODBC:xx.xx.xx.xx;username;password) for a MySQL server?

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

Confused array type in an object

2019-08-09 Thread Nigel Greenlee via 4D_Tech
Hi.

I am looking for a better solution than what i currently have..this has 
probably been encountered by others.

I am creating some code on 4D V17 but I can not really use collections or 
.notation as this is going to get deployed on V16 and will not be upgraded for 
at least a few months(and i am not sure that would solve this problem anyway).

I am retrieving an object from a connected source(Magento FYI)... from the 
object  we get a sub entity object and that sub entity may itself contain a 
subentity etc etc(we are mapping data to go into our system). I am trying to 
write something agnostic and generic so i am not expecting to ‘hard wire’ any 
behaviour for a specific entity into the code that extracts the data.

So at each ‘entity’ level I get the attribute names and types. where the 
attribute type is 38 or 42 this is a ‘sub entity’ so we are going to get that 
object and call back into the same code to go down a level.

 Now on V16 of course i wont get a type 42 but actually a type 42 SHOULD(as i 
understand it) mean the object (element) contains an object and that object 
SHOULD be a ‘complex’ object and my understanding is that should be an array of 
objects(else it would not be a collection)? Have i misunderstood that? 

So i should be able to write(for a type 42 attribute)..

OB Get Array($ObjData;$attributeName;$aObjSubObject) //Where $aObjSubObject is 
an Array Object

(and mostly that works)….


However

I am finding a case where
Attribute Type =42 
Attribute Name=“additional_information"

...and the object looks like this:-

{account_status:null,additional_information:[Check / Money 
order],amount_ordered...

in that object ‘additional_information’ looks like
additional_information:[Check / Money order]

which as any JSON/4D object fool can see(LOL) is an array type object(of text 
in this case) not a collection of objects. When i retreive it as an array of 
objects I get the correct number of elements(1) but the value of the element(1) 
is NULL because its not [{…


indeed if I write:-


OB Get Array($ObjData;$attributeName;$aTextarray) //Where $aTextarray is an 
Array of type text

This indeed gets the values from the object..which would be absolutely fine(and 
a work around might be to get both, as neither error, and then look at whether 
the values in the object array are null and if they are then its an array of 
values).

So my question is this. What is a better way to find out what the type of data 
in the attribute is? What am I missing in my understanding of the structure of 
an/this object.

OB Get type returns 42(matching the attribute type of course!). It feels like 
the attribute is Shrodingers Cat- existing as a collection of cats and not a 
collection of cats at the same time. 


Nigel Greenlee



**
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: Options To Put Data Into Existing Excel Spreadsheets?

2018-05-07 Thread Nigel Greenlee via 4D_Tech
Allan

I think I have the code you refer to. if it is the component that uses vbs 
scripts(such as application_arrange_windows.vbs)..this might have been 
something other than Miyakos’ code.. contact me off list and i can put a copy 
of this on a drop box for you.

C_TEXT($1)
C_TEXT($2)
C_TEXT($3)
C_TEXT($4)

SCPT_XL_SetParameter ("XCEL_WORKBOOK_NAME";$1)
SCPT_XL_SetParameter ("XCEL_SHEET_NAME";$2)
SCPT_XL_SetParameter ("XCEL_RANGE";$3)
SCPT_XL_SetParameter ("XCEL_VALUE";$4)

SCPT_XL ("range_set_value”)

Nigel





> On 7 May 2018, at 09:44, Allan Udy via 4D_Tech <4d_tech@lists.4d.com> wrote:
>  application_arrange_windows
> Hi All,
> 
> I'm up the proverbial creek without a paddle...
> 
> Years ago (v11) we started using the 'Excel Library' component put together 
> (I think) by Keisuke.  For the life of me I can no longer find a source 
> version of this (if there ever was one), and it appears that any online link 
> to the component no longer exists.
> 
> At one point we did get the component upgraded to work in a v14 database.  
> Seems (under MacOS at least) that it's still working under v16, but it's 
> plainly only 32-bit.  Due to a couple of other reasons we now need to look at 
> taking this single-user app to 64-bit, and of course it won't work.  :-(
> 
> I have found Keisuke's 4d-plugin-xls  
> (https://github.com/miyako/4d-plugin-xls), but this does not appear to 
> contain options to find and set cell ranges as the earlier component did, nor 
> is there any sensible documentation, so it's not really useable.
> 
> I'm aware of Pluggers XL Plugin, but at 600 Euro it's going to be hard sell 
> for our client when only basic use is made of Excel  (Open a spreadsheet, 
> find a couple of named cells, put data in those cells, save the spreadsheet).
> 
> Are there any other options out their to interface a 4D app with an Excel 
> spreadsheet?
> 
> Cheers,
> Allan Udy
> 
> Golden Micro Solutions Ltd, Blenheim, New Zealand
> http://www.golden.co.nz
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> 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)
FAQ:  http://lists.4d.com/faqnug.html
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: Macro to check that local variables are declared in a method?

2018-04-28 Thread Nigel Greenlee via 4D_Tech
Bob

I have a component that declares all my variables(not just locals). Locals were 
simple-everything else was hard. It relies on you having a definable format(i.e 
type is at end or demarked by _ ) and having consistent(even if varying) way of 
identifying type (e.g _at is is array text and _atxt is array text  and _t is 
txt and _txt is text. if it finds something that it does not understand it 
decalres it(commented out) as //C_UNKNOWN($_somethingprobablyatypo_xxx).

The definitions are editable and you set them up when you put the component 
it(it installs a couple of methods in your code and does not alter your 
structure so taking it back out does not break your code). I have been using it 
on several systems for over a year with differing decalration systems and so 
far it has been very good(it does some other things besides decalring 
variables..will auto put a header on your methods and auto put code in if you 
want it..i have it put $_l_FormEvent:=Form Event ..Case of..:($_L_formevent=on 
clicked)..end case in all new object methods for example).

You would be welcome to have a copy to try out-i would welcome feedback on 
whether it can work for others. (if you do want to try it let me know your 
naming convention so I can confirm it will work with the code).-i have versions 
for V14,15,AND 16.

Nigel Greenlee




> On 27 Apr 2018, at 11:54, Bob Miller via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hello,
> 
> Has anyone created a macro to check a method to make sure all its local 
> variables are declared?
> 
> I've thought about undertaking such a thing, but as it probably involves 
> getting into regular expressions, I've been looking forward to doing this 
> with some dread.
> 
> If anyone has done this already and is willing to share, I'd be much 
> obliged!
> 
> The "tough" issue for me is "how to identify a local variable":
> - it begins with a $
> - it may end with any of these characters: space, equals, semicolon, 
> colon, dash, left paren, left curly brace, end of line, or any arithmetic 
> or comparison operator
> - it is not fully enclosed in quotes; example: "$ ###,###.00" is a format, 
> not a local variable, but I'm ignoring EXECUTE ON SERVER, etc.
> 
> I'm probably making a mountain out of a molehill, but hey, that's what 
> this list is for - to let people show me exactly that.  I appreciate it.
> 
> 
> Bob Miller
> Chomerics, a division of Parker Hannifin Corporation
> 
> 
> ll
> "PLEASE NOTE: The preceding information may be confidential or privileged. It 
> only should be used or disseminated for the purpose of conducting business 
> with Parker. If you are not an intended recipient, please notify the sender 
> by replying to this message and then delete the information from your system. 
> Thank you for your cooperation."
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> 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)
FAQ:  http://lists.4d.com/faqnug.html
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 question

2017-10-19 Thread Nigel Greenlee via 4D_Tech
Ferdinando

I want to share with you how i manage listbox scroll bars

1) In the on load section of the form i call a wrapper method with pointer to 
the list box area(i have never updated these to use the object name but that 
should really be done).

LB_SetScrollBar (->SCRIPTS_lB_Scripts;-2;-2)  the -2 here sets them to visible 
if i want them invisible it is -3 -3




I have put the code for that method here. 
https://www.dropbox.com/s/j6fmfrmt954ue8c/LbSetScroll.txt?dl=0

This is a nice method-i (originally) wrote(with others) when we moved from AL 
many years ago. you can use it to hide/swap/show vertical or horizontal or set 
the scroll position


2) in the form resize i call another bit of code
LB_ShowHideScrollonResize(->SCRIPTS_lB_Scripts)

I have put the code for that method here. 
https://www.dropbox.com/s/kfjyfp8i3uw02wm/LB_ShowHideScrollonResize.txt?dl=0

This method works out if the scroll bars need to be displayed(based on the 
column widths and the number of rows and the size of the listbox area-It calls 
the first method))




Hope this is useful to someone


Nigel Greenlee
(This gun is for hire..available for tackling any 4D job anywhere)







> On 18 Oct 2017, at 17:14, stardata.info via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> I use 4D V15.4 on windows.
> In one layout i use the listbox object, and in settings area i have setting 
> the scrol bar like automatic.
> I have only one row in this list box, but 4D show the same the scroll bar.
> 
> Someone know the reason?
> 
> Thanks
> Ferdinando
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: v13 - odd compiler error

2017-10-13 Thread Nigel Greenlee via 4D_Tech
Chip

Ah..The joy of auto declared variables removes this problem for me..so much 
that when i work on databases that don’t do the declarations for me it is a 
pain.

Nigel Greenlee

> On 12 Oct 2017, at 22:36, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> well your "friend"  ;) was right...
> DUH!
> c_pointer($43;
> 
> of course, I have copy pasted, into a new method window, deleting the 
> original, compacted, and had *just* finished manually retyping the 
> method (not long fortunately)...
> 
> 
> 
> On Thu, 12 Oct 2017 10:26:01 -1000, David Adams via 4D_Tech wrote:
>> Check if there is a typo and you've declared $43 instead of $3. The errors
>> you describe are almost exactly what I would expect in this case. Not that
>> I've ever done anything like that...but it happened to a friend once or
>> twice.
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: VOIP caller ID interface

2017-10-08 Thread Nigel Greenlee via 4D_Tech
Joe

I have been writing an interface to the Asterisk VOIP software(Using PHP). At 
this point  I am waiting for the client to decide how they want the interface 
to work-if you are using Asterisk I can offer some assistance (I found there 
documentation somewhat obtuse and the sample 4D Code that was published as a 
tech-note a few years back needed some finesssing to get the full information 
on queues etc.

My plan is to link telephone numbers to customers where the number may not be a 
number published on the record as a number to contact the customer on so when 
an incoming call comes we can look up the client and if not identified by the 
software allow the number to be ‘tagged’ to a customer-my thinking being that 
often customers call from personal mobiles or call from numbers external to the 
business-so Fred from Hokey Company 2000 may call from his 07 number..but 
we dont want sales people calling Hokey Company 2000 on the 07xxx number or to 
even show that number on the customer record.

Nigel Greenlee



> On 8 Oct 2017, at 09:35, Peter Bozek via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> On Sun, Oct 8, 2017 at 2:11 AM, Joe Dombroski via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Has anyone extracted caller ID from a VOIP phone and used it to open a
>> client record in 4D?
>> 
>> 
>> 
> I am now solving same problem so would be interested in answer as well.
> 
> I am able to communicate with certain routers (Fritzbox, which are quite
> nice German routers) that offer call monitoring, including VoIP calls,
> through telnet - like interface where router writes all call events. But
> need a solution that would work with any router.
> 
> It seems that SIP analyzers work by snipping the TCP communication, and I
> do not want to go that way. I was looking at TR-069 protocol that can be
> used to monitor router performance, but it seem that cannot be used to get
> VoIP events in real time. There are some extensions of the protocol that
> seems promising, but that would require a lot of investigation and testing.
> As I did not found any description how to do it, it is open question if it
> is even possible.
> 
> --
> 
> Peter Bozek
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

oh sweet

2017-10-06 Thread Nigel Greenlee via 4D_Tech
All


How long have i wanted this….



https://blog.4d.com/passing-data-back-and-forth-between-forms/?utm_content=buffer15244_medium=social_source=twitter.com_campaign=buffer

joy joy joy of 4D


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

Re: Listbox Spacing Between Columns

2017-09-25 Thread Nigel Greenlee via 4D_Tech
Douglas

I undertook a project a long long long time back to convert a pretty rich 
framework(for its time) from Area List to Listbox..to put that in time context 
it was when you could not buy any licences for Area List!

 At the time LB did not have anything like the abilities it had now but i can 
say i have never missed Area List and implement very easy listbox areas on all 
my forms even on new databases where i have only put bits of the framework 
in-including nice stuff like putting formula based columns onto field based 
listboxes. .(I would happily undertake to move anyone to listbox if you you 
want to farm the job out). 



Nigel Greenlee




> On 24 Sep 2017, at 20:20, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Sannyasin:
> 
> "I’m looking again seriously at Listboxes as a replacement for ALP. It’s
> close, but there’s a couple things that don’t quite work well in Listboxes
> for heavy data editing. I do both the programming and the data editing for
> this, so little glitches and funky UI things make a difference!"
> 
> I haven't delved into LB's at much depth. Part of it is that ALP does what
> I need it to do and, to their credit, LB's are an easy transition from
> grouped scrollable areas. Having done multiple"no new features" upgrades
> from legacy versions of 4D this year, I appreciate that.
> 
> In contrast, I worked on a project where LB's were required (ALP was not
> allowed) and it was absolutely clear that "the little glitches and funky UI
> things make a difference" to the point of having to figure out a *lot* of
> work arounds. I offered to buy ALP for the client but they were adamant
> so the UI was limited but chacun a son gout.
> 
> BTW, converting the array to a text array and keeping the numeric array
> hidden might be your best bet. If LB's offer calculated columns, that would
> be a piece of cake.
> 
> 
> --
> Douglas von Roeder
> 949-336-2902
> 
> On Sat, Sep 23, 2017 at 8:10 PM, Sannyasin Siddhanathaswami via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Me too! (well not a couple of decades—at least 1 decade)
>> 
>> I’m looking again seriously at Listboxes as a replacement for ALP. It’s
>> close, but there’s a couple things that don’t quite work well in Listboxes
>> for heavy data editing. I do both the programming and the data editing for
>> this, so little glitches and funky UI things make a difference!
>> 
>> 
>> Sannyasin Siddhanathaswami
>> 
>> On Sep 23, 2017, 5:04 PM -1000, wrote:
>> 
>> Sorry, that’s about it for me. I’ve been using AreaList Pro for a couple of
>> decades…
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Command numbers and names and using Execute

2017-09-22 Thread Nigel Greenlee via 4D_Tech
Pat


An excellent point. 

Where i think that won't work though-if i am understanding correctly is this...

 Lets say i write the following piece of very odd code(why you would write this 
i do not know but its an example)..

if(themoonisblue)
$_t_ExecuteText:=(“Array Text($_at_MyText;0)”)
else
$_t_ExecuteText:=(“Array longint($_al_MyLongint;0)”)
end if
Execute formula($_t_ExecuteText)

and presumably if you are using Footrunner(maybe that tokenises the code so 
maybe footrunner does not have a localization issue) or your own version of 
code from text(like what I have) then it also would still need manual 
translation to either the local command name or the command ID

if you are doing something like the above- reading the V16 manual- you need to 
modify the way the text is stored to modify the syntax to the tokensyntax-so 
using the command number of the command typed and storing that as :Cxxx as 
described in Miyakos email. 

Actually that new syntax is really useful if you are running code from text via 
a series of execute statements as not only will it cope with localization but 
also field/table renaming-although for me my approach will be to create the 
tokenised version of the text as extra field.


Nigel Greenlee


> On 21 Sep 2017, at 18:24, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> FYI - in V15 and later you don't need to bother with the command numbers
> any more:
> 
> "
> Compatibility note: Since a command name may vary from one 4D version to
> the next (commands renamed), this command was used in previous versions
> 
> of the program to designate a command directly by means of its number,
> especially in non-tokenized portions of code. This need has diminished over
> time as
> 
> 4D continues to evolve because, for non-tokenized statements (formulas), 4D
> now provides a token syntax. This syntax allows you to avoid potential
> problems
> 
> due to variations in command names as well as other elements such as
> tables, while still being able to type these names in a legible manner (for
> more
> 
> information about this point, refer to the Using tokens in formulas section).
> Furthermore, by default, the English language version is used starting with
> 4D
> 
> v15; however, the "Use regional system settings" option on the Methods Page of
> the Preferences allows you to continue using the French language in a
> 
> French version of 4D."
> 
> HTH!
> Pat
> 
> On 21 September 2017 at 17:39, Arnaud de Montard via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> 
>>> Le 21 sept. 2017 à 17:51, Nigel Greenlee via 4D_Tech <
>> 4d_tech@lists.4d.com> a écrit :
>>> 
>>> For ($i;1;1)  //well i know there are less than 1 commands for
>> the next few years at least:)
>> 
>> you can exit the loop when ok = 0, see here:
>> <http://forums.4d.com/Post/FR/16080071/3/16455667#16455667>
>> 
>> --
>> Arnaud
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>> 
> 
> 
> 
> -- 
> *
> 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)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Server Process "Frozen"-ish

2017-09-13 Thread Nigel Greenlee via 4D_Tech
I have server side processes that run in the background. Because i like to 
start as little as necessary at startup my code ‘automatically’ starts the 
process.

So in my code(where it writes the jobs into a table for the server to process). 
After the client side(or server side) has written a task it calls.

$_L_PostActionProcesser:=Execute on 
server("DATA_BackgroundRecordHandler";128000;"Post Save Data Processor";True;*) 

That makes sure the process is running. 

Now I know the process should not quit-but you never know what might happen. I 
have not come across it quitting for no reason but i have come across reasons 
to ‘end’ the process. The above ‘solution’ makes sure it is running(and avoids 
starting it at startup on the server). 

Just a workaround suggestion..

Nigel Greenlee.




> On 11 Sep 2017, at 07:43, Bernd Fröhlich via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Cannon Smith:
> 
>> I’ve seen something odd since upgrading our customers to v16.1 a few months 
>> ago. This is on 64-bit server, both platforms. There are a few background 
>> processes that continually run on the servers, waking up every few seconds 
>> to see if there is work to be done. This has worked without problem for a 
>> decade now, but starting with v16.1 we occasionally have a process the just 
>> sort of quits.
>> 
>> By occasionally, I mean maybe once in 2-3 months per server. Little enough 
>> that I didn’t pay much attention at first—just relaunched the server. But 
>> cumulatively (across all servers) it has happened probably 20-30 times in 
>> the last few months.
>> 
>> By the process sort of quitting, I mean that the tasks it is supposed to 
>> take care of just stop getting taken care of. The activity monitor shows the 
>> process is still there and nothing I have noticed seems out of the ordinary. 
>> It’s like the code just quit executing in that process.
>> 
>> I know I need to get more detailed information and will start trying to do 
>> that, but wonder if anyone has experienced anything similar that might give 
>> me a starting place to look?
> 
> 
> Same here. 4D V16.1 32 Bit on OS X 10.11.6.
> A background process does some reporting, sends and receives mails, etc.
> Every once in a while it just stops. No idea why. At least I am not the only 
> one.
> Now we just have to find what is common on all our servers...
> 
> Greetings from Germany,
> Bernd Fröhlich
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: 4D and Git Connection

2017-08-22 Thread Nigel Greenlee via 4D_Tech
Neil.

I would be interested in getting some info on doing this. 

I would like to move my repositories  from local stores to a github. When i 
tried to set it up i was getting a problem with MaxBuffer size(not sure if I 
need to start with an empty(ish) directory on the local drive.

Anything you can share on getting things rolling would be most welcome.

PS i am now have some a nice code versioning solution that i am looking to take 
to the next stage and looking for some funding.


Nigel Greenlee




> On 22 Aug 2017, at 17:04, Lee Hinde via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> When are you doing your commits? With each method? Daily? Neil suggested he 
> was looking for incremental commits. Which seems ‘noisy’.
> 
> 
> 
>> On Aug 22, 2017, at 9:00 AM, Drew Waddell via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> I have done this.  I used Macros to run methods that would commit the text 
>> of the methods edited to a Git repo, there is an on save event.  It's 
>> definitely not perfect but it helps my team track changes and look up 
>> potentially "ghost" changes in our codebase.
>> 
>> Drew Waddell
>> Development Team Lead
>> Orchard Software
>> 
>> -Original Message-
>> From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Dennis, 
>> Neil via 4D_Tech
>> Sent: Tuesday, August 22, 2017 10:17 AM
>> To: '4D iNug Technical'
>> Cc: Dennis, Neil
>> Subject: 4D and Git Connection
>> 
>> I recall that someone has worked with Git as a 4D code repository but I 
>> don't exactly remember where I heard it.
>> 
>> I'm looking to automatically check out and check in 4D methods to Git as 
>> they are modified via a 4D client. To give you the full picture we want to 
>> use TFS and single sign on to connect to TFS which can be setup as a Git 
>> repository. The Git repository in TFS will store any changes our team makes 
>> to the 4D server's code. Has anyone done this or can anyone point me in the 
>> right direction?
>> 
>> Neil
>> 
>> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: UUID vs Longint primary key

2017-08-04 Thread Nigel Greenlee via 4D_Tech
+2

Nigel Greenlee


> On 4 Aug 2017, at 12:09, Marcus Straßmann via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> +1
> 
> 
> MacStrass - Marcus Straßmann
> Softwareentwicklung und Beratung
> Auf der Markscheide 35
> D-44807 Bochum
> 
> Mobil: +49 (173) 374 39 92
> eMail: macstr...@macstrass.de
> 
> Am 04.08.2017 um 10:39 schrieb Herr Alexander Heintz via 4D_Tech 
> <4d_tech@lists.4d.com>:
> 
>>> Someone can explain when is better use UUID and when Longint field in 
>>> primary key?
>> 
>> If you can even remotely think of a scenario where you might ever be 
>> challenged to merge databases, go with a UUID!!!
>> It will save you incredible headaches!
>> Switched to UUIDs long ago, never looked back, best decision ever!
>> 
>> Of course if such a scenario is unthinkable, you can use longints
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Listbox Printing

2017-08-02 Thread Nigel Greenlee via 4D_Tech
  //QR SET TEXT 
PROPERTY($QRarea;1;-1;qr text color;0xFF00)

QR SET TEXT 
PROPERTY($QRarea;$ColumnNumber;qr detail;_O_qr font;_o_Font number(<>FontPlain))
QR SET TEXT 
PROPERTY($QRarea;$ColumnNumber;qr detail;qr font size;<>FontDefaultPlainSize)
End if 
End if 
End for 
If ($TotalWidth>$MaxPortrait)
//$OK:=PRINT_SetSIZE ("A4";"L”)<-changes the 
print to landscape
GET PRINTABLE AREA($MaxRows;$MaxLandcscape)
If ($MaxLandcscape<$TotalWidth)
Gen Confirm ("Format to one sheet 
wide?";"Yes";"No")
If (OK=1)

$PC:=Int($MaxLandcscape/($TotalWidth/100))


If ($PC<100)
SET PRINT OPTION(Scale 
option;$PC)
End if 
End if 
End if 
GET PRINTABLE MARGIN($left;$Top;$Right;$Bottom)
GET PRINTABLE AREA($MaxHeight;$MaxWidth)
Else 
GET PRINTABLE MARGIN($left;$Top;$Right;$Bottom)
    GET PRINTABLE AREA($MaxHeight;$MaxWidth)
End if 
$maxlines:=Int($MaxHeight/16)

  //PRINT SETTINGS
QR RUN($QRarea)
QR DELETE OFFSCREEN AREA($QRarea)


Nigel Greenlee


> On 2 Aug 2017, at 19:18, James Crate via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> I am printing a listbox on a form which just has a detail section (i.e. Print 
> Form). The listbox is printing, but variable sized according to the arrays, 
> and I’d like fixed size with empty rows. There isn’t much documentation on 
> printing listboxes, there’s no “Print variable frame” checkbox like text 
> areas, and they don’t even receive the normal printing events. Is there a way 
> to accomplish this?
> 
> Jim Crate
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Restricting a query

2017-08-01 Thread Nigel Greenlee via 4D_Tech
Jarosz

Actually you don’t need to build your own query editor. All you actually need 
to do is make sure you wrap any calls to the query editor(and to any query in 
general) so you can apply to any query a client filter



> On 31 Jul 2017, at 19:38, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Jarosz,
> For that you'll want to build your own query editor. To achieve that sort
> of separation of data you'll need to be careful that all queries and
> selections created by relations are segregated by client.
> 
> On Mon, Jul 31, 2017 at 11:34 AM, jarosz via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> I have a table which contains records for 10 different clients.
>> I'd like to give a client the ability to search the table for only his
>> records and not be able to see any of the other clients' records.
>> 
>> Is it possible to do this using the standard 4D Query editor by always
>> applying an additional search criteria eg clientID=xxx?
>> 
>> Or do I need to build my own custom query editor?
>> I'm using 4D 15.4.
>> 
>> I'd be interested to hear how others have approached this...
>> 
>> Many thanks
>> 
>> Michael Jarosz
>> 
>> 
>> 
>> 
>> --
>> View this message in context: http://4d.1045681.n5.nabble.
>> com/Restricting-a-query-tp5753437.html
>> Sent from the 4D Tech mailing list archive at Nabble.com.
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> 
> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
> 
> *- Edmund Burke*
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Strange Error

2017-07-26 Thread Nigel Greenlee via 4D_Tech
Hi

One of my clients is still using 4D V12. Today an error came up that I have not 
seen before and of course the immediate assumption is that I have put the alert 
message in. The alert appears on a form in compositiing mode where the code 
loads a web form(that may or may not be relevant-but that is something i have 
changed on the form recently).  I tried opening the same record and did not get 
an error so i am thinking this error is not something i need to worry about.

I just wondered if anyone else has seen this message before and if you ever 
idendified a cause.

The alert says

Alert

TECHNICAL ERROR

Details:
Error thrown: [object Object]
Text status: Error


Any information anyone can provide will be useful before i get asked what is 
causing it.


Nigel Greenlee


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

Packages-building an installer

2017-07-11 Thread Nigel Greenlee via 4D_Tech
Hi

I wondered if anyone else has used ‘Packages’ for creating an installer(maybe 
you can suggest a similar product). I am creating a simple installer for an 
in-house application-i will rather give the users a link to an installer than a 
.zip as they have a habit of installing stuff on the desktop.(this is on OSX 
only)

I know this is slightly ‘off topic'

I am however having two problems:-

The first is with permissions. If i zip the .4dbase up and send it to a machine 
the installed app runs fine. However when i create an installer package(with 
user persmissions set to Owner Root and user Admin(i also tried user Wheel) The 
installed application does not have the correct permissions and wants to open 
read only. I wondered if anyone has a suggestion to overcome that.

The second problem I have i with making an icon in the doc. I have written an 
Applescript which runs after the install. and this should make an icon in the 
Doc and relaunch the doc. If i run the Applescript it works fine but when i 
attach it to my installer to run automatically it seems to fail. I wondered if 
anyone might know a reason why the script might fail when it is executed from 
an installer.

(the script could be better)
set the_choice to "Add Application" as string
if the_choice is "false" then error number -128
try
if word 1 of the_choice is "Add" then

set persistent_what to "persistent-apps"
set this_file to "/applications/xx.app" as string<<—here we 
have the app name
do shell script "defaults write com.apple.dock " & 
persistent_what & " -array-add 
'tile-datafile-data_CFURLString"
 & this_file & 
"_CFURLStringType0'"

end if

tell application "Dock"
quit
repeat
try
activate
exit repeat
end try
end repeat
end tell
on error error_message number error_number
if error_number is not -128 then -- not user cancelled
display dialog "Error: " & error_number & return & error_message
end if
end try

Thanks to anyone who can point me in the right direction.



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

Re: An efficient printing approach...

2017-07-03 Thread Nigel Greenlee via 4D_Tech
Robert

I have not looked at your report at all. 

Two things spring to my mind.

1) if the report could be produced in excel could you not use ODBC to extract 
the data from 4D(Not my prerered option  but it it should be feasible)

2) More practically(and something i did recently). Could you not create a 
template in Excel(nice headers and all that bananas). and then inject the data 
into it from 4D(this is not actually complicated especially on OSX as you can 
use LEP)…i recently had something i was converting where the users told me that 
‘it used to make the document into an excel document..i mean on oS9..and nobody 
has done anything to fix it! I wrote some code to put the columns and rows into 
an excel document-i pick up an existing template in which widths etc are 
already set and fill the rows(pretty snappy too). I did not bother about how to 
get say a totals column on the template to automatically be updated because it 
was not in the scope of what i was doing but i believe that should be possible.

For anyone interested here is the (pretty agnostic) code i used-it-i think its 
pretty straigthforward reading.


https://www.dropbox.com/s/6dyd0uk6m2u6mx0/TabDeltoXL.txt?dl=0

If you are on OSX
> On 30 Jun 2017, at 18:54, Robert ListMail via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I was tasked with creating this report in 4D where I chose to use Print 
> Form…. Since it took me an embarrassingly long time to create this and since 
> it could be done from scratch in Excel in 20 minutes… I wanted to hear from 
> the smarter 4D Developers at large.  So, how would you build a report like 
> this in 4D? Also, how much time might you budget or estimate…?
> 
> https://www.dropbox.com/s/c0kgzg9uwed840i/2017_06_27_16_52_46_OCR.pdf?dl=0
> 
> Thanks,
> 
> Robert
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Localization from a component...

2017-06-22 Thread Nigel Greenlee via 4D_Tech
Hi

I wondered if anyone else has experienced a problem with localisation from a 
component.

I have just been testing some code in an uncompiled component and am getting an 
issue with a 4D crash. Its very specific and totally repeatable(I will work 
around the problem-its easy for me to go a different way), I wondered if this 
is a known bug(I will register it after next week)

I have the following in a component ...

$_Txt_CurrentDatabaseLocalizatio:=Get database localization(Current 
localization)<—works fine
$_Txt_DefaultDatabaseLocalizatio:=Get database localization(Default 
localization)<-works fine
$_Txt_InternalDatabaseLocalizati:=Get database localization(Internal 4D 
localization)<-crash


Anyone else seen this? Anyone have a logical reason why that iteration of the 
command should crash.


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

Re: Array Summary Sum Utility Method

2017-06-21 Thread Nigel Greenlee via 4D_Tech
Sannyassin

Surely here you could be utilizing  2D arrays? 

e.g
Array (aInvoices)-1D
array (aInvoiceItems)-1D
array (ainvoiceValue)-1D

Array (ainvoiceItemNumbers)-2D)-on row per invoice one column per item
array (ainvoiceitemDescription)-2D Ditto
Array(aInvoiceItemQuantitySold)-2D Ditto
Array(aItemSoldAmount-2D

You don’t say if you are displaying these arrays on screen-obviously the 2D 
arrays can’t be displayed on screen.

With the above representation in a listbox on screen the ‘summarisation’ column 
could be a formula based column
eg. Sum(aItemSoldAmount{rownumber}. You can insert the ‘summary’ column in 
dynamically. 

The following brief(unrelated) example shows how to insert a formula based 
column in a listbox

$Formula:=“LB_SUMMARISE(->”+aItemSoldAmount+”)”)
LISTBOX INSERT COLUMN 
FORMULA($area->;$ColumnNumber;$ColumnName;$Formula;$Type;$HeaderName;$ptr3->)

There are a couple of limitations of formula based listbox columns though-cant 
have a footer and cant sort on them.







> On 20 Jun 2017, at 23:25, Sannyasin Siddhanathaswami via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Aloha,
> 
> Does anyone have a utility method for summarizing (and summing) a set of 
> arrays?
> 
> For example with Invoice Line Items:
> 
> Arrays:
> aItemNumbers
> aItemDescription
> aQuantitySold
> aExtendedSoldAmount
> 
> Of course, with invoice line items there are multiple records with item 
> numbers. I want a summary array where there is only 1 element with an item 
> number, and the aQuantitySold, and aExtendedSoldAmount gets summed.
> 
> I know there’s lots of ways to do this, but didn’t want to reinvent the wheel 
> if possible.
> 
> Thanks!
> 
> Sannyasin Siddhanathaswami
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: What are some causes of Plugin and Component folder synchronization errors?

2017-06-15 Thread Nigel Greenlee via 4D_Tech
Kirk..Could be i have heard funny things happen with the new protocol..

I can tell you a funny story though about a load balancer.

 I was working on a project(non-4D related) in which we were setting up users 
mobiles phones. The setup made a connection into the company infrastructer, we 
kept getting stuck with some phones just not getting a connection..lots of 
angst and a big blame fest…threats to throw us out of the building etc…weeks 
in(when nearly finished) they found the load balancer had a IP in its balancing 
list that no longer existed-so when we started setting up 10 phones at a time 
one of them would get directed to that IP and nothing would happen!

Good luck with network…

Nigel Greenlee


> On 15 Jun 2017, at 16:29, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Nigel,
> I've narrowed it down to some issue with the network. There isn't anything
> particularly huge in the plugin or network folders. But watching the actual
> data transfer (that is, watching the graph on Little Snitch) I see that the
> download just stops and then 4D times out and puts up the "Couldn't sync
> Plugins folder" message. Just contacted my guy at the colo asking if they
> installed any load-balancing stuff as first thought. He says no.
> 
> I wonder if this is an artifact of the 4D network protocol?
> 
> On Wed, Jun 14, 2017 at 10:14 PM, Nigel Greenlee via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> A few months back I was testing something out that resulted in my creating
>> large files(>2gb) inside my .4dbase(package). When i logged in from
>> ‘client’ to server i noticed a significant load on folder synching and the
>> synching would then fail.
>> 
>> It is worth checking you have not ended up with something large in your
>> folder that is synching to client.
>> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
> 
> *- Edmund Burke*
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: What are some causes of Plugin and Component folder synchronization errors?

2017-06-14 Thread Nigel Greenlee via 4D_Tech
Kirk

I don’t know if the following information has any relevance to you issue.  A 
few months back I was testing something out that resulted in my creating large 
files(>2gb) inside my .4dbase(package). When i logged in from ‘client’ to 
server i noticed a significant load on folder synching and the synching would 
then fail. 

It is worth checking you have not ended up with something large in your folder 
that is synching to client.

Nigel Greenlee




> On 14 Jun 2017, at 21:26, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi folks,
> 
> A couple of users are suddenly getting these errors attempting to login to
> our server over WAN. One had recently upgraded his OS to Sierra and I
> thought it might be something to do with that. I deleted all his old 4D
> folders, reinstalled the db and still got a plugin sync error. I'm using
> Sierra 12.6 so it's a mystery to me why his machine barfs and I don't.
> 
> Then another user, at the same location, noticed a computer there was
> throwing the component sync error.
> 
> I've typically seen this sort of thing involve network lag issues but there
> are other users on that same network apparently having no issues.
> 
> Any thoughts?
> 
> Thanks
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
> 
> *- Edmund Burke*
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: 4D and Sage

2017-06-14 Thread Nigel Greenlee via 4D_Tech
Pat

I have code for this:..it uses the ODBC plug in but should be converted to just 
use SQL i think.



Nigel
> On 13 Jun 2017, at 12:17, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> We've had a few enquiries from customers and prospects about interfacing
> with Sage and I'd like to get an idea of how much work would be involved in
> setting this up.
> Basically we need to:
> - Extract data into our 4D database
> - Push data from 4D to Sage
> 
> Standard stuff I guess :)
> 
> We'll be using 4D v16.
> 
> I'm guessing this could be done via ODBC.
> 
> ​What tools would be required? EG:
> - 4D ODBC Pro?
> - ​Sage developer account?
> 
> I'd be interested to receive quotes form 4D developers who have done this
> on setting it up for us.
> 
> Pat Bensky
> 
> -- 
> *
> CatBase - The Database Publishing Solution
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Macros...why have i forgotten this.

2017-06-14 Thread Nigel Greenlee via 4D_Tech
Hi.

I think old age has crept up on me.

I have some macros which I use in my development structure. I want those macros 
to work client server(i normally develop on single user). 

 The Macros V2 folder is next to the .4db at the same level as plug ins, 
components folders etc. In Client server thie Macros V2 folder does not get 
copied to the client cache. 

I seem to remember tackling this before but cant find what i did and cant 
remember how to get the macros on the ’server’  to auto implement on the client.


Thanks to anyone who can set me straight




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

Re: v16 Component Compiler error

2017-06-04 Thread Nigel Greenlee via 4D_Tech
Kirk

Probably unlrelated..but i am getting an error from 4D pop in V16-i used the 
application maker and when it build the application i then get and error..so it 
seems someone at 4D needs to pop in to the pop plugs and fix some things.

> On 4 Jun 2017, at 05:00, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Bob,
> I'm betting that one of the components has the offending culprit in it -
> either a variable name or method name. And the method may be invisible
> which makes it even more challenging to identify.
> 
> On Sat, Jun 3, 2017 at 8:41 PM, Bob Finnerty via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Well, yes
>> 
>> But I may have stumbled on the answer: It seems to be related in some way
>> to 4DPop - when I remove these components, the error disappears..
>> 
>> Not sure why, exactly
>> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
> 
> *- Edmund Burke*
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: V16 on OSX Application licence

2017-05-22 Thread Nigel Greenlee via 4D_Tech
Ok. So today i tried (and i checked on the Apple site) to right click to allow 
the application-no joy. In OSX system preferences the ‘allow applications from 
unidentified developers’ does not exist any more. SO do that mean i have to 
build with XML keys to make it work?..i am going to test that out shortly.



Nigel Greenlee
 
> On 19 May 2017, at 20:12, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> If that is so easy, why does 4D itself not do this
> 
> Regards
> 
> Chuck
> 
> Chuck Miller Voice: (617) 739-0306
> Informed Solutions, Inc. Fax: (617) 232-1064   
> mailto:cjmillerinformed-solutions.com 
> Brookline, MA 02446 USA Registered 4D Developer
>   Providers of 4D and Sybase 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. 
> 
>> On May 19, 2017, at 12:31 PM, Timothy Penner via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> Hi Nigel,
>> 
>> If "the application can't be opened" because of the unidentified developer, 
>> you can usually bypass this by right-clicking on the application and 
>> choosing "Open" or by moving the application to the root of the 
>> /Applications/ folder (i.e. /Applications/YourApp.app).
>> 
>> However the best way to work with this behavior is to become an identified 
>> developer by signing your application. To do this you must first join the 
>> Apple Developer Program to obtain a application signing certificate, and 
>> then sign your application. And preferably distribute your application via a 
>> Signed DMG. See here: http://kb.4d.com/assetid=77688 
>> <http://kb.4d.com/assetid=77688>
>> 
>> -Tim
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

V16 on OSX Application licence

2017-05-19 Thread Nigel Greenlee via 4D_Tech
Hi

I am building a small application for internal deployment in a company. I am 
trying to deploy using the unlimited desktop(partner programme).


 However when i try to launch that application on OSX it will not launch- just 
a message

“The application …can’t be opened"

After a bit of head scratching(have i included the licence etc) I now think the 
OS is blocking the application because it is not from an ‘identified develop’. 

How do i set the developer to an identified one?

Or does anyone know if maybe my problem is something else



Nigel Greenlee


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

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread Nigel Greenlee via 4D_Tech
Hi

On OSX this is easy to do-something like this should work

$_t_DocumentPath:=<—known name  //if a partialthe image path is know
$_txt_OSASCRIPT:="mdfind "+Char(34)+$_t_DocumentPath+Char(34)
$_t_InputStream:=""
$_t_OutputStream:=""
LAUNCH EXTERNAL PROCESS($_txt_OSASCRIPT;$_t_InputStream;$_t_OutputStream)




> On 16 May 2017, at 07:59, John Baughman via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am thinking that perhaps using Launch External Process there might be a way 
> to search for a file and get back the path to the file if found.
> 
> I have a method that recursively crawls through a volume or folder to locate 
> a file, but it is relatively slow. It is pasted below. Any ideas to make this 
> more efficient or know how to use LEP to do a file search. Needs to work on 
> both Mac and Windows.
> 
> Thanks,
> 
> John
> 
> //Method: SearchFolderContents_Jut
> C_TEXT($1;$folderPath;$2;$documentToFind;$0;$pathToDocumentFound)
> $folderPath:=$1
> $documentToFind:=$2
> $pathToDocumentFound:=""
> 
> DOCUMENT LIST($folderPath;$aDocuments)
> $found:=Count in array($aDocuments;$documentToFind)
> 
> If ($found>0)
>  $pathToDocumentFound:=$folderPath+$documentToFind
>   
> End if 
> 
> If ($pathToDocumentFound="")
>FOLDER LIST($folderPath;$aFolders)
>   
>For ($i;1;Size of array($aFolders))
>$pathToDocumentFound:=SearchFolderContents_Jut 
> ($folderPath+$aFolders{$i}+Folder separator;$documentToFind)
>If ($pathToDocumentFound#"")
>$i:=Size of array($aFolders)+10
>   
>End if 
>   
> End for 
>   
> End if 
> 
> $0:=$pathToDocumentFound
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Hex Colour Picker in Listbox

2017-05-11 Thread Nigel Greenlee via 4D_Tech
Sorry meant to put a link on that

https://www.dropbox.com/s/oxt7nh2q6w078iw/ComplimentaryColours?dl=0


> On 11 May 2017, at 09:47, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hello all,
> 
> I have a list of colours in my system and I have a corresponding hex colour 
> code field but nobody has really used it.  I want to do a few things:
> Automatically map common colours to hex colours (via a lookup
> Provide a hex colour picker that I can use in a listbox
> Use the returned/edited hex colour to do one of the following:
> Set the text colour to the chosen hex value
> Set the row or cell colour to the chosen hex value
> Is there an example of this anywhere?
> 
> Regards,  Dougie
> 
> 
> telekinetix Limited- J. Douglas Cryer
> Phone : 01234 761759  Mobile : 07973 675 218
> 2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
> Email : jdcr...@telekinetix.com   Web : 
> http://www.telekinetix.com 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Hex Colour Picker in Listbox

2017-05-11 Thread Nigel Greenlee via 4D_Tech
Doug

This may be of no use at all to you ..on the other hand..

Some while back i picked up a document off the web of complimentary colours I 
translated it into 4D Code. This helps if you are doing any kind of row 
shading, it just builds an array of RGB references and their colour names and 
has the rgb of one step two step and 3 step lighter. I was using it in an SVG 
charting mechanism.





> On 11 May 2017, at 09:47, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hello all,
> 
> I have a list of colours in my system and I have a corresponding hex colour 
> code field but nobody has really used it.  I want to do a few things:
> Automatically map common colours to hex colours (via a lookup
> Provide a hex colour picker that I can use in a listbox
> Use the returned/edited hex colour to do one of the following:
> Set the text colour to the chosen hex value
> Set the row or cell colour to the chosen hex value
> Is there an example of this anywhere?
> 
> Regards,  Dougie
> 
> 
> telekinetix Limited- J. Douglas Cryer
> Phone : 01234 761759  Mobile : 07973 675 218
> 2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
> Email : jdcr...@telekinetix.com   Web : 
> http://www.telekinetix.com 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: 4D_Pack Replacement commands in v16

2017-05-10 Thread Nigel Greenlee via 4D_Tech

> On 10 May 2017, at 11:29, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi,
> 
> Would someone please care to mention where one can find the replacement for 
> commands from the Pack like:
> 
> 
> _o_AP Get table info  
> 
> 
> 
> And where the hell are the PDF-Manuals for v16?
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

AP Get table info (table; invisible; destruct) 


GET TABLE PROPERTIES(Table;Invisible) but if you want to know the other 
attributes… seems you can’t have that information now. maybe seems odd(of 
course the depracted command still works for now)


Nigel Greenlee

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

Re: Diff 4D Write Documents

2017-04-27 Thread Nigel Greenlee via 4D_Tech
Kirk

Just to throw a  curved ball to the mix…

 I use in  a different context some DIFF code in 4D-I did not write it. 

I have tried using the DIFF command (On osx) and for my purposes the DiFF code 
i have which produces arrays of differences and is more preferable for me. 

This is however being used as part of my own code control code so the 
parameters of what you want from the code may be very different. It picks up a 
document(or 2) and compares them.

 I put the code into a component because it can only run compiled-it was 
painfully slow uncompiled (and in my case i am using it in development so my 
code is not compiled).

Calling DIFF via LEP(not sure how this would be called on WIndows) is like 
this(with my notes). The problem with this is you have to write code to 
‘humanise’ the results-i started to write something for my purposes but have 
not progressed to completion.

C_TEXT($_t_NewDocumentPath;$_t_OldDocumentPath;$_txt_OSASCRIPT;$_t_InputStream;$_t_OutputStream)
C_TEXT($1;$2)
$_t_NewDocumentPath:=Convert path system to POSIX($1)//$1 is the new document 
path
$_t_OldDocumentPath:=Convert path system to POSIX($2)//$2 is the old document 
path
$_txt_OSASCRIPT:="DIFF -iwc "+Char(34)+$_t_OldDocumentPath+Char(34)+" 
"+Char(34)+$_t_NewDocumentPath+Char(34)
$_t_InputStream:=""
$_t_OutputStream:=""
LAUNCH EXTERNAL PROCESS($_txt_OSASCRIPT;$_t_InputStream;$_t_OutputStream)
  //(Information)
  //***from(Old)file with modification time(note the***)
  //---to(new)file with modfication time(note the---)
  //line of stars(longer than this)-seperator
  //***1***this means the old file from range
  ///this will always be at least one line it gives a context the line content 
is here(this can be multiple lines
  //the context lines start with two spaces
  //the differing lines start with a char
  //! (space) means a line this part of a group of one or more lines that 
changed between the fwo files-there will be a block of lines in the to file to 
correspond
  //+ an inserted file in the (new)?? that corresponds to nothing in the (old) 
file
  //- a  deleted line in the  old file that corresponds to nothing in the new 
file


Happily provide you with source code for the 4D DIFF -I found it on one of the 
4d code sharing sites-written by David Dancy.

I have put the code into a structure. 

https://www.dropbox.com/sh/64mcnxej3nh2h2p/AAD-wgNga2x2P75rdRyast0Fa?dl=0

I too use BBedit(best text editor ever in my opinion) on the mac-never been 
able to(had the time to) work out how to call it via an OSA(Applescript) and 
get the compare results text back.

> On 25 Apr 2017, at 23:50, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Kirk:
> 
> My current thinking is to store the entire document but a PDF is harder to
> futz with and it *would* save a bit of disk space. I'm leaning toward just
> setting up a folder for each quote and dropping a changed document in it.
> Disk space is copious and free and I don't need "chain of custody" type
> practices. The issue that my client is dealing with is that some of the
> sales reps have futzed with some of the quote documents. By adding this
> feature the sales reps will know that their 4D Write documents will be
> tracked by the audit trail and that should cut out almost all of the few
> instances of mischief.
> 
> DeltaWalker might do the trick. I've been using it on the Mac for a couple
> of years and it works fine but it is a little slow. It its favor, the
> Windows version operates via the command line. Word has a compare feature,
> though I've never programmed Word to run from the command line, and then
> there's this online service , too.
> 
> I like the idea of using diffchecker.com but who knows how long it will be
> available.
> 
> Next step is to contact the client and ask them how automagic the diff
> function needs to be.
> 
> Thanks for your suggestions.
> 
> --
> Douglas von Roeder
> 949-336-2902
> 
> On Tue, Apr 25, 2017 at 3:20 PM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Doug,
>> On Tue, Apr 25, 2017 at 1:32 PM, Douglas von Roeder via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>> 
>>> In addition to the hash, my thinking is to store changed documents as
>>> versions of the original ("reference") document instead overwriting the
>>> original.
>>> 
>> 
>> ​If the formatting isn't important (headers, footers, page numbers) I'd
>> just save the body text without formatting. Save them into a related table
>> of 'versions' with the hash and date and stuff. If they want the formatting
>> and the whole smash I'd save them as a PDF. ​The point is you want to
>> prevent changing that archive copy.
>> 
>> 
>>> Next step is to find an app that will do a diff that I can display for
>> the
>>> ​ ​
>>> end user.
>>> 
>> ​I found an app called Deltawalker that's pretty good. ​
>> 
>> 
>> --
>> Kirk Brooks
>> San Francisco, CA
>> ===
>> 
>> *The only thing necessary for the 

Re: Dynamic Method Creation & Content Changing

2017-04-22 Thread Nigel Greenlee via 4D_Tech
John

You should not really have much trouble with 4D SET METHOD..I Use it all the 
time(in development not in a live enviroment)

METHOD SET CODE($_t_methodName;$_t_MethodText)

just need to make sure method is not open in the design enviroment or you will 
get an error


Nigel
> On 22 Apr 2017, at 17:01, truegold via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi Nigel,
> 
> I’m not sure if it would be easier to use foot runner. I do know that the 
> strategy I worked through works pretty well. Here’s the almost final result 
> (needs to be tested further)...
> 
> The send user has a UI and supplies two pieces of data: a study name 
> (actually an abbreviation or acronym) and a position in a string (1-80 
> positions) where the position will have a single character code. These become 
> part of the names of the list, list items, and methods.
> 
> With those two pieces of data I am able to auto-generate several new 4D 
> lists, insert into existing 4D list, create two new methods with code 
> formatted correctly, and…
> 
> I couldn’t figure out how to get the Method Set Code command working so I 
> used Rob’s API Create Method to create the new 4D methods. Works great!!!
> 
> I could not get API Set Method to work. In fact it always crashes in 4D v15r2 
> (Mac). So, at this time, I’ll have to 
> 
> I opted for just auto-generating the code fragments (new case dispatches with 
> a couple lines of code) and displaying them in three text variables. Each 
> text variable corresponds to the method that needs to be updated. I also auto 
> open the three methods so they don’t have to search for them. BTW, the user 
> currently has access to design and makes minor tweaks from time to time. This 
> won’t work in compiled but they’ve never run in compiled in over 25 years.
> 
> Then, for each text var, they can select all and copy the code fragment and 
> place it into the proper routine. All they need to do is go to the bottom of 
> the case dispatch and add these lines there. About as simple as it gets - and 
> yes they could still mess up.
> 
> If I could get Rob’s API Set Method to not crash (or understand how 4D’s 
> Method commands work) I might be able to fully automate it. But until...
> 
> Anyway what used to be a nightmare of steps and rereading of the cryptic docs 
> (and fraught with error) has been reduced to a minute or two exercise.
> 
> Exactly what I was after.
> 
> Finally, creating an new study is an infrequent exercise. So they might not 
> revisit this for another year or more. But when they do it’s now a simple 
> thing.
> 
> Appreciate,
> John...
> 
>> Its always an issue when you probably wish it was a different way but it has 
>> been written and now you have to deal with it..no budget for a proper 
>> redo..no will for it either!.
>> 
>> I would certainly consider though using Footrunner for code you you write(I 
>> don’t use footrunner as i have my own solution internal to my code)..i 
>> assume you can automatically create the footrunner document and that 
>> probably easier to ‘patch’ sections of code and sub-calls into than putting 
>> into 4D itself..and you could be running a compiled solution then.
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Dynamic Method Creation & Content Changing

2017-04-22 Thread Nigel Greenlee via 4D_Tech
John

Its always an issue when you probably wish it was a different way but it has 
been written and now you have to deal with it..no budget for a proper redo..no 
will for it either!.

 I would certainly consider though using Footrunner for code you you write(I 
don’t use footrunner as i have my own solution internal to my code)..i assume 
you can automatically create the footrunner document and that probably easier 
to ‘patch’ sections of code and sub-calls into than putting into 4D itself..and 
you could be running a compiled solution then.


Nigel

> On 21 Apr 2017, at 16:24, truegold via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi Nigel,
> 
> First I know the issue of using 4D List as a short cut for using a real 
> lookup of records in a table, aka choice list, for example. I have a client 
> who has an app (I have inherited this one as well) where there are hundreds 
> of these and they are having the kinds of problems you mentioned.  I am 
> slowly replacing them with table based choice list lookups.
> 
> But after reading your thoughts I realize that in this case I am not really 
> doing anything dynamically EXCEPT when things need to be setup for a new 
> study. And in this case without rewriting the application it must be handled 
> the way I have described. So keep in mind that I have not been tasked to 
> rewrite the App but only help them make this aspect of it easier.
> 
> SO the dynamic is really a one time thing. What I am really trying do is 
> automate it and reduce the chances for error and not have to go through 
> obscure notes to figure it out.
> 
> There are several NEW 4D lists that must be created each time they create a 
> new study. Then these list need to referenced and part of the mechanism is by 
> adding the names of these list to another meta list. That’s where the insert 
> list items comes in.
> 
> Then there are two new methods created each time that use these NEW list. An 
> the list names and number are the only thing that changes inside of this 
> wrapper method that calls another method with these list names as parameters.
> 
> Outside of header and some variable declarations there is a single line of 
> code which is the method and parameter list. Not much to validate here.
> 
> As to writing code inside another method that’s trickier. I might just open 
> the methods and present the code lines for them to copy them in.
> 
> It’s not as bad as you think (or else I am a bit delusional! Sometimes it’s 
> hard to tell. ) and on the surface it seems quite easy.
> 
> I’ll be explaining it to the client today and see what they think. If they 
> say go for it then I’ll give it a try and see if I can get most of it 
> automated.
> 
> I hope that explains it better. Always hard to explain when you’re trying not 
> to be verbose.
> 
> Appreciate,
> John...
> 
>> 4D lists can suck if they are being edited..I remember having trouble with a 
>> system a while back where users complained that some drop downs did not have 
>> something in that should have been there..testing showed that we had code 
>> nicely adding to the 4D list that was being used in the drop down..lots of 
>> head scratching..probably a blame fest..then we worked out what was going 
>> to..the list we being written to by other clients overwriting the list. and 
>> the user had a list different to what they expected.
>> 
>> In General I avoid using a 4D list for anything dynamic…a table with  
>> something like…
>> OWNER(User)<-create one ‘system’ owned list for each list name and where no 
>> user specific version use the system version…(Duplicate records or combine 
>> system owned with private owned)
>> LIST_NAME
>> LIST_ITEM_NAME
>> NAME_ABBREV
>> STUDY_REF 
>> ..(and a record ID)
>> Would be probably be a better way to handle a dynamic list and easier to 
>> then relate something like study steps ..step items…step item options..etc
>> 
>> In my humble you should never need to have code edit itself for this kind of 
>> purpose. The code should support and be supported by the data and switches 
>> in the data should define the route through the code…that will always be 
>> more robust and easier to write than code that writes code. 
>> 
>> Code that writes code is hard to validate:)..i know this ..lets say in your 
>> code you have a line $_t_InsertStatement:=“IF(<>MyBadlyNamedVariable)” 1stly 
>> you have to be sure that variable exists. and then if someone decides 
>> somewhere to change the name of the variable it wont automatically change in 
>> your hardcoded insert line and somewhere you will be getting calls about an 
>> error..even worse is when 4D changes the name of the a function call or the 
>> parameters.
>> 
>> Just my tuppence worth.
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub: 

Re: Dynamic Method Creation & Content Changing

2017-04-21 Thread Nigel Greenlee via 4D_Tech
John



4D lists can suck if they are being edited..I remember having trouble with a 
system a while back where users complained that some drop downs did not have 
something in that should have been there..testing showed that we had code 
nicely adding to the 4D list that was being used in the drop down..lots of head 
scratching..probably a blame fest..then we worked out what was going to..the 
list we being written to by other clients overwriting the list. and the user 
had a list different to what they expected.

In General I avoid using a 4D list for anything dynamic…a table with  something 
like…
OWNER(User)<-create one ‘system’ owned list for each list name and where no 
user specific version use the system version…(Duplicate records or combine 
system owned with private owned)
LIST_NAME
LIST_ITEM_NAME
NAME_ABBREV
STUDY_REF 
..(and a record ID)
Would be probably be a better way to handle a dynamic list and easier to then 
relate something like study steps ..step items…step item options..etc

In my humble you should never need to have code edit itself for this kind of 
purpose. The code should support and be supported by the data and switches in 
the data should define the route through the code…that will always be more 
robust and easier to write than code that writes code. 

Code that writes code is hard to validate:)..i know this ..lets say in your 
code you have a line $_t_InsertStatement:=“IF(<>MyBadlyNamedVariable)” 1stly 
you have to be sure that variable exists. and then if someone decides somewhere 
to change the name of the variable it wont automatically change in your 
hardcoded insert line and somewhere you will be getting calls about an 
error..even worse is when 4D changes the name of the a function call or the 
parameters.

Just my tuppence worth.


> On 21 Apr 2017, at 00:42, truegold via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi David,
> 
> First this is an App I took over and am maintaining. The client brought this 
> to my attention because after working in the app since the late 80’s it’s 
> still not clear and easy to remember all the steps (even with documentation) 
> it takes to get things to the point of usability.
> 
> As I look at it I see several 4D list that need to be created. I see list 
> items that need to be inserted into existing 4D list. I see several methods 
> that have to be created (using generic routines where all that changes are 
> the parameters names), and several methods that have to have code inserted 
> into case statements.
> 
> So most of seems to me can be automated. Probably need a UI of some sort to 
> add the name, abbreviation, and study number. (Then I can generate most 
> things on the fly and view ten in the UI before it’s committed.)
> 
> All of this is for setting things up so that another routine will be run that 
> reprocesses all this information crafting necessary records that are used 
> based upon all these new constructs. And then, finally, the study can begin 
> and data captured.
> 
> BTW, I’m intentionally trying not to explain everything as it’s a long and 
> winding road…
> 
> Brittle? I suppose. But if automated less chance for error I think. Less need 
> to reread and restudy somewhat unintuitive notes (yes I could rewrite them so 
> they are clearer).
> 
> Anyway, my main concern was with dynamic method creation and inserting lines 
> of code into existing methods. If it can be done then it’s something I might 
> pursue - if the client thinks it might be worth it.
> 
> Otherwise I’ll trudge through the notes and create the structure manually.
> 
> Kind of a proof in concept is what I’m after.
> 
> Thanks for your thoughts,
> John…
> 
> 
>> A method is just a block of text. The magic in the method comes from 4D's
>> interpreter. I modify methods via code and also do lots of code generation
>> for my standard housekeeping sort of code. You can get and set the text
>> however you like.
>> 
>> With that said, I don't see why you would do it in this case. It sounds
>> like you've got some user configurable data that you need to do lookups on
>> or otherwise manipulate. (Or are they a sort of decision-tree or driving a
>> logic cascade?) Right now you're keeping it in a 4D list and are proposing
>> to bake it into code. I think that the problem is that you're using lists
>> for data that should be in the data file. Before baking the data into code,
>> try and answer the question "how would I do this using the data file?" The
>> data file is a great place to keep user-specific config data and such. If
>> not there, then in a disk file. Putting the data into the data file makes
>> is easier to see, reuse, validate, etc.
>> 
>> Speaking of validation, it sounds like the setup is a bit brittle and easy
>> to mess up. Another solid argument for the data file. You need a UI for the
>> configuration entry which creates the configuration data. Then you can have
>> a *different* piece of code that interprets and validates the configuration

Re: Methods, Components, Comments, and Tooltips

2017-04-20 Thread Nigel Greenlee via 4D_Tech
Tom

I handle forms in my version control. I use a method to get all form objects 
into an object-its an object of my own format…here is a sample below. Pretty 
extensive. I have code to pack and unpack the form objects so i can compare 
current version of a form with the last one (not using diff) to tell me in 
plain english what is changed. The object is put into t blob and written out to 
a version control document

the object is build using a call like this...

CORE_T_ParseFormName:=$_aT_FormNames{$_L_Index}
FORM LOAD($_aT_FormNames{$_L_Index})
C_OBJECT($CORE_ob_FormObject)
CLEAR VARIABLE($CORE_ob_FormObject)
CORE_GetFormObjects ($_aT_FormNames{$_L_Index};0;->$CORE_ob_FormObject)

I have put a copy of CORE_GetFormObjects on my 
dropbox..https://www.dropbox.com/s/banb0mpgllkj8na/CORE_GetFormObjects.txt?dl=0 
its fairly self explanatory if a little wordy..its shockingly fast i mean 
really uncompiled ‘boom' all them form objects parsed into an object faster 
than a fast thing.

If I was modifying it i would not have the constants hard coded as i now have 
code I got from the forum for reading the names of all 4D constants.


Three caveats….

1) if you try to get the menu bar of the form i think you just get the current 
menu bar(i build my menus on the fly anyway so this is not an issue for 
me)..but it can lead to you being told the menu bar has changed!
2) If you use inherited forms when you parse a form you get the inherited form 
objects and you can have an object named the same on the inherited form as on 
the inheriting form(!) and when you get the form objects they don't always come 
in the same order, this can lead to an object x on the inherited form being 
found in the array of objects before the object on the inheriting form on pass 
and then next time after-which can lead to you reporting that the object type 
has changed-i just make sure my object names on inherited forms are unique!
3)There are a couple of properties you can't get-they are as follows:-
//the following form setting cannot be obtained in code
//Markers
//access
//menu bar
//print settings
//appearance
//form type
//inherited form table
//inherited form name
//save geometry
(This is on V14 maybe on 15/16 you can get these)


this(without much comment) is the code i use to report the differences between 
two form objects(current and previous) 
https://www.dropbox.com/s/9u16tzd9db6689i/Diff_CompareForms.txt?dl=0



{"Form Name":"CODE_CHANGES","Number of Pages":2,"Fixed Width":false,"Fixed 
Height":false,"Form Title":"","Form Menu":"","Active Form Events":["On 
Load","On Validate","On Clicked","On outside Call","On Double CLicked","On 
drop","On menu selected","on Plug in area","on data change","On drag over","On 
timer","On after keystroke","on after edit","On begin drag over","On bound 
variable change","On mac toolbar button","On page change"],"Form 
Objects":[{"Page Number":1,"Name":"oCODLBChangesVIewer","Variable 
Name":"CODE_abo_MethodChanges","Type":7,"Type Name":"Object type 
listbox","Multiline option":0,"Multiline option Name":"Multiline Auto","Style 
Sheet":"__automatic__","Font Name":".SF NS Text","Font Size":12,"Font 
Style":0,"Font Style Name":"Plain","Is visible?":true,"Foreground 
Colour":"Foreground Color","Background Colour":"Foreground Color","Alternate 
Background Colour":"Foreground Color","Left Position":144,"Top 
Position":55,"Right Position":495,"Bottom Position":604,"Horizontal 
Resize":0,"Horizontal Resize Name":"Resize horizontal None","Vertical 
Resize":0,"Vertical Resize Name":"Resize Vertical None","Horizontal 
Alignment":1,"Horizontal Alignment Name":"Align …lots more here-cutting this as 
its a long bit of text


I have recently added a ‘watcher’ process which looks for all forms modified 
since the last time it looked(it looks every few mins) and if a form is 
modified runs code to compare it and save a new version of the object out. 
Happy to hear from anyone with comment/critique on this code.


> On 20 Apr 2017, at 14:04, Benedict, Tom via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Lutz writes:
> 
>> we use a modified version of the mentioned vc-framework component. It saves 
>> all changes in the code to text files
>> immediately and keeps track of the timestamps of the changes in an external 
>> database. The text files can be
>> committed to a source code versioning tool like svn, mercurial, git ...
> 
>> We extended it a bit to allow reimporting of the exported code. So we are 
>> able to switch between branches and
>> we can do team development without a development server and dev clients. All 
>> members of our team use single user >instances of 4D. The result of the 
>> development will be compiled into a built/merged server application.
>> A very old version (V13 yet) with import code can be found on Github: 
>> https://github.com/elutz/vc-framework-v13
> 
> Do your apps use 4D forms? If so, how do you deal with them with respect to 
> version control?
> 
> Thanks,
> 
> Tom Benedict

Re: Methods, Components, Comments, and Tooltips

2017-04-20 Thread Nigel Greenlee via 4D_Tech
Luiz

I have a nice set of code that exports the code, including the forms(as 
objects),and all the database settings including table structure,  and 
maintains a history(in an external database) of everything using a modified 
DIFF . I would be happy to give you a copy of my component(including source) 
for doing this(i would need to change it a a bit  to work for you as it does a 
couple of other things-sets a header on the methods (and you might want that 
but you might want it different), and declares all my variables(you would not 
want that as I doubt it will comply with your naming convention). The code is 
set up for single user usage-so if you do client server development i would 
need to rethink some stuff on there-which i need to do anyway.


There are other people around with similar tools.

> On 20 Apr 2017, at 11:16, Epperlein, Lutz (agendo) via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
>> 1 - how does one get access to the 4D source code outside of 4D?  Is there a 
>> magic
>> command to get 4D to regurgitate its code into plain text?
> 
> METHOD GET CODE
> Since V13
> Than you can do what you want with the text. An example is the VC-Framework 
> component by J. Fletcher: https://github.com/4D/vc-framework-v13
> 
> 
> Regards Lutz
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: v13 and OS X 10.12

2017-04-13 Thread Nigel Greenlee via 4D_Tech
Chip

Maybe this article will be of some relevance and assistance

http://osxdaily.com/2017/04/11/run-macos-virtual-machine-easy-parallels/


> On 13 Apr 2017, at 17:15, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am slowly leap frogging versions of OS X and 4D.
> Moving from 4D v2003 and v12 to v13, and OSX 10.6.8 to 10.9.?
> 
> The next step will be to move to v14, 15, or 16 of 4D before moving to 
> 10.0(?), .11(?), .12(?).
> 
> However in the mean time, we need to replace a Mac computer, and a new 
> Mac will have 10.12 on it, no choice. If it matters it will likely be a 
> mini, although an iMac is also possible.
> 
> I understand the compatibility matrix, and v13 was released and dead 
> before OS X 10.12
> 
> What I need is some information on real world functionality of v13 on 
> 10.12.
> At the moment I have no components, and no plugins other then come with 
> 4D (i.e. 4D pop, SVG etc), and most of these could be removed.  
> 
> I will be looking at Keisuke's iCal plugin/component (I have not had 
> time to even determine which one it is).
> 
> Any feed back is helpful -- Thanks!
> Chip
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: 4D Compiler

2017-04-09 Thread Nigel Greenlee via 4D_Tech
Heinz, Timothy.

I completely agree. A strict nomenclature with typing is essential.

 In fact its the only way i too have been able to implement auto declaration in 
my code-not just locals-i was inspired by your comment about doing it for 
locals on here a while back to go back and complete work i had done on code 
previously-of course its harder pulling out variables than locals or 
interprocess-so it was a hell of a job to do (Trust me its a thing of beauty 
but there were about 50 attempts of running this across including a few bad 
failures with my code before i weeded out all the gotchas)..i might now go back 
and provide a way of allowing definition of the nomenclature so it could be 
used with other conventions(I use a convention where the type is after a 
’group' and before the name(xxx_type_name) and i know a lot people use 
Name_type and i define screen variables such as buttons (but) or radio  buttons 
as rb rather than all longints as (l) and a couple of other other usages for 
listboxes, drop downs etc

Here however I have taken over pre-existing work where beyond having adopted S 
for strings at some point there is nothing currently in place. Yes I would love 
to make sure the 69,000 guessing points are sorted-but it will take time. There 
are other pressing challenges such as no usage to speak of of style sheets and 
a variety of form implementation ranging.

So give me time and we will see how i progress.




> On 7 Apr 2017, at 17:35, Herr Alexander Heintz via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> This is where strict variable nomenclature with typing info helps a lot.
> You can easily create a method that can gather all locals in a piece of code, 
> and add the declarations at the top of a method.
> You can even apply that automatically using METHOD GET CODE and METHOD SET 
> CODE.
> OTOH if you have no variable nomenclature with typing…
> 69000 typing errors.
> Forget it, seriously...
> 
>> Am 07.04.2017 um 18:29 schrieb Timothy Penner via 4D_Tech 
>> <4d_tech@lists.4d.com>:
>> 
>> Nigel,
>> 
>>> I tried David Adams suggestion of trying ‘all vars are declared’ and at 
>>> 69000 errors decided that was not the way to go!
>> 
>> You really should try to fix those...That is 69,000 places that 4D is 
>> guessing what the variable type should be - instead of you explicitly 
>> telling 4D what the variable type should be. All you need to do is use 
>> C_TEXT or C_LONGINT or C_* at the top of your methods to declare what the 
>> variables are. This is the best practice after all.
>> 
>> Just my 2 cents.
>> 
>> -Tim
>> 
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: 4D Compiler

2017-04-07 Thread Nigel Greenlee via 4D_Tech
Douglas.

Yes that is kind of what i thought and can remember the old days  so would kind 
of expect it to have failed after one of those passes and-when you have fixed 
of type x get more but that really was not what i saw-i had syntax errors( to 
many” }"or “)” etc) and variables re-declared differently etc but and i had 
only cleared about half of them when it suddenly found all the 
$Something:=confirm(“something”;”Yes”;”No”)..lots of them and if else else etc. 

I did notice though that when I cleared ‘general’ errors(Which oddly where not 
at the top) that did seem to allow it to find more..I finally got through this 
one after 2 days at it(I tried David Adams suggestion of trying ‘all vars are 
declared’ and at 69000 errors decided that was not the way to go!..and could 
not run his retokenise code because this is a live system i am working on and 
its V12). Its feels better to me to have a system that does at least 
syntactically correct and is compilable.

Of course now i got some ‘fallout’ I found that at least one Variable was used 
in a 4D Write document and the same var(Interprocess) was a number and then 
somewhere else a string..changed the name of the variable in the string and 
then was told a document was not working…Can anyone think of other examples 
where a var might be used in a way that does not show up in 
forms/methods/scripts?

Nigel Greenlee




> On 6 Apr 2017, at 21:47, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Nigel:
> 
> A couple of thoughts on this…
> 
> I couldn't find this documented but 4D's compiler does three "passes"
> through the source code (when you're not typing all of your variables).
> IIRC, the compiler displays what it's doing for each pass but newer
> versions of 4D + modern hardware are so fast that I haven't seen the
> "label" appear in the compiler window.
> 
> For the sake of argument, lets' say that the three passes are something
> like syntax, declarations, and then parameter type matching. There must be
> no errors in one phase before the compiler will move on to the next.
> Perhaps what you're seeing is that as you resolve errors during the syntax
> phase, those changes engender issues within that same phase.
> 
> Once the issues in the syntax phase are resolved, the compiler will run the
> declarations phase and will report those errors.
> 
> Rinse, lather, repeat for the next phase.
> 
> 
> Second issue is that 4D's compiler used to scan methods sequentially, based
> on ID, and would check parameters based on the parameter list that exists
> for the first instance of a method.
> 
> This was my observation of the early versions of the compiler so it could
> be observer error/bias and 4D could have completely revamped how the
> compiler functions. Also, in the 25 years or so since I made this
> observation, I've never gone back and checked. :-)
> 
> Having just done a 2004 to 15 conversion, I saw the same behavior you're
> experiencing and it was *not* a pleasant feeling. Most of the time I
> compile it really is just a "spell check", so it was unnerving to compile -
> error fix - compile and get more errors - error fix - compile and get
> different errors. No fun at all but an inherent part of the process of
> "getting to done".
> 
> 
> 
> --
> Douglas von Roeder
> 949-336-2902
> 
> On Wed, Apr 5, 2017 at 1:56 AM, Nigel Greenlee via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> David
>> 
>> Thanks for the insight. I think i might try that-day 2 and half already of
>> this! Hopefully the compile with ‘all vars are declared should show me what
>> is not declared(!)…i would love to be able to run my code(which i spoke
>> about on here) that now auto sets the declarations of variables at the top
>> of methods and declares everything that does not comply with the naming
>> convention and is not declared as //C_UNKNOWN..but alas not much naming
>> convention in play. I will try your re-tokenize code shortly.
>> 
>> My next ‘side task’(now that i have my updated code repository
>> working-although not installed on the system i am talking about here yet)
>> is to write something that will report repeating methods-methods and
>> scripts that are identical or near identical, and i think as part of that I
>> will get it to report if there are invalid method names in new process(I
>> find it annoying that ‘find unused methods’ shows any methods called only
>> in new process or from a menu as uncalled)
>> 
>> As with most people my own code never assumes parameters these days-with
>> all vars passed put into locals which really helps with parameter checking
>> in the code-and very few vars not passed(so a 

Re: 4D Compiler

2017-04-07 Thread Nigel Greenlee via 4D_Tech
Tim

I bow to your knowledge on this. I only go back as far as version 2.5 of 4D and 
in my first year of work did not have the compiler. I suspect there is little 
of the original David Hemmo code in the current compiler now. 

> On 7 Apr 2017, at 02:34, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
>> On Apr 6, 2017, at 7:52 PM, Lee Hinde wrote:
>> 
>> On Apr 6, 2017, at 3:09 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>>> 
>>> I wonder whatever happened to the original 4D Compiler writer David Hemmo?
>> 
>> David’s at Apple now.
> 
> I wonder what group he works in. You think he’s in the group that works on 
> compilers, LLVM, Clang and all the super low level stuff?
> 
>>> When he wrote 4D Compiler back in 1990 I thought he was a programming 
>>> god... 
>> 
>> So did ACIUS, given the original pricing.
> 
> I don’t remember the 4D Compiler 1.0 price. Was it $999?  I do remember that 
> you got 4D Compiler on a floppy diskette that was a key disk you could not 
> copy. I remember having to pass that disk around at the place I worked 
> whenever anyone wanted to compile and it asked for the diskette.
> 
> Tim
> 
> 
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.com
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: 4D Compiler

2017-04-04 Thread Nigel Greenlee via 4D_Tech
Chuck

Yep thats pretty much what i am figuring..but I was just curious if anyone know 
what the 'trigger points’ that cause it to give up are-if we knew what they 
were we could clear up those errors first(I have been at this one all day today 
and most of yesterday)

Nigel Greenlee

> On 4 Apr 2017, at 17:19, Charles Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:y a
> 
> On Tue, Apr 4, 2017 at 12:05 PM, Nigel Greenlee via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Just out of curiosity does anyone know why the compiler does this(its a
>> long time since i have had more than 2 errors in the compiler because i
>> compile everytime i change a piece of code to check for syntax before i
>> even test it)
> 
> 
> I would think that at times when compiler hits an error it can not go
> further down that path of logic, so it can not report errors later in that
> code
> 
> Regards
> Chuck
> 
> 
> -- 
> -
> Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
> Informed Solutions, Inc.
> Brookline, MA 02446 USA Registered 4D Developer
>   Providers of 4D, Sybase & SQL Sever connectivity
>  http://www.informed-solutions.com
> -
> This message and any attached documents contain information which may be
> confidential, subject to privilege or exempt from disclosure under
> applicable law.  These materials are intended only for the use of the
> intended recipient. If you are not the intended recipient of this
> transmission, you are hereby notified that any distribution, disclosure,
> printing, copying, storage, modification or the taking of any action in
> reliance upon this transmission is strictly prohibited.  Delivery of this
> message to any person other than the intended recipient shall not
> compromise or waive such confidentiality, privilege or exemption
> from disclosure as to this communication.
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

4D Compiler

2017-04-04 Thread Nigel Greenlee via 4D_Tech
Hi

I have always been curious-but really never had to see this in this way. 

I am currently updating a system which has never been compiled-not with a view 
to compiling but to clear up syntax errors. So i started with some number of 
errors(somewhat north of 100)…i cleared some stuff..and then suddenly i had 
some more errors.

In the past I always thought this was because errors of one type had been 
cleared(ie. syntax) and now it could see bad assignments. But in this case it 
was not so..and the errors now reported are probably more significant

Just out of curiosity does anyone know why the compiler does this(its a long 
time since i have had more than 2 errors in the compiler because i compile 
everytime i change a piece of code to check for syntax before i even test it)


Nigel Greenlee



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

Component Capabilities

2017-03-23 Thread Nigel Greenlee via 4D_Tech
All

I recently posted regarding some work i have been doing to move(and improve) my 
code management functionality from my database to a component. The main 
objective of this was speed. Having moved all my code relating to methods i am 
now looking at the code i have that stores a binary version of a 4D form. I 
have perfectly working in code in my (host) database but i really would like to 
move as much of this one to my component as possible.-it does a fair bit of 
‘heavy lifting reading all the properties of each object on each page of each 
form and building an object(for the form)  and then comparing the object to the 
previous version.

What i am really interested in is to know what others who have undertaken this 
kind of thing have done to get around :


METHOD GET CODE($_Txt_MethodName;$_t_MethodText;*) ... (ETC)

This of course cannot be executed on the component when it is compiled(and 
there is no point in this component if it is not compiled).-i had a try of 
running it in an execute statement-but that did not work(unless i missed 
something)!


With project methods etc I am getting them on the host and passing the code to 
the component for processing-it returns(if required) updated code, to be honest 
that is good enough for speed. I am pretty happy with the results



Now i am dealing with forms where I get lots of raw information.

(for example)...

OBJECT GET EVENTS(*;"";$_aL_FormEvents)  //gets a list of the form events
FORM GET VERTICAL RESIZING($_Bo_vResize;$_L_minHeight;$_L_MaxHeight)
FORM GET HORIZONTAL RESIZING($_Bo_hResize;$_L_mWidth;$_L_MaxWidth)

...and I wondered if anyone has found a way to do this kind of thing from a 
compiled component on the uncompiled structure. If it can't i will just move 
the object process(comparison to old version of form) but I thought maybe I am 
missing a trick…

I looked at the work done in the unit testing programme from Mark Schaak-to see 
what cleverness he might be up to and notice that in there he has ready to go 
code for the host component which creates methods-but i could not see anything 
more complex than that(in this case i don’t need to create methods on the host 
database-they already exist and I am nor distributing this code)

any ideas?


Nigel Greenlee









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

Regex

2017-03-22 Thread Nigel Greenlee via 4D_Tech
Hi.

I am not very good with regex and looking for some ideas. 

The following regex says if matches

$_RegexString:=\\b(?i)On*

$_t_text=(LONG TEXT CONTAINING) somewhere the word O2FX2I

$_bo_IsFound:=Match regex($_RegexString;$_t_Text;1;$_l_Start;$_l_End)

My regex should be only finding if the word(In this case ‘on’) if the beginning 
of a word in the text(so should find if my regex word was ‘o2' but not ‘on’)

Can anyone guide me what my regex string should have been-my head is hurting:)

Nigel Greenlee


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

Re: Host Structure in a component-Enhancing 4D Code-you really want to see this

2017-03-16 Thread Nigel Greenlee via 4D_Tech
Hi

Thanks(scroll down for link to a nice video)

Dont really know what was going on. Think i was being blind to an accidental 
reference to $tableNums. All working now.-replaced the locals with process vars 
and tidied it up and its all good. 

Incidentally i had lots of fun with updating records using an execute immediate 
statement with a built line of the update where part of the update was a long 
bit of text that contained sections lifted from my code-all kinds of characters 
i there, even wrapped in [ ] i was getting errors-changed to not using 'execute 
immediate’ and my errors went away.

Does anyone know a better way of to check if the table/structure exists.? i 
currently call this..and other than a Session Variable(<>DIff_bo_TablesChecked) 
don’t know of a way to avoid it

Begin SQL
CREATE DATABASE IF NOT EXISTS DATAFILE  <>; 
 Use LOCAL DATABASE DATAFILE  <> AUTO_CLOSE;  
EXECUTE IMMEDIATE :SQLTEXT;
Use database SQL_Internal;
End SQL


This code is for my own Code Manager. I have existing and long standing code 
that runs on my system setting method headers and saving out copies of the code 
and writing to a changes document a summary of the changes to a method. This 
code has always been a bit slow(there is a detectable delay as you close 
methods)

 I have always been guilty of forgetting to type my variables  and inspired by 
a comment on here about extracting variables from a method returned to a half 
baked piece of code I had that did the same..the difference was I want to 
extract not just locals i want to extract all the variables and make sure 
declarations are made at the top of methods. 

Being a bit obsessive I have been beating through this in my spare time over 
the past couple of weeks. Extracting Locals and interprocess variables was 
pretty easy the challenge was how to successfully extract variables. I was 
EVENTUALLY happy with the result of this(plenty of gotchas along the 
way)-having a method that ran over all my code and build the declarations.

The problem then was that it too was a bit slow-parsing a long method line by 
line uncompiled is just never going to be rocket fast so I wanted to move it to 
a component. I already had a component as part of my code manager because 
DIFFING two methods(based on 4D code published by David Dancy) was REALLY slow 
uncompiled and I had put that in a component.

I slowly moved parts of my 'variables extractor’ to the component till i had 
something that could be included in my code manager to build the variables on 
method save-now i can extract the variables from even in a large method in just 
about no time.

The SQL code I was working on was to  to store the history of changes in an 
external structure(I had already started on that-previously this was written 
out to a document and of limited use). Moving them to an external database 
means I can now easily create a view of method changes to show all the history 
of a piece of code, and do some things around that(fix/revert/report etc) 
...thats my next little side project.

 The compiled component code manager is now working the way I want and this 
nicely enhances my code

I thought i would share a little video of what happens in my code…

https://www.dropbox.com/s/j5x0vy45j1ikocg/Automatical%20Typing%20of%20variables.mp4?dl=0
 


Answers to inevitable questions:-

Did i have to change my structure to do this? Not at all. The are a couple 
methods in my host code-less now than before the component and I hoping to 
reduce them down further as well.

How does it know the type of the variables? I use a naming convention so it 
recognises by the variable type..if you have no naming convention it would be 
hard to do. I read the compiler directives as well

What about $1 etc? it recognises them by assignment(or from the compiler 
directives).  Almost always my code has $_l_MyVariable:=$1(In the top of the 
code) so we can deduce that $1 is a longint(and $_l_MyVariable:=$1-> means $1 
is a pointer!). I have considered using assignments to work out the type of all 
variables-but as I use a naming convention It was work I did not need to do.

What about ‘badly’ named variables. If i lazily type For($i;1;…)..old habits 
die hard! then the code wont know what the variable is so will declare 
//C_UNKNOWN..so i can just find them and fix ‘em..-

Could a different naming convention be used? Yes. -i have currently hard coded 
my naming convention but i plan to change that to pick up a document in which 
any naming convention can be defined

Could a different header model by used Yes-again i currently have my 
headers(different rules for project methods, form methods, triggers, object 
methods) hard coded  i also plan to change this to pick up the header 
definitions from documents.

What about if there are methods you don’t want this to happen in. I have a few 
method like that-as this code was in my 

Host Structure in a component

2017-03-13 Thread Nigel Greenlee via 4D_Tech
I know this topic has been covered in General before but there are some things 
I am not sure about and i seem to be having a problem.

I want to get the details of a host structure in a COMPILED component.


ARRAY LONGINT($tableNums;0)
ARRAY TEXT($tableNames;0)
Begin SQL
 SELECT TABLE_ID
 FROM _USER_TABLES
 INTO :$tableNums;

 SELECT TABLE_NAME
 FROM _USER_TABLES
 INTO :$tableNames;
End SQL

I know that code works inside the host database uncompiled and my reading 
suggested this is how i should be getting the structure in the component. 
However i am getting an error(just after this SQL. (error 1430) the variable 
does not exist.

I was wondering if anyone could enlighten me where I am going wrong here.


Thanks.

Nigel Greenlee


 


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

Re: osx open url vs osascript FYI

2017-03-13 Thread Nigel Greenlee via 4D_Tech
David

This works for me launching(all sorts of) documents..(OSX there is a another 
bit bit i have for windows)

$_t_DocumentPath:=<—full path to document
If (Test path name($_T_DocumentPath)=Is a document)
$_t_PosixPath:=Convert path system to POSIX($_t_DocumentPath)

$_t_FilePath:=$_t_char+$_t_PosixPath+$_t_Char
$_t_applicationName:=UTIL_GetDocApps ($_t_DocumentType;True)  //do some stuff 
to check what app they want(not entirely necessary  This will only ask once!-so 
could be launching an HTML doc with preferred browser for example

If ($_t_applicationName#"")
  //now we must checkt the applicaiton exist
$_t_ApplicationPath:=System folder(Applications or program files)

If (Not(Test path name($_t_ApplicationPath+$_t_applicationName)=Is a document))
  //i am not faffing about looking for apps installed somewhere else..
LAUNCH EXTERNAL PROCESS("open "+Char(34)+$_t_PosixPath+Char(34))

Else 
LAUNCH EXTERNAL PROCESS("open -a "+Char(34)+$_t_applicationName+Char(34)+" 
"+Char(34)+$_t_FilePath+Char(34))

End if 

Else 
LAUNCH EXTERNAL PROCESS("open "+Char(34)+$_t_PosixPath+Char(34))

End if 




> On 13 Mar 2017, at 07:08, David Ringsmuth via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Bernd,
> 
> Yes, html was what I first tried.
> 
> David Ringsmuth
> 
> From: Bernd Fröhlich via 4D_Tech
> Sent: Saturday, March 11, 2017 4:57 AM
> To: 4d_tech@lists.4d.com
> Cc: Bernd Fröhlich
> Subject: Re: osx open url vs osascript FYI
> 
> David Ringsmuth:
> 
>> I tried many different things to launch a .htm on OSX using OPEN URL, and it 
>> would not automatically open the document.
> 
> 
> Have you tried using ".html" instead of ".htm"?
> What happens if you doubleclick your .htm-document in the finder?
> 
> Greetings from Germany,
> Bernd Fröhlich
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Tables created with SQL CREATE TABLE command and triggers

2017-03-08 Thread Nigel Greenlee via 4D_Tech
Pat

Ah Relationships-well you never mentioned them I was thinking of an 
Autistic System:)

…i guess there is no way other than external database file with 500 or so  
tables(that should be enough:))  as mentioned by Tim Nevels (You can easily 
automate the creation of the tables of course through your uncompiled structure.

(i would still put this in an external datafile if it where me! data can live 
there and not in the main database and therefore remain intact on upgrade)..

Nigel




> On 8 Mar 2017, at 14:34, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi Nigel,
> A cunning plan, but wouldn't work because
> a) only one database can be active at a time, so only one table would be
> accessible.
> b) We allow the customer to define their own relations between their
> tables, and that wouldn't be possible.
> 
> But I like your outside-the-box thinking :)
> Pat
> 
> On 8 March 2017 at 12:43, Nigel Greenlee via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> Pat
>> 
>> OK..
>> 
>> 
>> Let me suggest something crazy then...
>> 
>> 1) You create an external data(file) with a single table(with a trigger)..
>> Lets call this the template.-we never use the template
>> 
>> 2) When a user wants to create a custom table you duplicate the
>> template(Using LEP)..rename the ‘copy’ to reflect the custom table name.
>> The copy has a single table with a trigger(a generic trigger i
>> assume)..and a single field(UUID auto generate)..
>> 
>> 3) You use alter to alter the name of the table in the copy and add the
>> custom fields
>> 
>> So you end up with N external data-files one for each custom table.
>> 
>> …maybe someone has a better way
>> 
>> Nigel
>> 
>> 
>> 
>>> On 8 Mar 2017, at 12:32, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com>
>> wrote:
>>> 
>>> Hi Nigel,
>>> Yeah I did look into that option as well, but it doesn't solve the
>> trigger
>>> problem. Triggers are essential to us!
>>> Pat
>>> 
>>> On 8 March 2017 at 12:19, Nigel Greenlee via 4D_Tech <
>> 4d_tech@lists.4d.com>
>>> wrote:
>>> 
>>>> Pat
>>>> 
>>>> A sideways question for your concept.
>>>> 
>>>> 1) Are you creating the tables in the main structure or using the
>> external
>>>> datafile( CREATE DATABASE IF NOT EXISTS DATAFILE
>>>> <<$_t_CustomTablesPath>>;) .(I use an external datafile structure for
>> some
>>>> things-very useful..it could be useful in your scenario as the created
>>>> tables and data could remain intact with new builds.
>>>> 
>>>> 
>>>> I have not tested to see if you can set the trigger code on a table in
>> an
>>>> external data file and if you can do it compiled..the external datafile
>> is
>>>> not compiled..but i suspect the answer is no!
>>>> 
>>>> I guess the other option is to go back to the days before we had
>> triggers
>>>> and set a process to look for modified records in the created tables…
>>>> 
>>>> Nigel Greenlee
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On 8 Mar 2017, at 10:10, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com>
>>>> wrote:
>>>>> 
>>>>> Hi Arnaud,
>>>>> Yes, but the thing is that the TABLES will not be missing, only the
>>>> custom
>>>>> fields that the client created. Now if there was a REGENERATE MISSING
>>>>> FIELDS function ...
>>>>> 
>>>>> On 8 March 2017 at 09:59, Arnaud de Montard via 4D_Tech <
>>>>> 4d_tech@lists.4d.com> wrote:
>>>>> 
>>>>>> 
>>>>>>> Le 8 mars 2017 à 10:19, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com
>>> 
>>>> a
>>>>>> écrit :
>>>>>>> 
>>>>>>> [...] Also I've realised that there is another fundamental problem
>> with
>>>>>> the idea
>>>>>>> of allowing customers to create new fields: when we issue a program
>>>>>> update,
>>>>>>> those custom fields - and their data - will be lost!
>>>>>> 
>>>>>> See GET MISSING TABLE NAMES and REGENERATE MISSING TABLE:
>>>>>> <http://doc.4d.com/4Dv16/4D/16/GET-MISSING-TABLE-NAMES.
>>&g

Re: 4D v15.4: Sequence number issue / Duplicate key error

2017-03-08 Thread Nigel Greenlee via 4D_Tech
Rudy

In my vast head banging experience of this its usually that a record has been 
created with no ID, or in the case of sequence the 4D sequence is out of sync. 

My suspicions would be records in transactions or record deletions

Two suggestions..

1) Put some code in the ‘save’ part of the record that check the ID is unique 
before you save it.

if(Record number([Table])=-3)/if it is a new record not saved yet then there 
should be nothing with the id on
$_l_Max:=0
else
$_l_Max:=1//this record
end if
$ID:=[table]id

SET QUERY DESTINATION(Into variable;$_l_RecordCount)
Repeat
query([table];[table]id=$ID)
if($_l_RecordCount> $_l_Max)
$ID:=$ID+1 //..the id will clash
end if
until($_l_RecordCount<=$_l_Max)
SET QUERY DESTINATION(Into current selection)
[table]id:=$ID

1) add a UUID(auto increment) primary key make your existing ID not the 
primary/unique(no need to change relations or anything like that) and put 
something in to watch for duplicates and report them to you-then you can look 
at how they are happening without users having an issue). 




Rebuilding the index hides the problem because it resets the sequence number.



.
> On 8 Mar 2017, at 12:26, Two Way Communications via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hi all,
> 
> I ran into an issue while using SEQUENCE NUMBER in 4D v15.4, in a 
> client-server setup.
> 
> I put the result in a field called ‘ID’, which is the primary key for that 
> table, and by default is unique. Auto increment is off.
> The code is running in a transaction.
> 
> Frequently, users get the error ‘Cannot save the record, DUPLICATE KEY’.
> Then, I go to the structure and rebuild the index on that field (ID).
> 
> They try again, and the record is saved without a problem.
> 
> After a while, though, and after other users have added records to this 
> table, the problem re-occurs.
> Rebuilding the index again fixes the problem.
> 
> I have exported the data to a tab delimited file, truncated the table, and 
> imported the data. Problem is still there.
> I have compacted the data file. Same problem.
> 
> Any ideas what can be the cause?
> 
> Kind regards,
> 
> Rudy Mortier
> Two Way Communications bvba  -
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Tables created with SQL CREATE TABLE command and triggers

2017-03-08 Thread Nigel Greenlee via 4D_Tech
Pat

OK..


Let me suggest something crazy then...

1) You create an external data(file) with a single table(with a trigger).. Lets 
call this the template.-we never use the template

2) When a user wants to create a custom table you duplicate the template(Using 
LEP)..rename the ‘copy’ to reflect the custom table name.
The copy has a single table with a trigger(a generic trigger i assume)..and a 
single field(UUID auto generate)..

3) You use alter to alter the name of the table in the copy and add the custom 
fields

So you end up with N external data-files one for each custom table.

…maybe someone has a better way

Nigel



> On 8 Mar 2017, at 12:32, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi Nigel,
> Yeah I did look into that option as well, but it doesn't solve the trigger
> problem. Triggers are essential to us!
> Pat
> 
> On 8 March 2017 at 12:19, Nigel Greenlee via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> Pat
>> 
>> A sideways question for your concept.
>> 
>> 1) Are you creating the tables in the main structure or using the external
>> datafile( CREATE DATABASE IF NOT EXISTS DATAFILE
>> <<$_t_CustomTablesPath>>;) .(I use an external datafile structure for some
>> things-very useful..it could be useful in your scenario as the created
>> tables and data could remain intact with new builds.
>> 
>> 
>> I have not tested to see if you can set the trigger code on a table in an
>> external data file and if you can do it compiled..the external datafile is
>> not compiled..but i suspect the answer is no!
>> 
>> I guess the other option is to go back to the days before we had triggers
>> and set a process to look for modified records in the created tables…
>> 
>> Nigel Greenlee
>> 
>> 
>> 
>> 
>> 
>> 
>>> On 8 Mar 2017, at 10:10, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com>
>> wrote:
>>> 
>>> Hi Arnaud,
>>> Yes, but the thing is that the TABLES will not be missing, only the
>> custom
>>> fields that the client created. Now if there was a REGENERATE MISSING
>>> FIELDS function ...
>>> 
>>> On 8 March 2017 at 09:59, Arnaud de Montard via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
>>>> 
>>>>> Le 8 mars 2017 à 10:19, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com>
>> a
>>>> écrit :
>>>>> 
>>>>> [...] Also I've realised that there is another fundamental problem with
>>>> the idea
>>>>> of allowing customers to create new fields: when we issue a program
>>>> update,
>>>>> those custom fields - and their data - will be lost!
>>>> 
>>>> See GET MISSING TABLE NAMES and REGENERATE MISSING TABLE:
>>>> <http://doc.4d.com/4Dv16/4D/16/GET-MISSING-TABLE-NAMES.
>> 301-3036706.en.html
>>>>> 
>>>> 
>>>> --
>>>> Arnaud de Montard
>>>> 
>>>> 
>>>> 
>>>> 
>>>> **
>>>> 4D Internet Users Group (4D iNUG)
>>>> FAQ:  http://lists.4d.com/faqnug.html
>>>> Archive:  http://lists.4d.com/archives.html
>>>> Options: http://lists.4d.com/mailman/options/4d_tech
>>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>>> **
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> *
>>> CatBase - The Database Publishing Solution
>>> tel: +44 (0) 207 118 7889
>>> w: http://www.catbase.com
>>> skype: pat.bensky
>>> *
>>> **
>>> 4D Internet Users Group (4D iNUG)
>>> FAQ:  http://lists.4d.com/faqnug.html
>>> Archive:  http://lists.4d.com/archives.html
>>> Options: http://lists.4d.com/mailman/options/4d_tech
>>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>>> **
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **

Re: Tables created with SQL CREATE TABLE command and triggers

2017-03-08 Thread Nigel Greenlee via 4D_Tech
Pat

A sideways question for your concept.

1) Are you creating the tables in the main structure or using the external 
datafile( CREATE DATABASE IF NOT EXISTS DATAFILE  <<$_t_CustomTablesPath>>;) 
.(I use an external datafile structure for some things-very useful..it could be 
useful in your scenario as the created tables and data could remain intact with 
new builds.


I have not tested to see if you can set the trigger code on a table in an 
external data file and if you can do it compiled..the external datafile is not 
compiled..but i suspect the answer is no!

I guess the other option is to go back to the days before we had triggers and 
set a process to look for modified records in the created tables…

Nigel Greenlee






> On 8 Mar 2017, at 10:10, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi Arnaud,
> Yes, but the thing is that the TABLES will not be missing, only the custom
> fields that the client created. Now if there was a REGENERATE MISSING
> FIELDS function ...
> 
> On 8 March 2017 at 09:59, Arnaud de Montard via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> 
>>> Le 8 mars 2017 à 10:19, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> a
>> écrit :
>>> 
>>> [...] Also I've realised that there is another fundamental problem with
>> the idea
>>> of allowing customers to create new fields: when we issue a program
>> update,
>>> those custom fields - and their data - will be lost!
>> 
>> See GET MISSING TABLE NAMES and REGENERATE MISSING TABLE:
>> <http://doc.4d.com/4Dv16/4D/16/GET-MISSING-TABLE-NAMES.301-3036706.en.html
>>> 
>> 
>> --
>> Arnaud de Montard
>> 
>> 
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>> 
> 
> 
> 
> -- 
> *
> CatBase - The Database Publishing Solution
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Old doesn't work with object fields....or rather Objects in General

2017-02-23 Thread Nigel Greenlee via 4D_Tech
David

This slightly changes the topic of the OLD on Object fields to a more detailed 
discussion of the ‘shortcomings' of objects….

(On the topic of the former in my case if I am creating an object in code its 
likely to be created with the same key order each time so if the ’stringified' 
version old is not =current then its changed-and even if it was not in the same 
order it has changed so it is modified). 

Dealing with the Form Meta data..I would really like it if 4D implemented the 
object and form meta data concept because you could extract easily the entire 
representation of a form which is what I currently do with some really 
interesting code-and i know  a number of others have done similar-maybe those 
of us who are interested in such could pool our code and end up with a common 
concept of the structure of the Meta object (Object keys named in a common way, 
common thinking of how to represent form elements etc)-waiting for 4D could be 
a while-probably there is stuff other people are doing that is better than mine.

I will throw some stuff here..if you or others  want to work this up feel free 
to come back to me:

There are a couple of Form Propeties and Object properties you cant(I think) 
get. This was a note i made in my code

 //the following form settings cannot be obtained in code(V14)
  //Markers
  //access
  //menu bar
  //print settings
  //appearance
  //form type
  //inherited form table
  //inherited form name
  //save geometry

and there is an interesting problem that occurs if you have an inherited 
form(took me a while to work out what the hell was going on)…if an inherited 
form has an object named ‘variable1’ and the form itself also has ‘variable1’ 
When you parse the form you get the objects of the form and the objects of the 
inherited form. When you get the variable associated with ‘variable1’ you might 
get the one from the form or the one from the inherited form..and it seems 
random which order you get the objects in-i had to make sure my object names on 
inherited forms where unique.


For your delectation I have put a copy of my version of a  form export (this is 
for a very basic auto made 4D form-i have some really complex forms-and the 
code building this may not be perfect) on my dropbox-

https://www.dropbox.com/s/sr3xfqrxfqton1p/FORM_PO_Purchase_Order_Item_Input.txt?dl=0
 
<https://www.dropbox.com/s/sr3xfqrxfqton1p/FORM_PO_Purchase_Order_Item_Input.txt?dl=0>
 

(Its easier as a human to read this if you replace the , with cr)

I build an object with the data put the object in a blob and create a document 
for safe keeping. In Previous attempts at this I used XML and boy did that get 
ugly!  I have code that reads this format back in and is able to compare the 
current version of a form with a saved version of the form-I do not have fancy 
code that reads this and creates or fixes a form or anything, it just tells me 
what has physically changed.

I would propose:
1) A common way for creating a form(and its objects) in an object.
2) A common way for comparing two complex objects where the ‘structure’ of the 
objects is known producing a either a human readable(string) of changes or an 
object representing the changes. e.g a way of comparing two representations of 
a form.

Let know if you or others are interested.

Nigel Greenlee


> On 23 Feb 2017, at 00:12, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> Seems really inefficient, but it work
> 
> 4D has taken pains to say that object fields *are not JSON*. They can be
> represented as JSON, but they aren't stored or accessed as JSON internally.
> So, it does seem like a good bug report/feature request to make Old work
> correctly on object fields. In fact, it's probably one of the more
> important field types that it could work on it. Having to serialize it and
> run an expensive comparison ourselves feels a bit over the top.
> 
> If you put in a feature request/bug report, shoot a note over here so that
> any of us that care can go and vote for your idea.
> 
> Speaking of objects and feature requests, Cannon "Object Module" Smith made
> a fantastic feature request the other day:
> 
> http://forums.4d.fr/Post/EN/19051683/1/19051684
> 
> The idea is to have an automatic, internal C_OBJECT-type structure (a
> dictionary) maintained by 4D for each widget on a form. If they did this,
> you wouldn't see anything different on the form, but if you wanted to
> associated custom attributes or data with the widget (rules, bindings,
> hints, extra lookup data, filters, formats, privileges, etc.), you would
> know right where to get/set the data. It may sound like a small thing, but
> it would be a *huge* win. Just massive. You can do something on this order
> now with a custom C_OBJECT in a form or process, but the init/cleanup cycle
> is kind of 'heavy'. Also, that makes the price o

Re: Live "On Column Resize" event

2017-02-09 Thread Nigel Greenlee
Tim

That sounds like a bug that 4D have introduced-have you reported it to them? 
There used to be a nasty killer if you put a trace in a form resize event 
-probably from a similar way of handling the call to how they are now handling 
the on column resize-it should only really actually be an on column resize when 
you mouse up. 

have you tried using the mouse state?

Get mouse($mousex;$mousey;$mousebutton)
if($Mousebutton=0), //mouse up-if mouse is down we are still resizing 
do stuff
end if



 I use an on column resize event on my forms and hope this is resolved before i 
start working with V16!

Nigel Greenlee


> On 8 Feb 2017, at 20:04, Tilman Haerdle <tilman.haer...@extragroup.de> wrote:
> 
> With 4D v16.0 the event "On Column Resize" fires live during resize of 
> listbox columns.
> 
> This has severe effects on methods who do stuff after resizing a column. If 
> the method takes to long irt is invoked again while it is still running which 
> results sooner or later in a stack overflow and subsequently a crash.
> 
> I'd wish there was a "On After Column Resize" event for methods who take 
> place after the fact and not during the resize action.
> 
> Any strategies to cope with the current implementation in v16?
> 
> Cheers,
> Tilman Haerdle
> 
> extragroup GmbH
> Pottkamp 19
> 48149 Münster
> Germany
> 
> Mobil: +49 178 721 5210 (Skype: TilmanHaerdle)
> Fax: +49 251 39089-10
> WWW: http://www.extragroup.de
> Email: tilman.haer...@extragroup.de
> 
> Geschäftsführer: Lars Busch
> Registergericht: Amtsgericht Münster / HRB: 5624 Steuer Nr.: 337/5903/0421 - 
> UstID: DE 204607841
> 
> Vectorworks interiorcad - profacto
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Convert Picture Crashing 4D

2017-02-09 Thread Nigel Greenlee
Sannyasin

Did you try 

SET PICTURE TO PASTEBOARD ? with the crashing pictures. If that does not crash 
that might give you an option(get clipboard data..etc etcif it does i think 
if you can’t then resolve it using Brunos' picture analysis code you will need 
to kiss them records goodbye. 

Good luck.

Nigel

> On 9 Feb 2017, at 02:14, Sannyasin Siddhanathaswami  wrote:
> 
> Aloha,
> 
> Thanks Nigel, and all. Even exporting the picture also causes a crash on some 
> of the pictures.
> 
> I’ll do some more testing.
> 
> In answer to Charles’s questions, both server and client are on a Mac, so 
> quicktime is installed by default. I don’t see how to determine if a picture 
> is compressed.
> 
> I’ll try these things next:
> Convert to PNG. If that works, convert again to JPG
> Try PICTURE to BLOB, then BLOB to PICTURE instead of CONVERT PICTURE
> Try the obsolete " _o_QT COMPRESS PICTURE”
> 
> I’ll let you all know what works for these funky pictures.
> 
> 
> Sannyasin Siddhanathaswami
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Convert Picture Crashing 4D

2017-02-07 Thread Nigel Greenlee
Bruno.

Nice code.-solid bit of work there..don't mind if I take a copy do you.

Nigel Greenlee


> On 7 Feb 2017, at 09:54, Bruno LEGAY <b.le...@ac-consulting.fr> wrote:
> 
> Hi,
> 
> Take a look here :
> http://forums.4d.fr/Post/FR/17329223/1/17329529#17329529
> 
> It is 4D code to parse internal 4D picture format (and extract the various 
> original format picture data).
> 
> You can test it to see what's wrong with your pictures…
> 
> HTH
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Convert Picture Crashing 4D

2017-02-07 Thread Nigel Greenlee
Sannyasin

Sorry i should have been more explanatory there..something like this(this all 
assumes the picture does load in the record)

$Path:=System folder(Documents folder)
$Path:=$Path+"Pictures"
If (Test path name($Path)#Is a folder)
CREATE FOLDER($Path)
End if 
$OutPath:=$path+Folder separator+"Converted_Pictures"
If (Test path name($OutPath)#Is a folder)
CREATE FOLDER($OutPath)
End if 
$OutPath:=$OutPath+Folder separator
ALL RECORDS([TABLE])
PICTURE CODEC LIST($Codecs;$Names)

For ($i;1;Records in selection([TABLE]))
If (Picture size([TABLE]Picture_pic)>0)
$_t_DocName:=[TABLE]RECORDIDSTRING

PICTURE TO BLOB([TABLE]Picture_pic;$_aPicBlob;".jpg”)<-if this does not work 
try something else
$doc:=Create document($Path+Folder separator+$_t_DocName+".jpg")
CLOSE DOCUMENT($doc)
BLOB TO DOCUMENT($Path+Folder separator+$_t_DocName+".jpg";$_aPicBlob)
$PosixPath:=Convert path system to POSIX($Path+Folder 
separator+$_t_DocName+".jpg")
$OutPosixPath:=Convert path system to POSIX($OutPath+$_t_DocName+".png")
$_t_Script:="sips -s format png "+$PosixPath+"  --out "+$OutPosixPath
LAUNCH EXTERNAL PROCESS($_t_Script)
end if
//here you would get the image from the new document back into the record if 
that is what you are planning to do
NEXT RECORD([TABLE])

End for 

I cant say if that will be any better-but if this will convert the picture(or 
even just export it in JPEG format) then you can open the image in preview and 
if it is loading there can then bring the JPEG back into the record.

> On 7 Feb 2017, at 09:36, Nigel Greenlee <nigel.green...@me.com> wrote:
> 
> Sannyasin
> 
> Hi-if you having trouble with 4D crashing it you might consider exporting the 
> picture in the what ever format it currently is and then using LEP to call 
> the command line to convert it to a JPG, then you can re-import the new 
> picture.
> 
> https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/sips.1.html
>  
> <https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/sips.1.html>
> 
> Nigel Greenlee
> 
> 
> 
>> On 6 Feb 2017, at 22:02, Sannyasin Siddhanathaswami <sid...@hindu.org> wrote:
>> 
>> Aloha,
>> 
>> We are starting the preparations for v16, and dealing with the picture 
>> issues. Let’s just say we have tons of ancient photos in our database! We 
>> are currently using v15.3 on a Mac (server - client).
>> 
>> Basically, we are trying to convert all pictures to jpg. Unfortunately, 
>> doing this crashed 4D:
>> CONVERT PICTURE([Members]Picture;".jpg";0.8)
>> 
>> Even putting the picture field into a variable before converting crashes 
>> during the “Convert Picture.” It’s not all picture, just many of them. By 
>> crash, the 4D.app just quits to the desktop with a crash report.
>> 
>> I can view these pictures just fine in an input form. If I copy the picture 
>> out of the input form, into another app, then back in, the conversion works 
>> fine.
>> 
>> Anyone have any tips on how to approach this? If I run the method to execute 
>> on server, the whole server crashes…
>> 
>> Thanks,
>> 
>> 
>> Sannyasin Siddhanathaswami
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Convert Picture Crashing 4D

2017-02-07 Thread Nigel Greenlee
Sannyasin

Hi-if you having trouble with 4D crashing it you might consider exporting the 
picture in the what ever format it currently is and then using LEP to call the 
command line to convert it to a JPG, then you can re-import the new picture.

https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/sips.1.html
 
<https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/sips.1.html>

Nigel Greenlee



> On 6 Feb 2017, at 22:02, Sannyasin Siddhanathaswami <sid...@hindu.org> wrote:
> 
> Aloha,
> 
> We are starting the preparations for v16, and dealing with the picture 
> issues. Let’s just say we have tons of ancient photos in our database! We are 
> currently using v15.3 on a Mac (server - client).
> 
> Basically, we are trying to convert all pictures to jpg. Unfortunately, doing 
> this crashed 4D:
> CONVERT PICTURE([Members]Picture;".jpg";0.8)
> 
> Even putting the picture field into a variable before converting crashes 
> during the “Convert Picture.” It’s not all picture, just many of them. By 
> crash, the 4D.app just quits to the desktop with a crash report.
> 
> I can view these pictures just fine in an input form. If I copy the picture 
> out of the input form, into another app, then back in, the conversion works 
> fine.
> 
> Anyone have any tips on how to approach this? If I run the method to execute 
> on server, the whole server crashes…
> 
> Thanks,
> 
> 
> Sannyasin Siddhanathaswami
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Subtable compatibility and conversion...

2017-02-02 Thread Nigel Greenlee
Robert

Firstly i think the ‘subrecord’ field is missing from the line i think it 
should be something like ([Plant_IU]sufieldname).

also…

I tackled moving from subtables on a system that had 27+ of them and at least 
one where a sub-records should never have been the solution(i think the 
sub-table had 30 fields and that was more than the parent record!) when i went 
to V11, such that to go from pre-v11 my customers had to export their data and 
import for V11(i deleted the fields on the tables in V11 and removed the 
’special’ relationship so the pre-v11 data of customers would not have opened 
in V11).

I was working on my own, and did the whole conversion in under a week-and then 
wondered why i had not done it years before-its not a pleasant task going back 
through old code and changing it just to end up looking exactly the same to the 
users but you are probably going to need to tackle it at some point and the 
satisfaction of doing it was great.


This was a fair size system(6000+methods 120+tables 1000+forms). 

I was already using listbox(and previously area-list) for most sub-record 
displays which probably made the re-organisation of forms easier and already 
had in place custom search windows for each table which meant keeping thing 
simple for the users was easy too.

Nigel Greenlee

> On 2 Feb 2017, at 04:54, Robert ListMail <listm...@usersoft.com> wrote:
> 
> I’m working with a database that’s still being used in v11 and where the 
> current development version is in v15. There have been thousands of syntax 
> error fixes and now I’m dealing with the 7 existing subtables. Shouldn’t the 
> compatibility mode provided by the conversion continue to work in v15 and 
> possibly v16?  I have the following error that’s being flagged during a 
> compiler syntax check… Specifically:
> 
> _o_FIRST SUBRECORD([Plant_IU])  //Error: Did not expect a table
> 
> Is there a way to continue in compatibility mode?  Why am I getting the error 
> above?
> 
> Is there a detailed tech-note that maps out the migration path from a v14R3 
> or later database approach?
> 
> Thanks,
> 
> Robert
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

An interesting gotcha

2017-01-26 Thread Nigel Greenlee
Hi

I thought i would share the following with the NUG as somebody somewhere will 
get the same error(in fact a search reveals someone was getting it from the SVG 
component a while back). 

I am currently working on V14 but i am sure the same applies at least to 
earlier versions.

Ok so we all know that we can pass back a value from a method in $0

AND we all know that you can call the method without somewhere to receive $0 
and thats ok

…MyMethod and $Return:=MyMethod are both valid

So i have an existing method which launches some data in its own process. 
Normally this is asynchronous-i.e the launched process is not a dependant on or 
depended by the launching process. In this particular case it is a generic 
method displaying a selection of records in any table

The method is currently called from menu bars as well as some calls from other 
places in the system, and as such uses a menu parameter to know which table to 
display data for

So at the top of the method we have(something like!)

if(count parameters>1)
$_L_TableNumber:=$1
$_l_CalledfromProcess:=$2
//etc
else
$_Txt_parameter:=Get selected menu item parameter
$_l_CalledfromProcess:=Current Processs
$_L_TableNumber:=Num($_Txt_parameter)
end if

//then we have

if($_l_CalledfromProcess=Current Process)
$_l_NewProcess:=New Process($_t_ThismethodName;256000;”Record 
Browser”;$_L_TableNumber;current process)
else
//do stuff
end if


Ok so far so good..hope that is all clear

Last week I made and edit to this method so that after launching the process we 
return $_l_NewProcess in $0(i have a need to for the launched process to be 
watched for it to end in a specific usage). As soon as this is deployed in 
compiled mode it gets an error

Now what is interesting about the error is this:-

The error is(-20002)  “Error when loading the method “(method name)” with the 
name of the method there.

So my first instinct was to check if I was suddenly having a problem with ‘Get 
selected menu item parameter’ and put an alert before and after to test..and 
the error still comes but the alert does not..so the code is not running 
through and encountering an error, the error is before anything executes. So 
what we find here is the 4D is hoisting the variables.-and thats good to note.

Now in normal circumstances $0 not received anywhere is no problem, but when 
the call is from a menu item 4D does not like you trying to return $0. I don’t 
know if there are other circumstances where trying to return $0 causes a 
problem but would be interested know if anyone else knows of such a place.

Note the baecause of the apparent hoisting even if you ‘wrap’ the call to $0

if(Count paramaters>=1)
$0:=$_l_NewProcess
end if

This will still generate an error.


(30 mins to track this down..30 seconds to create a fix!)


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

Re: PDFtk: Updating librairies on Mac

2017-01-23 Thread Nigel Greenlee
Bertrand

I assume you want to ‘auto’ install the pdtk onto machines. I did this a few 
years ago(wanted to provide a way to secure PDFS before the option was 
available from 4D.

this is what i did

1) in my application resources folder i created a folder called additions and 
in there put the pdftk.mpkg

..because i was only using this for pdf encrption nothing happens unless you 
want to encrpyt a PDF

in my encyption code is for look for a preference that I am storing in a table 
this stores in BLOB..the preferences gives them defaults for whether the they 
want to prevent copying(from documents), editing o documents, printing of 
documents, and a whether to set a user password for documents, and also the 
owner password to set(all documents generated were to get the same owner 
password). The preferences could be over-ridden when producing a document
b) look to check the path:

$Path:=System folder
$Pos:=Position(":";$Path)
$Path:=Substring($Path;1;$pos)
$Path:=$Path+"opt"+":"+"pdflabs:pdftk:bin"+":"+"pdftk"
$PathPosix:=Replace string($Path;":";"/")
$IsaPath:=Test path name($Path)
this tells us if pdftk is already installed
if it is not installed then this
$script_folder_path_t:=Get 4D folder(Current resources folder)+"additions:"
$script_file_path_t:=$script_folder_path_t+"Pdftk.mpkg"
$path_system_t:=Replace string($script_file_path_t;":";"/")  //the POSIX 
separator
$target_volume_t:=Substring($path_system_t;1;Position("/";$path_system_t)-1)
$system_folder_t:=System folder(System)  //take care of the /Volumes/ syntax
$boot_volume_t:=Substring($system_folder_t;1;Position(":";$system_folder_t)-1)
$script_file_path_t:=Choose($boot_volume_t=$target_volume_t;Substring($path_system_t;Position("/";$path_system_t));"/Volumes/"+$path_system_t)
LAUNCH EXTERNAL PROCESS("open "+$script_file_path_t)
installed the package-of course this assumes they have rights to install things 
on the computer

the rest of the code took the already created PDF and using the posix path of 
it and the preferences etc
$command:=$PathPosix+" "+$DocName+" output "+$Before+$DocName2+" owner_pw 
"+$PasswordOwner+$PasswordUser+" allow "+$Prevent2+$Prevent+$Prevent3
SET ENVIRONMENT VARIABLE("_4D_OPTION_CURRENT_DIRECTORY";$PathName)
LAUNCH EXTERNAL PROCESS($Command)
(prevent 2 is printing, prevent 3 is editing and prevent is copying

I have put a copy of the code in my dropbox
https://www.dropbox.com/s/j7vb6b6jgrfg5xq/DB_ControlDataFilePath.txt?dl=0 


if has a few subcalls-all pretty standard things that should be self explanitory

> On 15 Jan 2017, at 19:15, Bertrand SOUBEYRAND  wrote:
> 
> 

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

Re: Audit Trails

2017-01-09 Thread Nigel Greenlee
Pat!

I never new you had changed gender!:)..last time i saw you  i am pretty certain 
you were a lady..


Nigel.


> On 9 Jan 2017, at 16:30, Daniel N. Solenthaler  wrote:
> 
> Dear all,
> 
> thank you for your contributions regarding my question about Audit Trails.
> 
> Special Thanks to Pat Bensky for his generous offer.
> 
> Daniel
> 
> 
> Daniel Nestor Solenthaler
> eMail: dan...@solenthaler.com
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Windows users

2017-01-09 Thread Nigel Greenlee
You can also use php-there is an example in the 4D documentation of this-no 
plug in required. Page 974 of the english 14.3 language document 

C_TEXT($userAccount)
PHP GET OPTION(PHP privileges;$userAccount)

ALERT($userAccount)

 



> On 9 Jan 2017, at 15:29, Tai Bui  wrote:
> 
> Hi,
> 
> There a number of ways to do this. One way is to try using the Internet 
> Commands' IT_MyTCPAddr command:
> http://doc.4d.com/4Dv16/4D-Internet-Commands/16/IT-MyTCPAddr.301-3069779.en.html
> 
> Best Regards,
> -Tai B.
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: OPEN DATA FILE

2016-12-21 Thread Nigel Greenlee
Sujit.


What about storing the data in another data file altogether that you can access 
from either.

So…something like this…


CREATE DATABASE IF NOT EXISTS DATAFILE <<$VerifyDataPath>> auto_close;
USE LOCAL DATABASE datafile <<$VerifyStructurePath>> auto_close;
CREATE TABLE IF NOT EXISTS VERIFY_INFORMATION(VERIFY_BLOB BLOB, VER_DATE 
DATE);..///etc
USE DATABASE SQL_INTERNAL;

then just store the path to the verify datafile in a the a

Begin SQL
USE LOCAL DATABASE DATAFILE <<$VerifyDataPath >> auto_close;
SELECT  VERIFY_BLOB
FROM VERIFY_INFORMATION
WHERE BIT_LENGTH(VERIFY_BLOB) > 0
INTO :$VER_BLOB, :$VersionData
USE DATABASE SQL_INTERNAL;
End SQL

I do something like this in a different context(and not for using from two data 
files)..I use a blob for fields because i encrypt the data(with the keys hard 
coded)

Nigel

> On 19 Dec 2016, at 23:00, Sujit Shah <sujit...@gmail.com> wrote:
> 
> Thanks Nigel for your code.
> 
> 
> In my situation I have a dialog which gives the user an option to choose
> which data file they want to open:
> 
> www.fortuna.com.au/4D_issues/startup-dialog.png 
> <http://www.fortuna.com.au/4D_issues/startup-dialog.png>
> 
> So the user can either open/setup his/her file or explore a demo data file.
> This was all cool till I put the object for days to expiry. This
> information only comes from the Fortuna.4DD file and not from the
> FortunaDemo.4DD file. I could have stored the activation date on some
> hidden folder somewhere. But decided that it may be best to simply restart
> the Application if it has been opened with the Live User data file. It is
> kind of counter-intuitive as one would think how is the user ever going to
> open the demo data file?
> 
> For this I create a text file where I store the information of whether to
> present this startup option or not. So that each time the application
> launches it always opens with the Live Data and the startup option. If the
> user selects to open the Live Data it just proceeds as normal. However if
> the user chooses to open the demo data we set the text file so the startup
> dialog is not presented and the application restarts with the demo data
> file.
> 
> This is working well for me now..
> 
> When I posted this, I thought it would be easier to know which data file
> the application is going to open next read that information rather than try
> to set the flag this way.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Tue, Dec 20, 2016 at 1:20 AM, Nigel Greenlee <nigel.green...@me.com 
> <mailto:nigel.green...@me.com>>
> wrote:
> 
>> Sujit.
>> 
>> 
>> 
>> You can control where the default datafile is using  build with xml keys…i
>> hope the following does not stray far from what you are trying to do….
>> 
>> 
>> 
>> I know that at one point I wanted to a make a downloadable single user
>> demo version of a product AND i wanted  new client server builds to guide
>> the existing customers to open their correct current datafile.
>> 
>> Realising that ‘virgin’ users confronted with ‘open datafile’ dialogues
>> will wail in horror(and probably would end up creating a blank datafile) I
>> did the following:
>> 
>> 1) You will see in the code i get the ‘current data file’. I do this
>> pretty much before anything else in my startup method-I don't know of any
>> other way to interrogate it other than within the code-the method i use
>> allows switching to another datafile on startup..(well not really on
>> startup actually AFTER startup).
>> 
>> In my startup method if the ‘wrong’ datafile is in use is don't do
>> anything(i am a fan of doing as little as possible at startup anyway).
>> 
>> While (Semaphore("$DuringLogin"))
>> DelayTicks
>> End while
>> If (DB_ControlDataFilePath )
>> 
>> CLEAR SEMAPHORE("$DuringLogin”)
>> //the correct datafile is in use carry on.
>> else
>> CLEAR SEMAPHORE("$DuringLogin")
>> //don't do anything just let startup end-see what DB_ControlDataFilePath
>> does to restart with the correct datafile.
>> 
>> end if
>> 
>> 
>> 2) Using a build key strategy i made sure there default datafile inside my
>> package(not a good place to keep a datafile when someone overwrites the
>> package). This was the demo datafile I wanted users to use.
>> 
>> 
>> 
>> 
>>  
>>Database
>>
>>::Database_Build:
>>:DemoData.4DD
>> 
>> Most of what i am doing here does not rely on the build with xml keys
>> being used(that was really for doing a distributable structure to

Re: Sorting chemical formulas

2016-12-20 Thread Nigel Greenlee
Pat

would it not work if your ‘sort field contained the chars in a different order. 
The lower case are of secondary importance so if they came after the upper case 
they would only affect the sort in the case you mention

so in your example data AuBr3 becomes ABur003 or  in the sort field?

That would appear to be the simplest solution unless i am missing something

Nigel



> On 21 Dec 2016, at 00:40, Pat Bensky  wrote:
> 
> Here's an interesting challenge for those off you who like a good puzzle ...
> 
> I need to figure out how to sort chemical formulas correctly.
> 
> For example:
> 
> Ag2O
> 
> Al2O3
> 
> AsGa
> 
> AuBr3
> 
> This is how 4D sorts these 4 formulae, which at first glance appears to be
> correct. Unless you're a chemist :)
> 
> They should actually be sorted like this:
> 
> AuBr3
> AsGa
> Al2O3
> Ag2O
> 
> ​So the lowercase letters in the elements should not be considered in the
> sort order.
> One simple solution would be to just create a sort field in which all
> lowercase letters have been deleted. That would work in most cases but not
> if there was a situation something like
> 
> AuBr3
> AgBr3
> ​AsBr3
> 
> So that won't do.
> Note - we already deal with the subscripted numbers by padding them out
> with zeros.
> 
> The only solution I've come up with so far is:
> 1. Create a numeric sort field.
> 2. Create another field with the formulas stripped of all lowercase letters
> - let's call this field NoLowerCase.
> 3. Sort them on the NoLowerCase field and save that sort order in the
> numeric sort field.
> 4. Run through all the records in their sorted order. If any two or more
> are found to have the same NoLowerCase entry, adjust their numeric sort
> order according to their original formulas.
> Then they can be sorted by the sort field and should all be in the correct
> order.
> 
> Any better ideas?
> 
> Pat
> -- 
> *
> CatBase - The Database Publishing Solution
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Searching Nul UUIDS

2016-09-23 Thread Nigel Greenlee
Hi

I have been caught with this a couple of times(V14) and wondered if anyone 
knows why.

If i perform the following query on my development version(single user):-

Query (or query selection) ([DATA];[DATA]UUIDField=(“0”*32);*)
Query (or query selection) ([DATA];|;[DATA]UUIDField=“”)

This correctly finds all the records that have nothing in the UUID (this is a 
related record identity not the key field on the table which cannot be nul).

However if I perform the same connected to a server(Client) then it finds zero 
records.

Now i already have a UTIL( is uuid nil) and if change the above to

Query by formula([DATA];UTILISUUIDNIL(;[DATA]UUIDField)) //This works fine even 
though it tests in the same way(sort of)...

$0:=($1=“”) | ($1=(“0”*32)

Anyone know why there is a difference in behaviour between the type of 4D used?

Nigel Greenlee








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