omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. marcus67
    3. Best

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 2
    • Followers 1
    • Topics 21
    • Posts 97
    • Best 29
    • Controversial 0
    • Groups 0

    Best posts made by marcus67

    • [Share Code] Tool to synchronize with a WebDav server

      Since I wanted to synchronize my Pythonista files with my project on GitHub I installed the iOS app "working copy" and use my little tool "gitsynchista" to move files back and forth between the local Pythonista directory tree and the WebDav server offered by "working copy".

      See https://github.com/marcus67/gitsynchista for a (still very short) ReadMe and a downloadable self-extracting Python script.

      Have fun!

      posted in Pythonista
      marcus67
      marcus67
    • RE: Wish list for next release

      I would throw in module lxmlwhich would give us enhanced XML support including XSLT 1.0 transformations.

      posted in Pythonista
      marcus67
      marcus67
    • RE: Wish list for next release

      When opening (and not neccessarily modifying) pyui files the order in which the JSON is written out to file does not seem to be preserved. So, I do get changes in GIT commits that are not real changes:

      diff

      Would it possible to sort the attributes by name before streaming them to file? Thanks!

      posted in Pythonista
      marcus67
      marcus67
    • RE: [Share Code] Rechtschreibung (a little app for testing German spelling and the pitfalls thereof)

      My little app "rechtschreibung" has grown up a little bit. It has become "universal", which is to say that it works pretty well with my iPad and my iPhone using different screen layouts.

      The Readme has been extended quite a bit as well.

      Thanks to everybody who helped me along the way by answering my questions in the forum!

      screenshot

      posted in Pythonista
      marcus67
      marcus67
    • RE: How to lock the orientation in `ui.View.present()`

      @dgelessus This works. This is too embarrassing. I'm inclined to delete this thread... :-)

      posted in Pythonista
      marcus67
      marcus67
    • RE: Help with screen sizes

      iPad Air: (1024.00, 768.00)

      posted in Pythonista
      marcus67
      marcus67
    • [Share Code] pyzipista: tool to create a self-extracting Pythonista deployment file

      For my other Pythonista apps "rechtschreibung" and "gitsynchista" I have written a little tool called pyzipista to create a self-extracting Python script for deployment.

      See https://github.com/marcus67/pyzipista for a (still very short) ReadMe and the downloadable self-extracting deployment file which was generated using the app on itself.

      Have fun!

      posted in Pythonista
      marcus67
      marcus67
    • Full Control over argv in shortcuts?

      Hi there!
      I've not been working with Pythonsta for over a year now (shame on me!) and coming back noticed that there seems to be a change in the way argv arguments are passed to shortcut scripts. Some of my shortcuts do not work anymore because the path of the current editor script from which I call the shortcut is added as argument. Is there a way to suppress this behaviour (which is very useful in other contexts, I have to admit)? For some of my shortcuts I need to have full controll over the arguments. Thanks!

      posted in Pythonista
      marcus67
      marcus67
    • RE: Spacing of ButtonItem's

      @omz: That's what the title bar looks like now! :-)

      corrected title bar

      posted in Pythonista
      marcus67
      marcus67
    • RE: [Share Code] gitsynchista now has pyzipista support

      @mikael And it has just been ported to Pythonista 3.

      posted in Pythonista
      marcus67
      marcus67
    • RE: Bug list for beta release 201001

      Since version 2.0 there is a little bug in the handling of the clipboard filled with whole lines. To reproduce: Look for a line of code with content starting in the very first column. Highlight the code from the left of the first character to the the very left of the next line.

      highlighting

      Go to somewhere else. Insert the clipboard left from the first character of that line. Result: The line will be inserted but the terminating newline character (which should be in the clipboard) is NOT inserted. So, such an insert has always to be followed by pressing RETURN.

      posted in Pythonista
      marcus67
      marcus67
    • RE: Spacing of ButtonItem's

      @omz Hi there! I've incorporated your changes and created references to all otherwise dangling instances. It still crashes, usually when pressing the third button. See here. Any idea?

      posted in Pythonista
      marcus67
      marcus67
    • Spacing of ButtonItem's

      Is there a way to influence the spacing of ButtonItem's in a title row bar? They seem to be pretty far apart. In the iPhone layout of my app I have four (one left and three right) of them and now there's hardly any room left for the title itself. Thanks a lot!

      screenshot

      posted in Pythonista
      marcus67
      marcus67
    • RE: Keyboard hiding TextView

      @mikael For the time being I'm just checking the screen dimensions and add the offset when I find out that the app is running on an iPad. This is probably wrong but for my two cases it works.

      It did, however, add some more functionality to my EnhancedView: In case the app is running on an iPhone which does not offer the hide keyboard key the view will automatically show a ButtonItem on the upper right which will call end_editing() on the open view. After closing it will restore any ButtonItem's previously replaced by the keyboard ButtonItem. See this screen shot.

      posted in Pythonista
      marcus67
      marcus67
    • RE: Keyboard hiding TextView

      @mikael Thanks, Mikael! That was a very helpful hint. I've proceeded quite a bit with my implementation. I've created a view called EnhancedView which can serve as a drop-in replacement for ui.View in layouts that have at least one ui.TextView or ui.TextField in them. See here. The view does the following:

      • It overwrited the method keyboard_frame_did_change to hook into the changes of the keyboard frame (as suggested by you).
      • Upon first call of the method it scans all subviews recursively to find all ui.TextView's and ui.TextField's.
      • The default delegate method of all these subviews is replaced by a delegate listening to the *_did_*_editing hooks.
        • When editing is started in one of the subviews, this subview stores itself as current view in the EnhancedView.
        • When editing is finished the view removes itself again.
      • For each call to keyboard_frame_did_change the EnhancedView checks if a) the keyboard is visible, b) it has an active editing subview and c) the subview is at least partially hidden by the keyboard. If so, it computes a delta y offset for its bounds attribute and thus moves itself upward. In all other cases it restores the bounds to its original value (which is y=0).

      The only little problem left is that even the recursive scan of the delta offsets for the y coordinate does not yield the correct value on the iPad. For some reason the topmost view has an offset of y=0 according to its frame. However, it is NOT at the top of screen but underneath the status bar which seems to have a height of 20 pixels. If I add those 20 extra pixels on the iPad it works fine. But on my iPhone, it actually shifts the the view to hight, although the status bar is visible there, too.

      Is there a way to distiguish between these cases? Thanks a lot!

      posted in Pythonista
      marcus67
      marcus67
    • RE: Modal mode for `webbrowser.open()`

      Nobody answered so far. @omz: Could you help me with this, please? Thanks!

      posted in Pythonista
      marcus67
      marcus67
    • Keyboard hiding TextView

      I have a view with a canvas size of small portrait (iPhone) containing a TextViewin the lower half. When I enter text into the view the keyboard completely covers the TextView. It accepts text but it is not visbible. How do I make the canvas automatically shift upward in such a case? I thought that the iOS framework would do this for me. Thanks for your help!

      posted in Pythonista
      marcus67
      marcus67
    • RE: Workaround for Multiple File Sharing

      @AtomBombed If you have access to a WebDAV server you could try my gitsynchista. Don't get mislead by the name. You don't have to have git involved if you don't want to...

      posted in Pythonista
      marcus67
      marcus67
    • Speech "velocity" differs between iDevices?

      Has anybody noticed that the reading velocity using speech.start() differs between iDevices? Using the value 0.5 is fine for my iPad but it is much to fast for my iPhone. A value of 0.1 is much more appropriate there. How come? :-)

      posted in Pythonista
      marcus67
      marcus67
    • RE: Wish list for next release

      After working a bit with the UI editor I would suggest adding these features:

      • Provide a view type which can serve as placeholder for a subview which is defined in another pyui file. This way you could easily re-use subviews.
      • Allow several items in a view to be simultaneously selected, cut and inserted into another view. This would make refactoring view a LOT easier.
      • Provide the icon for the action menu while the UI editor is active. Otherwise I always have to switch to a tab with a Python script before I can start my app using an action icon.
      posted in Pythonista
      marcus67
      marcus67