ok, well that's interesting...

I got more of me not knowing if this is right or not:


Code:

For(P,0,8
   If L1(P*3)=1
      48+P->*{PSTR+6
      Open(PSTR,"r+->B
      Read(INT,1,1,B
      SetTextXY(5,5
      PrintUInt(*{INT},2
      Pause
      CloseAll
   End
End

this just outputs some 3?! digit numbers, when they should be outputting what I stored to byte 1...


Code:

"PeriodX->PSTR
48+P->*{PSTR+6
//store ASCII # of period, 0-8, to offset 6
Open(PSTR,"r+->PERSLOT
Write(IX,1,1,PERSLOT
Write(STR,IX,1,PERSLOT+1
Close(PERSLOT

the above is in a lbl that I called before the 1st code thing i.e. me trying to disp "INT". When I didn't have the {}'s, it spit out some 9 digit #'s, iirc.

IX is the # of chars in STR, and STR is what the user input as the class name for period P. I've checked, and those values appear to be stored correctly in their vars, because I can store and display them with no problem. When it comes to appvar saving/ loading, that's when everything falls apart. I haven't tried to disp the user input from the appvar yet, bc I need to know the # of chars in order to read IX*1 bytes. Any help would be appreciated


how I "initialized" AppVars for the period(s) that were selected in the main menu (AppVars are made fine)

Code:

//create AppVars for the periods
"PeriodX"->PSTR
For(P,0,8
   CloseAll
   If L1(P*3)=1
      48+P->*{PSTR+6
      //store ASCII # of period, 0-8, to offset 6
      //       Period
      //offset:0123456
      Open(PSTR,"w
      //make new file
   End
   CloseAll
End
MateoConLechuga wrote:
beckadamtheinventor wrote:
MateoConLechuga wrote:
You can use Write without a Resize beckadamtheinventor.


I said that you couldn't re allocate the file with Write Wink To my knowledge, anyways.

And I'm saying you can.


oh. ok. I didn't know that. Thank you for letting me know.
Ok, well, I still want to know if I'm doing anything wrong, so could an ICE guru/expert/PT_ take a look at my code please?
some updated routines for saving/loading the appvar:

Saving:

Code:

"PERIODX"->Str1
48+P->*{Str1+6

//store ASCII # of period, 0-8, to offset 6

Open(Str1,"r->PERSLOT
Write(IX,1,1,PERSLOT
Seek(IX,0,PERSLOT)
Write(STR,IX+1,1,PERSLOT+1
Close(PERSLOT

where IX is the # of chars in the input string, STR, and STR is the class name that the user input.

Loading:

Code:

Open(Str1,"a+->B
//open AppVar
//obtain IX in IY
//NOT WORKING!!!!!!!!!!!!
Alloc(1->IY
Alloc(1->LEN
Read(IY,1,1,B
ZeroScreen
         
Copy(LEN,IY,1
      
SetTextXY(5,15
PrintUInt(IY,3

SetTextXY(5,35
PrintUInt(LEN,2

SetTextXY(5,45
PrintUInt(IX,2

SetTextXY(5,55
Read(IY,1,1,B
PrintUInt(IY,4

Printing IX works, all other code prints stuff, in order of the 4 outputs:
IY: 13652341
LEN: 13652342
IX: 04 // this is correct, the input in this test was 4 characters long
IY as read from appvar: 13652341

This sounds like nothing's being saved to the appvar, and consequently, nothing is read.
The AppVar's size in the Mem Mgmt menu are always 19, even after I delete them and try with longer inputs, this further reinforces the above statement.

Any help is appreciated needed at this point Razz
For your loading code replace the whole section with the following

Code:

Open(Str1,"r"->B
Alloc(1)->IY->LEN
Read(IY,1,1,B
Read(LEN,IY,1,B)
SetTextXY(5,15
PrintUInt(IY,3

SetTextXY(5,35
PrintUInt(LEN,2
CloseAll
PROGRESS UPDATE: LAX18 helped me squash (more) bugs in my code, so now, I can set up the periods, and write the length of the class name and the class name itself into the AppVar!

I'll probably post some screens later on in the week...

So, now, I'm designing the UI in which you select the class to edit the agenda. LAX18 is working on bugfixing some old input code he gave me, so when that's done, I just need to finish up some more things, then AgendaCE will be ready!

Side note: idk if I've asked this before, but a Goto inside of a loop in ICE doesn't cause a memory leak, correct? (Idk if this is right too Razz )
Bad news: My dad banned me from using IRC forever, I think, and he also banned me from going on Cemetech until my PSAT is over, which is on October 15th, iirc, so this means I won't be able to work on AgendaCE for a while, or even check in here...

See you guys later...!
Banned from IRC forever? That's a significant amount of time!

What happened?
Nothing really, he just hates large chats, but he's completely fine with SAX (maybe bc he doesn't realize SAX connects to IRC?)

I don't think it's forever, but if I ask, it'll definitely be forever...
I'll try and survive with SAX... If it's urgent/ my project specific, just PM me...
Would this program be for the 84 Plus CE?
The ICE language is only compatible with the TI 84 Plus CE; so yes, this is for the CE. Wink
A quick update: I got the UI stuff done/ planned, I'm just waiting for LAX18 to get some code done, and after that, there's more testing to be done. As of now, AgendaCE can take class inputs (thanks to beckadamtheinventor), as well as have a configurable period system, period 0-8. The names are also read and displayed, and there's a "settings" menu, that for now, has deletion controls for the saves. I just need the actual agenda part, and since I have no idea on how to make text editors, LAX18 let me use his (old) code; he is also improving it... I'll let LAX18 comment on this if he likes...

I might have more features added after an initial release, any suggestions?
Good way to learn more about ICE, and if you have any questions, don't forget to ask me!
PT_ wrote:
Good way to learn more about ICE, and if you have any questions, don't forget to ask me!


Umm... how do I make a text editor in ICE with save and load features?

***SM84CE RUUUUNNNNSSSS
When are you going to release it?! Smile
Justin wrote:
When are you going to release it?! Smile


I suppose when he finishes it?
SM84CE wrote:
A quick update: I got the UI stuff done/ planned, I'm just waiting for LAX18 to get some code done, and after that, there's more testing to be done. As of now, AgendaCE can take class inputs (thanks to beckadamtheinventor), as well as have a configurable period system, period 0-8. The names are also read and displayed, and there's a "settings" menu, that for now, has deletion controls for the saves. I just need the actual agenda part, and since I have no idea on how to make text editors, LAX18 let me use his (old) code; he is also improving it... I'll let LAX18 comment on this if he likes...

I might have more features added after an initial release, any suggestions?

^^ I also need ICE text editor code help... PT_??
  
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
Page 2 of 2
» 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