method to get all text box Entries (like .getEntry('entry_title) as list or dictionary... #92

Closed
stcorry opened this Issue Feb 6, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@stcorry

stcorry commented Feb 6, 2017

It would be awesome if we could get a method to get all of the entry values as a dictionary so that we can easily hand over all values to the helper functions...

@jarvisteach jarvisteach self-assigned this Feb 6, 2017

@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach Feb 6, 2017

Owner

I'll look into this - should be fairly simple.

There are already two built-in dictionaries that you can access directly:

  • n_entries - contains all the entry widgets, indexed by name.
  • n_entryVars - contains all the entry widgets' StringVars, indexed by name.

So, in your helper function, you could include a line of code like this:

print ( app.n_entryVars [ "entry1" ].get() )

Although, that does the same as:

print ( app.getEntry ( "entry1" ) )
Owner

jarvisteach commented Feb 6, 2017

I'll look into this - should be fairly simple.

There are already two built-in dictionaries that you can access directly:

  • n_entries - contains all the entry widgets, indexed by name.
  • n_entryVars - contains all the entry widgets' StringVars, indexed by name.

So, in your helper function, you could include a line of code like this:

print ( app.n_entryVars [ "entry1" ].get() )

Although, that does the same as:

print ( app.getEntry ( "entry1" ) )
@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach Feb 26, 2017

Owner

Wrapper function to return all entry values as a dictionary.
Loop through each entry in either of the above - not sure which is more efficient.
And add it to a dictionary, using the dictionary key.

Owner

jarvisteach commented Feb 26, 2017

Wrapper function to return all entry values as a dictionary.
Loop through each entry in either of the above - not sure which is more efficient.
And add it to a dictionary, using the dictionary key.

@jarvisteach jarvisteach added this to the 0.06 milestone Feb 26, 2017

jarvisteach added a commit that referenced this issue Mar 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment