PT_ wrote:

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

Code:
B/4-21+23int(A/6->theta
Sorry I haven't posted in a bit... I haven't really been motivated that much to work on BasicNote right now. Also this past week I was volunteering at a STEM camp as a counselor so I wasn't able to work on it much then.

Currently the things I have been working on are the clipboard(copying and pasting), as you may know. Doing that is very easy internally (using some sub() commands), but graphically updating the screen to display the new text is a bit harder. My solution is pretty slow - since I have to display special text for w,m,[space], z, f, i, etc (all the chars that aren't 3 pixels in width), I have to re-display everything char-by-char, instead of line-by-line which would be way faster. obviously i can't display line by line because of how the OS does perfect kerning, and my program assumes that all chars are 3 pixels in width (which is way easier to work with). Oh, and obviously I don't update the entire page, just everything from the y value of the cursor down.

Anyways, hopefully I can get back to some more interesting stuff soon so I have cooler stuff to show you guys. Here's an update post, even though it's in my signature...

oh, and uh.. here's the current code for the entire text editor so far, if anyone is interested for whatever reason. there are some unfinished code lines btw
Code:
DelVar XDelVar RDelVar SClrDraw
0->Xmin:1->DeltaX
0->Ymin:1->DeltaY
AxesOff
DispGraph
Text(0,1,"12345678901
Text(0,69,"99/99
Line(89,55,89,62
Line(67,55,67,62
Horizontal 55
DelVar B8->A
"  ->Str7
Repeat S and K=22
Repeat Ans
Line(B,61-A,B,57-A
getKey->K
Line(B,61-A,B,57-A,0
End
If Ans=21 or Ans=31:Then
If Ans=21:Then
DelVar Rnot(S->S
If S:Then
Text(0,91,"2
Else
Text(0,91,"   
End:End
If Ans=31:Then
If not(R:3->R
DelVar SR-1->R
If R:Then
Text(0,91,"A
If R<2
Text(0,91,"a
Else
Text(0,91,"   
End:End:End
If R=2:"ABC  DEFGHIJKLMNOPQRSTUVWXYZtheta'  :?
If R=1:"abc  defghijklMnopqrstuvWxyztheta'  :?
If S:"           |E{}[e]    [    ]       [i]
If not(R) and not(S:"=        ^ ,()/ 789plotdot 456-\>123+ 0.~
If K>=41 and K<=104:Then
If " "!=sub(Ans,K-20-5int(.1K),1) or (K=102 and R
Then
sub(Ans,K-20-5int(.1K),1->Str8
If B>89 and A<54:DelVar BA+6->A
Text(A,B+1,"   
Text(A,B+1,Str8
If R=1 and inString("WM",Str8
Then
Line(B+1,61-A,B+3,61-A,0
Pt-Off(B+2,60-A
sub("wm",inString("WM",Str8),1->Str8
End
23round(A/6-1,0)+B/4+2->theta
If Ans=length(Str7
Then
Str7+Str8->Str7
Else
sub(Str7,1,theta)+Str8
If theta+1<length(Str7
Ans+sub(Str7,theta+2,length(Str7)-theta-1
Ans->Str7
End
B+4->B
End:End
If S and sum(K={24,26
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=50) or A>8 and A<54:Then
Line(B,62-A,B,57-A,MK=624
For(F,B,B+3(K-25),K-25
For(G,A,A+5
Pxl-Change(G,F
End:End
If not(X:Then
K->M
23round(A/6-1,0)+B/4+2->X
End
B+4(K-25->B
23round(A/6-1,0)+Ans/4+2->V
If V=X
DelVar XDelVar M
End:End
If not(S) and sum(K={24,25,26,34
Then
If not(B) and A>8 and K=24
Then
A-6->A:92->B
End
B+4((K=26)(B<92)(length(Str7)>23round((A-6)/6,0)+B/4+2)-(K=24)(B>0->B
A+6((K=34)(A<54)(length(Str7)>23round(A/6,0)+B/4+1)-(K=25)(A>8->A
If B=92 and A<54 and K=26:DelVar BA+6->A
End
If K=14 and X!=V:Then
If X>V
V+.01X
If V>X
X+.01V
sub(Str9,1,1)+sub(Str7,iPart(Ans)+1,100fPart(Ans)-iPart(Ans))+sub(Str9,2,length(Str9)-1->Str9
End
If sum(K={15,23:Then
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
End:End
If K=15 and "[xhat]T"!=sub(Str9,2,2:Then
sub(Str7,1,23int(A/6)+B/4-21)+sub(Str9,2,inString(Str9,"[xhat]T")-2
If 23int(A/6)+B/4-21<length(Str7
Ans+sub(Str7,23int(A/6)+B/4-20,abs(23int(A/6)+B/4-21-length(Str7
Ans->Str7
End
For(G,int(A/6),1+int((length(Str7)-1)/23
Text(6G+2,(B+1)(G=int(A/6))+(G>int(A/6)),"                                                                                             
If length(Str7)>2:Then
23->theta
If length(Str7)<23G:length(Str7)-23(G-1->theta
For(F,(B+1)(G=int(A/6))+(G>int(A/6)),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="
"   
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
ClrHome
(sorry for double post)

hurray, just finished pasting code (not completely sure it's bug free yet though). graphical updating is finished, but it is very slow, so I will wait a little bit before putting that into the pasting code so that maybe you guys can give me some input on making it faster? anyways, here's for the actual pasting (no graphical updates)
Code:
If K=15:Then
If "[xhat]T"!=sub(Str9,2,2:Then  //would this be better/faster than combining it with the previous line?
sub(Str7,1,23int(A/6)+B/4-21)+sub(Str9,2,inString(Str9,"[xhat]T")-2
If 23int(A/6)+B/4-21<length(Str7
Ans+sub(Str7,23int(A/6)+B/4-20,abs(23int(A/6)+B/4-21-length(Str7
Ans->Str7
End:End
Well, I made my own version for the CSE (not for the CE, since it uses DCS libs). Here's what I come up with:

The GIF is not very well, the "+" at the beginning is pure orange, and the cursor is red. I'm trying to fix some bugs. Take a look:

Code:
// -----------------------------------------------------------------------------------------
// -------------------- CSENote ---------------------------------------------------------
// -----------------------------------------------------------------------------------------
// Variables:
// A - Index of left "+", selected note
// B - Index of right "+", selected mode
// F - Mode of selecting text
// G - [2nd] = On/Off
// H - Mode of [ALPHA]
// L - Left x-value of selected text
// M - right x-value of selected text
// N - y-value of selected text
// Str7 - Copied text
// Str9 - Content of note
// Keys:
// [TRACE] to select
// [ZOOM] to copy (if something is selected)
// [WINDOW] to paste (if something is selected)
// [2nd] to activate the 2nd-mode
// Arrows to move
// [ALPHA] to add a letter, of character
// [DEL] to delete a letter, or the selected stuff.
// [MODE] to go back to the homescreen of my program
// When at my homescreen:
// [Y=], [WINDOW] to select a note
// [TRACE], [GRAPH] to select a mode
// I hope this is all, goodluck :)
:DCS
"2222222222222222BBBBBBBBBBBBBBBBBBBBBBB333B333BBBBBBBBB3B3BB3BBBB6BBB6B3B3BB3BBBB6BBB6B3B3BB3BBBB66BB6B333BB3BBBB666B6BBBBBBBBBBB6B666BBBBBBBBBBB6BB66B333BB33BBB6BBB6B3BBB3BBBBB6BBB6B33BBB3BBBBBBBBBB3BBBBB3BBBBBBBBB333B33BBBBBBBBBBBBBBBBBBB2222222222222222"
ClrHome
If 80>det([[20
Then
Disp "Get DoorsCSE to run this","http://dcs.cemetech.net"
Return
End
StoreGDB 1
"rowSwap(NOTES2"->Str0
1->A
1->B
det(0
~1->L
~1->M
~1->N
If Str9="..P:NT:FN"
Then
det(4
"NEW POST"->Str9
1:det(2
"CONTENT"->Str9
2:det(1
End
0->Xmin
264->Xmax
0->Ymin
det(0
164->Ymax
FnOff
AxesOff
BackgroundOff
Lbl 0
ClrDraw
TextColor(Black
Text(~1,0,0,"NOTES"
Line(0,147,264,147,Black
Line(195,164,195,0,Black
Lbl 1
real(8,1,0
real(7,9,32,33,240,70,255,1
real(8,1,1
real(7,9,0,33,50,70,255,1
For(Z,1,min(20,theta),2
Z:det(0
Text(13+7Z,15,Str9
End
Text(20,210,"Add"
Text(34,210,"Edit"
Text(48,210,"Delete"
Text(62,210,"Rename"
DelVar KTextColor(Orange
Repeat max(K={45,105
Text(6+14B,200,"+"
Text(6+14A,5,"+"
Repeat Ans
getKey
End
Ans->K
If max(K={11,12
Text(6+14A,5,"   "
If max(K={14,15
Text(6+14B,200,"   "
min(10,min(theta/2,max(1,A+sum(DeltaList(K={11,12->A
min(4,max(1,B+sum(DeltaList(K={14,15->B
End
TextColor(BLACK
// Exit
If K=45
Then
RecallGDB 1
ClrHome
Return
End
If K=105
Then
// Change title
If B=4
Then
Input "ENTER THE TITLE:",Str9
2A-1:det(1
End
// Delete note
If B=3 and theta!=2
Then
2A-1:det(7
det(7
A-(A>1->A
End
// Add note
If B=1
Then
"NEW POST"->Str9
theta+1:det(2
"CONTENT"->Str9
theta+2:det(2
End
// Edit note
If B=2
Then
" "->Str7
DelVar FDelVar GDelVar SDelVar T2->H
ClrDraw
2A-1:det(0
Text(~1,0,0,Str9
2A:det(0
length(Str9->P
Line(0,147,264,147,Black
For(Z,0,int(P/29
For(D,1,min(29,P-29Z
Text(20+14Z,9D-7,sub(Str9,29Z+D,1
End
End
Repeat K=22
getKey->K
max(0,min(int(P/29),T+sum(DeltaList(K={25,34->T
max(0,min(29,min(P-29T,S+sum(DeltaList(K={24,26->S
// Paste selected stuff
If K=12 and Str7!=" "
Then
" "
If 29T+S
Ans+sub(Str9,1,29T+S
Ans+Str7
If P-29T-S
Ans+sub(Str9,29T+S+1,P-29T-S
sub(Ans,2,length(Ans)-1->Str9
length(Ans->P
End
// Copy selected stuff
If K=13 and ~1!=L
sub(Str9,1+L,M-L->Str7
// Some code to change modes
If K=14:not(F->F
If K=21:not(G->G
If G
Then
If K=24:0->S
If K=25:0->T
If K=26:min(29,P-29T->S
If K=34
Then
int(P/29->T
min(S,P-29T->S
End
End
If K=31:H+1-3(H=2->H
Line(9S,143-14T,9S,130-14T,RED
If K
Then
Text(0,186,sub("          [\\T]",10F+1,3+7not(F
Text(0,205,sub("                 [2nd]",17G+1,5+12not(G
Text(0,240,sub("[\\A][a]          ",3H+1,3+7(H=2
End
// Delete character/selected stuff
If K=23
Then
DelVar Q" "
If T+S and ~1=L
Ans+sub(Str9,1,29T+S
If 0<L
Ans+sub(Str9,1,L+29N
If 29T+S+1<P and ~1=L
Ans+sub(Str9,29T+S+2,P-29T-S-1
If ~1!=L and P-29N-M
Ans+sub(Str9,29N+M+1,P-29N-M-2
sub(Ans,2,length(Ans)-1->Str9
length(Ans->P
If ~1!=L
L->S
End
// Add character
If K>34 and ~1=L
Then
1->Q
" "
If T+S
Ans+sub(Str9,1,29T+S
Ans+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZtheta\'  .? abc  defghijklmnopqrstuvwxyztheta\'* .?          ^^^2,()/ 789* 456- 123+ 0.~ ",K-5int(.1K+4)+35H,1
If 29T+S<P
Ans+sub(Str9,29T+S+1,P-29T-S
sub(Ans,2,length(Ans)-1->Str9
length(Ans->P
End
// Select character
If F and max(K={24,26
Then
If ~1=N
T->N
If K=24 and S>~1 and T=N
Then
If S+1=L or ~1=L:S->L
If S+1=M:S->M
If ~1=M:S+1->M
End
If K=26 and S<30 and T=N
Then
If S-1=L:S->L
If S-1=M or ~1=M:S->M
If ~1=L:S-1->L
End
// Display highlighted stuff
If T=N
Then
For(Z,max(1,L),min({M+1,29,P-29N
If Z=1+L
Asm(prgmCHANGE
sub(Str9,29N+Z,1
If inString(" .,:",Ans
Ans+"   "
If Z>L and Z<=M
Ans+"  "
Text(20+14N,9Z-7,Ans
If Z=M
Asm(prgmCHANGE
End
End
If not(M-L
Then
~1->L
~1->M
~1->N
End
End
Line(9S,143-14T,9S,130-14T,20-8(S>L and S<=M and T=N
// Update screen
If ~1=L and (K=23 or K>34) or (K=12 and Str7!=" ") or (K=23 and ~1!=L
Then
For(Z,T(~1=L)+N(L!=~1),int(P/29
real(8,1,0
real(7,9,27,33+7Z,210,8,255,0
real(8,1,1
real(7,9,0,33+7Z,130,8,255,0
For(D,1,min(29,P-29Z
Text(20+14Z,9D-7,sub(Str9,29Z+D,1
End
End
real(8,1,0
real(7,9,27,40+7int(P/29),210,7,255,1
real(8,1,1
real(7,9,0,40+7int(P/29),130,7,255,1
S+Q(S<29)-not(Q)(S and S=not(P-29T->S
T+Q(S=29)-not(Q)(T and not(P-29T->T
If Q and S=29
0->S
~1->L
~1->M
~1->N
2A:det(1
End
End
Goto 0
End
End
DispGraph
Goto 1

And I've no idea about the title, something like ColorPad, CSENote or who knows a good one?
Very nice PT_, it's looking great so far Wink

I got everything for the graphical updates done. Since the graphical update code would be pretty much exactly the same for both pasting and deleting, I combined the two. However, it errors out (invalid dim) sometimes at the edge of the screen, for whatever reason i don't know... on further inspection, 23G-20-2(F>5) is always 1 greater than the length(Str7) if it errors out.
Code:
If sum(K={15,23:Then
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
End:End
If K=15 and "[xhat]T"!=sub(Str9,2,2:Then
sub(Str7,1,23int(A/6)+B/4-21)+sub(Str9,2,inString(Str9,"[xhat]T")-2
If 23int(A/6)+B/4-21<length(Str7
Ans+sub(Str7,23int(A/6)+B/4-20,abs(23int(A/6)+B/4-21-length(Str7
Ans->Str7
End
For(G,int(A/6),1+int((length(Str7)-1)/23
Text(6G+2,(B+1)(G=int(A/6))+(G>int(A/6)),"                        " //94 spaces
If length(Str7)>2:Then
23->theta
If length(Str7)<23G:length(Str7)-23(G-1->theta
For(F,(B+1)(G=int(A/6))+(G>int(A/6)),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=" " // 1space
"    " //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

oh, and uh.. interesting story, i had to write this code twice, because i lost it the first time when i tried to copy it... but luckily I was able to remember most of it.
I'm definitely glad I pasted my entire code a few posts ago...
I'll be keeping offline backups from now on Very Happy
Wow, PT_, that looks amazing! I was planning to fix up my version under the name ColorNote, but it's never going to be able to compete with yours (and it's going to take too much effort to fix it) so feel free to use the name.
Thanks Wright! I fixed a bug, with copying, it copies only text from the first line, now at the line you have selected.

Things to fix:
- (Done) Copy text from the highlighted line
- (Unneccesary) Leaving black pixels if dehighlight to left.
- (Done) Probably, instead of highlighting, only another textcolor.
- (Done) Change title of my program, now definitely ColorNote, since Wright give me permission to use that.
- (Done) Make a nice icon.
- (Done) The possibility to highlight more lines

Things to add:
- (Done) If you have more then 10 notes, add multiple pages.
- (Done) If the note is longer then uhm 10*29=290 characters, also add multiple pages.
- (Done) If press enter, go to the next line, so that you don't need to fill the whole line.
- (Done) Optimization Smile
- (Done) Show a text, when copying the highlighted stuff.
PT_ wrote:
- If press enter, go to the next line, so that you don't need to fill the whole line.


How are you creating an ENTER function? I'm wanting to add one to mine, but it will seriously screw up A LOT of stuff I have already. I mean, I was thinking about a delimiter, but the problem with that is now the note is shorter than it actually is (the ability to move the text cursor in my prog is based off the length of the note).

I was also thinking that you could just add a bunch of spaces, but I'm not sure... Is that a bad idea, or would that actually be fine?

[edit]
oh, and any input on this?
I think the spaces would be fine, it's only 23 bytes per line. It would keep your code simple, and it would work well.
The disadvantages of spaces is, that they are existing. If you would remove the Enter, you must also remove all the spaces. I've yet no idea how to make it, I would think about it.

EDIT: you said 23G-20-2(F>5) > length(Str7)
23G-2(F>5) > 20+length(Str7)
Lets assume F=1, so

Code:
23G > 20+length(Str7)
Lets length(Str)=47, then G would maximal being 3
23*3 = 69
69 > 20+47 ....... while 46<length(Str7) (also true)

If G=3 and F=1 and length(Str7)=47, then the sub( command would become:

Code:
23(G-1)+(F-1)/4<length(Str7// True
sub(Str7,49+something,1
which will result in an error.
Yes I believe you are right, but now how to fix it?

I errored out (invalid dim) on the 3rd line when testing, and like you said on sax, it would happen if "23n+1=length(Str7)" (n being any number). In this case, 23(3)+1=70=length(Str7) is when i errored out.

Also, I discovered a graphical bug where 2 extra characters got displayed on the right edge of the screen (when my paste got over to that side), even though they are non-existent. They are characters that come from my paste, but they are not actually part of the end of the note...
Okay, here's another thing I've been working on. If you press the down arrow to move your cursor, but the length(Str7) does not reach to where your cursor is, then the cursor value get's updated to wherever the last character is... currently, if you press down and on the next line you are past the length(str7), it gets updated properly. however, if you press down and there is text below you, the cursor should just move straight down, but for some reason it gets updated and moves to the last character of str7... here's my code:
Code:
If not(S) and sum(K={24,25,26,34
Then
If not(B) and A>8 and K=24
Then
A-6->A:92->B
End
B+4((K=26)(B<92)(length(Str7)>23round((A-6)/6,0)+B/4+2)-(K=24)(B>0->B
A+6((K=34)(A<54)(length(Str7)>23round(A/6,0)+B/4+1)-(K=25)(A>8->A
If B=92 and A<54 and K=26:DelVar BA+6->A

//here is the important part:
If K=34 and 23int(A/6)+B/4+2>length(Str7:Then   //if down pressed and cursor would be past length(str7) when it moves to next line
2+6(1+int((length(Str7)-1)/23->A   //convert length(str7) to y value for cursor
4((length(Str7)-2)-23int(length(Str7)/23->B  //convert length(str7) to x value for cursor
End:End

for some reason, the 'k=34 and 23int.....' part get's activated when it shouldn't, like i said above.

I did some further inspection afterwards. say a=8, b=40, and length(str7)=37. then, the statement would be

Code:
if k=34 and 35>37:Then
//code
end

so, 35 is not greater than 37, right? then why does it get activated??? I'm probably just making a stupid mistake but I seriously can't find the problem here.
If A=8, B=40 and length(Str7)=37, then you get from this code:

Code:
A+6((K=34)(A<54)(length(Str7)>23round(A/6,0)+B/4+1)-(K=25)(A>8->A
A+6(1*1*1)-0*1=A+6

Then A is 14.

Code:
If K=34 and 23int(A/6)+B/4+2>length(Str7:Then
If TRUE and 23*2+10+2>37 which is false

What happens if you try

Code:
If K=34 and 23int((A-1)/6)+B/4+2>length(Str7:Then

???
PT++, thanks. I can't believe I didn't notice how I was accidentally updating A before hand as well... your solution did not work, but it was very close. instead, it would be
Code:
23int(A/6-1)+B/4+2>length(Str7

that way, you offset for the previous update. but maybe I could just prevent the previous update as well?

EDIT: actually, that wouldn't work... though it does solve my previous problem, that now disables the ability to actually do anything I originally intended the function to do (if user presses down, and text is not below them, cursor gets updated to the placement of the end of str7).
Hmm, what if you do:

Code:
A+6((K=34)(A<54)(length(Str7)>23round(A/6,0)+B/4+1)-(K=25)(A>8->A
-->
Code:
A+6((K=34)(A<54)(int(A/6)<=int((length(Str7)-1)/23))-(K=25)(A>8->A
Then you can only press down when your cursor is NOT at the same line as the end of the string. If A=8 and length(Str7)=23, then you get
Code:
A+6(1*1*(1<=0)-(K=25)(A>8->A
which results, that A = 8. However, if length(Str7)=24, then you get
Code:
A+6(1*1*(1<=1)-(K=25)(A>8->A
so A=14, which is true.

You can remove the whole second if-statement, by using this code instead:

Code:
min(B,4length(Str7)+92-92int(A/6->B
(You don't have to update A again, since we already did that). Another possibility is
Code:
min(B,4length(Str7)-92int(A/6-1->B

If length(Str7)=35 and A=14, then B would being updated if B>48

Code:
min(B,4length(Str7)-92int(A/6-1
min(B,4*35-92*int(2.33333-1
min(B,140-92*1
min(B,48
So that is correct. If B>48, then min(B,48\) returns 48, which is correct.
Lol, can't use Cool 8\)

EDIT: here's the full code:

Code:
If not(S) and sum(K={24,25,26,34
Then
  If not(B) and A>8 and K=24
  Then
    A-6->A:92->B
  End
  B+4((K=26)(B<92)(length(Str7)>23round((A-6)/6,0)+B/4+2)-(K=24)(B>0->B
  A+6((K=34)(A<54)(int(A/6)<=int((length(Str7)-1)/23))-(K=25)(A>8->A
  If B=92 and A<54 and K=26:DelVar BA+6->A
  min(B,4length(Str7)-92int(A/6-1->B
End
I really appreciate all your effort PT_, but that didn't solve anything. Normal cursor movement works, but when you press down and the area below you is greater than the length(str7), the cursor moves down anyways, but obviously can't move farther (and, logically, each time you go backwards until you hit where the length(str7) is, you can't move forward again).

I think I'll have to look at this another time and see if I can adjust it. I'm currently preparing for my sisters wedding shower (she's leaving me! Sad Sad Sad ). I should be able to figure it out when I take a closer look at the code.
Now that I had some more time to sit down and look at it, I fixed it. Now it moves backwards if the cursors placement is greater than length(str7) when you press down, and moves straight down if there is text below it or is at the end of the string. and obviously, it doesn't move down if there no text on the next line Smile
Code:
If not(S) and sum(K={24,25,26,34:Then
If not(B) and A>8 and K=24:Then
A-6->A:92->B:End
B+4((K=26)(B<92)(length(Str7)>23int(A/6-1)+B/4+2)-(K=24)(B>0->B
A+6((K=34)(A<54)(length(Str7)>=23int(A/6)+1)-(K=25)(A>8->A   //a+6 now only relies on if any text is on next line
If B=92 and A<54 and K=26:DelVar BA+6->A
If K=34 and A<54 and 23int(A/6-(length(Str7)>23int(A/6-1)+B/4+1))+B/4+2>length(Str7   //changed this as well obviously
4((length(Str7)-2)-23int(length(Str7)/23->B   //update x value of cursor
End

Like always, optimizations appreciated Smile

I believe I am going to change title input again btw. And/or start on multiple page support in notes. Also, I think I might save the undo/redo function (if i do it at all) for another version, after I release the first version of BasicNote.

Code:
If B=92 and A<54 and K=26:DelVar BA+6->A
If K=34 and A<54 and 23int(A/6-(length(Str7)>23int(A/6-1)+B/4+1))+B/4+2>length(Str7   //changed this as well obviously
4((length(Str7)-2)-23int(length(Str7)/23->B

Why are you checking if A<54, since you can't update A if A>=54?
You can get rid of the A<54, and probably use the Ans:

Code:
If B=92 and K=26:DelVar BA+6->A
23int(A/6
If K=34 and Ans-23(length(Str7)>Ans+B/4-22)+B/4+2>length(Str7   //changed this as well obviously
4length(Str7)-8-92int(length(Str7)/23->B
Instead of trying to fix every problem along the way, I'm just going to move along and fix them later. Currently the problem is straight up and down highlighting, but I think I'm going to move on for now. I'll make a Fix List and an updated To Do List in a bit.

Next up: multi-page note support. I think the easiest way to keep track of how many pages there are in a note is not actually keeping track at all, but just using the length of the note and converting it to a page count. also it has to be able to add a page and remove a page.

The main thing that has been irking me for a while now though is the text display. Since not every char is 3 pixels wide, I have to display text char by char. Which means that when you load up a note, or go to the next/previous page, it will take much longer than you would want before you could actually edit it. I can't rely on the ti-os, since it has perfect kerning, and my prog does not. So... yeah.

Adding multi-page notes list on the menu doesn't seem like it should be too hard, so I may get that done in just a little bit.
[UPDATE]
trying to get a lot done lately. going to camp this week, so won't be able to work on it for a bit.

first release should be within the month, but it definitely won't be bug free. i'll try to fix that later.

all of the important features are done, but there are still way more that I could add. text editor is basically done, but still got a bunch of misc bugs I need to fix. the only main feature I'm missing from it as of now is multi-page notes. However, I did get the multi-page notes list kind of working, though it doesn't quite work correctly (was in a bit of a rush trying to do this before camp). here's the attempt:


hope you guys like it so far. I'll be back in a few days Wink as I said, I should have 1 or more releases this month Smile
  
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.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
» View previous topic :: View next topic  
Page 6 of 9
» 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

 

Advertisement