» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Hurray, no more left behind lines interrupting regular text or blank lines interrupting highlighted text! Here's the code:
Code:
```If S and sum(K={24,26  //if second is activated and left or right arrow key pressed Then If A>8 and K=24 and not(B:Then 92->B:A-6->A:End If B=92 and A<54 and K=26 DelVar BA+6->A If (length(Str7)>23round(A/6-1,0)+B/4+2 and K=26) or (K=24 and (B and A=8) or (B!=92 and A=54) or A>8 and A<54:Then Line(B,62-A,B,57-A,MK=624  //if M=24 and K=26 or M=26 and K=24, draw a line, otherwise erase a line For(F,B,B+3(K-25),K-25 For(G,A,A+5 Pxl-Change(G,F   //highlighting stuff End:End If not(X:Then   //if you just started highlighting (nothing else is highlighted) K->M   //store direction of highlighting in M 23round(A/6-1,0)+B/4+2->X   //store the origin (where you started highlighting) End B+4(K-25->B 23round(A/6-1,0)+Ans/4+2->V   //moves just the same as B, with your cursor If V=X   //if you are back at the origin (nothing is highlighted) DelVar XDelVar M   //get rid of the origin and direction of highlighting End:End ```

Now, the only problem with this is that if the user does any action other than highlighting, the program can get "confused". You wouldn't want the user to highlight 2 separate things, right? Otherwise, even if the text is not highlighted in between, all text between the origin (X) and your cursor would be copied into the clipboard when you press [TRACE].

So, what I need now is to make it so that if a user does anything other than highlighting, it converts the highlighted text back to regular text. Which would take a few seconds, depending on how much is highlighted. Suggestions on this are welcome
I just said this on IRC, but I'll put this here just in case.

Now you have plenty of strings! Yay!
Don't use the ones with question marks, it gets screwy if you're moving the cursor backwards in the BASIC editor.
solarsoftware wrote:
UI for OneNote:

Looks good?

This looks really cool. What if something like this were to be made into a shell for the CSE with stuff like PowerPoint and even Calculator, so it could be like an OS, but as a shell so it didn't replace anything. However, my idea is probably never going to be done.
Actually, readroof2, solarsoftware is working on just that! Or something very similar. He is making a Windows 10 clone for the CSE, and this will be one of his features.
Will it be like a shell, or will it totally get rid of the TI-OS. I hope it is a shell because it could get specialized programs for stuff like PowerPoint to run, like how a TI-84 had to have a shell that would translate program to music. How is it coming along?
It is (as far as I know) a hybrid basic program (DCS8). It is coming along well.
Will the program look sharper when run on the calculator? I can't tell if the picture is just fuzzy or if the picture is good but the program looks kind of crude.
Most of it is kind of crude. Further conversation on this can be held here:
[url] https://www.cemetech.net/forum/viewtopic.php?t=11355&postdays=0&postorder=asc&start=0[/url]
This isn't big, but I just realized that
Code:
```23round(A/6-1,0 can be 23int(A/6-1```

A starts at 8, and the limit is 50. 56 would be too far down the screen, therefore the limit is 50. I believe going farther than 50 would break the pattern of my formula, which goes 1 2 3 4 etc.

[EDIT]
Here's my deletion code so far. Currently it does not deal with highlighted text, and there's also quite a bit of graphical issues with it. The deletion within the string works fine though, besides the graphics.

Code:
```If K=23:Then 23int(A/6-1)+B/4+2->theta If Ans!=length(Str7:Then If Ans+1<length(Str7 sub(Str7,1,Ans)+sub(Str7,Ans+2,length(Str7)-Ans-1 If theta+1=length(Str7 sub(Str7,1,theta Ans->Str7 For(G,int(A/6),1+int((length(Str7)-1)/23 23:If length(Str7)<23G:23G-(23G-length(Str7))-23(G-1) Text(6G+2,1,"             "   //94 spaces. there's probably a better way to do this. Text(6G+2,1,sub(Str7,23G-22+2,Ans-2 End:End:End ```

edit 2: I believe I found the main problem, which is that spaces are displayed only as 1 pixel of blank space instead of 3 pixels wide (which my program automatically does when typing a space character). There are still some other graphical issues besides that, which I'm not able to figure out yet.
I think this line could be optimized:

Code:
`If length(Str7)<23G:23G-(23G-length(Str7))-23(G-1)`

To this:

Code:
```If 23G>length(Str7 23(1-G)+length(Str7```

EDIT: here's my optimized full code:

Code:
```If K=23 Then   B/4-21+int(A/6->theta   Str7   If theta+1<length(Str7     sub(Str7,1,theta)+sub(Str7,theta+2,length(Str7)-theta-1   If theta+1=length(Str7     sub(Str7,1,theta   Ans->Str7   If theta!=length(Str7   Then     For(G,int(A/6),1+int((length(Str7)-1)/23       If 23G>length(Str7         23(1-G)+length(Str7       Text(6G+2,1,"             "   //94 spaces       Text(6G+2,1,sub(Str7,23G-20,Ans-2     End   End End```
Thanks, PT_.

Spaces now work, and pretty much everything works, except for the fact that when deleting anything out of a string such as "Hey There", it gets graphically updated to "HeHey Thre" (i.e. you deleted the e in "There"). The string is fine, it's just the graphical display. Here's my code, without PT_'s optimizations yet.

[EDIT]
I pretty much fixed it, and updated the code. However, the only problem I still see is that the last 2 characters of each line get ignored somehow. I'm probably going to figure it out in a bit, but if you guys can figure it out before me then great

Code:
``` If K=23:Then 23int(A/6-1)+B/4+2->theta If Ans!=length(Str7:Then If Ans+1<length(Str7 sub(Str7,1,Ans)+sub(Str7,Ans+2,length(Str7)-Ans-1 If theta+1=length(Str7 sub(Str7,1,theta Ans->Str7 For(G,int(A/6),1+int((length(Str7)-1)/23 Text(6G+2,1,"                      " //94 spaces 23:If length(Str7)<23G:23G-(23G-length(Str7))-23(G-1) For(F,1,int(3.87Ans),4 sub(Str7,23G-22(F<6)-24(F>5)+int((F+8)/4),1 If Ans=" "  //1 space "    "    //4 spaces If F>5 Text(6G+2,F-8,Ans End:End:End:End ```

The reason I use "-22(F<6)-24(F>5)" is because if I used 24 only, the "c[xhat]" at the beginning of str7 would be displayed (if i was on line 1). If i was on line 2, it would mess up as well, not displaying the c[xhat], but instead the 2 characters on the previous line (or something of the like). If i used 22 only, it has an invalid dim error.
Okay, here's a current screenshot of deleting. [Link]
Oh, and yes, I did the change the top right corner a little bit. The "99/99" is a page indicator. Not functional yet, but will be soon

Anyways, as you can see, deleting something on the last line of the note works perfectly fine. Deleting something that's not on the last line makes it ignore the last 2 characters of each newly displayed line, which is obviously a problem... Inside the string though, it's perfectly fine, it's just the graphical display that's wrong. Help is appreciated, and I have the code for it in my previous post.
I think I have the solution, however, I have not tested it yet, since I here do not have a mono-calc. Here's what I came up:

Code:
```If K=23:Then 23int(A/6-1)+B/4+2->theta If Ans!=length(Str7:Then If Ans+1<length(Str7 sub(Str7,1,Ans)+sub(Str7,Ans+2,length(Str7)-Ans-1 If theta+1=length(Str7 sub(Str7,1,theta Ans->Str7 // Until this, it is correct // This is from me: For(F,int(A/6),1+int((length(Str7)-1)/23 Text(6G+2,1,"                      " //94 spaces 23 If length(Str7)<23F length(Str7)-23(F-1 For(G,1,Ans sub(Str7,23(F-1)+G,1 If Ans=" "  //1 space "    "    //4 spaces Text(6F+2,4G,Ans End End End // Here a Text(-command to draw the last 4 spaces, to overdraw the last string End```

As said, I haven't tested it yet.
I finally got it to work!!! Such a satisfying feeling

Turns out my formulas would return fractions and stuff because of what G and F were, so I was able to fix that. I had to add some checking in order for it to display the last 2 characters of each line, which involved checking if the length of a line was 23 chars long, and if so, display the last 2 chars, otherwise, don't try and display the last 2 chars (because they wouldn't exist). Here's the working code:

Code:
``` If K=23:Then 23int(A/6-1)+B/4+2->theta If Ans!=length(Str7:Then If Ans+1<length(Str7 sub(Str7,1,Ans)+sub(Str7,Ans+2,length(Str7)-Ans-1 If theta+1=length(Str7 sub(Str7,1,theta Ans->Str7 For(G,int(A/6),1+int((length(Str7)-1)/23 Text(6G+2,1,"          " //94 spaces. If you can improve upon this (while keeping it fast) then go ahead. 23->theta If length(Str7)<23G:23G-(23G-length(Str7))-23(G-1->theta For(F,1,8+int(3.87Ans),4 If theta=23 or (theta<23 and length(Str7)>23(G-1)+(F-1)/4 sub(Str7,23G-22(F<6)-24(F>5)+int((F+8)/4),1 If Ans=" " //1 space "    " //4 spaces If F>5 and (theta=23 or (theta<23 and length(Str7)>23(G-1)+(F-1)/4 Text(6G+2,F-8,Ans End:End:End:End ```

This code is a little bit crude, but it works

[EDIT]
Okay, now the only problem is is that it is VERY slow. Yes, it is fine for just a single line, but if you have the entire page filled up with text and you delete a single character from the first line, it takes pretty much a full minute (or a bit less) just to re-display the rest of the text on the page. It would be fast if I could display an entire sub() of each line of the note instantly, but unfortunately, I have to check for space characters, in order to space them out by 3 rather than 1, which is their normal pixel width.

Is there anyway to make this a lot faster? Thanks in advance!

[edit 2]
I also just realized that i forgot to add in "w" and "m" checking, so I would need to check for those characters too (because they are 5 pixels in width, I would have to replace them with my 3 pixel versions). Going to need to update my code.
Wow, that is so nice looking Michael! I don't have time to look back, but is there any other new things you haven't implemented yet that are on a todo list?

Code:
```23int(A/6-1)+B/4+2->theta //Could be 23int(A/6)+B/4-21->theta```

Code:
```sub(Str7,23G-22(F<6)-24(F>5)+int((F+8)/4),1 //Could be sub(Str7,23G-22-2(F>5)+int(F/4+2),1 //Could be sub(Str7,23G-20-2(F>5)+int(F/4),1```

Code:
```23G-(23G-length(Str7))-23(G-1->theta //Could be length(Str7)-23(G-1->theta```

Code:
```If theta=23 or (theta<23 and length(Str7)>23(G-1)+(F-1)/4 //Could be, since theta<=23 If theta=23 or 23(G-1)+(F-1)/4<length(Str7```
Michael2_3B wrote:
This isn't big, but I just realized that
Code:
```23round(A/6-1,0 can be 23int(A/6-1```

well, no... the round( token will round the value to the nearest integer, the int( token will just take the integer part of the number, for example

Code:
``` int(25.76=25 round(25.76,0=26 ```

That's not the same... (the only time these two statements are indeed the same is when the fractional part of the number is lover than 0.5, in which case the round( token will barf out the lowest integer.)
Since Michael wrote that A starts at 8, and ends at 50, with difference of 6, you can start as follow:

Code:
```A=8,  round(8/6,0)=1   int(8/6)=1 A=14, round(14/6,0)=2  int(14/6)=2 A=20, round(20/6,0)=3  int(20/6)=3 A=26, round(26/6,0)=4  int(26/6)=4 etc... ```

but here, round( has exactly the same result as int(.
Unicorn wrote:
is there any other new things you haven't implemented yet that are on a todo list?

Well, since my last todo list was quite a few posts ago, I'll make one again, here:

Things to Fix/Change
-- Hopefully speed up display of text after deleting/pasting
(Done) -- Finish deletion code
(Done) -- Change highlighting from inverting to just underlining (makes it easier to de-highlight quickly)

-- An ENTER function maybe... gonna need help with this
(Done) -- Pasting (Inserting)
-- Undo / Redo (requires action list?) (probably not coming in 1st version, if at all)
-- multi-page note support and multi-page notes list support on menu

After I finish the text editor, I have a few small things to finish up on the menu. such as a search bar that searches for text (in titles, in notes, and maybe in clipboard)
Here's my formula for converting length(Str7) to a Y cursor value (anywhere between 8 and 50 with diff of 6):

Code:
``` 2+6(1+int((length(Str7)-1)/23->A ```

And here's for X:

Code:
``` 4((length(Str7)-2)-23int(length(Str7)/23->B ```

Current deletion code:

Code:
``` If K=23:Then 23int(A/6)+B/4-21->theta If not(X) and Ans!=length(Str7) or (X:Then If not(X:Then If Ans+1<length(Str7 sub(Str7,1,Ans)+sub(Str7,Ans+2,length(Str7)-Ans-1 If theta+1=length(Str7 sub(Str7,1,theta End If X:Then If X>V V+.01X->theta If V>X X+.01V->theta If 100fPart(Ans)<length(Str7 sub(Str7,1,iPart(Ans))+sub(Str7,100fPart(Ans)+1,length(Str7)-100fPart(Ans If 100fPart(theta)=length(Str7 sub(Str7,1,iPart(theta DelVar XDelVar M End Ans->Str7 For(G,int(A/6),1+int((length(Str7)-1)/23 Text(6G+2,0,"                  " //94 spaces If length(Str7)>2:Then 23->theta If length(Str7)<23G:length(Str7)-23(G-1->theta For(F,1,8+int(3.87Ans),4 If theta=23 or 23(G-1)+(F-1)/4<length(Str7 sub(Str7,23G-20-2(F>5)+int(F/4)(23G-20-2(F>5)+int(F/4)<=length(Str7)),1 If Ans=" " //1 space "    " //4 spaces If F>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(F-1)/4<length(Str7 Text(6G+2,F-8,Ans If inString("wm",Ans:Then Text(6G+2,F-8,sub("WM",inString("wm",Ans),1 Line(F,61-(6G+2),F+2,61-(6G+2),0 Pt-Off(F+1,60-(6G+2 End:End:End:End If 23int(A/6)+B/4-21>length(Str7:Then 2+6(1+int((length(Str7)-1)/23->A 4((length(Str7)-2)-23int(length(Str7)/23->B End:End:End ```

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
» All times are UTC - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum