# Cant get object to work in processing.py

**URL:** <https://discourse.processing.org/t/cant-get-object-to-work-in-processing-py/39830>\
**Category:** Processing.py\
**Created:** [November 22, 2022, 5:48pm UTC](https://discourse.processing.org/t/cant-get-object-to-work-in-processing-py/39830 "2022-11-22T17:48:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fosker](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@Fosker](https://discourse.processing.org/u/Fosker)\
**Post date:** [November 22, 2022, 5:48pm UTC](https://discourse.processing.org/t/cant-get-object-to-work-in-processing-py/39830/1 "2022-11-22T17:48:52Z")

</div>

Sorry new to Processing and trying to build a wall with different sized bricks, at the basic stage of creating a brick class this doesn’t produce anything when I run it and I can’t work out why…!

class Brick(object):  
def **init** (self, xpos, ypos, width\_, height\_):  
self.xpos = xpos  
self.ypos = ypos  
self.width\_ = width\_  
self.height\_ = height\_

```
def display(self):
    strokeWeight(5)
    stroke(255,0,0)
    fill(255)
    rect(self.xpos, self.ypos, 20,10)

```

Brick1 = Brick(100,100,20,10)

def setup():  
size(300, 300)  
noLoop()

def draw():  
background(0,204,0)  
display.Brick1()

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [November 22, 2022, 6:02pm UTC](https://discourse.processing.org/t/cant-get-object-to-work-in-processing-py/39830/2 "2022-11-22T18:02:25Z")

</div>

> [@Fosker](#):
>
> `display.Brick1()`

Object goes 1st, and then its method: `Brick1.display()`

BtW, variables & methods by convention should use lowerCase names:

```python
brick = Brick(100, 100, 20, 10)
brick.display()

```
