Re: Difference between OB Copy and :=

2018-06-12 Thread Peter Bozek via 4D_Tech
On Wed, Jun 13, 2018 at 3:26 AM, johnbdhPop via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Thanks Cannon,
>
> So maybe I want to use OB Copy when I load the record in an input
> form. That way I can make changes to the object without changing the object
> in the field. That way if the user cancels I don’t have to worry about the
> field.
>
> When the user saves the record, should I use OB Copy to save the
> object back to the field, or does it really matter?
>
> John
>
>
No and no, imho.

As I understand it, object field contain "serialized" object - it means
object is stored in some internal data structures, you can imagine it is
stored as JSON text (which is not the case, but is OK to visualize how it
works.) When you load the record, object is created (in memory)  from that
representation and reference to it assigned to field. When you save the
record, the object in memory is serialized (converted to JSON) and saved to
disk.

It means, when the record is loaded, you can work with object field as any
object variable (they ay be some exception for the rule, but nothing comes
to my mind now.) There is no need to copy the object field and then copy
object back - what you want to achieve, 4D does transparently.


--

Peter Bozek
**
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: Delay process bug

2018-06-12 Thread Bernd Fröhlich via 4D_Tech
Cannon Smith:

> We just released a new version of our software a week and a half ago. In this 
> version I added a palette window on the server which runs On Timer. I also 
> added code to most every background process which updates some information 
> every time it wakes up from a Delay Process call. The palette window checks 
> this information and, if it sees a process that has been asleep longer than 
> one minute, resumes the process and sends us a Slack message identifying the 
> server and process that was asleep. If the process does not get resumed, 
> another Slack message is sent so we can handle the issue manually before our 
> customer knows.
> 
> Interestingly, this mechanism was triggered on Sunday morning at 1:01 AM for 
> 9 servers. All 9 reported one or more stalled processes within a 60 second 
> time period.


I also have a palette window that runs On Timer.
So the workaround for the Delay Process bug was quite simple over here.
I replaced Delay Process with Pause Process (which is what Delay Process does 
anyway when the bug bites).
In On Timer I call Resume Process.
Never had any problems since I did it that way.

(Still this is only a workaround and the bug should of course be fixed by 4D. 
Until it is fixed Delay Process is a command that should be avoided.)

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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Difference between OB Copy and :=

2018-06-12 Thread 4dialog via 4D_Tech
There is a good article in knowledgebase that describes this:

http://kb.4d.com/assetid=78011   



-
Hilsen
--
Helge Antonsen
www.4dialog.no 
--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
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: Write Pro: programmatically manipulate text expertise needed

2018-06-12 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Pat,

Your tips seem to work, but I am hoping you also know the answer to the next 
problem.
See example 1 : After replacing the text with ST SET 
TEXT($wp_obj;$text;$start_pos;$end_pos) the cursor must be set after the last 
inserted character. This replacing is done in the On After Keystroke event of 
the Write Pro area and is triggered when the user types a space. However, I 
don't succeed in setting the cursor at the end of the inserted text, it stays 
at the position where it was (position after the original space)

Do you also have a tip how to set the cursor to a different position in the "On 
After Keystroke" event of the Pro Area?

Thanks,

Piotr


> -Oorspronkelijk bericht-
> Van: Pat Bensky 
> Verzonden: dinsdag 12 juni 2018 13:40
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Write Pro: programmatically manipulate text expertise needed
> 
> Piotr,
> 1. I think you will need to use ST GET PLAIN TEXT to get all the text after 
> the
> specified range and then look for the first return character in that 
> selection. I
> believe this is the only way to get an accurate position with styled text.
> 
> 2. Again, use ST GET PLAIN TEXT to get a range of text from the cursor 
> position
> back n characters or to the beginning of the text.
> 
> HTH
> 
> Pat
> 
> On Tue, 12 Jun 2018 at 10:02, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
> > Hi all,
> >
> > We are in the progress of migrating from 4D Write to Write Pro A lot
> > of things are going fine, but there is one area that seems easy but I
> > am having difficulties with it and that is programmatically
> > manipulating text
> >
> > I give 2 examples that maybe seem obvious to others but are not for me:
> >
> >   1.  I am in a procedure where I have an Write Pro object (not perce
> > an area on screen, could be a range) and an expression has been
> > selected via $type:=ST Get content
> > type($wp_obj;$start;$end;$startBlock;$endBlock). I call the command ST
> > SET TEXT($wp_obj;$text;$startBlock;$endBlock) to replace the selected
> expression. So far no problems, but here it comes...
> > Now I want to find the first occurrence of a carriage return in the
> > text that comes after the replaced text (end inserted text - end whole 
> > text).
> > What is the best / easiest way to do this? Remember, this text can
> > contain styled text and/or expressions and/or pictures
> >   2.  Example 2 is like example 1 but now with an actual visual area.
> > The user types a couple of characters. At a certain point after typing
> > I want to procedurally replace the typed text from the cursor back
> > until the first space and replace it with another text. Maybe somebody
> > knows "Type it for me", this is what I am talking about. So, what is
> > the best way to find the first occurrence of a space from the cursor
> > back and replace this text with another text?
> >
> > Thanks in advance,
> >
> > Piotr
> >
> >
> 
> **
> > 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
> >
> 
> **
> 
> 
> 
> --
> *
> 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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Write Pro: programmatically manipulate text expertise needed

2018-06-12 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Pat,

Thanks for your answer.

Sometimes the solution is quite obvious but you just don't see it😊

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Pat Bensky 
> Verzonden: dinsdag 12 juni 2018 13:40
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Write Pro: programmatically manipulate text expertise needed
> 
> Piotr,
> 1. I think you will need to use ST GET PLAIN TEXT to get all the text after 
> the
> specified range and then look for the first return character in that 
> selection. I
> believe this is the only way to get an accurate position with styled text.
> 
> 2. Again, use ST GET PLAIN TEXT to get a range of text from the cursor 
> position
> back n characters or to the beginning of the text.
> 
> HTH
> 
> Pat
> 
> On Tue, 12 Jun 2018 at 10:02, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
> > Hi all,
> >
> > We are in the progress of migrating from 4D Write to Write Pro A lot
> > of things are going fine, but there is one area that seems easy but I
> > am having difficulties with it and that is programmatically
> > manipulating text
> >
> > I give 2 examples that maybe seem obvious to others but are not for me:
> >
> >   1.  I am in a procedure where I have an Write Pro object (not perce
> > an area on screen, could be a range) and an expression has been
> > selected via $type:=ST Get content
> > type($wp_obj;$start;$end;$startBlock;$endBlock). I call the command ST
> > SET TEXT($wp_obj;$text;$startBlock;$endBlock) to replace the selected
> expression. So far no problems, but here it comes...
> > Now I want to find the first occurrence of a carriage return in the
> > text that comes after the replaced text (end inserted text - end whole 
> > text).
> > What is the best / easiest way to do this? Remember, this text can
> > contain styled text and/or expressions and/or pictures
> >   2.  Example 2 is like example 1 but now with an actual visual area.
> > The user types a couple of characters. At a certain point after typing
> > I want to procedurally replace the typed text from the cursor back
> > until the first space and replace it with another text. Maybe somebody
> > knows "Type it for me", this is what I am talking about. So, what is
> > the best way to find the first occurrence of a space from the cursor
> > back and replace this text with another text?
> >
> > Thanks in advance,
> >
> > Piotr
> >
> >
> 
> **
> > 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
> >
> 
> **
> 
> 
> 
> --
> *
> 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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Difference between OB Copy and :=

2018-06-12 Thread Cannon Smith via 4D_Tech
The neat thing about objects, in my opinion, is that they are reference based. 
I would try to stay away from using OB Copy unless it is warranted. For 
example, in your example you could just use the field directly or a reference 
to the field. Unless you save the record, changes won’t be put back in the 
database anyway.

However, be aware of a bug in 4D. If you modify a child object in an object 
type field and then save the record, the object will not be saved. It is only 
saved if you modify a top level key in the object. The workaround, until 4D 
fixes this, is to assign the object field to itself before saving.

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




> On Jun 12, 2018, at 7:26 PM, johnbdhPop via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>   So maybe I want to use OB Copy when I load the record in an input form. 
> That way I can make changes to the object without changing the object in the 
> field. That way if the user cancels I don’t have to worry about the field.
> 
>   When the user saves the record, should I use OB Copy to save the object 
> back to the field, or does it really matter?
> 

**
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: Difference between OB Copy and :=

2018-06-12 Thread johnbdhPop via 4D_Tech
Thanks Cannon,

So maybe I want to use OB Copy when I load the record in an input form. 
That way I can make changes to the object without changing the object in the 
field. That way if the user cancels I don’t have to worry about the field.

When the user saves the record, should I use OB Copy to save the object 
back to the field, or does it really matter?

John




On June 12, 2018 at 3:14:33 PM, Cannon Smith via 4D_Tech (4d_tech@lists.4d.com) 
wrote:

> [Letter Templates]WP_SeriesPictures:=oPictures  

Both [Letter Templates]WP_SeriesPictures and oPictures point to the same 
C_Object instance in memory. If you change either one, they are “both” changed.


> [Letter Templates]WP_SeriesPictures:=OB Copy(oPictures)

[Letter Templates]WP_SeriesPictures and oPictures now point to completely 
separate C_Object instances in memory. If you change one, the other is 
unaffected.

A deep copy means that if the object being copied has child objects (and 
grandchildren, etc.), they are all copied as well. It is then safe to modify 
any level of object knowing you won’t modify the original object.

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




> On Jun 12, 2018, at 7:08 PM, johnbdhPop via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
>  
> What is the difference between the following...
>  
> [Letter Templates]WP_SeriesPictures:=oPictures  
> [Letter Templates]WP_SeriesPictures:=OB Copy(oPictures)
>  
>  
> Both work. The LRM for OB Copy speaks to “a complete (deep) copy of the 
> properties”. What does “deep” mean.

**
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: Difference between OB Copy and :=

2018-06-12 Thread Cannon Smith via 4D_Tech
> [Letter Templates]WP_SeriesPictures:=oPictures  

Both [Letter Templates]WP_SeriesPictures and oPictures point to the same 
C_Object instance in memory. If you change either one, they are “both” changed.


> [Letter Templates]WP_SeriesPictures:=OB Copy(oPictures)

 [Letter Templates]WP_SeriesPictures and oPictures now point to completely 
separate C_Object instances in memory. If you change one, the other is 
unaffected.

A deep copy means that if the object being copied has child objects (and 
grandchildren, etc.), they are all copied as well. It is then safe to modify 
any level of object knowing you won’t modify the original object.

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




> On Jun 12, 2018, at 7:08 PM, johnbdhPop via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What is the difference between the following...
> 
> [Letter Templates]WP_SeriesPictures:=oPictures  
> [Letter Templates]WP_SeriesPictures:=OB Copy(oPictures)
> 
> 
> Both work. The LRM for OB Copy speaks to “a complete (deep) copy of the 
> properties”. What does “deep” mean.

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

Difference between OB Copy and :=

2018-06-12 Thread johnbdhPop via 4D_Tech
 
What is the difference between the following...

[Letter Templates]WP_SeriesPictures:=oPictures  
[Letter Templates]WP_SeriesPictures:=OB Copy(oPictures)


Both work. The LRM for OB Copy speaks to “a complete (deep) copy of the 
properties”. What does “deep” mean.

Thanks,

John


**
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: Moving Methods/Forms between structures seems disabled - SOLVED!!!

2018-06-12 Thread Randy Engle via 4D_Tech
Makes perfect senseThanks

Randy Engle, Director
XC2 Software LLC – XC2LIVE!

for the record, it is not a 4D thing,

any applications running as administrator (console, for example) will not 
accept drop from an app running on a lesser entitlement.

2018/06/13 7:58、Randy Engle via 4D_Tech 
<4d_tech@lists.4d.com> のメール:
If you have one of your 4D executables set to "Run as Administrator", you won't 
be able to "move" objects into it.




**
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: Moving Methods/Forms between structures seems disabled - SOLVED!!!

2018-06-12 Thread Keisuke Miyako via 4D_Tech
for the record, it is not a 4D thing,

any applications running as administrator (console, for example)
will not accept drop from an app running on a lesser entitlement.

2018/06/13 7:58、Randy Engle via 4D_Tech 
<4d_tech@lists.4d.com> のメール:
If you have one of your 4D executables set to "Run as Administrator", you won't 
be able to "move" objects into it.



**
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: Moving Methods/Forms between structures seems disabled - SOLVED!!!

2018-06-12 Thread Randy Engle via 4D_Tech
After much writhing and gnashing of teeth...

If you have one of your 4D executables set to "Run as Administrator", you won't 
be able to "move" objects into it.

Hope this saves somebody tome time!

😉

Randy Engle, Director
XC2 Software LLC – XC2LIVE!




Let me ask this another way hopefully someone knows:

If I "wanted" to not allow "moving" objects into a structure using the "moving" 
features of 4D, what setting would I check/uncheck?

😉

Thanks to all who entertain this option!


**
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: Scroll position of display-type subform

2018-06-12 Thread Richard Wright via 4D_Tech
Thanks, Miyako, that works!


> From: Keisuke Miyako 
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Subject: Re: Scroll position of display-type subform
> Message-ID: <30f1fc18-68d9-4b1b-9413-aba4d7db5...@4d.com>
> Content-Type: text/plain; charset="utf-8"
> 
> haven't tried,
> but I wonder if CONVERT COORDINATES would be smart enough to take into 
> account the scrolled amount of a detail subform.
> 
> http://doc.4d.com/4Dv16/4D/16.3/CONVERT-COORDINATES.301-3651760.en.html
> 
>> 2018/06/12 7:37、Richard Wright via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> I need to get the position of an object on a display-type subform in global 
>> coordinates and the subform may be scrolled.
> 

**
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: 4D Write to 4D Write Pro, Moving and using templates (Was: WR Count equivalent in 4D Write Pro)

2018-06-12 Thread JOHN BAUGHMAN via 4D_Tech
Step 1 should have read "Using WR Count and WR GET PICTURE IN PAGE INFO"


> On Jun 12, 2018, at 11:41 AM, JOHN BAUGHMAN  wrote:
> 
> 1. In 4D Write store the position and dimensions of each anchored picture 
> place holder into a c_object.
>   Using WR Count and WR SELECT PICTURE IN PAGE
> 


John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.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: Delay process bug

2018-06-12 Thread Cannon Smith via 4D_Tech
I’ve seen it happen in as little as a few hours of a machine restart or after 
it had been running for a >2 months. Same with when 4D Server itself was 
launched.

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




> On Jun 12, 2018, at 3:26 PM, Jim Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Also many people have this occur after several months, so the DELAY PROCESS 
> code must be able to accommodate the milliseconds rollover, at least in 
> general. If it’s related to that, it must be an interesting corner case.

**
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 Write to 4D Write Pro, Moving and using templates (Was: WR Count equivalent in 4D Write Pro)

2018-06-12 Thread JOHN BAUGHMAN via 4D_Tech
If anyone was following the original thread, the underlying problem was how to 
address Anchored Picture place holders when converting a 4D Write template to 
4D Write Pro. Beyond that, how to populate the place holder pictures when the 
4D Write Pro template is used.

My last post left this problem as undoable in anything prior to v17. I have 
since figured out a way to do it in v16 and thought I would post my solution if 
anyone is in fact interested.

Moving the Template from 4D Write to 4D Write Pro…

1. In 4D Write store the position and dimensions of each anchored 
picture place holder into a c_object.
Using WR Count and WR SELECT PICTURE IN PAGE

2. Copy the 4D Write area to an off screen area and delete all the 
anchored picture placeholders.

3. Convert the off screen area to 4D Write Pro.

4. Using the c_object created in step 1 recreate in the new 4D Write 
Pro are all the anchored picture place holders with WP Add Picture.
Store the picture reference returned by WP Add Picture in the 
c_object created in step 1.

Saving the 4D Write Pro template

1. Store the c_object in the template record.

2. Using the picture references stored in the c_object, delete all the 
anchored picture place holders

3. Save the record

Opening the template in the Template table.

1, Using the saved c_object, recreate all the anchored picture place 
holders with WP Add Picture.
Update the picture references in the c_object with the newly 
created anchored pictures references as returned by WP Add Picture

Adding a 4D Write Pro template in a 4D Write Pro document for a patient in the 
patient table.

1. Using the saved c_object recreate all the anchored picture place 
holders with WP Add Picture.
Update the picture references in the c_object with the newly 
created anchored pictures references as returned by WP Add Picture

2, Using the picture references in the c_object, populate the place 
holder pictures with the photos from the patient record.

Hope this helps anyone struggling with a similar situation.

John



John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.com

> On Jun 10, 2018, at 9:06 PM, JOHN BAUGHMAN  wrote:
> 
> 
> 
>> On Jun 10, 2018, at 8:37 PM, Keisuke Miyako via 4D_Tech 
>> <4d_tech@lists.4d.com > wrote:
>> 
>> I must say it would be difficult to manipulate an existing anchored image 
>> without Get elements or Get element by id (v17).
> 
> 
> You assumed correctly in that these are anchored pictures. I have discovered 
> as you have pointed out that the reference returned by Add picture is 
> destroyed when the record is unloaded. I think you have confirmed for me that 
> there is no way currently to use picture place holders in a 4D Write Pro 
> template as I did in 4D Write.
> 
> I will give this a bit more thought, but I am about to give up on this part 
> of my attempt to upgrade my client to v16. Since it is way to early to deploy 
> v17, I will have to tell them they will have to wait until we upgrade to v17 
> to move any of their photo templates to Pro or create any new ones. Of course 
> this prevents me from moving them to 64 bit until then as well.
> 
> BTW, another thing I cannot find is any way to provide a means for end users 
> to insert 4D expressions as they can in 4D Write. I could write a dialog for 
> this, but it already exists in 4D so why not provide the same functionality 
> out of the box?
> 
> John
> 
> 
> 
> John Baughman
> 1331 Auwaiku Street
> Kailua, Hawaii  96734
> (808) 262-0328
> john...@hawaii.rr.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: Delay process bug

2018-06-12 Thread Dennis, Neil via 4D_Tech
I also did some digging our servers are patched on a monthly bases and 
restarted. So usually restart is few days over the 24.74 days. We have only had 
one instance of the delay process bug. So most of the time, even if it is a 32 
bit signed integer problem, we don't have an issue with the delay process 
except the one time.

Neil





Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
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: v13 - Windows, DOS, LEP, Virtual environments, attrib command

2018-06-12 Thread Chip Scheide via 4D_Tech
I found a actual PC, and moved everything over there to try.

the answer is : YES 
the virtual environment was causing the hide/show attributes of the 
files to be wonky, and folders not to work at all.

On Tue, 12 Jun 2018 20:19:11 +, Keisuke Miyako via 4D_Tech wrote:
> to rule out virtual environment as decisive factor, perhaps you could try
> 
> https://github.com/miyako/4d-plugin-document-properties
> 
> as mentioned multiple times,
> an accurate understanding of how path escaping works on CLI is required,
> especially for folder paths on windows as by definition they end with 
> an escape character.
The code worked without an issue once on a real PC, rather then a 
virtual environment.


Thanks
> 
> 
> **
> 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
> **
---
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Delay process bug

2018-06-12 Thread Jim Crate via 4D_Tech
I doublechecked the time the server was started until the last time the 
processes were delayed and it was actually 24.74 (2137700 seconds). The 
processes were delayed for 5 minutes. However, that time period + the delay is 
still 9,483,647 ms, or 2.63 hours, short of the 2147483647 max signed 32-bit 
integer.

Also many people have this occur after several months, so the DELAY PROCESS 
code must be able to accommodate the milliseconds rollover, at least in 
general. If it’s related to that, it must be an interesting corner case.

Jim Crate


> On Jun 12, 2018, at 1:33 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 22 days does sound suspicious; as if (no proof),
> the scheduler is testing if milliseconds "minus" process up-time is "greater 
> than" delay time...
> such logic would break when milliseconds expressed in signed 32-bit long 
> integer flips to negative, after 24 days.
> (milliseconds is counted since system boot, not 4D launch)
> 
>> 2018/06/13 4:43、Jim Crate via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> Our server (macOS 10.11, 4D 16.3 HF3 64-bit) hit this bug again last week 
>> after being up for about 22 days.
> 
> 
> 
> 
> **
> 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: Delay process bug

2018-06-12 Thread Dennis, Neil via 4D_Tech
> 32-bit long integer flips to negative, after 24 days.

You might be on to something 😊

Could pass this on to the 4D tech guys... there are several bugs already 
reported for this.

Neil



Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
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: Delay process bug

2018-06-12 Thread Jim Crate via 4D_Tech
There have been enough reports that they know it happens on both macOS and 
Windows. Multiple reports indicate the processes can continue when RESUME 
PROCESS is called. In this case RESUME PROCESS would have worked, because when 
quitting the server, the processes started again because the quitting process 
resumes them. However, this bug will never be reproducible on demand. The only 
way this bug can be fixed is by 4D engineers looking into the code to figure 
out why sometimes processes delayed with DELAY PROCESS don’t wake up. None of 
us know what kind of mechanism or data structures they are using to track when 
delayed processes should wake up.

Sometimes, as programmers, we just have to take the customer reports of 
something happening and look through our code to see what can possibly trigger 
the condition. I have done that before and discovered the cause of 
non-reproducible bugs. I have also looked and not found code that could cause a 
condition the customer reported.

Jim Crate


> On Jun 12, 2018, at 1:27 PM, Dennis, Neil via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> DELAY PROCESS never comes back
> 
> Be sure to submit a bug with 4D when this happens. I submitted one and they 
> said if it isn't reproducible they "can't" fix it. If there is enough 
> complaining about it, I hope they would spend time digging into it and 
> realize it is a problem even if it can't be reproduced on demand.
> 
> Neil
> 
> 
> 
> 
> 
> 
> --
> 
> Privacy Disclaimer: This message contains confidential information and is 
> intended only for the named addressee. If you are not the named addressee you 
> should not disseminate, distribute or copy this email. Please delete this 
> email from your system and notify the sender immediately by replying to this 
> email.  If you are not the intended recipient you are notified that 
> disclosing, copying, distributing or taking any action in reliance on the 
> contents of this information is strictly prohibited.
> 
> The Alternative Investments division of UMB Fund Services provides a full 
> range of services to hedge funds, funds of funds and private equity funds.  
> Any tax advice in this communication is not intended to be used, and cannot 
> be used, by a client or any other person or entity for the purpose of (a) 
> avoiding penalties that may be imposed on any taxpayer or (b) promoting, 
> marketing, or recommending to another party any matter addressed herein.
> **
> 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: Delay process bug

2018-06-12 Thread Cannon Smith via 4D_Tech
We just released a new version of our software a week and a half ago. In this 
version I added a palette window on the server which runs On Timer. I also 
added code to most every background process which updates some information 
every time it wakes up from a Delay Process call. The palette window checks 
this information and, if it sees a process that has been asleep longer than one 
minute, resumes the process and sends us a Slack message identifying the server 
and process that was asleep. If the process does not get resumed, another Slack 
message is sent so we can handle the issue manually before our customer knows.

Interestingly, this mechanism was triggered on Sunday morning at 1:01 AM for 9 
servers. All 9 reported one or more stalled processes within a 60 second time 
period.

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




> On Jun 12, 2018, at 1:43 PM, Jim Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Our server (macOS 10.11, 4D 16.3 HF3 64-bit) hit this bug again last week 
> after being up for about 22 days. There are 2 separate processes that run 
> periodically, both at the same time stopped waking from DELAY PROCESS. The 
> Server window also was not showing the 4D username in the user list, although 
> IP, machine name, and login date/time were displayed.

**
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: Delay process bug

2018-06-12 Thread Keisuke Miyako via 4D_Tech
22 days does sound suspicious; as if (no proof),
the scheduler is testing if milliseconds "minus" process up-time is "greater 
than" delay time...
such logic would break when milliseconds expressed in signed 32-bit long 
integer flips to negative, after 24 days.
(milliseconds is counted since system boot, not 4D launch)

> 2018/06/13 4:43、Jim Crate via 4D_Tech <4d_tech@lists.4d.com> のメール:
> Our server (macOS 10.11, 4D 16.3 HF3 64-bit) hit this bug again last week 
> after being up for about 22 days.




**
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: Delay process bug

2018-06-12 Thread Dennis, Neil via 4D_Tech
> DELAY PROCESS never comes back

Be sure to submit a bug with 4D when this happens. I submitted one and they 
said if it isn't reproducible they "can't" fix it. If there is enough 
complaining about it, I hope they would spend time digging into it and realize 
it is a problem even if it can't be reproduced on demand.

Neil






--

Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
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: v13 - Windows, DOS, LEP, Virtual environments, attrib command

2018-06-12 Thread Keisuke Miyako via 4D_Tech
to rule out virtual environment as decisive factor, perhaps you could try

https://github.com/miyako/4d-plugin-document-properties

as mentioned multiple times,
an accurate understanding of how path escaping works on CLI is required,
especially for folder paths on windows as by definition they end with an escape 
character.



**
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: Delay process bug

2018-06-12 Thread Jim Crate via 4D_Tech
Our server (macOS 10.11, 4D 16.3 HF3 64-bit) hit this bug again last week after 
being up for about 22 days. There are 2 separate processes that run 
periodically, both at the same time stopped waking from DELAY PROCESS. The 
Server window also was not showing the 4D username in the user list, although 
IP, machine name, and login date/time were displayed.

A watchdog process would have to run continuously to avoid being delayed at the 
time when delay timers die. Sucking up that much cpu just to try to be notified 
of a bug that occurs every few weeks doesn’t seem like a great solution. Also, 
because these methods use plugins and probably Begin/End SQL blocks, I can’t 
run them preemptively to see if preemptive threads have the same problem with 
DELAY PROCESS.

Jim Crate


> On Mar 31, 2018, at 8:31 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> So, the Delay Process bug hit two servers within an hour of each other this 
> morning, after months of not having the issue.  It was weird that both of 
> them hit the bug this morning within a short period of time of each other.
> 
> This was on 16.3 HF2, so the latest and greatest...
> **
> 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
**

v13 - Windows, DOS, LEP, Virtual environments, attrib command

2018-06-12 Thread Chip Scheide via 4D_Tech
I have run across a situation where I *think* the problem is a virtual 
environment.

Using LEP I am trying to set files &/or folders (in)visible.
The base attrib command is:
attrib [+/-]H [/S /D] Path

where [+/-] = make hidden/ make visible
where [/S /D] = switches to apply to all files & folders and subfolders

Running attrib from cmd, I am finding that the hidden state of files is 
only sometimes changed, and folders never,
even manually setting the hidden attribute of a folder does NOT result 
in the folder being hidden.

Has anyone else ever attempted this?
run onto this issue?

I am running the virtual environment (Parallels with Windows 7 
ultimate), on a Mac running 10.11.

Thanks for any insights
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ Progress component, and other components

2018-06-12 Thread Chip Scheide via 4D_Tech
not exactly..  :)
I have component which has 4D code which wraps the Progress component, 
this did 2 things for me
- I had existing code for thermometers & barber poles, so I just used 
those method calls to manage Progress and id not have to go back 
through lots of code to change calls, method names etc.
- I have a component, in which I put up a progress indicator (barber 
pole in this specific instance). The wrapper code, mentioned above, for 
Progress is included in the component.  I do not have a specific 
wrapper component for Progress.

Also, I think I have figured out the issue, what I was not aware of was 
in this context, Progress is trying to use the Host database context 
for the User close action callback, rather then the context of the 
component in which Progress was called/instansiated.
So, I will need to either, install the call back method into the host, 
or modify my Progress init routine to allow a passthrough Host user 
close callback method name.

Thanks for the help
Chip

On Mon, 11 Jun 2018 20:48:37 +, Keisuke Miyako via 4D_Tech wrote:
> you are working on a component that "wraps" around another component?
> 
> just as a reminder,
> the progress component is open-source since v16,
> partners have ways to customise and distribute them.
> 
>> 2018/06/11 23:21、Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> の
>> メール:
>> In component (wrappers for progress methods including):
> 
> 
> 
> 
> **
> 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
> **
---
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v16 Time picker - bound variable changed

2018-06-12 Thread Jody Bevan via 4D_Tech
Thanks Keisuke.

That explains it. I still have not wrapped my head around how to tell when a 
non-R version will have the features of an R-version. I have read the BLOG on 
it, and it does not go into that detail.

How can we know what are ‘feature’ equivalent?

I spent time yesterday reading on: http://www.4d.com/products/r-release.html 

Also at: https://blog.4d.com/en-whats-new-previous-r-releases/ 




> On Jun 11, 2018, at 5:10 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> LISTBOX SET PROPERTY was created in 16R2, it's normal that it won't compile 
> on 16.3 (if that is what you mean)
> 
> http://doc.4d.com/4Dv16R6/4D/16-R6/LISTBOX-SET-PROPERTY.301-3547819.en.html
> 
> 2018/06/12 6:09、Jody Bevan via 4D_Tech 
> <4d_tech@lists.4d.com> のメール:
> I submitted a bug on Sunday in regard to 16.3 Hotfix 4 where the command 
> Listbox Set Property and all the lk_ constants are not dereferenced (thus 
> cannot compile). In the Method editor one ends up with just a numerical 
> reference.
> 

**
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: Why won't Help Tip editor accept Carriage Return?

2018-06-12 Thread Pat Bensky via 4D_Tech
We manage help tips this way:
- For each object, select the On Mouse Enter form event
- We have a Help Tip named "HelpText" which simply contains a variable,
tHelpText. Select that Help Tip for each object.
- On the object, populate the tHelpText variable in the On Mouse Enter form
event.

With this scheme, you can customise your help tips in lots of creative ways
- e.g. depending on whether the user is on Mac or Windows, what day of the
week it is, what level of access the user has, or whatever. I also find it
much easier to manage the tips as you don't have to deal with a long list
of Help Tips.

Pat

Pat


On Tue, 12 Jun 2018 at 06:32, Keisuke Miyako via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> for the record, problem does not exist for v14 or later.
>
> this is basically a compatibility issue between macOS 10.8/9 and 13.6
> (evidently a regression from 13.5, really sorry about that...),
> which was released in the first half of 2015.
>
> > 2018/06/12 13:22、Dan Ivy via 4D_Tech <4d_tech@lists.4d.com> のメール:
> >
> > I agree with Doug about where this is coming from. Also as a workaround
> I had
> > success using a text editor to create the help text with carriage returns
> > and then paste it into the 4D help editor. After that 4D seems to allow
> > returns to be added or deleted from the text displayed in the help
> editor.
>
>
>
> **
> 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
> **



-- 
*
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Write Pro: programmatically manipulate text expertise needed

2018-06-12 Thread Pat Bensky via 4D_Tech
Piotr,
1. I think you will need to use ST GET PLAIN TEXT to get all the text after
the specified range and then look for the first return character in that
selection. I believe this is the only way to get an accurate position with
styled text.

2. Again, use ST GET PLAIN TEXT to get a range of text from the cursor
position back n characters or to the beginning of the text.

HTH

Pat

On Tue, 12 Jun 2018 at 10:02, Piotr Chabot Stadhouders via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi all,
>
> We are in the progress of migrating from 4D Write to Write Pro
> A lot of things are going fine, but there is one area that seems easy but
> I am having difficulties with it and that is programmatically manipulating
> text
>
> I give 2 examples that maybe seem obvious to others but are not for me:
>
>   1.  I am in a procedure where I have an Write Pro object (not perce an
> area on screen, could be a range) and an expression has been selected via
> $type:=ST Get content type($wp_obj;$start;$end;$startBlock;$endBlock). I
> call the command ST SET TEXT($wp_obj;$text;$startBlock;$endBlock) to
> replace the selected expression. So far no problems, but here it comes...
> Now I want to find the first occurrence of a carriage return in the text
> that comes after the replaced text (end inserted text - end whole text).
> What is the best / easiest way to do this? Remember, this text can contain
> styled text and/or expressions and/or pictures
>   2.  Example 2 is like example 1 but now with an actual visual area. The
> user types a couple of characters. At a certain point after typing I want
> to procedurally replace the typed text from the cursor back until the first
> space and replace it with another text. Maybe somebody knows "Type it for
> me", this is what I am talking about. So, what is the best way to find the
> first occurrence of a space from the cursor back and replace this text with
> another text?
>
> Thanks in advance,
>
> Piotr
>
> **
> 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
> **



-- 
*
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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Write Pro: programmatically manipulate text expertise needed

2018-06-12 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi all,

We are in the progress of migrating from 4D Write to Write Pro
A lot of things are going fine, but there is one area that seems easy but I am 
having difficulties with it and that is programmatically manipulating text

I give 2 examples that maybe seem obvious to others but are not for me:

  1.  I am in a procedure where I have an Write Pro object (not perce an area 
on screen, could be a range) and an expression has been selected via $type:=ST 
Get content type($wp_obj;$start;$end;$startBlock;$endBlock). I call the command 
ST SET TEXT($wp_obj;$text;$startBlock;$endBlock) to replace the selected 
expression. So far no problems, but here it comes... Now I want to find the 
first occurrence of a carriage return in the text that comes after the replaced 
text (end inserted text - end whole text). What is the best / easiest way to do 
this? Remember, this text can contain styled text and/or expressions and/or 
pictures
  2.  Example 2 is like example 1 but now with an actual visual area. The user 
types a couple of characters. At a certain point after typing I want to 
procedurally replace the typed text from the cursor back until the first space 
and replace it with another text. Maybe somebody knows "Type it for me", this 
is what I am talking about. So, what is the best way to find the first 
occurrence of a space from the cursor back and replace this text with another 
text?

Thanks in advance,

Piotr

**
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: Bug reports?

2018-06-12 Thread Alan Chan via 4D_Tech
>
>> Try
>>
>> http://forums.4d.com/Bugs/EN/
>>
>>
>this just redirect me to http://forums.4d.com/MyHome/EN, so I gather it
>does this to non-partners too.

Once you login the forum regardless of non-partner status, you should be able 
to see Bug link at the upper part of the page.

Alan Chan

**
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: Bug reports?

2018-06-12 Thread Peter Bozek via 4D_Tech
On Mon, Jun 11, 2018 at 9:00 PM, Alan Chan via 4D_Tech <4d_tech@lists.4d.com
> wrote:

> Try
>
> http://forums.4d.com/Bugs/EN/
>
>
this just redirect me to http://forums.4d.com/MyHome/EN, so I gather it
does this to non-partners too.

--

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