Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Installing plugin? (pasteboard)
Started by curtistaplin Oct 07 2019 07:44 AM

4 replies to this topic

Best Answer Rob Miracle , 07 October 2019 - 02:58 PM

Go here:  https://marketplace.coronalabs.com/corona-plugins/pasteboard

Activate the plugin.

Click on the documentation link and follow the instructions there.

 

Rob

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

curtistaplin

[GLOBAL: userInfoPane.html]
curtistaplin
  • Observer

  • 6 posts
  • Corona SDK

Hey,

 

I'm looking to use the Pasteboard plug in for a project I'm working on. I've downloaded the plug in from Github, I've tried to put the plug in in my corona project <coronaproject>/plugins/pasteboard . I've also tried pasting the files in the plugin directory of the Corona SDK. Where am I going wrong?

 

-Curtis



[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 944 posts
  • Corona SDK

If you have problems with your code, then the best way towards fixing them is by sharing said code.

 

All I can tell you now is to read documentation https://docs.coronalabs.com/plugin/pasteboard/index.html



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

  Best Answer

Go here:  https://marketplace.coronalabs.com/corona-plugins/pasteboard

Activate the plugin.

Click on the documentation link and follow the instructions there.

 

Rob



[TOPIC: post.html]
#4

curtistaplin

[GLOBAL: userInfoPane.html]
curtistaplin
  • Observer

  • 6 posts
  • Corona SDK

If you have problems with your code, then the best way towards fixing them is by sharing said code.

 

All I can tell you now is to read documentation https://docs.coronalabs.com/plugin/pasteboard/index.html

 

Here's my code I'm now getting an error which states:  '0 attempt to call nill value in function require main.lua 9

 

local pasteboard = require( "plugin.pasteboard" )
 
txtstring = "Test text string"
 
pasteboard.copy("string",txtstring)
 
Here are my build settings:
--
-- For more information on build.settings, see the Project Build Settings guide at:
--
 
settings =
{
orientation =
{
-- Supported values for orientation:
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
default = "portrait",
supported = { "portrait", },
},
 
--
-- Android section
--
android =
{
usesPermissions =
{
"android.permission.INTERNET",
},
},
 
settings =
{
    plugins =
    {
        ["plugin.pasteboard"] =
        {
            publisherId = "com.coronalabs",
        },
    },
}
 
--
-- iOS section
--
iphone =
{
xcassets = "Images.xcassets",
plist =
{
UIStatusBarHidden = false,
UILaunchStoryboardName = "LaunchScreen",
},
},
 
--
-- Plugins section
--
plugins =
{
 
},
 
--
-- Project section
--
excludeFiles =
{
-- Exclude unnecessary files for each platform
all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", },
android = { "LaunchScreen.storyboardc", },
},
}
 


[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,207 posts
  • Enterprise

Your build.settings file appears to be malformed. First, it's really hard to read it because you're not using code formatting. When posting code, click the blue <> button and paste the code in the popup window. Secondly, you may not be maintaining your indents in your text editor. It's really important with Lua nested tables that you use proper indention. It's almost impossible to figure out which opening curly brace goes with it's matching  closing curly brace.

 

You do also seem to have multiple "plugin" sub-tables; the last one blowing away the first reference, basically telling it to not load any plugins. You also seem to have a settings table inside the outside settings table.

 

A basic build.settings is something like this:

settings =
{
	orientation =
	{
		default = "portrait",
		supported = { "portrait", },
	},

	android =
	{
		usesPermissions =
		{
			"android.permission.INTERNET",
		},
	},

	iphone =
	{
		xcassets = "Images.xcassets",
		plist =
		{
			UILaunchStoryboardName = "LaunchScreen",
			UIStatusBarHidden = true,
		},
	},

	plugins =
	{
		["plugin.pasteboard"] =
		{
			publisherId = "com.coronalabs"
		},
	},

	excludeFiles =
	{
		-- Exclude unnecessary files for each platform
		all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", "*.psd"},
		android = { "LaunchScreen.storyboardc", },
	},
}

Notice how each sub-table is nicely indented and there is only one version of each sub-table. See how the curly braces line up to show you the content of each block. You probably can copy/paste this which I think has all of your elements in it.

 

Rob




[topic_controls]
[/topic_controls]