Re: 4D World Tour - Denver

2017-05-04 Thread Cannon Smith via 4D_Tech
Well, I thought I was talking about workers in general, but that was under the 
assumption that all processes have some kind of execution cycle. Are you saying 
that a non-UI process (ex. pre-emptive thread) won’t have an execution cycle?

In either case, the only place I can think of where this might matter is in a 
worker process that has UI in it, so yes, CALL FORM is where the rubber meets 
the road here. I was trying to be more exact, but maybe assumed too much?

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On May 4, 2017, at 1:46 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I think you are talking about using CALL FORM and not about workers in 
> general. In the past if you did CALL FORM 10 times to the same form, it would 
> do a redraw after each CALL FORM and thus could cause some flickering. Now 
> when a windows starts dealing with a CALL FORM it handles all the CALL FORMs 
> and then at the end it does a screen redraw. 

**
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 World Tour - Denver

2017-05-04 Thread Tim Nevels via 4D_Tech
On May 4, 2017, at 2:00 PM,Cannon Smith wrote:

> I also learned that in previous versions a worker would check for the next 
> message once per execution cycle. Right now that has changed so that the 
> worker will continue executing whatever it needs to empty the message queue 
> all in one event cycle. There are pros and cons each way (although I wish it 
> were the former way), but this can affect UI updating in some cases, so it is 
> good to be aware of.

I think you are talking about using CALL FORM and not about workers in general. 
In the past if you did CALL FORM 10 times to the same form, it would do a 
redraw after each CALL FORM and thus could cause some flickering. Now when a 
windows starts dealing with a CALL FORM it handles all the CALL FORMs and then 
at the end it does a screen redraw. 

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

Re: 4D World Tour - Denver

2017-05-04 Thread Tim Nevels via 4D_Tech
On May 4, 2017, at 12:21 PM,David Adams wrote:

> Thanks for all of the details from your time at the tour, it sound really
> great. I'm happy to see that CALL FORM and CALL WORKER are being promoted,
> that's great. I strongly encourage everyone to try these features out. If
> you can find 30-60 minutes when you've got the feeling to experiment, you
> can master the basic mechanics. Several months later, I'm still sorting
> through nuances ;-) The documentation on the basic commands is excellent,
> although I find the overall 'about workers' page possibly more misleading
> than clarifying.

And this is where the 2nd day of the 4D World Tour and JPR’s presentation is so 
valuable. He spends a lot of time talking about the worker process system. The 
ideas behind how it works. The detail of when things happen. (Example: if you 
open a window and then do CALL FORM before you issues a DIALOG command, exactly 
what happens related to the form events? Not gonna tell you. Go to the 4D World 
Tour and let JPR tell you!)  All this background information is so helpful. And 
because the meetings are small with less than 50 people, you can ask questions 
at any time. 

JPR also talks about “slicing” and “chunking” and why you need to use these 
techniques and provides examples of their use with workers. Important 
information needed so that your finished implementation using these new 
commands is smooth and polished. 

> I'm glad that Tim pointed out that these commands work in 32-bit and don't
> require compilation to execute. I think that these commands may have come
> out of 4D's work on making more of the language pre-emptive. That's
> understandably lead to some conflation of the two subjects. Pre-emptive
> mode and these new CALL commands can be treated as unrelated subjects. So
> if you don't care about pre-emptive, you should still find out about these
> commands - they're a vast improvement over past options.


And for another clarification, you CAN have a worker generate a UI, open 
windows, etc. The caveat is you can only do this if the worker is interpreted, 
or the worker compiled but set to not running preemptively. You only get the 
illegal command error messages when compiling and you have set the method to 
run preemptively. (Reminds me of a Dirty Harry saying… “a man’s got to know his 
limitations.”)

And 4D has had preemptive processes for a long time. They are now exposing this 
existing technology to developers for us to use. An example is the “DB4D 
Server" process running on the server. (And it could very well be that any 
process running on 4D Server with “State” of “Running” is a preemptive process. 
I didn’t ask JPR that question, I’m just guessing here.)

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

Re: 4D World Tour - Denver

2017-05-04 Thread Cannon Smith via 4D_Tech
I also just got back from the World Tour. It was great to see some of you again 
and the information was very helpful. Add had some great demos and JPR shared a 
lot of great information.

One thing JPR helped me understand better is that a worker is basically just a 
process ready to do things. You can actually start a worker process without any 
method at all. It just starts and sits there waiting for you do ask it to do 
something. Maybe not helpful in real life, but knowing that helped me 
understand the concept better.

I also learned that in previous versions a worker would check for the next 
message once per execution cycle. Right now that has changed so that the worker 
will continue executing whatever it needs to empty the message queue all in one 
event cycle. There are pros and cons each way (although I wish it were the 
former way), but this can affect UI updating in some cases, so it is good to be 
aware of.

Thanks to 4D for putting the Tour on!

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236



**
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: Bar code

2017-05-04 Thread Timothy Penner via 4D_Tech
> I have seen these plug-in i have seen the 128 but not the interleaved 2 of 5.

Actually, the zbar plugin lists"I25" which I think is "Interleaved 2 of 5":
https://github.com/miyako/4d-plugin-zbar

Quote: "@since 0.4: ISBN10, ISBN13, I25, CODE39"

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

RE: Bar code

2017-05-04 Thread stardata.info via 4D_Tech

Hi Tim,

Thanks for your reply.

I have seen these plug-in i have seen the 128 but not the interleaved 2 
of 5.


/Ferdinando/


Il 04/05/2017 13:45, 4d_tech-requ...@lists.4d.com ha scritto:

Message: 5
Date: Wed, 3 May 2017 22:13:14 +
From: Timothy Penner
To: 4D iNug Technical<4d_tech@lists.4d.com>
Subject: RE: Bar code
Message-ID:
Content-Type: text/plain; charset="utf-8"

Code 128 is here:
https://github.com/miyako/4d-plugin-zbar

A few others that may be useful are:
https://github.com/miyako/4d-plugin-zint
https://github.com/miyako/4d-plugin-qrencode
https://github.com/miyako/4d-plugin-data-matrix

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

Re: Counting # of specific characters in string/text

2017-05-04 Thread John Baughman via 4D_Tech
Quick and dirty ideas…

$text:="Now is the time for all good men to come to the aid of their country"
ARRAY TEXT($aWords;0)
GET TEXT KEYWORDS($text;$aWords)
$wordCount:=Count in array($aWords;"The")

COPY ARRAY($text;$textTest)
$characterCount:=0
While (Position("e";$textTest)>0)
$characterCount:=$count+1
$characterCount:=Replace string($textTest;"e";"";1)
End while 


John
**
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 World Tour - Denver

2017-05-04 Thread Justin Will via 4D_Tech
David,

I completely agree!!!  Call Form and Call Worker are really more accurately 
named and described by your naming.

> As a quick heads-up, I think that the most accurate names for these commands 
> are respectively:
> 
> EXECUTE METHOD IN WINDOW
> EXECUTE METHOD IN WORKER

Thanks
Justin Will
**
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: Counting # of specific characters in string/text

2017-05-04 Thread Arnaud de Montard via 4D_Tech

> Le 4 mai 2017 à 15:11, Vincent de Lachaux via 4D_Tech <4d_tech@lists.4d.com> 
> a écrit :
> 
> Something like:
> 
> [using Replace string]

About using Replace string and "big" text (example: count lines in a csv):

 
With 4D v16 compiled, Replace string is now always faster that the loop with 
Position, more specially when diacritical (e=é…). But before it was the wheel 
of death…

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

Re: Components: Running uncompiled?

2017-05-04 Thread David Adams via 4D_Tech
Peter and Arnaud, thanks so much for your suggestions and help. I'm still a
bit mystified, but it seems to be working now. For development, I'm happy
to work all interp. for a bit, no problem. It's massively easier to develop
with components now that you have a way to trace through the component
code. And I'm a guy that's forever setting and storing error details...but
the Debugger is just so much better. (I've always been a fan of the 4D
Debugger, it's pretty darn good.)

On Thu, May 4, 2017 at 9:45 PM, Arnaud de Montard via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> > Le 4 mai 2017 à 12:33, David Adams via 4D_Tech <4d_tech@lists.4d.com> a
> écrit :
> >
> > 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 that the
> > component must be compiled.
>
> From this page:
>  and-compatibility.300-3373446.en.html>
> "In general, an interpreted method can call a compiled method, but not the
> reverse,"
> From your scheme I understand that 'MessageHub' (1) component embeds calls
> to 'DaKine' and 'OBJ_Component' (2 & 3). So my guess would be you're trying
> to use 1 compiled while 2 and/or 3 are/is not.
>
>
> I often use aliases to switch during development between
> interpreted/compiled. Let's say my component is like this:
>   ../myComponentFolder/
> myComponent.4db (Interpreted)
> buildFolder/
>   myComponent.4dbase (Compiled)
> I create an alias from Compiled and put it in the host component folder.
> Then when needed, I use "Finder/get info/select other original" to make it
> "point on" Interpreted or Compiled.
>
> I'd like to know if there's some trick to avoid host restart each time,
> BTW…
>
> --
> 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
> **
>
**
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 World Tour - Denver

2017-05-04 Thread David Adams via 4D_Tech
Tim,

Thanks for all of the details from your time at the tour, it sound really
great. I'm happy to see that CALL FORM and CALL WORKER are being promoted,
that's great. I strongly encourage everyone to try these features out. If
you can find 30-60 minutes when you've got the feeling to experiment, you
can master the basic mechanics. Several months later, I'm still sorting
through nuances ;-) The documentation on the basic commands is excellent,
although I find the overall 'about workers' page possibly more misleading
than clarifying.

Seriously folks, jump in! Make a silly new database with one form and a few
methods - that's all it takes to figure out the basics. After enough people
are using these tools and familiar with their standard behaviors, we can
start to exchange some better ideas about how best to use them.

As a quick heads-up, I think that the most accurate names for these
commands are respectively:

EXECUTE METHOD IN WINDOW
EXECUTE METHOD IN WORKER

They not sending messages in any traditional sense, they moving code into a
different context where it's executed. They're more like an unusual control
structure or a remote procedure call than to a message. Although you can
build a more traditional messaging system on top of these commands. By
"traditional messaging", I mean computer-to-computer messaging, not
person-to-person. (I've been into message-oriented, networked systems
architectures for a long time - like many on this list.)

So, yeah, dive in, try them out and have some fun. They're pretty neat. And
there are some very nice advantages to using workers.

Oh, and just as another couple of technical heads up:

 Any 4D code can *send* using the new commands, but only a window or a
worker can *receive.*

 These are pure calls - there is no concept of a return,
 but you can add a callback if you're coming from a window or worker.

 The concept of the queue is of limited usefulness because we can't see
it,
  control it, or change it in any sort of fine-grained way.

I'm glad that Tim pointed out that these commands work in 32-bit and don't
require compilation to execute. I think that these commands may have come
out of 4D's work on making more of the language pre-emptive. That's
understandably lead to some conflation of the two subjects. Pre-emptive
mode and these new CALL commands can be treated as unrelated subjects. So
if you don't care about pre-emptive, you should still find out about these
commands - they're a vast improvement over past options.
**
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: Counting # of specific characters in string/text

2017-05-04 Thread Vincent de Lachaux via 4D_Tech
Something like:

  // 
  // Project method : str_Occurences
  // Database: Sandbox
  // ID[3FBA4FA5A1B74C9A87061DA1D97D5E51]
  // Created #2-1-2015 by Vincent de Lachaux
  // 
  // Description:
  //
  // 
  // Declarations
C_LONGINT($0)
C_TEXT($1)
C_TEXT($2)
C_BOOLEAN($3)

C_BOOLEAN($Boo_diacritical)
C_LONGINT($Lon_afterLength;$Lon_beforeLength;$Lon_delta;$Lon_occurences;$Lon_parameters)
C_TEXT($Txt_match;$Txt_target)

If (False)
C_LONGINT(str_Occurences ;$0)
C_TEXT(str_Occurences ;$1)
C_TEXT(str_Occurences ;$2)
C_BOOLEAN(str_Occurences ;$3)
End if

  // unitTest:
If (False)
ASSERT(str_Occurences ("Hello world!";"l")=3)
ASSERT(str_Occurences ("Hello world!";"Hello")=1)
ASSERT(str_Occurences ("Hello world!";"hello")=0)
ASSERT(str_Occurences ("Hello world!";"hello";False)=1)

End if
  // 
  // Initialisations
$Lon_parameters:=Count parameters

If (Asserted($Lon_parameters>=2;"Missing parameter"))

  //Required parameters
$Txt_target:=$1
$Txt_match:=$2

$Boo_diacritical:=True

  //Optional parameters
If ($Lon_parameters>=3)

$Boo_diacritical:=$3

End if

Else

ABORT

End if

  // 

$Lon_beforeLength:=Length($Txt_target)

If ($Boo_diacritical)

  //comparisons will be based on character codes
$Txt_target:=Replace string($Txt_target;$Txt_match;"";*)

Else

$Txt_target:=Replace string($Txt_target;$Txt_match;"")

End if

$Lon_afterLength:=Length($Txt_target)

$Lon_delta:=$Lon_beforeLength-$Lon_afterLength

$Lon_occurences:=Choose(Length($Txt_match)=1;$Lon_delta;$Lon_delta/Length($Txt_match))

  // 
  // Return
$0:=$Lon_occurences

  // 
// End


v i n c e n td el a c h a u x

Bee green - keep it on the screen



**
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 World Tour - Denver

2017-05-04 Thread Tim Nevels via 4D_Tech
I was at the 4D World Tour in Denver and I agree with John. It was excellent. 
Probably better than the last world tour 2 years ago. I highly recommend it to 
everyone. And that includes all you guys that think you are 4D experts and 
already know all that you need to know about 4D. You don’t know it all, and 
there is more you need to know about. And simply reading the documentation will 
not be enough.

There is so much more to learn about the new features in 4D v15 and v16 and at 
the 4D World Tour you will get example after example of how to actually use 
these new features. Practical examples. And you get the source code for every 
example so when you get back home you’ve got something to refer back to and 
build upon.

Here are just a few new things that I learned:

- CALL FORM and CALL WORKER work just fine in 32bit mode and not compiled. So 
you don’t have to be 64bit and compiled to take advantage of them. That was 
news to me.

- Workers have this great feature JPR calls the “mail box” for message passing. 
David Adams has raved about this new capability and it is very useful in many 
situations. And since you can create workers in 32bit mode and run them 
interpreted everyone can take advantage of them. 

- CALL FORM is the replacement for “Outside call”, SET TIMER and CALL PROCESS 
and is superior in most cases. JPR shows some great example of how you had do 
things using these old commands that can now be done much more logically and 
cleanly with CALL FORM. 

- CALL FORM also uses the “mail box” feature to allow you to send messages to a 
window and have them executed in FIFO order. And a form can certainly call 
itself with CALL FORM. And again, CALL FORM works just fine in 32bit and 
uncompiled mode so it is always available to use. 

- CALL FORM, which should really be called CALL WINDOW, takes a window 
reference so it can reach across processes effortlessly. 

- Using DIALOG(“form”;*) to open multiple windows in a single process offers 
many new possibilities. CALL FORM makes it easy to efficiently message between 
them. 

There is some talk about 4D Summit 2018 and the “theoretical” next version of 
4D that you are going to want to hear about. Big things are coming. JPR said 
that he cannot think of another version of 4D in the entire history of 4D 
versions that is going to be big and the next one. That’s bigger than v6 was 
and bigger than v11. Yeah, game changing. That’s straight from JPR. So it 
sounds like 4D Summit 2018 is going to be a must attend event for everyone.

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

Re: Counting # of specific characters in string/text

2017-05-04 Thread Arnaud de Montard via 4D_Tech

> Le 4 mai 2017 à 14:22, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> a écrit 
> :
> 
> Hi all
> 
> I’m wondering if someone has a clever routine to count the number of 
> appearances of a specific character/word in a string/text and is willing to 
> share it.

I use this one:

//Str_count (find_t;in_t {;"*") -> long
//$3 optional: pass "*" for strict comparison (default not strict)
//example :
//  $text:="eéèEÈÉ"
//  $what:="e"
//  $nb1:=Str_count ($what;$text) -> 6
//  $nb2:=Str_count ($what;$text;"*") -> 1
C_LONGINT($0)
C_TEXT($1)
C_TEXT($2)
C_TEXT($3)

C_BOOLEAN($strict_b)
C_LONGINT($findLen_l)
C_LONGINT($len_l)
C_LONGINT($out_l)
C_LONGINT($params_l)
C_LONGINT($start_l)
C_LONGINT($textLen_l)
C_TEXT($find_t)
C_TEXT($in_t)
C_TEXT($nmc_t)

If (False)
C_LONGINT(Str_count ;$0)
C_TEXT(Str_count ;$1)
C_TEXT(Str_count ;$2)
C_TEXT(Str_count ;$3)
End if

//_
$out_l:=-1  //error
$nmc_t:=Current method name
$params_l:=Count parameters
Case of
: (Not(Asserted($params_l>1;$nmc_t+" 2 parameters required")))
//error
Else
$find_t:=$1
$in_t:=$2
$findLen_l:=Length($find_t)
$textLen_l:=Length($in_t)
$out_l:=0
$strict_b:=($params_l>2)

Case of
: ($findLen_l=0)
: ($findLen_l>$textLen_l)
Else
$start_l:=1
$len_l:=$findLen_l
If ($strict_b)
$start_l:=Position($find_t;$in_t;$start_l;*)
While ($start_l>0)
$out_l:=$out_l+1
$start_l:=$start_l+$len_l
$start_l:=Position($find_t;$in_t;$start_l;*)
End while
Else
$start_l:=Position($find_t;$in_t;$start_l;$len_l)
While ($start_l>0)
$out_l:=$out_l+1
$start_l:=$start_l+$len_l

$start_l:=Position($find_t;$in_t;$start_l;$len_l)
End while
End if
End case

End case
$0:=$out_l
//_

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

Counting # of specific characters in string/text

2017-05-04 Thread Jörg Knebel via 4D_Tech
Hi all

I’m wondering if someone has a clever routine to count the number of 
appearances of a specific character/word in a string/text and is willing to 
share it.

Thanks

Cheers
Jörg


**
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: Components: Running uncompiled?

2017-05-04 Thread Arnaud de Montard via 4D_Tech

> Le 4 mai 2017 à 12:33, David Adams via 4D_Tech <4d_tech@lists.4d.com> a écrit 
> :
> 
> 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 that the
> component must be compiled. 

From this page:

"In general, an interpreted method can call a compiled method, but not the 
reverse,"
From your scheme I understand that 'MessageHub' (1) component embeds calls to 
'DaKine' and 'OBJ_Component' (2 & 3). So my guess would be you're trying to use 
1 compiled while 2 and/or 3 are/is not. 


I often use aliases to switch during development between interpreted/compiled. 
Let's say my component is like this:
  ../myComponentFolder/
myComponent.4db (Interpreted)
buildFolder/
  myComponent.4dbase (Compiled)
I create an alias from Compiled and put it in the host component folder. Then 
when needed, I use "Finder/get info/select other original" to make it "point 
on" Interpreted or Compiled. 

I'd like to know if there's some trick to avoid host restart each time, BTW…

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

Re: Components: Running uncompiled?

2017-05-04 Thread Peter Jakobsson via 4D_Tech

On 4 May 2017, at 12:33, David Adams via 4D_Tech <4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com
**

Components: Running uncompiled?

2017-05-04 Thread David Adams via 4D_Tech
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 that the
component must be compiled. I've looked at the docs...and don't really get
what the issue is. I can deploy all compiled, fine...but want to trace for
now.

My set is:

Host
   DaKine
   MessageHub
   OBJ_Component

MessageHub
DaKine
OBJ_Component

So, I build MessageHub with two components. Then I use exactly the same
components over in the Host. I don't have two copies of the components and
use the same versions throughout. But I figure this may end up being part
of the problem.

Thanks for any help.
**
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 server 12.6 on OSX 10.10.5?

2017-05-04 Thread Paul Lovejoy via 4D_Tech
Great. Thanks for the info.

Paul


> Le 4 mai 2017 à 09:56, Arnaud de Montard via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> 
>> Le 4 mai 2017 à 07:38, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> a 
>> écrit :
>> 
>> Hi Arnaud,
>> 
>> [...]
>> What OS version are you running 4D Server on?
> 
> It's mac osX 10.10.5 "yosemite" (machine = mac mini unibody, users ~ 30). 
> 
> -- 
> 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
> **

**
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 server 12.6 on OSX 10.10.5?

2017-05-04 Thread Arnaud de Montard via 4D_Tech

> Le 4 mai 2017 à 07:38, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Hi Arnaud,
> 
> [...]
> What OS version are you running 4D Server on?

It's mac osX 10.10.5 "yosemite" (machine = mac mini unibody, users ~ 30). 

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