Re: compnents - host table access

2017-04-28 Thread Chip Scheide via 4D_Tech
The component will be blind to the table(s) of the host. So, the solution that I think (i haven't coded this part yet) will work is: (Component Method) // Export_All //$1 - pointer - to a pointer array where each element // of the array points to a Host table to be exported //$2 - text -

RE: Specifying a type with OB GET

2017-04-28 Thread Timothy Penner via 4D_Tech
> In some cases I leave out the type if the property is required - in that case > it should generate an error. You don’t have to generate an error - you could just call OB IS DEFINED instead, then branch your code appropriately without generating an error stack.

Re: compnents - host table access

2017-04-28 Thread Wayne Stewart via 4D_Tech
Chip, Of course if you want access to a specific table you can just do this: C_POINTER(<>TSK_TaskTable_ptr;<>TSK_ID_ptr;<>TSK_Name_ptr) EXECUTE FORMULA("<>TSK_Name_ptr:=->[Task]") EXECUTE FORMULA("<>TSK_ID_ptr:=->[Task]ID") EXECUTE FORMULA("<>TSK_Name_ptr:=->[Task]Name") Regards, Wayne

Re: component question

2017-04-28 Thread Wayne Stewart via 4D_Tech
Chip, The technique that Dave Batton used in Foundation (and released publicly in a couple of free components) went like this: Start most methods with a call to the INIT method: Eg. // // Project Method: Log_Init // Initializes both

Re: How to tell compiler not to duplicate declarations in "Generate Typing"

2017-04-28 Thread David Adams via 4D_Tech
> I just posted it in the forums. I agree there are other things that are > probably more important but this seems like something that could be set as > an option pretty easily. And perhaps if they decide to do a set of compiler changes, they'll find it's easy to do several all in one go. Who

Re: PROCESS 4D TAGS [Solved]

2017-04-28 Thread Mitchell Shiller via 4D_Tech
Thanks Jim. So based on your post, I tried it with Select Document and as you note it works. Then I changed the path name to use the Folder Separator constant even though “:” (semi-colon) seemed to be working fine and voila, the code works. Don’t know why but it works. Mitch

Re: PROCESS 4D TAGS

2017-04-28 Thread Keisuke Miyako via 4D_Tech
if the document is not correctly loaded, as others have speculated: 1. given this is Mac, could there be a hidden file extension? 2. Given no encoding is not specified, could it be saved in UTF-16? Document to text doesn't update OK, the only way to know that it worked is to check that the

Re: component question

2017-04-28 Thread Tim Nevels via 4D_Tech
On Apr 28, 2017, at 2:00 PM,Chip Scheide wrote: > do I need to initialize the component's IP, or process variables in > every process or just once at startup of the host database? IP variables once at at startup in a component method. One way to do this is to have an “Component_Init” method

Re: PROCESS 4D TAGS

2017-04-28 Thread Jim Labos - infobase via 4D_Tech
Just tried exactly that (I used select document and the Document variable to get document). It worked with no problem. I tested on v16 OSX10.10.5 So it's either v14 problem or your settings. Cheers Jim Labos - infobase - Jim Labos - infobase -- View this message in context:

Re: compnents - host table access

2017-04-28 Thread Chip Scheide via 4D_Tech
ok - Thanks I think I know how to do this. The Export_All method will require a single parameter which (a pointer to) is an array of pointers to the host tables to be exported. Then the host can control the export by only sending those tables which need to be exported and the component will

Re: PROCESS 4D TAGS

2017-04-28 Thread Jeremy French via 4D_Tech
How do you know PROCESS 4D TAGS is failing? Have you confirmed that the process variable "tTemplate" actually contains your template? In other words, does “Document to text” successfully retrieve the template? When the command “Document to text” encounters an error, the command fails

Re: compnents - host table access

2017-04-28 Thread Kirk Brooks via 4D_Tech
Chip, No. But you can pass a pointer to a table and within the component build a pointer array of the fields. On Fri, Apr 28, 2017 at 11:22 AM, Chip Scheide via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Is it possible to get access to host tables without a pointer to the > table? > > One of the

compnents - host table access

2017-04-28 Thread Chip Scheide via 4D_Tech
Is it possible to get access to host tables without a pointer to the table? One of the methods I wold like to "componetize" is a routine that exports ALL the data in the system. I know I can expose a method which exports a single table (with a pointer to the host table), but i would like to be

component question

2017-04-28 Thread Chip Scheide via 4D_Tech
do I need to initialize the component's IP, or process variables in every process or just once at startup of the host database? Thanks Chip --- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing

re: PROCESS 4D TAGS

2017-04-28 Thread Mitchell Shiller via 4D_Tech
BTW the template is: “ ” Randy, I tried the compatibility option but that didn’t do it. Mitch ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html

Re: GET FIELD TITLES

2017-04-28 Thread Arnaud de Montard via 4D_Tech
> Le 28 avr. 2017 à 18:45, Paul Chernoff via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > I have restarted 4D a number of times with the same results Most probably the problem comes from 'Set field/table titles'… What source is used to set virtual names? Nothing's changed in the structure

Re: GET FIELD TITLES

2017-04-28 Thread Paul Chernoff via 4D_Tech
I have restarted 4D a number of times with the same results ​>​ As a guess - if you've modified some field names it only returns the ​>​ modified field names for the 'session'. If you do a restart what happens? ​>​ On Wed, Apr 26, 2017 at 10:53 AM, Paul Chernoff via 4D_Tech < ​>​

Re: How to tell compiler not to duplicate declarations in "Generate Typing"

2017-04-28 Thread Chip Scheide via 4D_Tech
Kirk, How many times have you heard that from one (or more) of your users?? "Kirk, ole buddy, ole pal.. You know.. I think that if you just.. this program would be GREAT!, er um.. maybe Yuge!" :) On Fri, 28 Apr 2017 08:11:18 -0700, Kirk Brooks via 4D_Tech wrote: > David, > > I just posted

Re: How to tell compiler not to duplicate declarations in "Generate Typing"

2017-04-28 Thread Kirk Brooks via 4D_Tech
David, I just posted it in the forums. I agree there are other things that are probably more important but this seems like something that could be set as an option pretty easily. Topic : *Compiler - don't duplicate declarations* http://forums.4d.fr/Post//19356198/1/ On Thu, Apr 27, 2017 at

Re: PROCESS 4D TAGS

2017-04-28 Thread Randy Jaynes via 4D_Tech
Mitch, I stumbled on this a few weeks ago. I think I tracked it down to a compatibility setting Use 4DVAR comments instead of Brackets I think my database had that turned off. Randy -- Randy Jaynes Senior Programmer

PROCESS 4D TAGS

2017-04-28 Thread Mitchell Shiller via 4D_Tech
v14 OSX HTML Template: Method: C_TEXT(tHTML;tTemplate;$tPathname;tData) $tPathname:=Get 4D folder(Current resources folder)+"Templates"+":"+"Test Template.html" tTemplate:=Document to text($tPathname) tData:="Hello There" PROCESS 4D TAGS(tTemplate;tHTML) Result: The

Re: How to tell compiler not to duplicate declarations in "Generate Typing"

2017-04-28 Thread Chuck Miller via 4D_Tech
If you compile with all variables typed and do not generate typing you will get a list of errors and can fix. Certainly it becomes a habit ingrained over time Regards Chuck Chuck Miller Voice: (617)

Re: Specifying a type with OB GET

2017-04-28 Thread Jeffrey Kain via 4D_Tech
Thanks for the confirmations -- I've been bitten in compiled mode several times where the type seemed obvious, everything was fine in interpreted mode, but 4D generated a runtime error when deployed. I will always use that "optional" parameter from now on... Jeff