# Trouble with WebContainers

**URL:** <https://forum.xojo.com/t/trouble-with-webcontainers/19167>\
**Category:** Web\
**Created:** [September 9, 2014, 10:04am UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167 "2014-09-09T10:04:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Lehmann](https://forum.xojo.com/user_avatar/forum.xojo.com/lars_lehmann/32/11818_2.png) [@Lars\_Lehmann](https://forum.xojo.com/u/Lars_Lehmann)\
**Post date:** [September 9, 2014, 10:04am UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/1 "2014-09-09T10:04:03Z")

</div>

Hi!

Webcontainers are awesome in it’s use, because you can create everything you want. But: they are also very bugy!

The bug, which lets labels only shown as a half label, is known (and very annoying). I do solve this, that I use textfields instead of Labels.

Now I have new bug: if I click on a button, the cklickevent is fired twice!

I embed some CC into another CC, which is embeded to the WebPage - all at runtime.  
If I add the CC manually over the IDE, the CC works fine and the event is fired once.

Is there a workaround to solve this issue? It’s driving me nuts!

And it’s very important for me, that it works…

Thank you guys

-Lars

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [September 9, 2014, 10:31am UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/2 "2014-09-09T10:31:11Z")

</div>

[quote=128005:@Lars Lehmann]Hi!

Webcontainers are awesome in it’s use, because you can create everything you want. But: they are also very bugy!

The bug, which lets labels only shown as a half label, is known (and very annoying). I do solve this, that I use textfields instead of Labels.

Now I have new bug: if I click on a button, the cklickevent is fired twice!

I embed some CC into another CC, which is embeded to the WebPage - all at runtime.  
If I add the CC manually over the IDE, the CC works fine and the event is fired once.

Is there a workaround to solve this issue? It’s driving me nuts!

And it’s very important for me, that it works…  
[/quote]

You could use a static flag and measure the time between click events to ignore the second one. Something like this at the beginning of the button Action event should do, on the top of my head :

Dejaclick as boolean and DejaTicks as integer are container properties

`If DejaClick = True and (Ticks-DejaTicks) < 30 then
 return
 DejaClick = False
else
 DejaTicks = Ticks
 DejaClick = True
end if
`

---

<div class="post-metadata">

**Author:** ![Lars\_Lehmann](https://forum.xojo.com/user_avatar/forum.xojo.com/lars_lehmann/32/11818_2.png) [@Lars\_Lehmann](https://forum.xojo.com/u/Lars_Lehmann)\
**Post date:** [September 9, 2014, 11:28am UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/3 "2014-09-09T11:28:58Z")

</div>

Yea, I solve this like this:

[code] if DejaClick = 1 then 'bugs verhindern

…some Code of mine

```
DejaClick = 2

```

else  
DejaClick = 1  
end if[/code]

But it’s not yellow of the egg - I had hoped to get a solution - to prevent this bug.

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [September 9, 2014, 11:34am UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/4 "2014-09-09T11:34:50Z")

</div>

> [@128025:@Lars Lehmann](#):
>
> But it’s not yellow of the egg - I had hoped to get a solution - to prevent this bug.

Did not know the expression “yellow of the egg”, apparently meaning “the heart of the matter”. Must be typically German 😉 Thank you for this.

Only Greg can probably say if the bug can be prevented, and how.

---

<div class="post-metadata">

**Author:** ![Lars\_Lehmann](https://forum.xojo.com/user_avatar/forum.xojo.com/lars_lehmann/32/11818_2.png) [@Lars\_Lehmann](https://forum.xojo.com/u/Lars_Lehmann)\
**Post date:** [September 9, 2014, 12:37pm UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/5 "2014-09-09T12:37:26Z")

</div>

huh? I speak every day with native-english-speakers and most of them know the expression ‘the Yellow of the egg’ - it means that the solution is not the best of the possibles (the yellow is better than the white of the egg) 😃

howsoever

thank you for your answers!

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [September 9, 2014, 12:54pm UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/6 "2014-09-09T12:54:21Z")

</div>

> [@128032:@Lars Lehmann](#):
>
> I speak every day with native-english-speakers and most of them know the expression ‘the Yellow of the egg’ - it means that the solution is not the best of the possibles (the yellow is better than the white of the egg) 😃

The image is enough to understand, so it is easy for an English speaker to gather the meaning, but after searching the Internet, it does seem rooted in Germany. The only mention I found was :

[quote]“She is not really the yellow of the egg”  
She is ugly … German[/quote]  
at [http://www.reddit.com/r/AskReddit/comments/14i3qd/what\_are\_some\_popular\_slang\_terms\_used\_in\_your/](http://www.reddit.com/r/AskReddit/comments/14i3qd/what_are_some_popular_slang_terms_used_in_your/)

That is the interesting part of the global village : we all speak English, but our cultural references vary. Europeans tend to believe the widespread use of American English invades their languages, this example is proof it can go the other way…

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [September 9, 2014, 1:40pm UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/7 "2014-09-09T13:40:46Z")

</div>

[quote=128026:@Michel Bujardet]  
Only Greg can probably say if the bug can be prevented, and how.[/quote]  
That said, we know about the first one (label offsets) and there’s a bug report already. I’ve not heard about the click event problem that I can recall. Please make a small sample project and file a bug report.

---

<div class="post-metadata">

**Author:** ![James\_Nicholson-Plank](https://forum.xojo.com/user_avatar/forum.xojo.com/james_nicholson-plank/32/611_2.png) [@James\_Nicholson-Plank](https://forum.xojo.com/u/James_Nicholson-Plank)\
**Post date:** [September 12, 2014, 4:15am UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/8 "2014-09-12T04:15:13Z")

</div>

for your info the TextChanged event in textfields in web containers also fires twice .

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [September 12, 2014, 9:50am UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/9 "2014-09-12T09:50:19Z")

</div>

Click twice for Lars, TextChange twice for James. Which of yours gentlemen will be kind enough to file an actionable bug report with sample project attached about these niceties ?

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [September 12, 2014, 12:31pm UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/10 "2014-09-12T12:31:52Z")

</div>

SEPARATE bug reports.

---

<div class="post-metadata">

**Author:** ![James\_Nicholson-Plank](https://forum.xojo.com/user_avatar/forum.xojo.com/james_nicholson-plank/32/611_2.png) [@James\_Nicholson-Plank](https://forum.xojo.com/u/James_Nicholson-Plank)\
**Post date:** [September 12, 2014, 8:18pm UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/11 "2014-09-12T20:18:17Z")

</div>

I did two months ago

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:24pm UTC](https://forum.xojo.com/t/trouble-with-webcontainers/19167/12 "2020-10-29T17:24:38Z")

</div>


