feenkcom / gtoolkit

Glamorous Toolkit is the Moldable Development environment. It empowers you to make systems explainable through experiences tailored for each problem.
https://gtoolkit.com
MIT License
1.06k stars 46 forks source link

Walkback "Wrong Layout state! It should be: 4 but is 2" when adding a second PharoRewrite snippet to a page #3831

Closed macta closed 3 days ago

macta commented 2 weeks ago

I copied the Rewriting Rust lePage by navigating to the StoreString view on an inspector, edited the named: string parameter to give it a new name, and then clicked on the Do it inspect button (and my page appeared to be working fine - letting me specify some C# files and run rewrite queries in the original snippet). I then decided that it would be useful to compare 2 queries, so I clicked (+) and added a second PharoRewrite snippet and this results in a continuous walkback errror: Wrong Layout state! It should be: 4 but is 2

image

Stack:

BlInfiniteState class>>assert:description: BlInfiniteState>>assert:description: BlInfiniteState>>assertLayoutStep: BrInfiniteTreeElement(BlInfiniteElement)>>dispatchLayoutThirdStep BrInfiniteTreeElement(BlInfiniteElement)>>dispatchLayout BrInfiniteTreeElement(BlInfiniteElement)>>consumePendingDataSourceCommands BrInfiniteTreeElement(BlInfiniteElement)>>scrollByInternal:from: BrInfiniteTreeElement(BlInfiniteElement)>>scrollBy: BlVerticalScrollbarElement>>scrollTo: BlVerticalScrollbarElement(BlScrollbarElement)>>onDragged: [ :anEvent | self onDragged: anEvent ] in BlVerticalScrollbarElement(BlScrollbarElement)>>initialize in Block: [ :anEvent | self onDragged: anEvent ] FullBlockClosure(BlockClosure)>>cull: BlEventHandler>>handleEvent: BlHandlerAnnouncementSubscription>>deliver: [ subscription deliver: anAnnouncement ] in SubscriptionRegistry>>deliver:to:startingAt: in Block: [ subscription deliver: anAnnouncement ] FullBlockClosure(BlockClosure)>>ifCurtailed: SubscriptionRegistry>>deliver:to:startingAt: SubscriptionRegistry>>deliver:to: SubscriptionRegistry>>deliver: Announcer>>announce: BlHandlerAnnouncerRegistry>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchArrivedEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlElementEventDispatcher(BlEventDispatcher)>>dispatchEvent: BrScrollbarThumb(BlElement)>>dispatchEvent: BlPullHandler>>onPulled:from:to:by:starting: BlPullHandler>>dragEvent: BlDragEvent>>sendTo: BlPullHandler(BlCustomEventHandler)>>handleEvent: BlHandlerAnnouncementSubscription>>deliver: [ subscription deliver: anAnnouncement ] in SubscriptionRegistry>>deliver:to:startingAt: in Block: [ subscription deliver: anAnnouncement ] FullBlockClosure(BlockClosure)>>ifCurtailed: SubscriptionRegistry>>deliver:to:startingAt: SubscriptionRegistry>>deliver:to: SubscriptionRegistry>>deliver: Announcer>>announce: BlHandlerAnnouncerRegistry>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchArrivedEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlElementEventDispatcher(BlBubblingEventDispatcher)>>dispatchEvent:next: BlEventDispatcherChain>>dispatchEvent: BlEvent class>>fireEvent:target: BlEvent class>>fireEvent: BlMouseProcessor(BlBaseEventProcessor)>>fireEvent: BlMouseProcessor>>fireAsDragEvent: BlMouseProcessor>>processDragMove: BlMouseProcessor>>handleMouseMove: BlSpaceEventListener>>mouseMoveEvent: BlMouseMoveEvent>>sendTo: BlSpaceEventListener(BlEventListener)>>handleEvent: BlSpaceEventListener>>handleEvent:

macta commented 2 weeks ago

I think this issue should possibly be changed to - Its impossible to safely copy the page "Rewriting Rust" - as I think its the copy operation that corrupts things and leads to a broken image (currently the suggested copy operation is to view the StoreOn view, modify the name in the script and re-evaluate the output - these steps don't work for this kind of page. In part because #storeOn is not implemented for the SmaccRewriteSnippet - but even if you implement a basic - output the class, you still hit errors).

I suspect copying other pages might be as equally dangerous

girba commented 2 weeks ago

Please write the steps you took (including the scripts)

macta commented 2 weeks ago

Please write the steps you took (including the scripts)

I've updated the description - to explain the steps - this might actually be a problem in the StoreString method of a page which leads to corruption.

girba commented 2 weeks ago

There is another exception that appeared. The one with Wrong Layout state! It should be: 4 but is 2 is a consequence of the first one.

j-brant commented 3 days ago

I didn't get the error above, but got another error. I fixed that and was able to copy the page using the instructions and add a new rewrite.