This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-24 22:28:27

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Panther Help Needed Very Badly!!!

OK, I might as well tell the whole story.  Brace yourself.

I was messing around in Scratch and accidentally messed it up completely, then accidentally chose 'save changes'.  Just like that, Scratch no longer works and I lose many, many blocks I made (I think at least 30, luckily all upladed at the block library).

I needed to make a project that could save and read text files anyway, so I looked at many mods.  I chose Panther, and began programming in it.

(I would just like to say, in case one of its developers reads this thread, that Panther is truly amazing.  My only complaint are the glitches--one, the checkbox reporter glitch, and two, the dialog blocks have many many glitches, such as if you use stop sign while they are up, or if you use them in presentation mode.)

But now I'm done with one of the projects (I'm making two) and I turned to JSO's method of compiling Scratch projects as EXEs on Windows using Iexpress.  I compiled the EXE, but there was the problem, right there.  I should have seen it coming.

Whenever you open a project in Scratch, it does just that--opens the project.  But whenever you open a project in Panther, it just opens the default project.  Hence my problem--it wouldn't automatically open my project like it should.

Plus, with some built-in dialogs in Panther, things are getting a little troubling.  Before I compile the EXE, I would like to make the following changes to the code (I know how to open the source browser):

Open my project, not the default (CRITICAL!!!)
Make it so that when you exit presentation mode, it closes Panther (Note:  I already know how to do this.)
Disable the news dialog that appears at the beginning, as well as the menu that pops up if it can't connect
Set it so that file I/O is automatically set to 'Always'  (I promise I'm not doing this for nefarious purposes  wink  )

Please respond with help, even if it's just a faint idea of what I might need to do.

Offline

 

#2 2011-08-25 12:30:33

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Please!  I really need help!  *bumps*

Offline

 

#3 2011-08-25 13:04:43

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Well, I always use "Open..." from the file menu.

Offline

 

#4 2011-08-25 13:26:58

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

scimonster wrote:

Well, I always use "Open..." from the file menu.

Well, yeah, normally that would work.  But for what I'm doing, it HAS to open the project automatically.

Offline

 

#5 2011-08-25 13:38:09

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

You're trying to make a version of Panther that opens in fullscreen and closes in fullscreen? Let me know if you get it to work, I've not quite managed it yet.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#6 2011-08-25 13:45:25

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

sparks wrote:

You're trying to make a version of Panther that opens in fullscreen and closes in fullscreen? Let me know if you get it to work, I've not quite managed it yet.

Well, not quite.  I've created an application that I want to open just in fullscreen, as an EXE.  The aforementioned compiling method works for Scratch, but since Panther always opens the default project no matter what, the EXE just opens the default project.  I want to make it so that it will open in fullscreen, have none of those newsy things, have file I/O automatically set to Always, and instead of using the arrow to exit presentation mode, have it exit the program.

Since I'm the only Panther-exclusive feature I'm using is the file blocks, perhaps it would be best just to modify Scratch, add those blocks, and run Scratch.exe?

EDIT:  Looks like I'm going to have to, since the Panther-compiled EXE doesn't even open in fullscreen.   hmm

EDIT2:  BTW, Sparks, if you want to know the methods that change the view mode (quarter-normal-presentation), they're all under ScratchFrameMorph.

enterNormalMode
enterPresentationMode
enterQuarterMode
enterQuarterModeIfSmallScreen (does exactly what it says)
exitPresentationMode

Now, I guess what I need to know is:
How to open a project without the Open screen (so I can automatically open a project, and set it to presentation mode.  I'll put them in something like ScratchFrameMorph initialize).
Where it tries to access the news, so I can comment that out.
How to set File I/O to Always automatically without the dialog.

Otherwise, I'll just find the code for the file blocks, add them to Scratch, and do it that way.

EDIT3:  BTW, Sparks, is anyone ever going to update the Panther news?  It hasn't been updated for more than a year...

Last edited by Greenatic (2011-08-25 14:06:28)

Offline

 

#7 2011-08-25 14:12:41

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

No need to modify Scratch! It would be too much of a hassle and probably wouldn't work.

1. You'll have to either modify Panther to allow opening of PT files on startup (it currently only allows SB's), or change your projects's extension to SB. If you're interested in the first, it's in the startup method. Find '.sb' and change it to '.pt'. For the second use command prompt or my extension changer widget!

2. Scratch2Exe automatically opens the project in presentation mode. If you're not using Scratch2Exe, you'll need to again modify the startup code to open in presentation mode regardless of what command-line arguments have been given.

3. To make it close when in presentation mode, navigate to
UI-Panes > PresenterMorph > button actions > exitPresentation
and replace the code with Smalltalk snapshot: false andQuit: true

4. If you want it to look really professional and avoid the green flag and stop buttons, navigate again to
UI-Panes > PresenterMorph > button actions > initialization > initialize
and delete the shoutGo and stopAll buttons. Leave the ext button though, or you won't be able to close Panther anymore!

Good luck, and just call if you need explaining  smile

Offline

 

#8 2011-08-25 14:22:21

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

LS97 wrote:

No need to modify Scratch! It would be too much of a hassle and probably wouldn't work.

1. You'll have to either modify Panther to allow opening of PT files on startup (it currently only allows SB's), or change your projects's extension to SB. If you're interested in the first, it's in the startup method. Find '.sb' and change it to '.pt'. For the second use command prompt or my extension changer widget!

2. Scratch2Exe automatically opens the project in presentation mode. If you're not using Scratch2Exe, you'll need to again modify the startup code to open in presentation mode regardless of what command-line arguments have been given.

3. To make it close when in presentation mode, navigate to
UI-Panes > PresenterMorph > button actions > exitPresentation
and replace the code with Smalltalk snapshot: false andQuit: true

4. If you want it to look really professional and avoid the green flag and stop buttons, navigate again to
UI-Panes > PresenterMorph > button actions > initialization > initialize
and delete the shoutGo and stopAll buttons. Leave the ext button though, or you won't be able to close Panther anymore!

Good luck, and just call if you need explaining  smile

LS97, I said I already knew #3.  I read it in another of your posts  smile

Thanks so much LS97.  Two more things though--you didn't mention a fix to these problems:

1.  I need to make it so that Panther doesn't try to download the news,
2.  Make it so that File I/O is automatically set to 'Always'.

EDIT2:  And where is the startup method?
EDIT3:  Is it the ScratchFrameMorph startup method?

EDIT4:  Evidently, it is.  But I get an error:  "Cannot write to a read-only file".  Does that mean I don't have admin permissions?

Last edited by Greenatic (2011-08-25 14:49:09)

Offline

 

#9 2011-08-25 14:57:42

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

^^
Ouch  hmm

Try moving Panther into another folder (your desktop) and save there.

For your second #1, it's also in the startup method (which you found  smile ). It should be pretty simple to find it, it's got a descriptive name.

And #2, I don't know Panther so I have no clue. Maybe try looking in initialize? It should have code for setting the variable the first time.

Last edited by LS97 (2011-08-25 14:58:02)

Offline

 

#10 2011-08-25 14:58:35

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

OK, I'm not going to do 5th edit.  New post.   tongue

I tried changing the ScratchFrameMorph > all > startup like you said, LS97, to allow .pt files.  I changed it to

Code:

t2 _ t1
                detect: [:t7 | ((t7 asLowercase endsWith: '.sb')
                        or: [t7 asLowercase endsWith: '.scratch'])
                        or: [t7 asLowercase endsWith: '.pt']]
                ifNone: [].

but it's still opening the default project.  What did I do wrong?

Offline

 

#11 2011-08-25 15:08:31

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Greenatic wrote:

OK, I'm not going to do 5th edit.  New post.   tongue

I tried changing the ScratchFrameMorph > all > startup like you said, LS97, to allow .pt files.  I changed it to

Code:

t2 _ t1
                detect: [:t7 | ((t7 asLowercase endsWith: '.sb')
                        or: [t7 asLowercase endsWith: '.scratch'])
                        or: [t7 asLowercase endsWith: '.pt']]
                ifNone: [].

but it's still opening the default project.  What did I do wrong?

Change the code to what it was before and replace .scratch with .pt! No need for those old 1.0 filenames anymore, since you're using PT anyway.

Offline

 

#12 2011-08-25 15:11:47

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

LS97 wrote:

Greenatic wrote:

OK, I'm not going to do 5th edit.  New post.   tongue

I tried changing the ScratchFrameMorph > all > startup like you said, LS97, to allow .pt files.  I changed it to

Code:

t2 _ t1
                detect: [:t7 | ((t7 asLowercase endsWith: '.sb')
                        or: [t7 asLowercase endsWith: '.scratch'])
                        or: [t7 asLowercase endsWith: '.pt']]
                ifNone: [].

but it's still opening the default project.  What did I do wrong?

Change the code to what it was before and replace .scratch with .pt! No need for those old 1.0 filenames anymore, since you're using PT anyway.

Oh, wow.  I didn't know what .scratch was, I was worried it was some sort of critical file XD

EDIT2:  See ^ 3 posts.  I still have 2 problems.
EDIT3:  Missed one of your posts.  Sorry.
EDIT4:  "Cannot write to read-only file" error fixed.  I had a Panther browser open in two different windows; I closed one and I was fine.

Last edited by Greenatic (2011-08-25 15:15:43)

Offline

 

#13 2011-08-25 15:20:58

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

LS97, it still won't open .pt!

Code:

t2 _ t1
                detect: [:t7 | (t7 asLowercase endsWith: '.sb')
                        or: [t7 asLowercase endsWith: '.pt']]
                ifNone: [].

Last edited by Greenatic (2011-08-25 15:22:39)

Offline

 

#14 2011-08-25 15:21:35

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Greenatic wrote:

LS97, it still won't open .pt!

Then I guess just change the file to SB. It'll work just fine.

Offline

 

#15 2011-08-25 15:23:34

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

LS97 wrote:

Greenatic wrote:

LS97, it still won't open .pt!

Then I guess just change the file to SB. It'll work just fine.

Can I just rename it, or do I have to do something special?

EDIT2:  Mwahahaha! XD  I turned off fillscreen, then made the File I/O dialog show itself.  A couple of alt-clicks, debug > inspect morph, and I'm in!  I'll post the method if I find it.

Last edited by Greenatic (2011-08-25 15:30:22)

Offline

 

#16 2011-08-25 15:30:52

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Greenatic wrote:

LS97 wrote:

Greenatic wrote:

LS97, it still won't open .pt!

Then I guess just change the file to SB. It'll work just fine.

Can I just rename it, or do I have to do something special?

As I said before, just use my extension changer widget!

And yeah nothing special. They're all the same old lame file type. I'm not a fan of Panther at all  roll

Offline

 

#17 2011-08-25 15:37:05

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Help! All my sprites dissappeared after testing my game on Panther 1.0 and I've tried restarting panther but the sprites won't come back! (You can still play the fully functional game in the window-thingy somehow???)


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#18 2011-08-25 15:53:03

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Borrego6165 wrote:

Help! All my sprites dissappeared after testing my game on Panther 1.0 and I've tried restarting panther but the sprites won't come back! (You can still play the fully functional game in the window-thingy somehow???)

You mean they all turn into grey boxes?  I got that once.  Here's how you fix it:

1.  On every sprite, use a |go to x:( ) y:( )| block.
2.  Right-click on all the shown variables.  Select hide.  If you need them to be shown at the start of the project, use a script like this:

When Green Flag Clicked
show {variable}
set layout of {variable} to {layout}
move {variable} to x:( ) y:( )

You'll need to do all of those.
3.  Make sure all the variables are hidden.  Save.
4.  Re-open the project.

That should work.

Last edited by Greenatic (2011-08-25 15:53:36)

Offline

 

#19 2011-08-25 16:14:27

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Found it!

To make it so you don't have to ask for File I/O, go to ScriptableScratchMorph > other ops > askForFileIO and replace the code with

Code:

^ true

Offline

 

#20 2011-08-25 16:17:30

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

LS97, I changed it to a .sb and it STILL opens the default project!?!?!?!?

Offline

 

#21 2011-08-25 16:20:35

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Greenatic wrote:

LS97, I changed it to a .sb and it STILL opens the default project!?!?!?!?

What exactly are you doing to open a project?

Offline

 

#22 2011-08-26 09:35:44

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

LS97 wrote:

Greenatic wrote:

LS97, I changed it to a .sb and it STILL opens the default project!?!?!?!?

What exactly are you doing to open a project?

It's saved to my desktop, so I go to my desktop and double-click it.  (I'm not using the "Open" option in Panther--just opening it normally)

Offline

 

#23 2011-08-26 09:59:13

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Greenatic wrote:

LS97 wrote:

Greenatic wrote:

LS97, I changed it to a .sb and it STILL opens the default project!?!?!?!?

What exactly are you doing to open a project?

It's saved to my desktop, so I go to my desktop and double-click it.  (I'm not using the "Open" option in Panther--just opening it normally)

Then that should work. Please paste the startup code you edited for Panther here, and I'll fix it and post it back  smile

Offline

 

#24 2011-08-26 10:02:36

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

Code:

t2 _ t1
                detect: [:t7 | (t7 asLowercase endsWith: '.sb')
                        or: [t7 asLowercase endsWith: '.pt']]
                ifNone: [].

Offline

 

#25 2011-08-26 15:15:46

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Panther Help Needed Very Badly!!!

bump

Offline

 

Board footer