Calculator Community > Axe

Help: Screenshotting program ends up screensh*tting

(1/4) > >>

DJ Omnimaga:
Ok so that french guy was asking how to make a program to store pics into programs, something that is impossible so far, but I decided to make an appvar version for now. However, I have problems. When I recall the pic, it's kinda glitchy. Some stuff shows fine, but other lines are garbage. I also got a crash once

Here's the code of my programs:


--- Code: ---.SCRNSHOT
StoreGDB
"vPIC"->Str1
GetCalc(Str1)
GetCalc(Str1,768)
conj(L6,Str1,768)
DispGraph
--- End code ---


--- Code: ---.SCRNVIEW
"vPIC"->Str1
GetCalc(Str1)->M
If M
conj(Str1,L6,768)
DispGraph
End
--- End code ---

Note: those two progs are launched from a TI-BASIC program so the graph screen is displayed prior launching them.

If anyone tries to debug this, please do not run on calc, or at least back up first, because my TI-Nspire froze once.

For french people, here's the original request: http://ourl.ca/4881/90891;topicseen#new

Builderboy:
Ok in the first program, remove the first getcalc, add a '->M' to the end of the second getCalc statement and change the Str1 on the line after into an M

should work :) I'm on my itouch so sorry if I messed up

Quigibo:
Yeah, Str1 is just a pointer to the name of the "vPIC" string it isn't the actual data.  You need to assign the getcalc result to a variable pointer (like M in builderboy's suggestion) becasue the appvars cannot be assigned static pointers like StrXX and PicXX since they move around a lot in ram and aren't in the same place every time you execute.

DJ Omnimaga:
Ooh wow I didn't knew variables were actually pointers. I thought they could only be like one byte lenght each. I didn't knew you could use -> at the end of the GetCalc(PTR,BYTES) command.

It still doesn't work, though. Now I changed what Builderboy told me to change and I got
--- Code: ---.SCRNSHOT
StoreGDB
"vPIC"->Str1
GetCalc(Str1)
GetCalc(Str1,768)->M
conj(L6,M,768)
DispGraph
--- End code ---
And it's even worse it seems, cuz it no longer actually manages to store even a single byte of the screen data. :/

calcdude84se:
I don't think you need the first "GetCalc" (did someone already say that?) and the "DispGraph" at the end seems superfluous, but it should work. Let me try...
Also, scrnview should have that last Str1 (the one in the conj( line) be M also.
As an afterthought, though I doubt this is your problem, just be aware that if there isn't enough free ram when you try to create vPIC, nothing will actually be created (since you are then proceeding to try to write to ROM, nothing bad will happen.)

Navigation

[0] Message Index

[#] Next page

Go to full version