Thanks Eliot. Your blind fix works :)
Here is how to make an Etoys script if you want to test yourself:
* right-click (or cmd/alt click) on any object (e.g., a sketch, window, button, about any Morph). Its halo pops up.
* click the cyan "viewer" halo handle. You get a viewer for the object
* drag out a command tile (those with the yellow exclamation mark button to the left). That creates a script.
Before, this would give a walkback. With your fix, it works as expected.
I just committed the fix. Ah, I see the commit message came in already. Cool.
Btw, I *love* how straight-forward it is to get such simple fixes into Etoys now. Much less cumbersome than pushing a changeset to the update stream. Everyone should try it. If you commit to the etoysinbox, that does no harm at all :)
- Bert -
On 03.05.2010, at 03:32, Eliot Miranda wrote:
> Hi Bert,
>
> there are 2.5 ways to fix this. 1. change senders of selector:arguments:precedence:temporaries:block:encoder:primitive: to send selector:arguments:precedence:temporaries:block:encoder:primitive:properties: with a new AdditionalMethodState (silly).
> 2a add the initialization of MethodNode's properties to selector:arguments:precedence:temporaries:block:encoder:primitive: (find attached)
> 2b implement selector:arguments:precedence:temporaries:block:encoder:primitive: in terms of selector:arguments:precedence:temporaries:block:encoder:primitive:properties: passing a new AdditionalMethodState.
>
> I'll leave to to you to implement 2b if you prefer it.
>
> Beware, this is a completely untested fix because I haven't yet reproduced the bug, but it has a good chance of being correct.
>
> best
> Eliot
>
> On Sun, May 2, 2010 at 6:13 PM, Eliot Miranda <eliot.miranda(a)gmail.com> wrote:
> Hi Bert,
>
> I've downloaded the dev package but so far haven't figured out how to reproduce. Let me know.
>
> best
> Eliot
>
> On Sat, May 1, 2010 at 11:15 AM, Bert Freudenberg <bert(a)freudenbergs.de> wrote:
> On 01.05.2010, at 18:17, Ricardo Moran wrote:
>> Hi guys, I just wanted to tell you the new dev image throws a DNU when I try to create a script by throwing a tile in the world.
>
>
> Something to do with nil method properties. Eliot, can you take a look? See attached debug log, and let me know if you need help reproducing.
>
> Dev package is at http://etoys.squeak.org/download/
>
> - Bert -
>
>
>
>
>
> <MethodNode-selectorargumentsprecedencetemporariesblockencoderprimitive.st>
On 02.05.2010, at 11:42, commits(a)source.squeak.org wrote:
>
> Karl Ramberg uploaded a new version of System to project Etoys:
> http://source.squeak.org/etoys/System-kfr.4.mcz
Yay! :)
And I could just load updates and get it. It's working!
Do we want to remove the question to load the latest packages? Or make it a preference?
> ==================== Summary ====================
>
> Name: System-kfr.4
> Author: kfr
> Time: 2 May 2010, 1:42:52 pm
> UUID: da25f7c9-3411-2341-adc0-d99de92c51e2
> Ancestors: System-kfr.3
>
> Add preference useLocale to language menu when noviceMode is off.
You need to use #eToyFriendly if this should not appear in a release. The #noviceMode preference is always off in the Etoys image.
> I prefer to use english language and it was a little painful to set this...
What exactly is painful? Once you toggle the preference and save the image, it should stay as it is?
> + ----- Method: Project>>toggleUseLocale (in category 'language') -----
> + toggleUseLocale
> +
> + ^ Preferences setPreference: #useLocale toValue: ((Preferences useLocale == true) not)
You could use "Preferences togglePreference: #useLocale" here. Also, the "== true" is unnecessary :)
- Bert -
Karl Ramberg uploaded a new version of System to project Etoys:
http://source.squeak.org/etoys/System-kfr.6.mcz
==================== Summary ====================
Name: System-kfr.6
Author: kfr
Time: 2 May 2010, 10:38:53 pm
UUID: 179bb06c-dbca-204b-b4d6-d5f539fe957d
Ancestors: System-bf.5
Fix a few things from System-kfr.4 per Berts suggestion
=============== Diff against System-bf.5 ===============
Item was changed:
----- Method: Project>>chooseNaturalLanguage (in category 'language') -----
chooseNaturalLanguage
"Put up a menu allowing the user to choose the natural language for the project"
| aMenu availableLanguages item |
Cursor wait showWhile: [
aMenu _ MenuMorph new defaultTarget: self.
aMenu addTitle: 'choose language' translated.
aMenu lastItem setBalloonText: 'This controls the human language in which tiles should be viewed. It is potentially extensible to be a true localization mechanism, but initially it only works in the classic tile scripting system. Each project has its own private language choice' translated.
Preferences noviceMode
ifFalse:[aMenu addStayUpItem.
+ ].
+ Preferences eToyFriendly
+ ifFalse:[aMenu addUpdating: #useLocaleString action: #toggleUseLocale.
- aMenu addUpdating: #useLocaleString action: #toggleUseLocale.
aMenu addLine].
availableLanguages := NaturalLanguageTranslator availableLanguageLocaleIDs
asSortedCollection:[:x :y | x displayName < y displayName].
availableLanguages do:
[:localeID |
item _ aMenu addUpdating: #stringForLanguageNameIs: target: Locale selector: #switchAndInstallFontToID:gently: argumentList: {localeID. true} extraIcon: (Locale localeID: localeID) iconForNativeLanguage.
item wordingArgument: localeID.].
].
aMenu popUpInWorld
"Project current chooseNaturalLanguage"!
Item was changed:
----- Method: Project>>toggleUseLocale (in category 'language') -----
toggleUseLocale
+ ^Preferences togglePreference: #useLocale
- ^ Preferences setPreference: #useLocale toValue: ((Preferences useLocale == true) not)
!
Bert Freudenberg uploaded a new version of Collections to project Etoys:
http://source.squeak.org/etoys/Collections-bf.3.mcz
==================== Summary ====================
Name: Collections-bf.3
Author: bf
Time: 2 May 2010, 6:59:40 pm
UUID: 145b3fa0-a26f-41fe-bfa0-aafd0b73974c
Ancestors: Collections-bf.2
- in String>>translated, use "context mclass" instead of the less accurate "context receiver class" to look up the text domain
=============== Diff against Collections-bf.2 ===============
Item was changed:
----- Method: String>>translated (in category 'translating') -----
translated
"answer the receiver translated to the default language"
+ | context class domain |
+ context := thisContext sender.
+ class := context mclass.
+ "Can we get rid of Text>>translated? It appears to be an abandoned experiment to translate the QuickGuides."
+ (class == Text and: [context method == (Text>>#translated)])
+ ifTrue: [class := context sender mclass].
+ domain := TextDomainManager domainForClass: class.
- | domain here |
- here _ thisContext sender receiver class.
- here == Text ifTrue: [here _ thisContext sender sender receiver class]. "ignore super call"
- domain := TextDomainManager domainForClass: here.
-
- "AA ifNil: [AA _ 45. self halt]." "only once for debug" "AA _ nil"
-
^ self translatedTo: LocaleID current inDomain: domain!
Karl Ramberg uploaded a new version of System to project Etoys:
http://source.squeak.org/etoys/System-kfr.4.mcz
==================== Summary ====================
Name: System-kfr.4
Author: kfr
Time: 2 May 2010, 1:42:52 pm
UUID: da25f7c9-3411-2341-adc0-d99de92c51e2
Ancestors: System-kfr.3
Add preference useLocale to language menu when noviceMode is off. I prefer to use english language and it was a little painful to set this...
=============== Diff against System-bf.2 ===============
Item was changed:
----- Method: Project>>chooseNaturalLanguage (in category 'language') -----
chooseNaturalLanguage
"Put up a menu allowing the user to choose the natural language for the project"
| aMenu availableLanguages item |
Cursor wait showWhile: [
aMenu _ MenuMorph new defaultTarget: self.
aMenu addTitle: 'choose language' translated.
aMenu lastItem setBalloonText: 'This controls the human language in which tiles should be viewed. It is potentially extensible to be a true localization mechanism, but initially it only works in the classic tile scripting system. Each project has its own private language choice' translated.
Preferences noviceMode
+ ifFalse:[aMenu addStayUpItem.
+ aMenu addUpdating: #useLocaleString action: #toggleUseLocale.
+ aMenu addLine].
- ifFalse:[aMenu addStayUpItem].
availableLanguages := NaturalLanguageTranslator availableLanguageLocaleIDs
asSortedCollection:[:x :y | x displayName < y displayName].
availableLanguages do:
[:localeID |
item _ aMenu addUpdating: #stringForLanguageNameIs: target: Locale selector: #switchAndInstallFontToID:gently: argumentList: {localeID. true} extraIcon: (Locale localeID: localeID) iconForNativeLanguage.
item wordingArgument: localeID.].
].
aMenu popUpInWorld
"Project current chooseNaturalLanguage"!
Item was added:
+ ----- Method: Project>>useLocaleString (in category 'language') -----
+ useLocaleString
+ "Answer a string characterizing whether the receiver is currently using localized language."
+
+ ^ (Preferences useLocale == true ifTrue: ['<yes>'] ifFalse: ['<no>']), ('use localized language' translated)!
Item was added:
+ ----- Method: Project>>toggleUseLocale (in category 'language') -----
+ toggleUseLocale
+
+ ^ Preferences setPreference: #useLocale toValue: ((Preferences useLocale == true) not)
+
+
+
+
+ !