HISE Logo Forum
    • Categories
    • Register
    • Login

    How to reset referToData?

    Scheduled Pinned Locked Moved Solved Scripting
    refertodatatableconnect
    15 Posts 4 Posters 935 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by d.healey

      If I connect two tables together using referToData, how do I later disconnect these tables?

      Also, is there any way to get the tableProcessor from a UI table so that I can use functions like restoreFromBase64()?

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @d.healey
        last edited by

        Bumpy bump

        HiseSnippet 974.3ocsV0saSjCE1SZMhDVVQk1GfQ4pTADkDnEXQqHj+PQPaiHEzdGq6LdRr5L1i73oP1UUZeO1Wl8Qh2fcO1dRFmtocgHXtHJ1G+cNe9y9bNdhTDPyxDRjW0SWjRQd+.d5BtZd+4DFGMd.xaOrhbVL8c7XF+7SoYJTuEojrLZHxyamWoWlW0cQluO+hdjXBOfVNEB8dAKf9FVBSUN6jtulEGOhDROkk3r5G2cbff2WDKxAJsCtEJkDbNYF8XhdYUvHuaMLjoDxoJhhlg71smHbwz4hOxsq+8rLFPW8f1nofirSORDGpYrdVT+4r3vIK25YHvKSJEhcrBwOgOhExVMeofbOiA+RDt5gWk0o2NqQu1tzqkC81.k7bnD1Ro8vSCjrTUoEMetCdLWQkQDP1coxw4ImpO4.Vf87.w0BFU4upf6K.HbUyDx4zQRXvJWz3vVsdfO7y9OuVM3rHS4GRTD+eweHeFiSaFHovV6k7v2Rmwx.TlfL.VSCGLWPj9FCsAjKi1LppuHIUvgAMpaMWGvbEHctYHczPpUiouPR8ix4AJlf6K38xUJAusFpTD2HXItG.tNNmtes+nVUy+7egu9xbi88+Y+bt8uOu1kfW2bXKbb88alom2399j33yf6lMtZb0j6pbyFBc7sa5lRZDHbBipokW.j0TmMY5x+qGWR6qwm0qeMdzX3xZNp1wBE8Dt0SfE+qZJJZi1J1swT4FMqSqk2DvF77jynR2yF8BgTw0SfvWeBja9cf8fyYgB9XNScRJkecY8nhSaHYqRAqfvqLoZ2sHUyHgHFjPcarUmQFB6VfSeJg7N.+nCat92EmjNJ+2eVjr2fmz2LF9I59ZSOyN1xgun.24abfe2X8EBcglBY.jlTpTwzpt2.5EPUaaYmp3AzryUhTPHWkU.Eh+eUpOshr+4q5tnj4Gz8irP07USzUzcNkMadYCh+dVWzWQn53DJzXmPAd9qLTXan9whPYysMwpJtHQ2IX+1mbCFsaF4B5X9DIEJTnqAibJhuqUMg1Ghv7XhZ8dJ5FoEFf7j0JjqqMyyXpEtMZ+l0n4Kkh6gmvTAy2LGqrANpSq9Nvwh1y2EOLJhFnJI3t3Q+52mdwn2JxUL9riHJICN7wPq0ovKTBnPz4bZroEaEcEE63V5wZEXJkGZF7OvWgw1q5GCFauzHJgDHEeHvVNP+.faalA3D271mp3izi8WU.Bia0rEJAdKxGBBza+GBE41LlNaAlGsEXd7Vf4fs.ygaAlmrEXd5MhQ+LvWlqDI1zAXhICM0T87Fx0kkL2BQ+Kj+FVjF
        

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          alt text

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          1 Reply Last reply Reply Quote 2
          • Dan KorneffD
            Dan Korneff
            last edited by

            It looks like the table index changes to 0 for both tables. If I script different indexes for each table I can get it to work.

            HiseSnippet 985.3ocsV01aSiDDdcRWDI2Ahd59AX0OkpqDkDnEtCgHjWJJ5nsQjBhuAas2jrp16FYutzHDR2Os6mD+C3lYWGaGN2RIB7Ghxry9LOOdVOyriiTd73XUDwo1oKWvIN+JcxRodd+4LgjLZ.wYaplcV.+0x.g77S4wZRukKXwwb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yC1.LObCvr+Ff4fM.yi1.LO9Zwf2974IZUnsb.VX7PSOUGmgRrsj4qPx+ApU2NZ.
            

            Dan Korneff - Producer / Mixer / Audio Nerd

            d.healeyD 1 Reply Last reply Reply Quote 1
            • d.healeyD
              d.healey @Dan Korneff
              last edited by

              @dustbro Not quite what I'm after but I might be able to use this. I want to completely disconnect the tables from a data object.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              ustkU 1 Reply Last reply Reply Quote 0
              • ustkU
                ustk @d.healey
                last edited by ustk

                @d-healey I imagine this would need another function that cancels what's made here:

                void referToDataBase(var newData)
                {
                	if (auto td = dynamic_cast<ScriptingObjects::ScriptComplexDataReferenceBase*>(newData.getObject()))
                	{
                		if (td->getDataType() != type)
                			reportScriptError("Data Type mismatch");
                
                		otherHolder = td->getHolder();
                
                		setScriptObjectPropertyWithChangeMessage(getIdFor(getIndexPropertyId()), td->getIndex(), sendNotification);
                		updateCachedObjectReference();
                	}
                	else if (auto cd = dynamic_cast<ComplexDataScriptComponent*>(newData.getObject()))
                	{
                		if (cd->type != type)
                			reportScriptError("Data Type mismatch");
                
                		otherHolder = cd;
                		updateCachedObjectReference();
                	}
                }
                

                Can't help pressing F5 in the forum...

                d.healeyD 1 Reply Last reply Reply Quote 1
                • d.healeyD
                  d.healey @ustk
                  last edited by

                  @ustk Yes I considered that too but not sure how to implement it. I might have another go at it.

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  ustkU 1 Reply Last reply Reply Quote 0
                  • ustkU
                    ustk @d.healey
                    last edited by ustk

                    @d-healey I tried with no luck. First I just set the otherHolder to nullptr but it didn't work.
                    something like this:

                    void removeFromDataBase()
                    {
                    	otherHolder = nullptr;
                    }
                    

                    So I thought the message notification had to change so I copied everything from de referToData function, set otherHolder to nullptr, and set the notifications to dontSendNotification, but that didn't work either so I gave up...
                    something like this:

                    void removeFromDataBase(var data)
                    {
                    	if (auto td = dynamic_cast<ScriptingObjects::ScriptComplexDataReferenceBase*>(data.getObject()))
                    	{
                    		if (td->getDataType() != type)
                    			reportScriptError("Data Type mismatch");
                    
                    		otherHolder = nullptr;
                    
                    		setScriptObjectPropertyWithChangeMessage(getIdFor(getIndexPropertyId()), td->getIndex(), dontSendNotification);
                    		updateCachedObjectReference();
                    	}
                    	else if (auto cd = dynamic_cast<ComplexDataScriptComponent*>(data.getObject()))
                    	{
                    		if (cd->type != type)
                    			reportScriptError("Data Type mismatch");
                    
                    		otherHolder = nullptr;
                    		updateCachedObjectReference();
                    	}
                    }
                    

                    and of course adding a removeFromData that calls this one to related components...

                    Can't help pressing F5 in the forum...

                    d.healeyD 1 Reply Last reply Reply Quote 1
                    • d.healeyD
                      d.healey @ustk
                      last edited by d.healey

                      @ustk
                      bool removeDataObject(ExternalData::DataType t, int index) override { return true; }

                      Smells interesting...

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      d.healeyD 1 Reply Last reply Reply Quote 1
                      • d.healeyD
                        d.healey @d.healey
                        last edited by

                        @d-healey Seems like another dead-end :(

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @d.healey
                          last edited by

                          A related issue. How can I change the tableData that the table is referring to?

                          This doesn't work:

                          HiseSnippet 984.3ocsV8taaaCDmxIrnxacaEXO.B4SxHcFx1ccCHaXdwNovXKIdydECHHnfVhJhHzjBTTo0XXXEC6AaOH6C6QXuAaGojiTZMbhM5zGr0Qd+386Nc+giUxPZVlTgbbmtHkhb9P7jEBcxfDBSfFMD47wXMYFm98LwUSoYZzgKRIYYzHjiyNO2nji6tH6y+7MGR3DQHsZID5ERVH.dNSWs539eGiyOlDQmxlWS6m1eTnTLPxk4.g1AGfRIgWQtjdJwnVCLx4AGEwzR0DMQSy.cNTFsXRh7UhB8eAKiAj0HzAMANnhkQCRX7nwKc1LDxY2wUt9NEt9mhOgEwtY8pPvmX2vqBQ8XfSi0QoNa.kbpQocKnziwSBUrTc0NF97A3QBMUESfPccpTnKpwez.OPBZHzsmSthdrBDtAg+yBBdhG7SqCZ1DB2YZO8Lt2W6c9EGzDd67fK.gk3ujpGHmmJEff+dSMYBc1qUghctCE6tWkItln7rK1a8X5UCyrbsFdojZMikJOeFHEbfGy6q75B+s+9sZ9KMcK0rcZdVh+pO8Csprm29lyXeuNsZAFZIvyYWzNyntPqj7ADNeFj34KEE6WtN.3Wa1jI3LA0KNWDpYRg2aoje3Ra9Dvo44TKA4xPB2iIhnuFbfkz0JeVbEDiu6xh87KQ55VDTZqnwT0T4Phl3aB8VjWXHTMdbpTSOS3aMHvTu2dq33UtWIw4T0J21ThpVGPeQ97YTUc20nHjCe6BiGb+JLBK97USQoXjfoOKkVJerjGYR3Mu+tkQnxu+PA0NkLDnh1VN8nxxIaTEwfy3g3hbZjk70abEAwZaOGz89T59d4T5stS4mFYxALMKJcSv0SoJMyDgcFRuF51Vz5vEOjlckVlhbv2TG.eEtyHwqq2PdQkvv9uhEoSfiy4u.wDJ6xDsQ52Q1n981DcqYh+TU2DideYhd0LwahqYh9oanI9nRSTz+vZCWbgP8P0a9gZF4u+s9JRDS9bkLOsHOMibMcjXrhBsYLsp2LKUOh0WtgV5cmp.yyjQ4bh91C4LSyK2.Jvu0jEyzCQFSun9z9MXxWvZm7ceo3iwiY5vjUywFqfiPcx+Gbr79BOBeTbLMTWQvcwG+ya6kCtCy+ixbMSb4IDshAIC3SymOAtlTHErtPP4Ylb3FlT3B4.irIBLgJhrB+K7TtYGirS4lcVtIZNITIeYXQiJyMRdncEfSB6EvbwmXj8toaIFGzN.MGtbzKCCMt+mAcjWMltaAldaAlmtEX97s.yy1BLewVf4KWKFy8R+1bsbdQ4.rv3irCHbbNRXZDZyBQ+WzdNyT
                          

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          1 Reply Last reply Reply Quote 0
                          • d.healeyD
                            d.healey
                            last edited by d.healey

                            Christoph committed a solution yesterday. Now referToData(-1) will reset back to the tables internal object.

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public HISE tutorials

                            DanHD 1 Reply Last reply Reply Quote 2
                            • d.healeyD d.healey marked this topic as a question on
                            • d.healeyD d.healey has marked this topic as solved on
                            • DanHD
                              DanH @d.healey
                              last edited by

                              @d-healey can you export on latest commit? Having issues here on osx....

                              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                              https://dhplugins.com/ | https://dcbreaks.com/
                              London, UK

                              d.healeyD 1 Reply Last reply Reply Quote 0
                              • d.healeyD
                                d.healey @DanH
                                last edited by

                                @DanH Yes on GNU/Linux and Windows, haven't tried MacOS yet.

                                What issue are you having?

                                Libre Wave - Freedom respecting instruments and effects
                                My Patreon - HISE tutorials
                                YouTube Channel - Public HISE tutorials

                                DanHD 1 Reply Last reply Reply Quote 0
                                • DanHD
                                  DanH @d.healey
                                  last edited by

                                  @d-healey a bunch of errors... Will have another go

                                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                  https://dhplugins.com/ | https://dcbreaks.com/
                                  London, UK

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post

                                  54

                                  Online

                                  1.7k

                                  Users

                                  11.7k

                                  Topics

                                  102.2k

                                  Posts