omz:forum

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

    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 16
    • Posts 62
    • Best 2
    • Controversial 0
    • Groups 0

    rb

    @rb

    3
    Reputation
    1808
    Profile views
    62
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    rb Unfollow Follow

    Best posts made by rb

    • RE: What what what!! New version in TestFlight!!!

      So pleased! love your app to bits OMZ :)

      posted in Pythonista
      rb
      rb
    • RE: Refresh /pull from icloud

      Seems to be working now I changed my reader device (old iPad mini) iCloud settings to passwords/accounts>push data ON an option not on my other iPad (iPad Pro) ...there’s a slight delay but it reads and updates ! Woop!

      posted in Pythonista
      rb
      rb

    Latest posts made by rb

    • RE: Playing and stop a sound with same button

      @cvp that works great thanks with a longer duration.

      Also added a fade up:

      class fade_playerUp(threading.Thread):
      	def __init__(self,player):
      		threading.Thread.__init__(self)
      		self.player = player
      		self.player.volume=0	
      	def run(self):
      		while self.player.volume < 1 :
      			#print(self.player.current_time,self.player.duration, self.player.volume)
      			self.player.play()
      			time.sleep(0.1)
      			self.player.volume += 0.01	
      		#self.player.stop()			
      						 ```
      
      Cheers!
      posted in Pythonista
      rb
      rb
    • RE: Playing and stop a sound with same button

      @cvp right yep ui.animate was a stupid idea - just how I was fading alphas previously.
      And yes fading would be reducing volume to 0 over time then stopping player I think.
      Don’t understand the threading thing but will look it up thanks again.

      posted in Pythonista
      rb
      rb
    • RE: Playing and stop a sound with same button

      @cvp that works perfectly thankyou. Your help and this forum is another reason I love pythonista!

      more questions though….

      If instead of stopping the sound I wanted instead to fade the sound and then stop it..
      ui.animate ?

      And if I wanted a way of fading and stopping ALL sounds how can I get all instances of player to iterate through them at once?or is there another way?

      Thanks!

      posted in Pythonista
      rb
      rb
    • Playing and stop a sound with same button

      Hi forum,
      I’m trying to make a simple soundboard type ui.
      I have a grid of buttons that play different sounds and a button to stop all effects.
      Ie sound.play_effect() and sound.stop_all_effects()

      What I would like to do though is play the sounds and colour the respective button a different colour for as long as it’s playing and then if the button is pressed again whilst the sound is still playing - stop that specific sound ..

      How can I do this?
      The effect is only created upon playing and is unique so how can I stop that exact effect?

      posted in Pythonista
      rb
      rb
    • RE: What what what!! New version in TestFlight!!!

      So pleased! love your app to bits OMZ :)

      posted in Pythonista
      rb
      rb
    • RE: ImageView UI Designer Code

      Ok it was the path again but it makes no sense to me …
      My path was resolved ok in designer using your script but I had to specify a full path to get it working as a load view. I don’t have to do this with the image views they work after I’ve set my file using
      os.chdir(os.path.split(__file__)[0])
      Anyhow it works so thanks again!

      posted in Pythonista
      rb
      rb
    • RE: ImageView UI Designer Code

      Found couple of issues.
      I had to add the middle line/check:

      if node['class'] in ['ImageView', 'Button']:
                    if 'custom_attributes' in node['attributes']:
                        attrs = node['attributes']['custom_attributes'] ```
      
      As I have some other buttons without anything in custom_attributes and it was erroring.
      After changing that I get the images appearing on buttons in designer woop! but unfortunately it still fails when imported as a load_view in my main function with same error ie :
      
      Warning: Could not load custom attributes of view "test_btn": 'NoneType' object has no attribute 'with_rendering_mode'
      posted in Pythonista
      rb
      rb
    • RE: ImageView UI Designer Code

      Dude your so generous with your assistance always above and beyond Thankyou ! It’s sunny right now in uk so I’m chillin with my dawg in the garden with a beer - will check this as darkness falls :)

      posted in Pythonista
      rb
      rb
    • RE: ImageView UI Designer Code

      Next question..
      If I want to add a custom image in designer for a button not an imageView…
      I can’t get the image to load using the same above syntax in custom attributes.Is this something to do with :
      .with_rendering_mode(ui.RENDERING_MODE_ORIGINAL)
      And if so what would the proper syntax be inside that custom attribute string? So far I just get errors if I add that as an extra string on end of image path.
      Also it’s not important that this image is visible in designer just that it works in final use when loaded/used in another view.

      posted in Pythonista
      rb
      rb
    • RE: ImageView UI Designer Code

      Nana is a beauty :)
      You are totally correct of course ! I managed to have 2 copies of the setImageInDesigner.py …duh one in iPad and one in iCloud where my scripts are stored so the path wasn’t resolving.Apologies for wasting part of your day with that !

      posted in Pythonista
      rb
      rb