omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. gojyuan

    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 0
    • Followers 0
    • Topics 2
    • Posts 8
    • Best 1
    • Controversial 0
    • Groups 0

    gojyuan

    @gojyuan

    1
    Reputation
    344
    Profile views
    8
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    gojyuan Unfollow Follow

    Best posts made by gojyuan

    • RE: iPadOS 16.1 input issues

      @cvp yes, our history is similar.

      I had 10 years experience on mainframes - Honeywell ( punch paper tape, held together by rubber bands ), IBM System 370/145 and Amdal 470/V6 ( I was a systems programmer using Assember ). After our daughters were born ( 30-35 years ago ), I set up my own business using a variety of languages.

      I love this industry because you are always learning something new. However sometimes caught out by technology changes.

      posted in Pythonista
      gojyuan
      gojyuan

    Latest posts made by gojyuan

    • RE: iPadOS 16.1 input issues

      @cvp yes, our history is similar.

      I had 10 years experience on mainframes - Honeywell ( punch paper tape, held together by rubber bands ), IBM System 370/145 and Amdal 470/V6 ( I was a systems programmer using Assember ). After our daughters were born ( 30-35 years ago ), I set up my own business using a variety of languages.

      I love this industry because you are always learning something new. However sometimes caught out by technology changes.

      posted in Pythonista
      gojyuan
      gojyuan
    • RE: iPadOS 16.1 input issues

      More followup…

      My programming history - I am 68 yo ( female) and have close to 40 years experience with mainframes (PL/1, Cobol,, assembler), Windows PCs ( dbase, VB, C#). The last 2 years I migrated to IOS with iPad Pro and chose Pythonista and taught myself Python with the help of this fantastic forum.

      After my professional career, hospitality became an option and I completely rewrote a C# application using Pythonista. I have both an iPad version and iPhone version. I was lucky to be introduced to the current build at the start of my conversion. I am very happy that I can have a version for both devices ( same code )

      There are many extremely talented people on this support forum and I have utilised a lot of shared code which was generously donated.

      Fortunately I am able to do workarounds for some of the problems I am now facing. I think I will have to move on as I am quite nervous about changes to Apple hardware that may affect my program in the future.

      I am currently testing SwiftUI Playgrounds but persistence data ( using SQLITE) is still an unknown. My only device for programming is my iPadPro (5th Gen), I do not own a Mac so xcode is not an option.

      posted in Pythonista
      gojyuan
      gojyuan
    • RE: iPadOS 16.1 input issues

      A little followup.
      My app is quite large - customers, bookings, vouchers, invoices / payments.

      Testing just the suggested code works. I am returning dictionaries. I modified the code to return just a string and this did not work. I am suspecting this is to do with memory ( ? paging ) in IOS 16. If there are a lot of IOS apps running, the response is very poor.

      I will be trying to write the return results to a specific file and then try to open it later to see if this works. I need a workaround until I can find a better solution.

      posted in Pythonista
      gojyuan
      gojyuan
    • RE: iPadOS 16.1 input issues

      @bosco Thank you for your suggestion. Interesting results.

      I had placed 2 print statements around the code - one after the main function call return,

      selection = get_selection(sel,value)
      select = custom.MyListDialog(title=title,items=selection)
      print('After dialog call - Select',select)

      and the other where the custom code is defined - after the view.wait_modal() statement.

      c = _MyListDialogController(title, items, frame, multiple, done_button_title=done_button_title)
      c.view.present('sheet')
      c.view.wait_modal()
      print('MyListDialog', c.selected_item)
      return c.selected_item

      Without ui.in_background, both print statements returned None.
      With ui.in_background ( around the definition ), the print statement following the wait_modal showed the correct result. However the order of print statements was incorrect ie the result printed before the definition if that makes sense.

      … results …
      After dialog call - Select None
      MyListDialog {'title': 'BUSINESS', 'accessory_type': 'none'}

      Apologies for the long reply.

      posted in Pythonista
      gojyuan
      gojyuan
    • iPadOS 16.1 input issues

      Hi,
      I do all programming on a iPad Pro. Yesterday updated to iPadOS 16.1 and console.input_alerts and custom listdialogs no longer working - not returning values.

      As a programmer I can get around some of these issues but my app is for my hospitality business and is vital for me to keep operating.

      Just wondering whether Pythonista is still viable or should I use another platform.

      Help much appreciated.

      posted in Pythonista
      gojyuan
      gojyuan
    • RE: Cannot print images in html

      Thank you everyone for your suggestions. I finally have it working, including a form that has a background image. The styling is very touch and go - very easy to have it working one moment and not the next.

      My application is a hospitality reservation / crm system ( my own business ). I was surprised at the comments regarding printing - is there another alternative that I am not aware of. Are most pythonista apps technical or gaming?

      I use a lot of html for email layouts so to be able to use the same for printing is very convenient. and the app allows me to modify the template anytime.

      <body>
      	<img src="{logo}" alt="logo.jpg" width="50" height="50">
      	<h1>Guest Details</h1>
      	<hr>
      	<table>
      		<tr>
      ...
      
      template = utils.template_path + '/GuestCheckIn.html'
      text = None
      with open(template,'r', encoding='utf-8') as infile:
      	txt = infile.read()	
      						
      if txt is not None:			
      	txt = txt.replace('{logo}',utils.get_file_url(utils.template_path + '/' + 'logo.jpg'))
      	txt = txt.replace('{fullname}', self.booking.customer.full_name)
      	txt = txt.replace('{fulladdr}', self.booking.customer.full_address(' '))
      ...
      utils.print_html_orientation(txt)
      
      posted in Pythonista
      gojyuan
      gojyuan
    • RE: Cannot print images in html

      Thank you, will give this a try. I am assuming i will be using this stream in the fileurl specified for the image.

      posted in Pythonista
      gojyuan
      gojyuan
    • Cannot print images in html

      Hi,
      I am a beginner in Pythonista and ios ( 2 months ) coming from a windows c# environment ( 37 years )
      I am converting an existing c# application and trying to create printable html reports and forms ( not really sure what other options I have).

      I am printing the reports by opening the html template and using airprint code that I have found on this forum ( print_html_orientation )

      So far all has been good but now I am trying to include images and not having much luck. My application path structure has all of the html files in a separate directory..

      I have seen threads that suggest that the script and images be in the same directory but this hasn’t worked. I have tried to use a file url in the HTML base element and also a file url when specifying the name of the image but this does not work as well.

      Am I missing something regarding how the html is interpreted prior to printing.

      posted in Pythonista
      gojyuan
      gojyuan