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 -
> 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.
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
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
> 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
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
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
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
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:
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
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
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
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
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
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
> 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
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 <
>
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
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
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
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
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)
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
23 matches
Mail list logo