question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace "magic" strings in Cursors.cs with const strings declared at top of file

See original GitHub issue

actual:

public static Cursor HSplit {
            get {
                if (hSplit == null)
                    hSplit      = new Cursor("hsplit.cur", 0);
                return hSplit;
            }
        }

expected:

internal const string HSPLIT_CUR = "hsplit.cur" 

// ...

public static Cursor HSplit {
            get {
                if (hSplit == null)
                    hSplit      = new Cursor(HSPLIT_CUR , 0);
                return hSplit;
            }
        }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Tanya-Solyanikcommented, Dec 5, 2018

Hi @karelz. I discussed this with @zsd4yr , we hit a race condition opening these 2 issues. Indeed #140 is the preferred way to implement this - we will get all OS improvements(high res and the right system theme) when we access the system cursors 😃 and will reduce size of our binary somewhat.

0reactions
karelzcommented, Dec 5, 2018

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

anti patterns - What is wrong with magic strings?
If a magic string is being written in multiple places you have to change all of them without any safety (such as compile-time...
Read more >
Use system cursors in System.Windows.Forms.Cursors #140
Cursors has a few embedded cursors that where added for backwards ... Replace "magic" strings in Cursors.cs with const strings declared at ...
Read more >
Using magic strings or constants in processing punctuation?
A space is always going to be a space, and it's just more natural to read (and write!): s.replace("String", " ");. Than: s.replace("String", ......
Read more >
Magic strings or constants?
When used directly as a magic string, value can be confused with something else, especially in large-scale applications, whereas const indicates ...
Read more >
Replacement for #define with magic numbers : r/rust
I am coming from C. I know in general magic numbers are bad, ... Why can't rust just to string Replacement before compilation?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found