CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 16, 2018, 14:37:44 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Copying and pasting a MOP problem  (Read 1040 times)
GeoffreyGRoy
Storm Trooper
***
Offline Offline

Posts: 151


View Profile
« on: August 26, 2018, 08:40:55 am »

I have a problem with my Slotter MOP (and I think the same problem occurs with the VEngrave MOP).  I have not been able to correctly implement the Copy/Paste functions and I get an assembly error (see attached image).

Has any one been able to do this correctly?  Help would be appreciated.

thanks
Geoff

Here is the source for Slotter (without CamBam libs)


* PasteError.jpg (12.46 KB, 349x147 - viewed 39 times.)
* SlotterSource.zip (56.55 KB - downloaded 29 times.)
« Last Edit: August 29, 2018, 14:14:04 pm by GeoffreyGRoy » Logged
dave benson
CNC Jedi
*****
Offline Offline

Posts: 1010


View Profile
« Reply #1 on: August 26, 2018, 12:59:30 pm »

Hi Geoff
You need to target  .net 4.5 for CB ver1
I tried a copying and pasting few other plugins including my own.
I couldn't find the source code so couldn't check out any further.

Dave


* copy n paste.PNG (19.24 KB, 399x267 - viewed 25 times.)
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 5214



View Profile WWW
« Reply #2 on: August 26, 2018, 18:52:48 pm »

Hello

The trocho pocket plugin seems to works well with copy/paste and copy/paste format ; maybe jk can help, or you can have a look on the source code.

http://www.cambam.co.uk/forum/index.php?topic=6209.0

I seems that something has changed on 1.0, because copy/paste that worked on 0.98 no longer works on 1.0

++
David
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3659



View Profile
« Reply #3 on: August 26, 2018, 19:59:57 pm »

My bet is it's something to do with serialisation, I know very little about it but jk is the man.
Logged
GeoffreyGRoy
Storm Trooper
***
Offline Offline

Posts: 151


View Profile
« Reply #4 on: August 28, 2018, 09:45:13 am »

Thanks for the tips, I will follow up with JK.

Geoff
Logged
jk
Wookie
****
Offline Offline

Posts: 261


View Profile
« Reply #5 on: August 30, 2018, 02:54:01 am »

Hi

Please see attached .cs file with fixes, copypaste is working now.

Error was in logger instance of MOPSlotter class. It shouldn't be serialized but is was since whole MOP class is marked as serializeable. I've marked it with [NonSerialized] attribute.

I've made a few small fixes too:
SlotterPlugin class should really be static (no reason to have a several plugin instances).
Whole Logger class shouldn't be marked as serializeable.
Hack with priming the XML serializer () may be done just once at plugin init.

* SlotterPlugin.cs.zip (6.22 KB - downloaded 23 times.)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.119 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap