Skip to content
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

find solution for completion #1

Closed
oroulet opened this issue Apr 9, 2017 · 29 comments
Closed

find solution for completion #1

oroulet opened this issue Apr 9, 2017 · 29 comments
Assignees

Comments

@oroulet
Copy link
Contributor

oroulet commented Apr 9, 2017

No description provided.

@oroulet
Copy link
Contributor Author

oroulet commented Apr 12, 2017

@fuchsmich
I get following error after your last 2 commits:
./qtodotxt
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:93:46: Unable to assign [undefined] to int
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:92:51: Unable to assign [undefined] to QString
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:99: TypeError: Cannot read property '1' of null
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:99: TypeError: Cannot read property '1' of null
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:99: TypeError: Cannot read property '1' of null
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:99: TypeError: Cannot read property '1' of null
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:99: TypeError: Cannot read property '1' of null
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:99: TypeError: Cannot read property '1' of null
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.q

@oroulet
Copy link
Contributor Author

oroulet commented Apr 13, 2017

@fuchsmich what is the status now? I does not seem to work for me..

@fuchsmich
Copy link

To me works (but not at the beginning of a line, have to modify the regex pattern for this to work).
In the middle of a line start typing a "(","+" or "@" then a list should pop up.

@fuchsmich
Copy link

...of course there is still a lot to do.

@oroulet
Copy link
Contributor Author

oroulet commented Apr 13, 2017

does not work here....
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:99:46: Unable to assign [undefined] to int
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:98:51: Unable to assign [undefined] to QString
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:109: TypeError: Property 'startsWith' of object (A) is not a function
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/TaskLine.qml:109: TypeError: Property 'startsWith' of object (A) is not a function
I understand this as that you expect a QString but we get a javascript string.... what version of qt do you have? 5.7 here..

@fuchsmich
Copy link

I'm using 5.8 in Archlinux and Windows.

Ok, seems the 5.7 js-machine doesnt have this function. argh.

@fuchsmich
Copy link

...mabe we should support at least 5.6 which is the LTS version.
Will have to check, how to install multiple versions of qt.

@fuchsmich
Copy link

Hm, it should work with 5.7 also.
qttt

I made a little change, maybe this helps. Just a minute.

@oroulet
Copy link
Contributor Author

oroulet commented Apr 14, 2017

still cannot test:
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/QTodoTxt.qml:250:31: Unable to assign [undefined] to QString
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/QTodoTxt.qml:250:31: Unable to assign [undefined] to QString
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:101: TypeError: Property 'startsWith' of object (A) is not a function
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:101: TypeError: Property 'startsWith' of object (A) is not a function
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:101: TypeError: Property 'startsWith' of object (A) is not a function
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:101: TypeError: Property 'startsWith' of object (A) is not a function
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:76: TypeError: Cannot read property 'text' of null
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:77: TypeError: Cannot read property 'cursorPosition' of null

@fuchsmich
Copy link

fuchsmich commented Apr 14, 2017 via email

@oroulet
Copy link
Contributor Author

oroulet commented Apr 14, 2017

file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/QTodoTxt.qml:250:31: Unable to assign [undefined] to QString
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/QTodoTxt.qml:250:31: Unable to assign [undefined] to QString
qml: -> string string
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:101: TypeError: Property 'startsWith' of object (A) is not a function
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:76: TypeError: Cannot read property 'text' of null
file:///home/olivier/dev/qml-qtodotxt/qtodotxt/qml/CompletionPopup.qml:77: TypeError: Cannot read property 'cursorPosition' of null

@oroulet
Copy link
Contributor Author

oroulet commented Apr 14, 2017

must be some limitation of javascript engine in qt 5.7
Can't we simply acces first character with str[0] in javascript?

@fuchsmich
Copy link

fuchsmich commented Apr 14, 2017 via email

@oroulet
Copy link
Contributor Author

oroulet commented Apr 14, 2017

What do you mean by current one? I pasted latest stack trace
Btw if the completion code get too complicated we should maybe push it to python... But python is probably slower than js...

@fuchsmich
Copy link

I replaced the "startsWith" method in last commit.

@oroulet
Copy link
Contributor Author

oroulet commented Apr 15, 2017

works well now!! well done!. I will export projects, contexts and priorities as a property from mainController.
But for dates I propose to replace the old string based completion by a calendar widget popup. Do you give it a try?

@oroulet
Copy link
Contributor Author

oroulet commented Apr 15, 2017

new property completionStrings implemented and satt as model. This seems to work very well!

@fuchsmich
Copy link

fuchsmich commented Apr 15, 2017 via email

@oroulet
Copy link
Contributor Author

oroulet commented Apr 16, 2017

calendar widget looks very nice! good work as usual! With such a widget I do not think strings will be necessary, but we'll see...

@oroulet
Copy link
Contributor Author

oroulet commented Apr 17, 2017

a small bug. If I choose 'due:' from autocompletion then the calendar pops up. But if I write 'due:' or get back to due: with backspace then not calendar pops up..

@oroulet
Copy link
Contributor Author

oroulet commented Apr 17, 2017

@fuchsmich and another bigger one: I select another task while the completion popup is visible then it stays visible and we get a coredump....

@fuchsmich
Copy link

a small bug. If I choose 'due:' from autocompletion then the calendar pops up. But if I write 'due:' or get back to due: with backspace then not calendar pops up..

That's intended behaviour. The calendar opens only when you select "due:" from the Completionlist.

@oroulet
Copy link
Contributor Author

oroulet commented Apr 18, 2017

It should not. Completion should appear on key press. Writing t: is faster without completion but you still want the calendar to pop up

@fuchsmich
Copy link

With some additional tweaking we could also use it in the search field.

@oroulet
Copy link
Contributor Author

oroulet commented Apr 19, 2017 via email

@oroulet
Copy link
Contributor Author

oroulet commented Apr 19, 2017 via email

@fuchsmich
Copy link

fuchsmich commented Apr 19, 2017 via email

@fuchsmich
Copy link

fuchsmich commented Apr 19, 2017 via email

@oroulet
Copy link
Contributor Author

oroulet commented Apr 20, 2017

This sounds like a big to report to qt

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

No branches or pull requests

2 participants