-
Notifications
You must be signed in to change notification settings - Fork 16
Enhancements for TableHeadings & CellEdit, Placeholders, autocomplete combo, various fixes and new examples #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I changed to datetime as dt so we can do isinstance(value, dt.date) before isinstance(value, date) or isinstance(value, datetime.date) doesn't work
This fills in sg.Text if it has a fk-relationship Don't compare it in records_changed Add an empty col in place of the required_marker
Go ahead and cast the table_value, since we maybe comparing dates, and table_value will be a str since Sqlite stores them as such.
This fills in description_column if col has fk-rels. Also simplified logic
This currently isn't integrated in any auto-logic, but user could do:
# Add a placeholder to the search input
ss.add_placeholder_to(
win["Orders:search_input"],
"🔍 Search...",
)
I'll add a video for it.
|
This fixes most of the things I saw when building the “orders.py” sqlite example. I tried to break them out in comments, but if there’s something you’d like explained or changed, let me know! I’d like your thoughts on the order example, in general, and if you’re OK on using it (in an annotated video) in the readme.
|
|
Regarding the new search - does it wrap around like the original version?
I'm hoping to get a chance to actually test it tonight, I just figured I
would ask while I was thinking about it
…On Tue, May 16, 2023 at 5:24 PM ssweber ***@***.***> wrote:
Forgot I videoed that in #312
<#312>
—
Reply to this email directly, view it on GitHub
<#313 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQX2REU3GH7EECJ4S3ILQ53XGPV7HANCNFSM6AAAAAAYEFTDIU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
I pulled your WIP branch. Unfortunately, nothing at all is working for me. I wonder if there are some cross-platform issues happening, since I'm running Linux.
I'm going to keep combing through all of your updates so I can try to catch up. |
|
really good to hear from you! I was starting to worry and miss your feedback. If you’d like, just comment out the “add_placeholder” call in auto_map_elements, there must be something different on Linux/ or your version of tkinter. The “new search” still starts with the first search order column, then second, etc until it finds a match. I just reworked it to map the description column. |
|
Looks like it doesn’t like this bind |
|
GitHub doesn’t like me posting it. Let’s try this again |
|
Yeah, sorry about not checking in. Its been pretty rough. Things are
starting to clear up at work, so that will help a lot
I commented out lines 3590-3593 as well as lines24 and 5425 and can get the
examples to run.
I tried testing the search but didn't have any luck as of yet
…On Sun, May 28, 2023 at 9:47 PM ssweber ***@***.***> wrote:
GitHub doesn’t like me posting it. Let’s try this again <Control-/>
—
Reply to this email directly, view it on GitHub
<#313 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQX2REQ2EQ773B6U7ZQIDZDXIP5ZRANCNFSM6AAAAAAYEFTDIU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Weird! Ok, looks like I need to get a Linux / alternative Python versions to test with setup going. |
|
Sorry to hear things have been so rough. Do you like the functionality as videoed? I will have some time tomorrow to debug |
|
Yes, your demo is awesome. I definitely like the way it looks and
operates.
Hopefully it won't take much to get things running well on Linux as well.
I'm sure it's something simple
…On Sun, May 28, 2023 at 10:02 PM ssweber ***@***.***> wrote:
Sorry to hear things have been so rough.
Do you like the functionality as videoed? I will have some time tomorrow
to debug
—
Reply to this email directly, view it on GitHub
<#313 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQX2REVPXKEDAEFHWTSFL23XIP7SBANCNFSM6AAAAAAYEFTDIU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Awesome. Ok I’m off for the night. If you figure it out great, otherwise I’ll look into it tomorrow. 😄 |
|
Regarding the error on line 5424, I replaced "<Control-/>" with
"<Control-slash>" and that now works with Linux (and I would think it would
work with Windows too).
I'll mess around a little more tonight on the other issue. I'm pretty far
behind, so I'm going to have to get familiar with the new additions
…On Sun, May 28, 2023 at 10:12 PM ssweber ***@***.***> wrote:
Awesome. Ok I’m off for the night. If you figure it out great, otherwise
I’ll look into it tomorrow. 😄
—
Reply to this email directly, view it on GitHub
<#313 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQX2REQBLZRZXFJJINM7RELXIQAZ7ANCNFSM6AAAAAAYEFTDIU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Putting this here for reference:
Line 3590 is the other issue with an AttributeError: 'Input' object has no
attribute 'add_placeholder'
Traceback (most recent call last):
File
"/home/jondecker76/PycharmProjects/pysimplesql/examples/SQLite_examples/journal_external.py",
line 31, in <module>
frm = ss.Form(driver, bind_window=win) # <=== Here is the magic!
File
"/home/jondecker76/PycharmProjects/pysimplesql/pysimplesql/pysimplesql.py",
line 3007, in __init__
self.bind(self.window)
File
"/home/jondecker76/PycharmProjects/pysimplesql/pysimplesql/pysimplesql.py",
line 3052, in bind
self.auto_map_events(win)
File
"/home/jondecker76/PycharmProjects/pysimplesql/pysimplesql/pysimplesql.py",
line 3590, in auto_map_events
self.window[search_box].add_placeholder(
AttributeError: 'Input' object has no attribute 'add_placeholder'
Process finished with exit code 1
…On Sun, May 28, 2023 at 10:15 PM Jon Decker ***@***.***> wrote:
Regarding the error on line 5424, I replaced "<Control-/>" with
"<Control-slash>" and that now works with Linux (and I would think it would
work with Windows too).
I'll mess around a little more tonight on the other issue. I'm pretty far
behind, so I'm going to have to get familiar with the new additions
On Sun, May 28, 2023 at 10:12 PM ssweber ***@***.***> wrote:
> Awesome. Ok I’m off for the night. If you figure it out great, otherwise
> I’ll look into it tomorrow. 😄
>
> —
> Reply to this email directly, view it on GitHub
> <#313 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AQX2REQBLZRZXFJJINM7RELXIQAZ7ANCNFSM6AAAAAAYEFTDIU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
|
Sorry to waste your time. That’s fixed now, and it seems tkinter on windows is happy with the I was only testing on the orders.py example, which uses an image for the search button, so I forgot to change the other layout we probably should rename Combo -> AutocompleteCombo, and Input/Multiline to EnhancedInput/EnhancedMline for debugging purposes. Thoughts on names for Input/Multiline? Right now they are only enhanced to support placeholders, but I’ll want to add type/length ability in the future. (eg only allow a two-digit int, a float, add dashes in-between dates as you type, etc) |
|
I tested the journal-internal, and it seems like search is working as intended, but let me know 😅 |
|
I’m sorry, no, I didn’t understand how search worked before: “Successive calls will search from the current position, and wrap around back to the beginning.” I will either revert, and add back in the description-column mapping, or see how to accomplish using new method. Need to read a bit more carefully |
|
Honestly, maybe what I’ll do is fix that, and then do a fresh pull request that again try’s to consolidate the different changes. I’ve rewritten things several times in this branch, so it’s not very clean anymore |
|
Let me know if you like #320 better than what we have now. I think we’d make a @Property DataSet.filtered_rows, that tables/combo/listbox/slider selectors would get their rows from. for the filter example I
|
|
Tomorrow I’ll try to get up an easier-to-review PR, without all the in-between rewrites, and no code-reorganizing. …as well as make sure I got search right this time. |
See below for up-to-date video.