Subscribe Bookmark RSS Feed

CloneBox. Strange behavior with Number Edit Box.

Phil_Brown

Super User

Joined:

Mar 20, 2012

 

In JMP 12/13, when I clone a Number Edit Box, it somehow loses the ability to process the " << get " message, and instead responds to " << getText ". Seems like its behaving as Text Edit Box, although it's class name remains as Number Edit Box. See Below for JMP Log. Is this a bug? or by design?

 

 

 


//:*/
Names Default To Here( 1 );
New Window( "Example", numbox = Number Edit Box( 0 ) );
Print( numbox << Get );

/*:
0


//:*/
clbx = numbox << cloneBox;
clbx << get;

/*:
The display box 'NumberEditBox' does not recognize the message 'get'; perhaps you mean one of these: <<Get XML <<Get RTF <<Get HTML <<Get Text <<Next <<Parent <<Select <<Delete <<Get Journal <<Get Script <<Get Picture <<Get Window ID <<GetOffset <<Get Size <<Get Min Size <<Get Max Size <<Get Width <<Get Height <<Get Property <<Get Property.


//:*/
clbx << getText;

/*:
"0"

 

 

PDB
2 REPLIES
Craige_Hales

Staff

Joined:

Mar 21, 2013

Thanks, looks like it needs some TLC. The behavior you observed makes journals freeze the value of a report's editable field into a non editable field. The cloned result is a base class of the numEdit and, even though it still claims to be a numEdit, it is missing some of the numEdit's specialization. I'll see what I can do.

If you need a workaround, I think you'll have to make a new NumberEditBox and copy the value from the old one. There appears to be no way to turn the clone into a full NumberEditBox.

Craige
Phil_Brown

Super User

Joined:

Mar 20, 2012

Ok, thanks Craig. So, is it that all non-graphics content in a journal are strings?

Yes, so I'm using clone box to "save" the state of various displayboxes to display elsewhere. I ended up just using Num() to re-instate those affected.
PDB