[Solved: Serious bug with Turkish Keyboard] Extension blocks not appearing

talhakaya

  • *
  • Posts: 25
Hey all, I've been developing an engine extension for Stencyl. I'm using Stencyl 3.1, and having some problems with it.
I enabled Tile API for testing purposes, and the result is this:

http://i.imgur.com/xl65UqM.png

As you see here, only one block of Tile API is appearing. There should be more. There's also no Tile API blocks in Custom section. Is this normal? I've tried it on another machine and it looks like this also. Am I missing something?

http://i.imgur.com/DW3Zd6F.png

I think extensions should also appear in this list but they never do.

So as I said, I've been developing my own extension, which works perfectly on Stencyl 3.0, but not showing the custom blocks on Stencyl 3.1. But I thought I should resolve the Tile API issue first, so that I could get a better answer for m extension afterwards.

Any kind of feedback, question is helpful as I am clueless right now. Thanks!

Edit: Can someone please tell me if Tile API is working correctly on my machine? As I mentioned, only one block is apparent.

« Last Edit: June 16, 2014, 05:31:50 am by talhakaya »

captaincomic

  • *
  • Posts: 6108
Hi,
which build are you using? I don't know why the extension blocks would not appear, but the Tile API has been added to the core palette under Scene > World, so the extension is not needed anymore with the latest build.
 

talhakaya

  • *
  • Posts: 25
I'm using the 7305 build, that should be the latest build as of now. I didn't know that Tile API wasn't needed anymore, but I was just using it to understand whether or not Stencyl is working fine on my computer. Thanks for the help.

So enough with the Tile API stuff. I created a new test extension. Just copied and pasted the "Test" extension. Now the question is: why would Stencyl 3.0 see the extension blocks (under the Custom section) and 3.1 wouldn't see them (neither in Extension section nor Custom section). I didn't change the .xml much, but  I'll post it anyway if that might be helpful:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<palette>
<block tag="test-print" spec="print %0 to console" code="Test.print(~);" type="action" color="gray" returns="void">
<fields>
<text order="0"></text>
</fields>
</block>
</palette>

Tell me if you want me to show more stuff or upload the extension.

Do I need to do anything else other than creating the extension (changing info.txt), installing and enabling it in the project, and restarting the project? What might have gone wrong?

Note that the extension works in Stencyl 3.0. Is this a bug?

Also I'd very much like to test Stencyl 3.0 on my machine, but there's no official way to download older versions?

Again, any kind of clue or opinion is helpful. Thanks.

captaincomic

  • *
  • Posts: 6108
Idk, it might be a bug. Please post your logs (Debug -> Logs -> Generate Logs.)

There are currently no 3.0 installers available, but I don't know why.
http://community.stencyl.com/index.php/topic,5530.msg35746.html#msg35746

talhakaya

  • *
  • Posts: 25
Here the logs are. Hope they help!

Note that the test extension I created is apparent in the latest log, and it's named "testnew".

captaincomic

  • *
  • Posts: 6108
Here's the problem:
Quote
java.lang.IllegalArgumentException: No enum const class stencyl.sw.editors.snippet.designer.Block$BlockType.ACTÝON
   at java.lang.Enum.valueOf(Unknown Source)
   at stencyl.sw.editors.snippet.designer.Block$BlockType.valueOf(Block.java:79)
   at stencyl.sw.editors.snippet.designer.DefinitionParser.readExternalDefinitions(DefinitionParser.java:110)
   at stencyl.sw.editors.snippet.designer.DefinitionParser.addDefinitionsForExtension(DefinitionParser.java:47)
   at stencyl.sw.app.tasks.OpenGameTask$3.run(OpenGameTask.java:220)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$000(Unknown Source)
   at java.awt.EventQueue$1.run(Unknown Source)
   at java.awt.EventQueue$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
That should be BlockType.ACTION instead of BlockType.ACTÝON. No idea why that is happening though.

talhakaya

  • *
  • Posts: 25
It's awesome that you showed me this, thanks a lot! The weird char error must be about the Turkish language. (There are two distinct letters in Turkish, i and ı, which has capital forms of these respectively: İ and I. I know it's weird but it's just how Turkish is.)

I'll try to change all 'i's with 'ı's and that should solve it. Going to update here with the result.

Thanks a lot for the help!

talhakaya

  • *
  • Posts: 25
Okay problem solved. Thank you very very much captaincomic!!! The problem was indeed caused by Turkish alphabet. It had nothing to do with Stencyl version differences (3.0 and 3.1).

The solution for Turkish Stencyl users: in blocks.xml file, "type" and "returns" (also possibly "color") fields should be written in CAPITAL LETTERS. Example:
Code: [Select]
<block tag="touch-lite" spec="set %0 as a Light Weight Touch Object" code="TouchCoreAPI.makeLightWeight(~);" type="ACTION" color="gray" returns="VOID">
My assumption is, Stencyl is making blocks.xml case-insensitive for at least these fields (type, returns, color) and using it that way. It clashes with Turkish alphabet because in our language, i's capital is İ, and ı's capital is I.

So it seems like Stencyl couldn't pass The Turkish Test  :)
http://blog.codinghorror.com/whats-wrong-with-turkey/

I think Stencyl developers should be aware of this as I think this is a bug to note down.

captaincomic

  • *
  • Posts: 6108
Okay, that explains it :)

I'll guess it will be an easy fix (using toUpperCase(Locale.ENGLISH)).

talhakaya

  • *
  • Posts: 25
Glad that the solution will be easy :)

Also note that this bug is not only affecting extension developers like me, it's affecting every Turkish Stencyl user who use extensions in their games. Extensions just don't work right on Turkish computers.

Also the devs should consider the UI glitches in Turkish, such as these:



Notice the weird I's.

captaincomic

  • *
  • Posts: 6108
The extension block bug and the UI glitch in your screenshot should be fixed now. If you notice anything else that doesn't work or looks strange, let me know.

talhakaya

  • *
  • Posts: 25
Did you guys release a new version of Stencyl? Will it work when I install Stencyl again?

captaincomic

  • *
  • Posts: 6108
Ah, sorry, forgot to say: The fix is in the private build, it will become public with version 3.2.

talhakaya

  • *
  • Posts: 25
Okay, thanks, looking forward to it!

talhakaya

  • *
  • Posts: 25
Here are more bugs from Turkish Stencyl.

First one is the errors that pop up in the logs. I have not experienced a bug from these errors, but I'm pretty sure these are not supposed to happen, because all errors have the Turkish letter "ı" in all of them.

The second one is a UI glitch. Instead of [MISSING] it should say LIST.

Cheers.