MikaelH Posted September 17, 2013 Report Posted September 17, 2013 Hi I can see at the Symbio home page there is a GOOP Developmente Suite v4.6 version! What's the news? 2013 support perhaps? regards Bjarne You should be able to download it from symbio.com/goop (on the lower right side) But I'm about to release GDS 4.7, this version should be downloadable in the end on this week. I'll keep you posted. GDS 4.6 don't have to many exciting stuff, other than 2013 compatible. GDS 4.7 have a 2013 bug fix and also property node creation (so you can access your object data through property nodes) Cheers, Mike Quote
MikaelH Posted September 19, 2013 Report Posted September 19, 2013 Here are the latest GDS builds http://goop.endevo.net/GDS/GDS_4.7(R1U)_2010.zip http://goop.endevo.net/GDS/GDS_4.7(R1U)_2010-64.zip http://goop.endevo.net/GDS/GDS_4.7(R1U)_2011.zip http://goop.endevo.net/GDS/GDS_4.7(R1U)_2011-64.zip http://goop.endevo.net/GDS/GDS_4.7(R1U)_2012.zip http://goop.endevo.net/GDS/GDS_4.7(R1U)_2012-64.zip http://goop.endevo.net/GDS/GDS_4.7(R1U)_2013.zip http://goop.endevo.net/GDS/GDS_4.7(R1U)_2013-64.zip If these pass the testing, we'll rename them and release them as GDS 4.7 Cheers, Mike 2 Quote
curiouspuya Posted September 30, 2013 Report Posted September 30, 2013 Thanks Mike!! Ill try your actor framework P Quote
burd Posted March 9, 2014 Report Posted March 9, 2014 I’m sure we’ll get interface sooner or later to LabVIEW, in the mean time we have to implement it ourselves in different ways. Here a thread and one example I use: http://lavag.org/topic/10621-interface/ I’ve not documented the Interface class template and how to use it, that comes with GDS. But here is a quick instruction, this design only makes sense to Referenced Objects. I1.png Add Interface Methods I5.png Create a Normal class that should implement the interface I2.png Add a design pattern: Interface I3.png This is what gets created I4.png I6.png Interface.zip Cheers, Mike Hello Mikael, I tried to use the interface the way you described, but I am getting an error (invalid reference) and I cannot figure out how to fix this. Could you give me a help with that? thanks Helcio GOOP DUCK.zip Quote
MikaelH Posted March 10, 2014 Report Posted March 10, 2014 I did a quick example where the Duck class implements the FlyBehaviour like this (see attached file) But for the design you are looking for, I would implement it like this: This soution does everthing you want. Why Interface is used in the design you are looking at (page 22 in Head First esign Patterns), because Interface exists in Java :-) Duck.zip Quote
burd Posted March 10, 2014 Report Posted March 10, 2014 I did a quick example where the Duck class implements the FlyBehaviour like this (see attached file)Interface1.png But for the design you are looking for, I would implement it like this: Interface2.png This soution does everthing you want. Why Interface is used in the design you are looking at (page 22 in Head First esign Patterns), because Interface exists in Java :-) Hi Mikael, I am trying to do the second solution indicated in the picture Interface2.png: The reference for the Duck class is invalid when the method PerformFly is executed, then I get the error 1556. How do I do this the right way? Thanks Helcio Duck2.zip Quote
burd Posted March 11, 2014 Report Posted March 11, 2014 I did a quick example where the Duck class implements the FlyBehaviour like this (see attached file) Interface1.png But for the design you are looking for, I would implement it like this: Interface2.png This soution does everthing you want. Why Interface is used in the design you are looking at (page 22 in Head First esign Patterns), because Interface exists in Java :-) Hi Mikael, I have been scratching my head...... I have been looking further into the 1556 error in the Duck Main.vi (attached) which claims that the reference is not valid. But if I clear this error, everything works just fine, as the reference refers to an object which exists in memory and the reference seems, therefore, to be perfectly valid: The error is generated just after it verifies if the reference is valid using the Not a Number/Patch/Reference function. I looked in the Help for this function and it says cannot be used to check for the validity of refnums created by Goop Wizard: Is this a bug in Goop? Thanks! Helcio Here is the Duck3.zip Quote
MikaelH Posted March 12, 2014 Report Posted March 12, 2014 Sorry for the late response. You are using by reference classes therefor you need to use the Create not just the Class Constant. Cheers, Mike 1 Quote
burd Posted March 12, 2014 Report Posted March 12, 2014 Hi Michael, That makes sense and everything works just fine now. Thanks! Quote
burd Posted March 27, 2014 Report Posted March 27, 2014 (edited) Hi Mikael, I built an observer pattern with Goop: I basically followed the Weather Station example in the Head First: design Patterns: I used the goop's interface template and the interface implement design pattern for the observers, but I think it would also work just fine using abstract class for rather than the interface. Here follow the the files (Observer Pattern GOOP.zip) and If you or anybody else have any comments, please, let me know. thanks Edited March 27, 2014 by burd Quote
burd Posted March 28, 2014 Report Posted March 28, 2014 (edited) Hi Mikael, I am trying to build the Starbuzz example in the Head First: Design patterns using Goop. I have had partial success and this vi works: However, something goes wrong when I want, for example, double soy or double mocha, etc. Could you help me to figure out what is going on? This is the project containing all classes and main vis: Decorator Patterm with GOOP.zip Thank You! Edited March 28, 2014 by burd Quote
MikaelH Posted March 30, 2014 Report Posted March 30, 2014 To start, have a look at my solution for the same example :-) It looks like you just forgot to set the Cost VI to reentrant. DecoratorPattern.zip 1 Quote
burd Posted March 31, 2014 Report Posted March 31, 2014 To start, have a look at my solution for the same example :-) StarbuzzCoffee.png It looks like you just forgot to set the Cost VI to reentrant. Reentrant.png Hi Mikael, Your solution is very elegant! I liked that the create vis can be used also to put constructors in it: and also I leked the way the class item icon in the project explorer mirrors the class hierarchy: blue for Beverage classes, red for condiment classes, frame for abstract classes and full for concrete classes: Thanks a lot for the solution! Helcio Quote
MikaelH Posted April 1, 2014 Report Posted April 1, 2014 It's nice that you like it. Here is another example form the same book. CommandPattern.zip 1 Quote
burd Posted May 22, 2014 Report Posted May 22, 2014 Hi Mikael, I am trying to build the abstract factory pattern with GOOP and I do not know how to check if an object reference is not empty in Labview. In JAVA this was done like this: How can I do this in labview? Quote
Tim_S Posted May 22, 2014 Report Posted May 22, 2014 If you're using the factory pattern... I expect you'd have flags in the object. The toString function would be an overloaded VI. However... this looks like the example for a decorator pattern. An example of both is at: https://decibel.ni.com/content/groups/large-labview-application-development/blog/2012/01/17/object-oriented-design-patterns-for-labview-that-can-make-your-life-easier Quote
MikaelH Posted May 22, 2014 Report Posted May 22, 2014 Hi Mikael, I am trying to build the abstract factory pattern with GOOP and I do not know how to check if an object reference is not empty in Labview. In JAVA this was done like this: How can I do this in labview? What class type are you using? If it's a GOOP3 type, you can use the Utility VIs (under Addons->GOOP Utility) GOOPUtil_IsValidReference.vi Quote
burd Posted May 30, 2014 Report Posted May 30, 2014 (edited) Hi Mikael, I have just read the post, thanks for the tip! The GOOPUtil_IsValidReference.vi is exactly what I need but unfortunately I use Goop4 classes Is there anything for goop4? regards Edited May 30, 2014 by burd Quote
MikaelH Posted June 4, 2014 Report Posted June 4, 2014 (edited) I'm working on it, you can try this solution, it looks likes it works in 2012 at least. But I'm not sure if it should work, we better ask NI. Make sure you convert the number string to U32, not I32 that is the default Cheers, Mike Edited June 4, 2014 by MikaelH Quote
MikaelH Posted June 4, 2014 Report Posted June 4, 2014 ...but don't try this, it crashes my LabVIEW (2012P1f5) Quote
burd Posted June 5, 2014 Report Posted June 5, 2014 Hi Mikael, I have completed the abstract factory pattern. I am sending attached for anyone to look and comment. I realized that I actually do not need to know the reference to a class is empty. If the class wasn't instantiated, the abstract method parent class executes (in the method toString in Pizza.class, the parent method of classes Sauce, Cheese, Dough, etc will be called in case these classes were not instantiated) resulting an empty string. Would be nice to have the tool to know of the class was instantiated, but I prefer to wait until you to complete the Utilities for goop 4 classes, looks complicated. The files are at https://decibel.ni.com/content/message/75586#75586 because they are too big to upload here. regards Helcio Quote
burd Posted June 5, 2014 Report Posted June 5, 2014 Missing classLogMessage.png Try to install the VIPC file again (https://decibel.ni.com/content/message/75586#75586), something went wrong with the previous upload. I updated it, now should be fine.. Quote
drjdpowell Posted June 7, 2014 Report Posted June 7, 2014 How can I do this in labview? An ‘empty’ object in LabVIEW is just the default constant of that wire type. So you can just ask if your ‘Dough’ is not equal to the default ‘Dough’ constant. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.