Le 11/11/2015 08:53, Dimitris Chloupis a ��crit :
> And I am back with new problems with pharo 5 , I hope you missed me :D
>
> If I try to create a new class called ChrTimeInputM that subclasses
> TextMorph I am getting this MNU with the stack bellow
Strange.
Code failing is this:
�� �� �� �� ((oldClass isNil or: [oldClass theNonMetaClass name asString ~=
newClassName])
�� �� �� �� �� �� �� �� and: [envt includesKey: newClassName asSymbol]) ifTrue:
�� �� �� �� �� �� �� �� �� �� �� �� ["Attempting to define new class over existing one when
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� not looking at the original one in this browser..."
�� �� �� �� �� �� �� �� �� �� �� �� (self confirm: ((newClassName , ' is an existing class in this system.
Redefining it might cause serious problems.
Is this really what you want to do?') asText makeBoldFrom: 1 to:
newClassName size))
�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ifFalse: [^ nil]].
The strange thing is that, of anything which looks like an environment
in Pharo, very few do have an includesKey: and certainly not
RBBrowserEnvironment
Moreover, in the case of scoped browsing, I don't think the test amount
to anything significant: if I try to redefine Object and if Object is
not in the browsed environment, I'll get no warning whatsoever.
Thierry
> I tried to replace includesKey: with includesClass: but then it alerts
> me falsely that there is already an existing class in the image, I tried
> this on the latest pharo 5 image with nothing installed in it. Here is
> the stack
>
> RBBrowserEnvironment(Object)>>doesNotUnderstand: #includesKey:
> PackageTreeNautilusUI(AbstractTool)>>compileANewClassFrom:notifying:startingFrom:
> PackageTreeNautilusUI(AbstractNautilusUI)>>compileAClassFrom:notifying:
> ClassDefinitionAcceptor>>accept:notifying:
> PackageTreeNautilusUI(NautilusUI)>>compileSource:notifying:
> PackageTreeNautilusUI(AbstractNautilusUI)>>whenTextAcceptedInView:
> MessageSend>>value: MessageSend>>cull: MessageSend>>cull:cull: [ action
> cull: anAnnouncement cull: announcer ] in
> AnnouncementSubscription>>deliver: in Block: [ action cull:
> anAnnouncement cull: announcer ] BlockClosure>>on:do:
> BlockClosure>>on:fork: AnnouncementSubscription>>deliver: [ subscription
> deliver: anAnnouncement ] in
> SubscriptionRegistry>>deliver:to:startingAt: in Block: [ subscription
> deliver: anAnnouncement ] BlockClosure>>ifCurtailed:
> SubscriptionRegistry>>deliver:to:startingAt:
> SubscriptionRegistry>>deliver:to: SubscriptionRegistry>>deliver:
> Announcer>>announce: RubScrolledTextMorph>>acceptContents
> RubScrolledTextMorph>>whenTextAcceptRequest: MessageSend>>value:
> MessageSend>>cull: MessageSend>>cull:cull: [ action cull: anAnnouncement
> cull: announcer ] in AnnouncementSubscription>>deliver: in Block: [
> action cull: anAnnouncement cull: announcer ] BlockClosure>>on:do:
> BlockClosure>>on:fork: AnnouncementSubscription>>deliver: [ subscription
> deliver: anAnnouncement ] in
> SubscriptionRegistry>>deliver:to:startingAt: in Block: [ subscription
> deliver: anAnnouncement ] BlockClosure>>ifCurtailed: