Jump to content

GOOP Development Suite v4.5 is released


Recommended Posts

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

Link to comment
  • 2 weeks later...
  • 5 months later...

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.

 

attachicon.gifI1.png

 

Add Interface Methods

attachicon.gifI5.png

 

Create a Normal class that should implement the interface

attachicon.gifI2.png

 

Add a design pattern: Interface

attachicon.gifI3.png

 

This is what gets created

attachicon.gifI4.png

attachicon.gifI6.png

 

attachicon.gifInterface.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?

post-15546-0-78121800-1394389983_thumb.p

 

thanks

 

Helcio

GOOP DUCK.zip

Link to comment

I did a quick example where the Duck class implements the FlyBehaviour like this (see attached file)

post-941-0-78041600-1394412354.png

 

But for the design you are looking for, I would implement it like this:

post-941-0-27895700-1394412365_thumb.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 :-)

 

 

 

Duck.zip

Link to comment
I did a quick example where the Duck class implements the FlyBehaviour like this (see attached file)

attachicon.gifInterface1.png

 

But for the design you are looking for, I would implement it like this:

attachicon.gifInterface2.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:

 

post-15546-0-21769700-1394478882_thumb.p

 

 

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

Link to comment

I did a quick example where the Duck class implements the FlyBehaviour like this (see attached file)

attachicon.gifInterface1.png

 

But for the design you are looking for, I would implement it like this:

attachicon.gifInterface2.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:

 

post-15546-0-47367900-1394560154_thumb.p

 

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:

 

post-15546-0-82180000-1394560062_thumb.p

 

 Is this a bug in Goop?

 

Thanks!

 

Helcio

 

Here is the

Duck3.zip

Link to comment
  • 2 weeks later...

Hi Mikael,

 

I built an observer pattern with Goop:

post-15546-0-30509000-1395961492_thumb.p

I basically followed the Weather Station example in the Head First: design Patterns:

post-15546-0-33220300-1395960890_thumb.p

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 by burd
Link to comment

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:

 

post-15546-0-29153400-1396045833_thumb.p

 

However, something goes wrong when I want, for example, double soy or double mocha, etc.

 

post-15546-0-48887200-1396045851_thumb.p

 

 

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 by burd
Link to comment

To start, have a look at my solution for the same example :-)

attachicon.gifStarbuzzCoffee.png

It looks like you just forgot to set the Cost VI to reentrant.

attachicon.gifReentrant.png

Hi Mikael,

 

Your solution is very elegant!

 

I liked that the create vis can be used also to put constructors in it:

 

post-15546-0-96676100-1396305984_thumb.p

 

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:

 

post-15546-0-91366800-1396306098.png

 

Thanks a lot for the solution!

 

 

Helcio

Link to comment
  • 1 month later...

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:


post-15546-0-21293300-1400782570_thumb.p

 

How can I do this in labview?

Link to comment

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

Link to comment
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

Link to comment
  • 2 weeks later...

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 by burd
Link to comment

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

post-941-0-03556800-1401845445_thumb.png

Cheers,

Mike

Edited by MikaelH
Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.