# API2 strikes again

**URL:** <https://forum.xojo.com/t/api2-strikes-again/62774>\
**Category:** General\
**Created:** [April 17, 2021, 8:51am UTC](https://forum.xojo.com/t/api2-strikes-again/62774 "2021-04-17T08:51:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [April 17, 2021, 8:51am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/1 "2021-04-17T08:51:37Z")

</div>

I was fooling around adding an Open Text button and I took the example found there:

[https://documentation.xojo.com/api/files/textinputstream.html](https://documentation.xojo.com/api/files/textinputstream.html)

and I get an error… in that line:

```
  TextArea1.Value = t.ReadAll

```

Of course I squashed it.

Xojo 2021r1 / Big Sur 11.2.3

BTW: no keyboard shortcut for help now ?

---

<div class="post-metadata">

**Author:** ![Jeannot\_Muller](https://forum.xojo.com/user_avatar/forum.xojo.com/jeannot_muller/32/13359_2.png) [@Jeannot\_Muller](https://forum.xojo.com/u/Jeannot_Muller)\
**Post date:** [April 17, 2021, 9:04am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/2 "2021-04-17T09:04:11Z")

</div>

Works for me out-of-the-box. Do you perhaps have a typo in the text area name on your window?

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [April 17, 2021, 9:05am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/3 "2021-04-17T09:05:37Z")

</div>

And what error?

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [April 17, 2021, 9:21am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/4 "2021-04-17T09:21:39Z")

</div>

> [@Emile\_Schwarz](#):
>
> `TextArea1. **Value** `

**VALUE**. When changed to .Text it worked !!!

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [April 17, 2021, 9:26am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/5 "2021-04-17T09:26:37Z")

</div>

> [@Emile\_Schwarz](#):
>
> TextArea1

seems Value got deprecated, have you enabled treat warnings as error?  
have you a error screenshots with .Value?

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [April 17, 2021, 9:36am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/6 "2021-04-17T09:36:14Z")

</div>

Out of the box as is my brain… A coffee is needed in the parking, white car, please !

Yes, it is deprecated, but the documentation forgot one update.

Imagine a newbie (with $ in his pockets) there !

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [April 17, 2021, 9:40am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/7 "2021-04-17T09:40:16Z")

</div>

> [@Emile\_Schwarz](#):
>
> the documentation forgot one update

as always 🙂 should be compiled and then generated …  
maybe together with the text at webpage it  
could be provided as xojo binary download as working example.

---

<div class="post-metadata">

**Author:** ![Jeannot\_Muller](https://forum.xojo.com/user_avatar/forum.xojo.com/jeannot_muller/32/13359_2.png) [@Jeannot\_Muller](https://forum.xojo.com/u/Jeannot_Muller)\
**Post date:** [April 17, 2021, 9:42am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/8 "2021-04-17T09:42:09Z")

</div>

Gotcha. We have a different understanding of “error”. “Value” is deprecated indeed, but it would still work.

Your Analysis warning settings are as follows:

![Screenshot 2021-04-17 at 11.31.35](https://forum.xojo.com/uploads/default/original/2X/8/8794d0d2a4f49bfbd95418d7fc01c352bfcce2a3.png)

In this case the IDE strikes back hard for everything not following API2 and you are getting the hint to use _ **text** _ now.

 ![Screenshot 2021-04-17 at 11.31.05](https://forum.xojo.com/uploads/default/original/2X/1/19290cf5945961ee403d11c42466ed4263165b05.jpeg)

But if you un-check that box, your code will still be running. I usually use it unchecked for old projects, where I am only doing a few changes, but don’t want to “optimize” the code. For new project I will switch it on.

Nevertheless good catch, and the documentation should be updated.@Paul_Lefebvre is often doing such changes, but it obviously simplifies Xojo’s workflows by raising a FC or sending an email to [docs@xojo.com](mailto:docs@xojo.com)

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [April 17, 2021, 9:43am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/9 "2021-04-17T09:43:30Z")

</div>

I have the zip archive handly, but not my codes to the web file server, so I placed my gun on the other shoulder 😉

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [April 17, 2021, 9:45am UTC](https://forum.xojo.com/t/api2-strikes-again/62774/10 "2021-04-17T09:45:55Z")

</div>

I wrote the code minutes ago… in a just created project to watch for unseen CRLF icon in TextArea… look at that thread to understand…

So, no, this project is not old.
