On 4 May 2017, at 12:33, David Adams via 4D_Tech <[email protected]> wrote:

> I'm still working away on my components and I have another remedial
> question. I'd really like to be able to trace through a component while in
> the host. Sometimes this works, sometimes I get complaints

Hi David -

You should be able to trace through the component code while in the host no 
problem but if you are finding the compiled/interpreted mode switching a bit of 
a pain, one way to make this slightly less ambiguous is to arrange things as 
follows:

COMPONENT SOURCES/BUILDS
1. create a “component sources” folder and put all your component sources in 
there (if you really want to give them a folder each, then do that)
2. create a “component builds” folder and put all your builds in there

3 HOST MODES...
In the host structure, create 2 distinct component folders, one prefix “s” 
(indicates interpreted components) and one prefix “c” (indicates compiled). In 
those, place aliases to each of the compiled/interpreted component sources that 
the host wants to use.

1: INTERPRETED / INTERPRETED
Then, in debug mode, remove the prefix “s” and work in the host. You will then 
unambiguously be using interpreted host with interpreted components and will be 
able to step into the component code in the debug cycle. If you need to ‘fix’ a 
component, exit the host, open the component and fix (this is the “unit test”). 
Then quit, re-open the host and retest (this is the “in-situ” test). At all 
times you don’t need to move anything around on the desktop.

2: INTERPRETED / COMPILED
This is the most demanding and unforgiving mode because a compiled component 
will choke on any ambiguous parameters from the host whereas an interpreted on 
won’t. It’s definitely worth testing in this mode to get components solid. To 
activate this mode, restore the prefix “s’ on the interpreted components alias 
folder and remove the prefix “c” on the compiled components aliases folder.

You will now be working with compiled components and will not be able to step 
into them in debug mode.

3: COMPILED / COMPILED
This is production mode. To activate this debug mode, keep the compiled 
component aliases active (unprefixed), compiled the host and open in compiled 
mode.

I’d recommend working with a heterogeneous component object code - i.e. either 
all interpreted or all compiled, otherwise it can get very confusing to use the 
debugger and you get that situation where it sometimes steps in and sometimes 
doesn’t depending on what state you happen to have left the component code in. 
It’s also a reason to create distinct build targets for component compiled code 
as opposed to using the component source as a target for both compiled and 
uncompiled conditions.

Regards

Peter

**********************************************************************
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:[email protected]
**********************************************************************

Reply via email to