Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Pasteboard plugin question
Started by reallyrottens_98 Feb 14 2019 11:13 AM

3 replies to this topic
pasteboard
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

reallyrottens_98

[GLOBAL: userInfoPane.html]
reallyrottens_98
  • Enthusiast

  • 54 posts
  • Corona SDK

Is it possible to suppress the native alert that the "Pasteboard plugin is not supported on the Simulator"? Every time I launch my project in the simulator I get this and don't need to see it anymore.

 

Thank you.

 

Ed



[TOPIC: post.html]
#2

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 575 posts
  • Corona SDK

You can do this:

local pasteboard = require( "plugin.pasteboard" )

-- Add this after require to suppress alert
if "simulator" == system.getInfo("environment") then
    for k,v in pairs(pasteboard) do
        if type(v)=="function" then pasteboard[k]=function() end end
    end
end


[TOPIC: post.html]
#3

reallyrottens_98

[GLOBAL: userInfoPane.html]
reallyrottens_98
  • Enthusiast

  • 54 posts
  • Corona SDK

Works great!

 

 

So this just replaces the function with an empty function? Brilliant!

 

 

Thank you!

Ed

 



[TOPIC: post.html]
#4

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 575 posts
  • Corona SDK

Hi Ed

Yes it just replaces all the functions in the plugin with empty functions.

You are welcome. Jacob




[topic_controls]
[/topic_controls]