• yoyo

    Thank you so much!
    I got it!

    posted in Pythonista read more
  • yoyo

    I want to show each row in csv file on iOS application GUI.
    Is Scroll view a proper component?

    What I want do is to show a following row values without comma on GUI.
    Can you please tell me how to display Sample.csv without comma by using scroll view?

    Sample.csv:
    1,Value A
    2,Value B

    posted in Pythonista read more
  • yoyo

    @cvp Thank you so much!

    posted in Pythonista read more
  • yoyo

    Hello, all pythonista in the world.
    I'm making a sample program which tests touch_began() and touch_end() methods by using custom view object on pyui file.
    I implemented MyView class in python file and touch methods worked well(Following program).
    If I put a label object on the pyui file, how can I get a value of label object in touch method?

    import ui
    class MyView (ui.View):
    def touch_began(self, touch):
    print('touch')

    def touch_ended(self, touch):
        print('end')
    

    v1 =ui.load_view('touch')
    v1.present(style = 'full_screen', orientations = ['landscape'])

    As I told, touch.pyui has a cutom view object connected to MyView class and label object. I want to print label object's text value when touch_began() is called. Could you please tell me how to implement?

    posted in Pythonista read more
  • yoyo

    @JonB Thank you so much! I’m gonna try!

    posted in Pythonista read more
  • yoyo

    My application for iOS has recording function. Based on sample code, I implemented a following code. As you understand, recorder.stop() is executed after alert dialog is closed. I want to change this specification from current one to new one which records a voice while a button on UI is kept touching, and when user releases a finger from a button, recorde.stop() is executed. How should I implement this? I don’t want to use an alert dialog.

    recorder = sound.Recorder('speech.m4a')
    recorder.record()
    # Continue recording until the 'Finish' button is tapped:
    dialogs.alert('Recording...','','Finish',hide_cancel_button=True)
    recorder.stop()

    posted in Pythonista read more
  • yoyo

    @johnridesabike Based on your sample, I was able to implement my requirement! Thank you so much.

    posted in Pythonista read more
  • yoyo

    @johnridesabike I have tried your sample code. However, load_view generate new screen, right? What I want to do is to change screen without exit button located on title bar...

    posted in Pythonista read more
  • yoyo

    @johnridesabike
    @mikael

    Thanks for your reply. Is it possible to reflect setting value dynamically when we use bring_to_front()?

    posted in Pythonista read more
  • yoyo

    #This is a sample code based on my app.
    import ui
    Import random
    
    #This function is connected to a button in TopPage.pyui
    def screen_front(sender):
        key = random.randrange(0,20,1)
        v3.bring_to_front()
    
    # I would like to show ‘key’ value in Next.pyui as default value after
    # ‘v3.bring_to_front()’ execution. It means that key value in Next.pyui
    # is always different since a value of key is set with random method. 
    
    v1 =ui.load_view('Canvas')
    v2 =ui.load_view('TopPage')
    v3 =ui.load_view('Next')
    v1.add_subview(v2)
    v1.add_subview(v3)
    
    #Bring TopPage.pyui as top page UI.
    v2.bring_to_front()
    
    v1.present('sheet')
    

    posted in Pythonista read more
  • yoyo

    I would like to know how to use common value between multiple UI screen.
    For example, when a user chooses something option in a top page, I want to display the value on next page as a default value. In my recogntion, to set value to a variable, we need to catch something event from pushing bottom or something.
    But I want to show a value choosen in previous screen as a default value in next screen.
    Could you please give me a advice to implement my hope.

    posted in Pythonista read more
  • yoyo

    @cvp Thank you so much for your comment. I did’nt know this function. However, as far as I read a description about recognize, recognize function can translate a voice to text from recorded file.
    I hope that my application can receive a voice directly, but if I implement following procedure, my hope may be able to be implemented.

    1. Sound recorder is executed.
    2. Record a user voice and save it.
    3. Call speech.recognize
    4. Translate voice file made by No.2 section to text file.

    posted in Pythonista read more
  • yoyo

    @omz Thank you for your comment.
    Can recognize functiion in speech module translate a voice file to text only?
    I checked a description about speech module, but there is not recognize function. I woiuild like to know current version documnent URL.

    posted in Pythonista read more
  • yoyo

    I know pythonista3 can access to objective-c library via objc_util.
    Have anyone tried to use SFSpeechrecognizer via objc_util?
    I want to know whether possible or not.

    posted in Pythonista read more
  • yoyo

    @JonB I finally have done sample program which I want to do. In my recognition, all view is regarded as a component like button, slider on the main canvas. And each components should be added to main canvas with add_subview().
    Thank to your comment, I did it.

    posted in Editorial read more
  • yoyo

    @JonB Thank you so much for your comment. I would like to know how to use add_subview(). Do you know any sample page or source code URL?

    Warm regards,
    Yoyo

    posted in Editorial read more
  • yoyo

    I’ve just started to try iOS app with pythonista, and I understood how to execute pyui from py file with load_view().
    I want to make an application which has multiple screen like top page and setting page, and so on.
    My current sample application has 2 buttons which transfer different pyui file by using load_view(), and each button looks work well. However, I notice when I tap exit icon on a screen, other screen remain working. I mean, each screen make new screen when button is tapped.
    I dont want to implement a new screen making but screen changing.
    Could you please how to change a pyui file?

    My sample is following.
    For example, Toppage has a button which is connected to goto_setting(), and when the button is tapped, it creates Setting page while Toppage is working.

    import ui
    def return_title(sender):
        ui.load_view('Toppage').present('sheet')
    
    def goto_setting(sender):
        ui.load_view('Setting').present('sheet')
        
    v = ui.load_view()
    v.present('sheet')
    

    posted in Editorial read more
Internal error.

Oops! Looks like something went wrong!