pharo-graphics / Bloc

Low-level UI infrastructure & framework for Pharo
MIT License
83 stars 40 forks source link

Attempt to read undeclared variable BlInfiniteMouseScrollListener when loading bloc/toplo #599

Closed Albou62 closed 1 month ago

Albou62 commented 2 months ago

Attempt to read undeclared variable BlInfiniteMouseScrollListener.

When the bloc package loading, I have 2 exceptions who said the variable BlInfiniteMouseScrollListener is undeclared. Loading continues and finishes.

However, when running examples on toplo ToSandBox an inspector opens but the SDL window with the example does not

GlobalVariable(UndeclaredVariable)>>runtimeUndeclaredReadInContext:
[
            (aBuilder pickOne: #preferableChildrenDataStructure)
                target: self;
                order: 4;
                label: 'Preferable children data structure' ;
                domainValues: { BlChildrenArray . BlChildrenRope . BlChildrenLinkedList };
                description: 'Choose which data structure should be used to store element''s children'.

            (aBuilder range: #scrollingVelocity)
                order: 5; 
                target: BlInfiniteMouseScrollListener;
                label: 'Scrolling velocity';
                description: 'A positive integer used as a multiplier to increase mousewheel scrolling velocity ';
                range: (1 to: 200 by: 1);
                default: OSPlatform current defaultScrollingVelocity.

            (aBuilder setting: #assertionsEnabled)
                order: 6;
                target: self;
                label: 'Assertions';
                description: 'Set enabled to turn assertions on or disable to turn them off';
                default: [ true ].

            (aBuilder setting: #debugModeEnabled)
                order: 7;
                target: self;
                label: 'Debug Mode';
                description: 'Set enabled to turn extensive debugging mode on or disable to turn it off';
                default: [ false ].
        ] in Bloc class>>preferencesOn: in Block: [...
SettingTreeBuilder>>parent:while:
SettingNodeBuilder>>asParentWhile:
SettingNodeBuilder>>with:
Bloc class>>preferencesOn:
SettingTreeBuilder>>systemsettings
SettingTreeBuilder>>buildPragma:
[:p | builder buildPragma: p] in SettingTree>>nodeList in Block: [:p | builder buildPragma: p]
OrderedCollection>>do:
PragmaCollector>>do:
SettingTree>>pragmasDo:
SettingTree>>nodeList
SettingBrowser>>allPackagesWithSettings
[ :selections |
                  selections asSet = self allPackagesWithSettings asSet
                      ifTrue: [ s nextPutAll: 'All packages' ]
                      ifFalse: [
                          selections do: [ :package |
                              s nextPutAll: package name.
                              s nextPut: Character space ] ] ] in [ :s |
          self viewedPackages
              ifEmpty: [ s nextPutAll: 'All packages' translated ]
              ifNotEmpty: [ :selections |
                  selections asSet = self allPackagesWithSettings asSet
                      ifTrue: [ s nextPutAll: 'All packages' ]
                      ifFalse: [
                          selections do: [ :package |
                              s nextPutAll: package name.
                              s nextPut: Character space ] ] ] ] in SettingBrowser>>getViewedPackageNames in Block: [ :selections |...
FullBlockClosure(BlockClosure)>>cull:
Array(Collection)>>ifEmpty:ifNotEmpty:
[ :s |
          self viewedPackages
              ifEmpty: [ s nextPutAll: 'All packages' translated ]
              ifNotEmpty: [ :selections |
                  selections asSet = self allPackagesWithSettings asSet
                      ifTrue: [ s nextPutAll: 'All packages' ]
                      ifFalse: [
                          selections do: [ :package |
                              s nextPutAll: package name.
                              s nextPut: Character space ] ] ] ] in SettingBrowser>>getViewedPackageNames in Block: [ :s |...
Text class>>streamContents:
SettingBrowser>>getViewedPackageNames
SettingBrowser(Object)>>perform:withEnoughArguments:
RubPluggableTextMorph(RubScrolledTextMorph)>>getTextFromModel
RubPluggableTextMorph>>update:
[:aDependent | aDependent update: aParameter] in SettingBrowser(Model)>>changed: in Block: [:aDependent | aDependent update: aParameter]
DependentsArray>>do:
SettingBrowser(Model)>>changed:
SettingBrowser>>updateList
SettingBrowser>>treeChanged:
MessageSend>>value:
MessageSend>>cull:
MessageSend>>cull:cull:
[ action cull: anAnnouncement cull: announcer ] in AnnouncementSubscription(AbstractAnnouncementSubscription)>>deliver: in Block: [ action cull: anAnnouncement cull: announcer ]
FullBlockClosure(BlockClosure)>>on:do:
[ Processor terminateRealActive ] in [ :ex |
              | onDoCtx handler bottom thisCtx |
              onDoCtx := thisContext.
              thisCtx := onDoCtx home.

              "find the context on stack for which this method's is sender"

              [ onDoCtx sender == thisCtx ] whileFalse: [
                  onDoCtx := onDoCtx sender.
                  onDoCtx ifNil: [ "Can't find our home context. seems like we're already forked
                and handling another exception in new thread. In this case, just pass it through handler."
                      ^ handlerAction cull: ex ] ].

              bottom := [ Processor terminateRealActive ] asContext.
              onDoCtx privSender: bottom.

              handler := [ handlerAction cull: ex ] asContext.
              handler privSender: thisContext sender.

              (Process forContext: handler priority: Processor activePriority) resume.

              "cut the stack of current process"
              thisContext privSender: thisCtx.
              nil ] in FullBlockClosure(BlockClosure)>>on:fork: in Block: [ Processor terminateRealActive ]

Debugger-Stack-GlobalVariable-2024-09-12-11039.fuel.tar.gz

Albou62 commented 2 months ago

The error exists when the settings are open when I launch the loading.

tinchodias commented 1 month ago

Hello @Albou62 : what was the Pharo version? 11?