Re: procedurally delete anchored image in 4D Write Pro

2018-05-25 Thread Keisuke Miyako via 4D_Tech
there is no reason why a "delete" command should not exist, I suppose,
but 4D Write Pro is about constructing dynamic documents using templates,
by evaluating embedded expressions and/or combining prepared segments (range 
objects),
so I would imagine that a delete command is not really in high demand.

same with commands Write Pro tables (no delete command)
if you don't need it in the final result.

perhaps a better way is rethink how you create the document.
rather than working on a single document created with WP New,
use WP New many times and build the document like lego.

2018/05/26 2:52、Piotr Chabot Stadhouders via 4D_Tech 
<4d_tech@lists.4d.com> のメール:
So there are 2 possibilities:
1. We are overlooking an existing command that can be used to delete an 
anchored image
2. 4D forgot to implement a WP delete picture command



**
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: procedurally delete anchored image in 4D Write Pro

2018-05-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Justin, Miyako,

INVOKE ACTION works, but then I was realizing that this only works with an 
Write Pro on a Form and not when using an "offscreen" 4D Write Pro object 
variable
That's why I thought I must be overlooking a command to do the deleting

So there are 2 possibilities:
1. We are overlooking an existing command that can be used to delete an 
anchored image
2. 4D forgot to implement a WP delete picture command

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako <keisuke.miy...@4d.com>
> Verzonden: donderdag 24 mei 2018 2:02
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: procedurally delete anchored image in 4D Write Pro
> 
> 
> 
> I think you need to first change the layout to inline (by UI or code), in 
> order to
> delete an image.
> 
> but the attribute "wk anchor layout" is not settable with WP SET ATTRIBUTES
> http://doc.4d.com/4Dv16R6/4D/16-R6/4D-Write-Pro-Attributes.300-
> 3605889.en.html
> 
> so you need to use INVOKE ACTION instead.
> 
> syntax: anchorLayout?value=inline
> http://doc.4d.com/4Dv16R6/4D/16-R6/Using-4D-Write-Pro-standard-
> actions.200-3605850.en.html#3610756
> 
> only then can you clear the selected image.
> 
> > 2018/05/24 8:03、Justin Carr via 4D_Tech <4d_tech@lists.4d.com> のメー
> ル:
> > INVOKE ACTION(ak clear;ak current form)
> 
> 
> 

**
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: procedurally delete anchored image in 4D Write Pro

2018-05-23 Thread Justin Carr via 4D_Tech
On 24 May 2018, at 10:01 am, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> I think you need to first change the layout to inline (by UI or code), in 
> order to delete an image.
> 
> but the attribute "wk anchor layout" is not settable with WP SET ATTRIBUTES
> http://doc.4d.com/4Dv16R6/4D/16-R6/4D-Write-Pro-Attributes.300-3605889.en.html
> 
> so you need to use INVOKE ACTION instead.
> 
> syntax: anchorLayout?value=inline
> http://doc.4d.com/4Dv16R6/4D/16-R6/Using-4D-Write-Pro-standard-actions.200-3605850.en.html#3610756
> 
> only then can you clear the selected image.

Seems to make no difference to me? The INVOKE ACTION(ak clear;ak current form) 
works regardless of the images being forced inline or left as anchored. The 
main "trick" is that the Write Pro area MUST have the focus, i.e. if you're 
trying to execute this code from a button, then that button must not be 
focussable.

cheers
J
**
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: procedurally delete anchored image in 4D Write Pro

2018-05-23 Thread Keisuke Miyako via 4D_Tech


I think you need to first change the layout to inline (by UI or code), in order 
to delete an image.

but the attribute "wk anchor layout" is not settable with WP SET ATTRIBUTES
http://doc.4d.com/4Dv16R6/4D/16-R6/4D-Write-Pro-Attributes.300-3605889.en.html

so you need to use INVOKE ACTION instead.

syntax: anchorLayout?value=inline
http://doc.4d.com/4Dv16R6/4D/16-R6/Using-4D-Write-Pro-standard-actions.200-3605850.en.html#3610756

only then can you clear the selected image.

> 2018/05/24 8:03、Justin Carr via 4D_Tech <4d_tech@lists.4d.com> のメール:
> INVOKE ACTION(ak clear;ak current form)




**
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: procedurally delete anchored image in 4D Write Pro

2018-05-23 Thread Justin Carr via 4D_Tech
> On 18 May 2018, at 11:21 pm, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> How can I procedurally delete an anchored image in a 4D Write Pro document?
> 
> I know how to select the image with
> WP SELECT(*;"WParea";$image_object)
> 
> But then what?

Try:

INVOKE ACTION(ak clear;ak current form)

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