Program to search inside programs
|
09-29-2015, 05:44 PM
(This post was last modified: 09-29-2015 07:02 PM by xset.)
Post: #1
|
|||
|
|||
Program to search inside programs
Hello. As far as Programs sorted chronologically, first program text is text of current program. So u press SHIFT+[User] then S and enter text to search, it will print line number and text in the line. Unfortunately we can't control position of cursor inside program editor, and can't call editor to edit some program (i wish developers will think about it). U also can run
Look code in text and same in attachment. |
|||
09-29-2015, 06:52 PM
(This post was last modified: 09-29-2015 07:01 PM by xset.)
Post: #2
|
|||
|
|||
Global search and local search
U press SHIFT+[User] and G (Sin key) to call global search on program texts
then enter text (currently case sensitive) and it will print results in form: Program name:Line Number: Text SHIFT+[User]+S (9 key) gives local search (search inside current program). Code:
Next task is case insensitive search and "Search and replace" in current program. |
|||
09-29-2015, 07:45 PM
(This post was last modified: 09-29-2015 07:45 PM by xset.)
Post: #3
|
|||
|
|||
RE: Program to search inside programs
Case insensitive version (only English letters of course)
Code:
|
|||
09-30-2015, 05:40 AM
Post: #4
|
|||
|
|||
RE: Program to search inside programs
Hello,
Nice work! Cyrille Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP. |
|||
09-30-2015, 06:24 AM
(This post was last modified: 09-30-2015 06:25 AM by xset.)
Post: #5
|
|||
|
|||
RE: Program to search inside programs
(09-30-2015 05:40 AM)cyrille de brébisson Wrote: Nice work! Thanks! I think this is only begining. We need fully functional editor. Currently i am investigating how to calculate exact size of text drawed TEXTOUT_P, so we could find there to put cursor and how much to shift because of scrolling. I think new editor should support: 1) Undo 2) Selecting of whole word by touching it (often used to copy variable name). 3) Fast shortcuts for selection of whole line or number of lines for copy-paste (current SHIFT-COPY SHIFT-PASTE is awful). 4) Some kind of autocompleting and hints 5) Fast gestures to call Search and Global Search with jumping on results. Also Search and Replace ! 6) Fast jumping between functions in current module (selecting from list). 7) Screen keyboard (because my eyes crying looking at orange letters on gray), useful with capacitive stylus. Any help would be appreciated. There many tasks for doing GUI things like listboxes, screen menus, dialogs for searching, etc. Best regards XSet |
|||
09-30-2015, 07:55 AM
(This post was last modified: 09-30-2015 08:22 AM by StephenG1CMZ.)
Post: #6
|
|||
|
|||
RE: Program to search inside programs
I had thought my Z EDITOR was a useful way of searching Notes and Programs, until I saw your approach. Very impressive.
Both our programs seem to have an issue parsing strings like "WAIT(", because INPUT returns a pair of brackets instead. Could you add searching of Notes too? Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
09-30-2015, 08:04 AM
Post: #7
|
|||
|
|||
RE: Program to search inside programs
(09-30-2015 06:24 AM)xset Wrote: 7) Screen keyboard (because my eyes crying looking at orange letters on gray), useful with capacitive stylus. YES ! We need a virtual keyboard that we can popup quickly. Thank you xset. Alpha keys are not readable on physical keyboard, I don't konw if hp fixed that on later hardware revision, or plan to do it... |
|||
09-30-2015, 08:35 AM
Post: #8
|
|||
|
|||
RE: Program to search inside programs
(09-30-2015 08:04 AM)hpfx Wrote:(09-30-2015 06:24 AM)xset Wrote: 7) Screen keyboard (because my eyes crying looking at orange letters on gray), useful with capacitive stylus. As well as improving visibility, a QWERTY pop-up would be useful. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
09-30-2015, 09:41 AM
Post: #9
|
|||
|
|||
RE: Program to search inside programs
(09-30-2015 07:55 AM)StephenG1CMZ Wrote: Could you add searching of Notes too? Not a problem, it's time to extract functions which actually does parsing, searching and use them on anything including Notes. Need to find some modular OOP-like technology for development, that is sad HPPL is not Lua :-( |
|||
09-30-2015, 03:13 PM
(This post was last modified: 09-30-2015 04:37 PM by StephenG1CMZ.)
Post: #10
|
|||
|
|||
RE: Program to search inside programs
On the Android emulator I find that when I cut and paste the code, there appears to be a space within one SIZE. Deleting that one space, it compiles OK.
The User S Search sequence works great, but the User G Globalsearch is ineffective: After entering the search text, it drops back to the edited text inserting SIN() into the text. If I attempt to Run the Globalsearch from your code, instead of from a file one is editing, I get an insufficient memory error. I suspect it's just that the code being searched is too big. Update: Instead of using MAKELIST to make one big list, looping through each file in turn would reduce the memory required. But that User S search within program is a great feature. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
09-30-2015, 04:30 PM
Post: #11
|
|||
|
|||
RE: Program to search inside programs
(09-30-2015 03:13 PM)StephenG1CMZ Wrote: On the Android emulator I find that when I cut and paste the code, there appears to be a space within one SIZE. Deleting that one space, it compiles OK. Better use attached hpprgm, i also have found some bugs with copied text. (09-30-2015 03:13 PM)StephenG1CMZ Wrote: If I attempt to Run the Globalsearch from your code, instead of from a file one is editing, I get an insufficient memory error. I suspect it's just that the code being searched is too big. You can change K_Sin() with K_8() OR KA_9() to move shortcut to appropriate keys. I am currently working on universal search (current program, all programs, notes). I though new cool feature for the editor, which also will be implemented there. I killed many hours trying to construct fast function calls "by pointer" but they still costs at least triple of direct call :-( Why HP banned "program" concept from RPL, you could pass symbol and eval it fast. EXPR is too slow. I am missing pointers to functions to write clean extendable code. :-( Looks like we can not avoid text code generation in some language higher than HPPL, but I can't figure how to implement "function as value" conception in absence of "program as value" mechanisms :-( |
|||
09-30-2015, 05:02 PM
Post: #12
|
|||
|
|||
RE: Program to search inside programs
On the Android emulator I don't think you can use hpprgm - it has to be cut and paste AFAIK.
Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
09-30-2015, 05:09 PM
(This post was last modified: 09-30-2015 08:51 PM by xset.)
Post: #13
|
|||
|
|||
Version 0.3
This version includes:
1) Searching in current program (or in last edited) Shift-USER S (S is button [9]) 2) Searching in all programs Shift-USER Shift-S (S is button [9]) 3) Searching in current note (or in last edited Note if u are not in editor) Shift-USER Note (Note is button [0]) 4) Searching in all notes Shift-USER Shift-Note (Note is button [0]) The program now contains semi-unversal function GlobSearch with arguments: str, IType, BCaseSense str - string to search. IType: 1 - Local searching in program, 2- Global searching in programs, 3-Local searching in note, 4-Global searching in notes. BCaseSense: 1 - Case insensitive, other values - Case sensitive Currently I hardcoded case insensitive search everywhere, so one need to change searching dialog to add check box for sensitive searching (just in case). Text of program, but better use attached file: Code:
Best regards XSet |
|||
09-30-2015, 05:18 PM
Post: #14
|
|||
|
|||
RE: Program to search inside programs | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)