# The function "noCursor()" does not exist

**URL:** <https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618>\
**Category:** Processing for Android\
**Created:** [March 12, 2020, 8:41am UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618 "2020-03-12T08:41:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bowo](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@bowo](https://discourse.processing.org/u/bowo)\
**Post date:** [March 12, 2020, 8:41am UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/1 "2020-03-12T08:41:01Z")

</div>

Hello, everyone, I have tapped the following code found as example in [https://processing.org/reference/noCursor\_.html](https://processing.org/reference/noCursor_.html) . While compilation, it told me that the function “noCursor()” does not exist, and The variable “HAND” does not exist. Have you meet any problems like this, thanks a lot for your suggestions.

```auto
void setup() {
  fullScreen();
  background(255);
  noCursor();
}

// Press the mouse to hide the cursor
void draw() 
{
  if (mousePressed == true) {
    noCursor();
  } else {
    cursor(HAND);
  }
}

```

My processing is 3.5.4 in mac pro Mid 2015, with  
|SDK Patch Applier v4|1||  
|Android SDK Build-Tools|26.0.2||  
|Android SDK Platform 28|6||  
|Google APIs Intel x86 Atom System Image|10||  
|Android SDK Tools|26.1.1||  
|Android SDK Platform-Tools|29.0.6||

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 12, 2020, 8:56am UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/2 "2020-03-12T08:56:07Z")

</div>

Will not work when running the program in a web browser or in full screen (Present) mode.

---

<div class="post-metadata">

**Author:** ![bowo](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@bowo](https://discourse.processing.org/u/bowo)\
**Post date:** [March 12, 2020, 9:45am UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/3 "2020-03-12T09:45:36Z")

</div>

Thanks, Chrisir, while, I have launched it in Processing IDE not web browser and disabled the full screen mode, it seems still not work. I guess it’s some problems of library, because I can not even complete the compilation, the error occurred while I build the project.

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [March 12, 2020, 10:56am UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/4 "2020-03-12T10:56:54Z")

</div>

Hi @bowo  
This function does not work on P4A.

---

<div class="post-metadata">

**Author:** ![bowo](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@bowo](https://discourse.processing.org/u/bowo)\
**Post date:** [March 12, 2020, 12:54pm UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/5 "2020-03-12T12:54:55Z")

</div>

Thanks a lot @noel, by the way, do you have ideal in which version, that function works?

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [March 13, 2020, 9:22am UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/6 "2020-03-13T09:22:01Z")

</div>

@bowo ===  
cursor() does not work in android mode because there is not any cursor object in the standard meaning for android; cursor is only used for list or data base and refers to the position of the item

---

<div class="post-metadata">

**Author:** ![bowo](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@bowo](https://discourse.processing.org/u/bowo)\
**Post date:** [March 13, 2020, 11:30am UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/7 "2020-03-13T11:30:51Z")

</div>

@akenaton Thanks a lot, got it now.

---

<div class="post-metadata">

**Author:** ![bowo](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@bowo](https://discourse.processing.org/u/bowo)\
**Post date:** [May 12, 2020, 7:50pm UTC](https://discourse.processing.org/t/the-function-nocursor-does-not-exist/18618/8 "2020-05-12T19:50:49Z")

</div>

If anyone want to realize cursor like function in your application, you can code like :

```auto
int oldMouseX=0;
int oldMouseY=0;
color oldCorlor;
color colorCursor= color(255,0,0);
color colorCursorTrajectory=color(255,0,255);

boolean bEnableCursorTrajectory=false;//You can set that value to be true, if you want to show cursor trajectory
int CursorSize=10;

void draw() {
  fill(oldCorlor);
  noStroke();
  ellipse(oldMouseX,oldMouseY,CursorSize,CursorSize);
  
  if (bEnableCursorTrajectory){
    stroke(colorCursorTrajectory);
    if (mousePressed == true) {
      strokeWeight(CursorSize);
      strokeCap(ROUND);
      line(mouseX, mouseY, pmouseX, pmouseY); 
    } 
  }
  /**/
  
  //your code here
  
  /**/
  if (mousePressed == true) {
    oldMouseX=mouseX;
    oldMouseY=mouseY;
    oldCorlor=get(oldMouseX,oldMouseY);
    noStroke();
    fill(colorCursor);
    ellipse(mouseX,mouseY,CursorSize,CursorSize); 
  }

}

```
