Link to Mod Share Mod Share

  Users Browse Upload Forums Log in

Mod Share Forums

Welcome to the Mod Share forums.

You are not logged in.

#1 2012-02-19 00:50:24

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Upload API for Kitcat

Can I get the API for Kitcat? I'm not sure how to prove that I'm the owner of it, though. Hmmmm. I only know that I'm the owner and other people will agree to me.

Last edited by GP1 (2012-02-25 22:30:57)


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#2 2012-02-19 10:20:57

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

I was able to prove you were the owner by asking LS if you were a developer of Kitcat, and he said yes, so that's good enough for me.
Your executable portion is available at [removed, if you need it, please let us know].
The site is now configured to allow uploads from that, but could you please test it?

You will get a file called uploader.exe, please put it in the working directory of your mod.
You will need the following code in Squeak:

upload
	| fName f path |
	path _  ScratchPlugin primGetFolderPath: 1.
	fName _ self projectDirectory.
	fName _ fName copyFrom: 22 to: fName size - 1.
	fName _ fName , '\' , projectName.
	self clearFile: 'file.txt'.
	f _ (FileStream fileNamed: path, '\file.txt') binary.
	f ifNil: [^ self].
	f setToEnd.
	f nextPutAll: fName.
	f close.
	ScratchPlugin primOpenURL: 'uploader.exe'.

as well as

clearFile: t1 
	| t2 t3 |
	t3 _ FileDirectory forFileName: t1.
	t3 deleteFileNamed: t1.
	t2 _ FileStream newFileNamed: t1.
	t2 close

zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#3 2012-02-20 13:56:54

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

So with the above code, I call the method "upload" in a menu or something to upload it?


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#4 2012-02-20 18:28:12

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

GP1 wrote:

So with the above code, I call the method "upload" in a menu or something to upload it?

Exactly. I made a menu option in Insanity.


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#5 2012-02-22 04:50:35

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

One problem. In the Squeak code you gave me, it gives me an error right before the *. Do I add code to it or something?


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#6 2012-02-22 11:06:38

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

GP1 wrote:

One problem. In the Squeak code you gave me, it gives me an error right before the *. Do I add code to it or something?

Sorry, there shouldn't be an * there, I think. If that doesn't work, I'll check it.


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#7 2012-02-22 14:52:29

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

jacob wrote:
GP1 wrote:

One problem. In the Squeak code you gave me, it gives me an error right before the *. Do I add code to it or something?

Sorry, there shouldn't be an * there, I think. If that doesn't work, I'll check it.

I know that the error will go away, even withour tsting it, and the code sort of makes sense


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#8 2012-02-22 16:03:16

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

OK, please let me know how it works.


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#9 2012-02-25 19:17:20

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

It doean't work. I found (i think) the error. You have a variable named fname, and your setting it to projectDirectory, then getting the size of it. Could you please give me the correct code?


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#10 2012-02-25 21:58:43

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

GP1 wrote:

It doean't work. I found (i think) the error. You have a variable named fname, and your setting it to projectDirectory, then getting the size of it. Could you please give me the correct code?

That was about the most correct code I could get...
Oh, found the problem. Save the image for end-user before running it, was annoying for me too. If it doesn't work then, then I'll need to work a bit harder.


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#11 2012-02-25 22:30:11

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

jacob wrote:
GP1 wrote:

It doean't work. I found (i think) the error. You have a variable named fname, and your setting it to projectDirectory, then getting the size of it. Could you please give me the correct code?

That was about the most correct code I could get...
Oh, found the problem. Save the image for end-user before running it, was annoying for me too. If it doesn't work then, then I'll need to work a bit harder.

I think I did save image for end user. Ill try it again.


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#12 2012-02-25 23:04:14

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

I was looking at the code, and shouldn't it be this:

upload
	| fName f path pName |
	path _  ScratchPlugin primGetFolderPath: 1.
	fName _ self projectDirectory.
	fName _ fName copyFrom: 22 to: fName size - 1.
       pName _ self projectName.
	fName _ fName , '\' , pName.
	self clearFile: 'file.txt'.
	f _ (FileStream fileNamed: path, '\file.txt') binary.
	f ifNil: [^ self].
	f setToEnd.
	f nextPutAll: fName.
	f close.
	ScratchPlugin primOpenURL: 'uploader.exe'.

I didnt look at the scratch source, but it seems like it would work.


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#13 2012-02-26 12:00:43

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

I wrote the code myself, I didn't copy Scratch's. Is uploader.exe in the same folder as the .exe and .image file? If not, you need to put it in, or it won't work.
Just click "Save image for end-user" once before trying it out, and then re-open it (be sure to save the project before uploading, too).
If that doesn't work, can I have a copy of the image so I can try implementing it myself?


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#14 2012-02-26 15:06:12

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

jacob wrote:

I wrote the code myself, I didn't copy Scratch's. Is uploader.exe in the same folder as the .exe and .image file? If not, you need to put it in, or it won't work.
Just click "Save image for end-user" once before trying it out, and then re-open it (be sure to save the project before uploading, too).
If that doesn't work, can I have a copy of the image so I can try implementing it myself?

I didn't try that. You should add code to make sure that the user saves the project. Just call saveProjectNoDiolog, or something like that.

And I know you didn't copy scratch. I meant I didn't check if the projectName was a method in the scratch source.

Last edited by GP1 (2012-02-26 15:09:22)


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#15 2012-02-26 15:28:08

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

GP1 wrote:
jacob wrote:

I wrote the code myself, I didn't copy Scratch's. Is uploader.exe in the same folder as the .exe and .image file? If not, you need to put it in, or it won't work.
Just click "Save image for end-user" once before trying it out, and then re-open it (be sure to save the project before uploading, too).
If that doesn't work, can I have a copy of the image so I can try implementing it myself?

I didn't try that. You should add code to make sure that the user saves the project. Just call saveProjectNoDiolog, or something like that.

And I know you didn't copy scratch. I meant I didn't check if the projectName was a method in the scratch source.

I think it is, because I used the Scratch source (not Scratch) in mine. Any success?


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#16 2012-02-26 17:50:28

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

jacob wrote:
GP1 wrote:
jacob wrote:

I wrote the code myself, I didn't copy Scratch's. Is uploader.exe in the same folder as the .exe and .image file? If not, you need to put it in, or it won't work.
Just click "Save image for end-user" once before trying it out, and then re-open it (be sure to save the project before uploading, too).
If that doesn't work, can I have a copy of the image so I can try implementing it myself?

I didn't try that. You should add code to make sure that the user saves the project. Just call saveProjectNoDiolog, or something like that.

And I know you didn't copy scratch. I meant I didn't check if the projectName was a method in the scratch source.

I think it is, because I used the Scratch source (not Scratch) in mine. Any success?

Can't try until 6pm. I'm on a tablet right now.


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#17 2012-02-26 17:52:37

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

GP1 wrote:
jacob wrote:
GP1 wrote:
jacob wrote:

I wrote the code myself, I didn't copy Scratch's. Is uploader.exe in the same folder as the .exe and .image file? If not, you need to put it in, or it won't work.
Just click "Save image for end-user" once before trying it out, and then re-open it (be sure to save the project before uploading, too).
If that doesn't work, can I have a copy of the image so I can try implementing it myself?

I didn't try that. You should add code to make sure that the user saves the project. Just call saveProjectNoDiolog, or something like that.

And I know you didn't copy scratch. I meant I didn't check if the projectName was a method in the scratch source.

I think it is, because I used the Scratch source (not Scratch) in mine. Any success?

Can't try until 6pm. I'm on a tablet right now.

That may be an issue, as I am 3 hours ahead of you timewise. I'll probably be up at 9, but not much after that, so please let me know quickly or I can't respond until tomorrow.


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#18 2012-02-26 18:05:25

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

jacob wrote:
GP1 wrote:
jacob wrote:
GP1 wrote:

I didn't try that. You should add code to make sure that the user saves the project. Just call saveProjectNoDiolog, or something like that.

And I know you didn't copy scratch. I meant I didn't check if the projectName was a method in the scratch source.

I think it is, because I used the Scratch source (not Scratch) in mine. Any success?

Can't try until 6pm. I'm on a tablet right now.

That may be an issue, as I am 3 hours ahead of you timewise. I'll probably be up at 9, but not much after that, so please let me know quickly or I can't respond until tomorrow.

Are you in the U.S.? ill do it as soon as I log on. I tried to install Squeak for Android, but I gues it doesnt work with Android 1.5 sad

Last edited by GP1 (2012-02-26 18:06:12)


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#19 2012-02-26 18:11:24

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

GP1 wrote:
jacob wrote:
GP1 wrote:
jacob wrote:

I think it is, because I used the Scratch source (not Scratch) in mine. Any success?

Can't try until 6pm. I'm on a tablet right now.

That may be an issue, as I am 3 hours ahead of you timewise. I'll probably be up at 9, but not much after that, so please let me know quickly or I can't respond until tomorrow.

Are you in the U.S.? ill do it as soon as I log on. I tried to install Squeak for Android, but I gues it doesnt work with Android 1.5 sad

Yes, I live in the US. I updated my location to say "Eastern United States". Anyway, I can help tomorrow if I have to go to bed before you can test it today.


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#20 2012-02-26 18:24:20

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

jacob wrote:
GP1 wrote:
jacob wrote:
GP1 wrote:

Can't try until 6pm. I'm on a tablet right now.

That may be an issue, as I am 3 hours ahead of you timewise. I'll probably be up at 9, but not much after that, so please let me know quickly or I can't respond until tomorrow.

Are you in the U.S.? ill do it as soon as I log on. I tried to install Squeak for Android, but I gues it doesnt work with Android 1.5 sad

Yes, I live in the US. I updated my location to say "Eastern United States". Anyway, I can help tomorrow if I have to go to bed before you can test it today.

Yeah. I have school tomorrow (8-2:30), so I won't be on untill 3, I ride a bus. I really got to get a universal clock app........


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#21 2012-02-26 18:41:03

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

GP1 wrote:
jacob wrote:
GP1 wrote:
jacob wrote:

That may be an issue, as I am 3 hours ahead of you timewise. I'll probably be up at 9, but not much after that, so please let me know quickly or I can't respond until tomorrow.

Are you in the U.S.? ill do it as soon as I log on. I tried to install Squeak for Android, but I gues it doesnt work with Android 1.5 sad

Yes, I live in the US. I updated my location to say "Eastern United States". Anyway, I can help tomorrow if I have to go to bed before you can test it today.

Yeah. I have school tomorrow (8-2:30), so I won't be on untill 3, I ride a bus. I really got to get a universal clock app........

Woohoo! This is the first topic on these forums to reach two pages!
Anyway, I'm getting home tomorrow late (track meet), but can work at school, as the programming teacher never assigns us anything.


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#22 2012-02-26 22:45:57

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

jacob wrote:
GP1 wrote:
jacob wrote:
GP1 wrote:

Are you in the U.S.? ill do it as soon as I log on. I tried to install Squeak for Android, but I gues it doesnt work with Android 1.5 sad

Yes, I live in the US. I updated my location to say "Eastern United States". Anyway, I can help tomorrow if I have to go to bed before you can test it today.

Yeah. I have school tomorrow (8-2:30), so I won't be on untill 3, I ride a bus. I really got to get a universal clock app........

Woohoo! This is the first topic on these forums to reach two pages!
Anyway, I'm getting home tomorrow late (track meet), but can work at school, as the programming teacher never * us anything.

Awww, I want a programming teacher. BTW, it doesn't work. I'll take the source from Insanity if I can..
EDIT: got it working. the *s needed to be replaced with asString:

upload
	| t1 t2 t3 |
	t3 _ ScratchPlugin primGetFolderPath: 1.
	t1 _ self projectDirectory asString.
	t1 _ t1 copyFrom: 22 to: t1 size - 1.
	t1 _ t1 , '\' , projectName asString.
	self clearFile: 'file.txt'.
	t2 _ (FileStream fileNamed: t3 , '\file.txt') binary.
	t2 ifNil: [^ self].
	t2 setToEnd.
	t2 nextPutAll: t1.
	t2 close.
	ScratchPlugin primOpenURL: 'uploader.exe'

Last edited by GP1 (2012-02-26 22:58:24)


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#23 2012-02-26 23:05:03

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

I need the exe again. I got it to work, but now the exe is having problems.


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

#24 2012-02-27 11:28:05

jacob
Mod Share Team (now jvvg)
From: Eastern United States
Registered: 2011-12-25
Posts: 375
Website

Re: Upload API for Kitcat

Link is http://dl.dropbox.com/u/15819889/Insani … loader.exe.
Also, the .exe is fine, it was the PHP on this end that had the problem, and I think I fixed it. Btw, I had to delete that test project.
Also, thanks for letting me know, as the error was also in the Insanity uploader (I wrote something that didn't work, and it appears I deleted a bit more than that).

Stupid forum software, censored out the word a s s i g n because of the first three letters.


zwgbewe1gbewzygbewizgbew
Fear me, all powerful forum moderator! tongue

Offline

#25 2012-02-27 11:57:47

GP1
Mod Share-er
From: Seattle, WA
Registered: 2012-01-15
Posts: 35

Re: Upload API for Kitcat

Yeah, I meant to tell you to delete that project.
And I kinda figured it was either a php error or an exe error, because the error appeared on the page said it could not find the project.


Im back, and Kitcat 1.3 Modcamp has been started again! Want to suggest a mod? Post here!

Offline

Board footer

This is part of Mod Share v4.0