Broke Ruby User Defined ???


Recommended Posts

It seems something might be wrong with the height as the width works. But when I look at the macro formatting it looks the same other than width vs depth

image.thumb.png.a48ca24e73cffa93f457de1ae11c236e.png

Link to post
Share on other sites

I did not touch this, but noticed that FormatterDepthSixteenths and FormatterHeightSixteenths have the same code for obj.depth. So I did changed the FormatterHeightSixteenths to obj.height and now it gives me a valid number in the Expanded Macro Value field.

 

2.png

Link to post
Share on other sites

And now it is working... Chief may want to look into this. Maybe Height and Depth give the same result, but something went wrong only by me making a copy of the formattedHeightSixteenths macro

 

3.png

Link to post
Share on other sites

So I think I am all back to working again, but again, can anyone else verify that FormatterHeightSixteenths does in fact show obj.depth. I changed it to obj.height and now it is working.

Link to post
Share on other sites

Steven,

 

The first error was because you hadn't selected an object that had a width.  Nil Class indicates that there's no object to evaluate.

 

These macros supplied by Chief do not have "error handling" so they require that they reference only objects that have the attributes width or height.  That can also cause an error to occur.

 

When I create a macro I include "error handling" so that the macro will either:

  • report why it failed ---  example:  No Object Selected to Evaluate
  • or return simply a blank string
  • or return a value of zero

It depends on what the macro is supposed to do.  I try to anticipate what the user needs to see in order to know what to return.

  • Upvote 2
Link to post
Share on other sites
15 minutes ago, Joe_Carrick said:

Steven,

 

The first error was because you hadn't selected an object that had a width.  Nil Class indicates that there's no object to evaluate.

 

These macros supplied by Chief do not have "error handling" so they require that they reference only objects that have the attributes width or height.  That can also cause an error to occur.

 

When I create a macro I include "error handling" so that the macro will either:

  • report why it failed ---  example:  No Object Selected to Evaluate
  • or return simply a blank string
  • or return a value of zero

It depends on what the macro is supposed to do.  I try to anticipate what the user needs to see in order to know what to return.

Ah! I understand. Thank you

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Member Statistics

    29633
    Total Members
    9156
    Most Online
    prologuy
    Newest Member
    prologuy
    Joined