Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6140801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:09:57+00:00 2026-05-23T18:09:57+00:00

I want to run a program which changes the background depending on which gender

  • 0

I want to run a program which changes the background depending on which gender you choose in a edit list.

Shoes.app do 
    para "your gender"
    list_box :items => ["female", "male"], 
    width => 120, :choose => "weiblich" do |list|
        @gender.text = list.text
    end

    @gender = para "#{@gender}"

    button "change colours" do

        if @gender ="female"
            background (deeppink)
        else @gender ="male"
            background (dodgerblue)
        end
    end
end

The problem is – whatever I do, if I use the if-statement, suddenly always “female” is in the variable and my background is pink, altough when I pick “male”. If I just do

...
button "change colours" do
para @gender
end
....

the right gender is in the variable @gender. Does anybody know what the problem is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:09:58+00:00Added an answer on May 23, 2026 at 6:09 pm

    You need if @gender == "female" and if @gender == "male" – note the two = symbols.

    You’re performing an assignment, not testing equality.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to design a c# program which can run program a 3rd exe
The first time the app is run, I want to have a checkbox list
I want run a script as follows: runner: ssh 'java program &' ssh 'java
I want to run the following command from a C program to read the
I want to run a DOS command in my C++ program. The point is
When I run the program from IDE (VS2008) it works perfectly. When I want
I have a python program/file that I want to run repeatedly and calculate the
I want to make a C# program that can be run as a CLI
In my C program I want to know if my executable is run in
I just want that my program or method should run at specific date and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.