Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jungle-boogie
Copy link
Contributor

hopefully a passable attempt to add decimal support per
#373 (comment)

I re-organized the conversion list, too.

hopefully a passable attempt to add decimal support per
sqlitebrowser#373 (comment)

I re-organized the conversion list, too.
@justinclift
Copy link
Member

Hmmm, that's breaking the build. Are you ok to click on "Details" to check the error, and attempt to fix it? πŸ˜„

@justinclift
Copy link
Member

justinclift commented Apr 20, 2016

@jungle-boogie Sorry, didn't notice you've pushed a fix. Just tested it quickly here, and it looks (mostly) good. πŸ˜„

There is one bit I'm unsure of though. For decimal display, it's using "0x" as the prefix. eg "0x10".

Isn't "0x" normally used to indicate a hexadecimal number?

%d is decimal! I won't forget this now.
@jungle-boogie
Copy link
Contributor Author

%d is decimal!

@justinclift
Copy link
Member

Awesome! Testing now. πŸ˜„

@justinclift
Copy link
Member

Yep, that looks good now. Thanks @jungle-boogie. πŸ˜„

@justinclift justinclift merged commit c5c8106 into sqlitebrowser:master Apr 21, 2016
@MKleusberg
Copy link
Member

Yes, this is looking fine πŸ˜„ Thanks for your contribution!
It's also nice to see somebody working on the display format feature - I wasn't really sure whether somebody is actually using it πŸ˜‰

@justinclift
Copy link
Member

@MKleusberg - just as a heads up while on the topic... the format definition box itself doesn't seem to be editable for the "custom" type. eg people can't type in their own format and have it stick. Is that supposed to work? πŸ˜„

@MKleusberg
Copy link
Member

I'm not sure to be honest ^^ But the code looks like this was never supposed to work. Allowing to type in one's own display formats isn't as easy as it sounds either, because we'd had to add some extra error checking. With the current code I see two problems:

  1. If the user types in some invalid code we'd get a syntax error. Not sure how we'd react there but we definitely don't display a proper error message.
  2. The user could type in some code that generates more than one column. This one is tricky because it doesn't produce a syntax error but would cause a lot of confusion throughout the application. So by some means we'd have to detect this case and prohibit it.

So, yes, we can get this done. But it's a bit trickier than expected. I'll just open a new issue for now so we can keep this in mind πŸ˜„

@justinclift
Copy link
Member

Cool. πŸ˜„

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants