Code Monkey home page Code Monkey logo

Comments (10)

jsbain avatar jsbain commented on September 23, 2024 1

Here is a workaround (using swizzle from my objc-hacks repo). This can be placed in site-packages/pythonista_startup

import ui
from objc_util import *
from objc_hacks import swizzle

def willDismiss(_self,_sel):
	pass
swizzle.swizzle(ObjCClass('SUINavigationView_PY3'), 'willDismiss', willDismiss, type_encoding='v@:')

from pythonista-issues.

dgelessus avatar dgelessus commented on September 23, 2024

This happens with some other views (e. g. ui.ScrollView) too.

from pythonista-issues.

jsbain avatar jsbain commented on September 23, 2024

this seems to be fixed now

from pythonista-issues.

jsbain avatar jsbain commented on September 23, 2024

Whoops, the original code to reproduce should read
ui.TableView().present('panel')

from pythonista-issues.

scj643 avatar scj643 commented on September 23, 2024

I can confirm

from pythonista-issues.

nilsj avatar nilsj commented on September 23, 2024

For me ui.TableView().present('sidebar') crashes in a similar fashion.

from pythonista-issues.

zrzka avatar zrzka commented on September 23, 2024

I did check this and I can confirm that it still crashes in 311014. It seems to me that this can be kind of memory management issue?

Doesn't crash

import ui

sv = ui.ScrollView()
sv.present('panel')

Crashes

import ui

ui.ScrollView().present('panel')

from pythonista-issues.

shaun-h avatar shaun-h commented on September 23, 2024

Just wanted to add this code crashes it on close still on 311017

import ui

nav = ui.NavigationView(ui.View())

nav.present(style='panel')

This is the fault log produced (cut down).

Fatal Python error: Aborted

Thread 0x000000016c0b3000 (most recent call first):

------------------------------------------------------------------------

Objective-C exception details:

NSInvalidArgumentException: -[SUINavigationView_PY3 willDismiss]: unrecognized selector sent to instance 0x131791f40

Stack trace:

0   CoreFoundation                      0x0000000185a2237c <redacted> + 148

from pythonista-issues.

jsbain avatar jsbain commented on September 23, 2024

The same should work for SUIScrollView_PY3, etc

from pythonista-issues.

omz avatar omz commented on September 23, 2024

This doesn't appear to crash in the current version.

from pythonista-issues.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.