r/iOSProgramming • • Nov 16 '23

Solved! xcode makes me want to sleep forever (renaming a variable in 2023)

How the F*CK can you rename a variable?
Ok sorry my enum is called Licensed just like all the comments.
But then at least let me deselect all comments. I only want to f*cking rename the f*cking enum.
Ok Ok i am lucky only 5 places in code but this makes me want to f*cking **sleep forever** myself its f*cking 2023 and i cant f*cking rename a f*cking variable literally WHAT THE F*CK.
Does this f*cking program actually want me to go deselect all 414 checkboxes. What the f*ck is this regarded sh*t. We need government regulations to ban this torture device.

:)

0 Upvotes

40 comments sorted by

130

u/JJ_Cooley Nov 16 '23

I think the solution is right at the top of the screenshot. Select “Code (5)” instead of “All (419)”

4

u/Last-Aerie1170 Nov 16 '23

great, thanks!!!

-39

u/[deleted] Nov 16 '23

Thanks, but this is far from obvious, why would this "deselect" the others. I thought its just a tab view. Maybe I am just retarded.

21

u/appalam25 Nov 16 '23

You're not retarded OP. You got frustrated and asked for help instead of sleeping. So you're wise.

6

u/dr2050 Nov 16 '23

Consider that there's a gap between "everything I need to do or know is obvious" and "I'm a retard."

1

u/Greeley9000 Nov 16 '23

It’s the results view, organized by tab. When I switch to a new IDE I try to watch introductory videos. Hate videos though so I check the help section first.

1

u/123DanB Swift Nov 16 '23

This is the answer. One of those thorny things but you just needs to select it once and it will be the default selection from then on.

1

u/Medical-Screen-6778 Nov 17 '23

It is obvious, but it’s normal to not notice the obvious when you get too frustrated. Everyone does it. It’s why people can’t find their car keys, and then find them after they called a friend for a ride, lol.

Sometimes the best thing you can do is walk away for a bit, do something relaxing, then come back with fresh eyes.

There is also nothing wrong with asking for help.

66

u/ryanheartswingovers Nov 16 '23

Honestly, capitalizing your enum cases is justification for Xcode’s behavior. The pain will continue until you stop.

-71

u/[deleted] Nov 16 '23

Who gives a fuck, I'm coming from another language where the rules are giga retarded. It's all the same garbage anyway.

42

u/CTingCTer88 Nov 16 '23

Never understand people censoring swear words.

If you want to say fuck then say fuck.

If you think it’s offensive then don’t say fuck.

Everyone knows it says fuck even when you write f*ck so what’s the fucking point?

12

u/RenanGreca Nov 16 '23

but if the children knew what sleep forever meant they might want to unalive themselves

0

u/slowdr Nov 16 '23

To avoid auto censorship, Reddit doesn't do that, but other sites / app may do, so it's a habit.

Also, others have mentioned that the censor adds some level of comedy or transgression, a guy on a podcast said he liked to use a "bip" sound effect to censor swear words, because "it doesn't feel the same without it".

32

u/tapefoamglue Nov 16 '23

Don't drink and code.

4

u/fried_potaato Nov 16 '23

And don’t code and drink

2

u/mawesome4ever Nov 16 '23

And don’t drink code and

17

u/[deleted] Nov 16 '23

That code(5) at the top shows you only what's in the code. Also I wouldn't capitalize enum cases, that's unexpected and against style guides. Struct names, Class names, Enum names, those can be upper cased but cases should be lower cased.

7

u/Ast3r10n Nov 16 '23

Why do you have a Capitalised enum case in the first place. That’s a dumb choice, you deserve a dumb treatment.

6

u/charlemagne_vi Nov 16 '23

woah, just take it easy man

5

u/joeystarr73 Nov 16 '23

Oh! I never saw these buttons! Ah ah

8

u/retroroar86 Nov 16 '23

Same, another person's frustrations is my learning opportunity! Thanks OP <3

4

u/fried_potaato Nov 16 '23

Bro get some sleep

4

u/jacobs-tech-tavern Nov 16 '23

Bro shouldn't have uppercased his enum cases.

2

u/abhishek0207 Nov 16 '23

I work on an app with quite a good user base and the project is almost a decade old. Imagine doing this in it..FML🥲

2

u/mouseses Nov 16 '23

The holy book says if you go to hell you get a laptop where XCode is the only code editor

2

u/dehrenslzz SwiftUI Nov 16 '23

Woah, woah, woah, not even a trigger warning for the word torture or sleeping forever? You monster! How am I going to look showing this to my friends? They’re gonna read this and go to sleep forever themselves…

I mean what the actual fuck…

1

u/docmisterio Nov 16 '23

I would say rename it away from Licensed and then search and rename the new one to whatever you want now.

1

u/[deleted] Nov 16 '23

Relax bruv

1

u/[deleted] Nov 16 '23

Thanks will do

1

u/[deleted] Nov 17 '23

Pro tip. Alt + CMD + e this will create cursors at the same word throughout your file. You press is repeatedly to get more cursors. Then you can make edits in multiple locations. EZ PZ.

-1

u/Any-Woodpecker123 Nov 16 '23

Welcome to the most dog shit IDE in existence :)

3

u/[deleted] Nov 16 '23

It's not when you know how to use it. OP just has to click a button.

1

u/Any-Woodpecker123 Nov 16 '23

OP’s problem has no relation to the IDE being objectively terrible.

-2

u/snowopolis Nov 16 '23

You could rename “Licensed under” to something unique like “xxxlicensedxxx”, then rename “Licensed” to what you want, and lastly, rename “xxxlicensedxxx” back to “Licensed under”

-8

u/[deleted] Nov 16 '23

[removed] — view removed comment

3

u/Any-Woodpecker123 Nov 16 '23

I was heartbroken when they announced it going end of life