Skip to content
This repository

# not working in editor when being accessed through a modifier (alt etc.) #147

Open
PragTob opened this Issue March 13, 2012 · 17 comments

3 participants

Tobias Pfeiffer eaffleck Tim Inman
Tobias Pfeiffer
Collaborator

I haven't reproduced the problem yet but this support question says that you are unable to use # in the editor when you have to access the # through a modifier, for instance alt + 3 on a Mac with UK keyboard settings.

eaffleck

Confirmed and reproducable with the Mac set to British keyboard (is fine with US and 'Australian' keyboard, which is US anyway)

Also I think this is a duplicate of issue #14

Tobias Pfeiffer
Collaborator

Thanks for pointing the duplication out, didn't look that far back :-< !

When i got the time I'll see if I can find a non Mac layout that uses Alt as a modifier (can't seem to find one on my german keyboard, we us ALT GR).

Tim Inman

I can confirm that on a mac book pro, UK keyboard, Snow Leopard, Shoes 3.0 and Hackety 1.0, there seems to be no way to acheive '#'. Alt + 3 is the default which should work - it doesn't - either does alt + shift + 3. Still a bug.

Tobias Pfeiffer
Collaborator

Hey @thehack could you please try it with the hacketyhack version from the current master as I really can't reproduce it right now with this. Just run shoes h-ety-h.rb - that would be a great help! Thank you!

Tim Inman

Well this is strange.

When I tested it this morning I was on the latest master, because I had cloned a fresh repository. I made sure by checking in finder that the creation dates on the files were recent and they were.

Just to be sure, after receiving this message, I wiped out and re-cloned the hackety repo. I ran 'git branch' to make sure it was master - it was. However now, whenever I open h-ety-h.rb in Shoes, the application crashes after about 3 seconds. I tried a full reboot and get the same results!

Tobias Pfeiffer
Collaborator

Oh well this is really strange... how does it crash? With a segfault or an error in the shoes console? Could you please paste the crashlog/post a screen of the shoes error console (maybe in a different issue?). That would help a lot to figure out what's going.

Thanks.

Tim Inman

yes, I'll do that as soon as I get a chance.

Tobias Pfeiffer
Collaborator

Thank you very much - you are a great help! :-)

Tim Inman

OK, If I run it with shoes, It just loads and eventually crashes but I get no console output, but if I run it from shoes-launch, and then try to open the editor, I get:

/Applications/Shoes.app/Contents/MacOS/shoes-launch /Users/timinman/hacketyhack/h-ety-h.rb
/Applications/Shoes.app/Contents/MacOS/ruby/gems/1.9.1/gems/hpricot-0.8.1/lib/hpricot/blankslate.rb:23: warning: undefining `object_id' may cause serious problems
2012-03-20 17:47:04.106 shoes-bin[349:903] *** __NSAutoreleaseNoPool(): Object 0x113babbb0 of class NSCFData autoreleased with no pool in place - just leaking
2012-03-20 17:47:04.128 shoes-bin[349:903] *** __NSAutoreleaseNoPool(): Object 0x100c70c60 of class NSCFData autoreleased with no pool in place - just leaking
2012-03-20 17:47:04.148 shoes-bin[349:903] *** __NSAutoreleaseNoPool(): Object 0x100c70d90 of class NSCFData autoreleased with no pool in place - just leaking
2012-03-20 17:47:04.166 shoes-bin[349:903] *** __NSAutoreleaseNoPool(): Object 0x113bb78f0 of class NSCFData autoreleased with no pool in place - just leaking
2012-03-20 17:47:04.195 shoes-bin[349:903] *** __NSAutoreleaseNoPool(): Object 0x100c6ffb0 of class NSCFData autoreleased with no pool in place - just leaking
2012-03-20 17:47:04.228 shoes-bin[349:903] *** __NSAutoreleaseNoPool(): Object 0x100c1e700 of class NSCFData autoreleased with no pool in place - just leaking
/Applications/Shoes.app/Contents/MacOS/ruby/lib/universal-darwin11.1.0/enc/utf_16be.bundle: warning: already initialized constant UTF_16BE
/Applications/Shoes.app/Contents/MacOS/ruby/lib/universal-darwin11.1.0/enc/utf_16le.bundle: warning: already initialized constant UTF_16LE
/Applications/Shoes.app/Contents/MacOS/ruby/lib/universal-darwin11.1.0/enc/utf_32be.bundle: warning: already initialized constant UTF_32BE
/Applications/Shoes.app/Contents/MacOS/ruby/lib/universal-darwin11.1.0/enc/utf_32le.bundle: warning: already initialized constant UTF_32LE
/Users/timinman/hacketyhack/app/ui/mainwindow.rb:56: warning: already initialized constant APP
-e: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [universal.x86_64-darwin11.1.0]

-- control frame ----------

c:0001 p:0000 s:0002 b:0002 l:0008a8 d:0008a8 TOP

-- C level backtrace information -------------------------------------------

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

/Applications/Shoes.app/Contents/MacOS/shoes-launch: line 9: 349 Abort trap DYLD_LIBRARY_PATH="$APPPATH" PANGO_RC_FILE="$APPPATH/pangorc" SHOES_RUBY_ARCH="universal-darwin11.1.0" ./shoes-bin "$@"

Tim Inman

This is all very puzzling to me, because as far as I can tell, my configuration hasn't changed since this morning when it didn't produce the '#', but also didn't seg-fault, which is a much bigger issue. The other thing I should have mentioned is that the 'about' and 'cheat' links work, but other than that the window is empty.

I have a screenshot of the hackety console as well. I can't show you the console after I click on the editor, because it immediately shuts down.

Here's a link to the image

Tobias Pfeiffer
Collaborator

Hey!
Thanks for uploading the screen! As far as I can tell it is probably related to a non ASCII character saved in a script you wrote, which is most likely related to #139 . You can temporarily fix this by going into your hacketyhack folder (I guess that under Mac OSX it's ~/.hacketyhack at least it is under Linux) and deleting the scripts that you saved there.

Then we can take another stab at alt + 3. However my next answer will most likely be more than a day in the future, traveling from Sweden to Germany with a lot of luggage :-)

Cheers

Tim Inman

Enjoy your travels.

Tobias Pfeiffer
Collaborator

Hey thanks I did though I'm still exhausted from all the cleaning etc. :-)

Did you get to try it out another time? Apparently #139 seems to be a bigger problem than I thought maybe I can get to it, I'll see. Confirmation of this issue right here would most certainly be nice though :-)

Tim Inman

Yes, you were dead-on! I deleted the projects in my .hacketyhack folder and it fixed the crashing issue.
I still cant make the '#', though.

Tobias Pfeiffer
Collaborator

Ahh this is so weird... I really can't reproduce here (Linux Mint, builds upon Ubuntu). I set my keyboard settings to United Kingdom Macintosh and I can make # with the Alt key to the right of my space bar (+ 3) everywhere (including hacketyhack) and nowhere with the alt key to the left of my spacebar (+3).

So it appears I'll see if I can "borrow" a Macbook from a friend :-/

we could try another thing though. It would be helpful if you could go to hacketyhack/app/ui/editor/editor.rb and insert the following line at line number 348: debug key

So it would look like:

  def onkey(key)
    debug key
    case key

and then try to make # with Alt + 3 and tell me what the output on the shoes console is (you reach it through Alt + /) maybe then I could try to come up with a fix though it's not ideal without having a way to verify it :-/

Thank you yo much for helping me figure this one out!

Tim Inman

Here goes:

console screenshot

Tobias Pfeiffer
Collaborator

Thank you!

Pretty much what I expected/feared though. Could also be a shoes problem.. I need to investigate this further. I'll report back here with my findings :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.